@@ -1,87 +1,80 | |||||
1 | <div class="contextual"> |
|
1 | <div class="contextual"> | |
2 | <% if @editable && @content.current_version? %> |
|
2 | <% if User.current.allowed_to?(:edit_wiki_pages, @project) %> | |
3 | <%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %> |
|
3 | <%= link_to l(:label_wiki_page_new), new_project_wiki_page_path(@project), :remote => true, :class => 'icon icon-add' %> | |
4 |
|
|
4 | <% end %> | |
5 | <%= watcher_link(@page, User.current) %> |
|
|||
6 | <span class="drdn"> |
|
|||
7 | <span class="drdn-trigger">Hello</span> |
|
|||
8 | <div class="drdn-content drdn-items"> |
|
|||
9 | <% if @editable %> |
|
5 | <% if @editable %> | |
10 | <% if @content.current_version? %> |
|
6 | <% if @content.current_version? %> | |
|
7 | <%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %> | |||
|
8 | <%= watcher_link(@page, User.current) %> | |||
11 | <%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %> |
|
9 | <%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %> | |
12 | <%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %> |
|
10 | <%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %> | |
13 | <%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') %> |
|
11 | <%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') %> | |
14 | <%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :class => 'icon icon-del') %> |
|
12 | <%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :class => 'icon icon-del') %> | |
15 | <% else %> |
|
13 | <% else %> | |
16 | <%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') %> |
|
14 | <%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') %> | |
17 | <% end %> |
|
15 | <% end %> | |
18 | <% end %> |
|
16 | <% end %> | |
19 | <%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %> |
|
17 | <%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %> | |
20 | <% if User.current.allowed_to?(:edit_wiki_pages, @project) %> |
|
|||
21 | <%= link_to l(:label_wiki_page_new), new_project_wiki_page_path(@project), :remote => true, :class => 'icon icon-add' %> |
|
|||
22 | <% end %> |
|
|||
23 | </div> |
|
|||
24 | </span> |
|
|||
25 | </div> |
|
18 | </div> | |
26 |
|
19 | |||
27 | <%= wiki_page_breadcrumb(@page) %> |
|
20 | <%= wiki_page_breadcrumb(@page) %> | |
28 |
|
21 | |||
29 | <% unless @content.current_version? %> |
|
22 | <% unless @content.current_version? %> | |
30 | <%= title [@page.pretty_title, project_wiki_page_path(@page.project, @page.title, :version => nil)], |
|
23 | <%= title [@page.pretty_title, project_wiki_page_path(@page.project, @page.title, :version => nil)], | |
31 | [l(:label_history), history_project_wiki_page_path(@page.project, @page.title)], |
|
24 | [l(:label_history), history_project_wiki_page_path(@page.project, @page.title)], | |
32 | "#{l(:label_version)} #{@content.version}" %> |
|
25 | "#{l(:label_version)} #{@content.version}" %> | |
33 |
|
26 | |||
34 | <p> |
|
27 | <p> | |
35 | <%= link_to(("\xc2\xab " + l(:label_previous)), |
|
28 | <%= link_to(("\xc2\xab " + l(:label_previous)), | |
36 | :action => 'show', :id => @page.title, :project_id => @page.project, |
|
29 | :action => 'show', :id => @page.title, :project_id => @page.project, | |
37 | :version => @content.previous.version) + " - " if @content.previous %> |
|
30 | :version => @content.previous.version) + " - " if @content.previous %> | |
38 | <%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %> |
|
31 | <%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %> | |
39 | <%= '('.html_safe + link_to(l(:label_diff), :controller => 'wiki', :action => 'diff', |
|
32 | <%= '('.html_safe + link_to(l(:label_diff), :controller => 'wiki', :action => 'diff', | |
40 | :id => @page.title, :project_id => @page.project, |
|
33 | :id => @page.title, :project_id => @page.project, | |
41 | :version => @content.version) + ')'.html_safe if @content.previous %> - |
|
34 | :version => @content.version) + ')'.html_safe if @content.previous %> - | |
42 | <%= link_to((l(:label_next) + " \xc2\xbb"), :action => 'show', |
|
35 | <%= link_to((l(:label_next) + " \xc2\xbb"), :action => 'show', | |
43 | :id => @page.title, :project_id => @page.project, |
|
36 | :id => @page.title, :project_id => @page.project, | |
44 | :version => @content.next.version) + " - " if @content.next %> |
|
37 | :version => @content.next.version) + " - " if @content.next %> | |
45 | <%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project, :version => nil) %> |
|
38 | <%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project, :version => nil) %> | |
46 | <br /> |
|
39 | <br /> | |
47 | <em><%= @content.author ? link_to_user(@content.author) : l(:label_user_anonymous) |
|
40 | <em><%= @content.author ? link_to_user(@content.author) : l(:label_user_anonymous) | |
48 | %>, <%= format_time(@content.updated_on) %> </em><br /> |
|
41 | %>, <%= format_time(@content.updated_on) %> </em><br /> | |
49 | <%= @content.comments %> |
|
42 | <%= @content.comments %> | |
50 | </p> |
|
43 | </p> | |
51 | <hr /> |
|
44 | <hr /> | |
52 | <% end %> |
|
45 | <% end %> | |
53 |
|
46 | |||
54 | <%= render(:partial => "wiki/content", :locals => {:content => @content}) %> |
|
47 | <%= render(:partial => "wiki/content", :locals => {:content => @content}) %> | |
55 |
|
48 | |||
56 | <fieldset class="collapsible collapsed"> |
|
49 | <fieldset class="collapsible collapsed"> | |
57 | <legend onclick="toggleFieldset(this);"><%= l(:label_attachment_plural) %></legend> |
|
50 | <legend onclick="toggleFieldset(this);"><%= l(:label_attachment_plural) %></legend> | |
58 | <div style="display: none;"> |
|
51 | <div style="display: none;"> | |
59 |
|
52 | |||
60 | <%= link_to_attachments @page, :thumbnails => true %> |
|
53 | <%= link_to_attachments @page, :thumbnails => true %> | |
61 |
|
54 | |||
62 | <% if @editable && authorize_for('wiki', 'add_attachment') %> |
|
55 | <% if @editable && authorize_for('wiki', 'add_attachment') %> | |
63 | <div id="wiki_add_attachment"> |
|
56 | <div id="wiki_add_attachment"> | |
64 | <%= form_tag({:controller => 'wiki', :action => 'add_attachment', |
|
57 | <%= form_tag({:controller => 'wiki', :action => 'add_attachment', | |
65 | :project_id => @project, :id => @page.title}, |
|
58 | :project_id => @project, :id => @page.title}, | |
66 | :multipart => true, :id => "add_attachment_form") do %> |
|
59 | :multipart => true, :id => "add_attachment_form") do %> | |
67 | <div class="box"> |
|
60 | <div class="box"> | |
68 | <p><%= render :partial => 'attachments/form' %></p> |
|
61 | <p><%= render :partial => 'attachments/form' %></p> | |
69 | </div> |
|
62 | </div> | |
70 | <%= submit_tag l(:button_add) %> |
|
63 | <%= submit_tag l(:button_add) %> | |
71 | <% end %> |
|
64 | <% end %> | |
72 | </div> |
|
65 | </div> | |
73 | <% end %> |
|
66 | <% end %> | |
74 | </div> |
|
67 | </div> | |
75 | </fieldset> |
|
68 | </fieldset> | |
76 |
|
69 | |||
77 | <% other_formats_links do |f| %> |
|
70 | <% other_formats_links do |f| %> | |
78 | <%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %> |
|
71 | <%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %> | |
79 | <%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %> |
|
72 | <%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %> | |
80 | <%= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %> |
|
73 | <%= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %> | |
81 | <% end if User.current.allowed_to?(:export_wiki_pages, @project) %> |
|
74 | <% end if User.current.allowed_to?(:export_wiki_pages, @project) %> | |
82 |
|
75 | |||
83 | <% content_for :sidebar do %> |
|
76 | <% content_for :sidebar do %> | |
84 | <%= render :partial => 'sidebar' %> |
|
77 | <%= render :partial => 'sidebar' %> | |
85 | <% end %> |
|
78 | <% end %> | |
86 |
|
79 | |||
87 | <% html_title @page.pretty_title %> |
|
80 | <% html_title @page.pretty_title %> |
General Comments 0
You need to be logged in to leave comments.
Login now