@@ -1,68 +1,71 | |||||
1 | <div class="contextual"> |
|
1 | <div class="contextual"> | |
2 | <% if @editable %> |
|
2 | <% if @editable %> | |
3 | <%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) if @content.current_version? %> |
|
3 | <% if @content.current_version? %> | |
4 | <%= watcher_tag(@page, User.current) %> |
|
4 | <%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %> | |
5 | <%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %> |
|
5 | <%= watcher_tag(@page, User.current) %> | |
6 |
<%= link_to_if_authorized(l(:button_ |
|
6 | <%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %> | |
7 |
<%= link_to_if_authorized(l(:button_ |
|
7 | <%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %> | |
8 |
<%= link_to_if_authorized(l(:button_ |
|
8 | <%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') %> | |
9 |
<%= link_to_if_authorized(l(:button_ |
|
9 | <%= 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') %> | |
|
10 | <% else %> | |||
|
11 | <%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') %> | |||
|
12 | <% end %> | |||
10 | <% end %> |
|
13 | <% end %> | |
11 | <%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %> |
|
14 | <%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %> | |
12 | </div> |
|
15 | </div> | |
13 |
|
16 | |||
14 | <%= wiki_page_breadcrumb(@page) %> |
|
17 | <%= wiki_page_breadcrumb(@page) %> | |
15 |
|
18 | |||
16 | <% unless @content.current_version? %> |
|
19 | <% unless @content.current_version? %> | |
17 | <p> |
|
20 | <p> | |
18 | <%= link_to(("\xc2\xab " + l(:label_previous)), |
|
21 | <%= link_to(("\xc2\xab " + l(:label_previous)), | |
19 | :action => 'show', :id => @page.title, :project_id => @page.project, |
|
22 | :action => 'show', :id => @page.title, :project_id => @page.project, | |
20 | :version => @content.previous.version) + " - " if @content.previous %> |
|
23 | :version => @content.previous.version) + " - " if @content.previous %> | |
21 | <%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %> |
|
24 | <%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %> | |
22 | <%= '('.html_safe + link_to(l(:label_diff), :controller => 'wiki', :action => 'diff', |
|
25 | <%= '('.html_safe + link_to(l(:label_diff), :controller => 'wiki', :action => 'diff', | |
23 | :id => @page.title, :project_id => @page.project, |
|
26 | :id => @page.title, :project_id => @page.project, | |
24 | :version => @content.version) + ')'.html_safe if @content.previous %> - |
|
27 | :version => @content.version) + ')'.html_safe if @content.previous %> - | |
25 | <%= link_to((l(:label_next) + " \xc2\xbb"), :action => 'show', |
|
28 | <%= link_to((l(:label_next) + " \xc2\xbb"), :action => 'show', | |
26 | :id => @page.title, :project_id => @page.project, |
|
29 | :id => @page.title, :project_id => @page.project, | |
27 | :version => @content.next.version) + " - " if @content.next %> |
|
30 | :version => @content.next.version) + " - " if @content.next %> | |
28 | <%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project) %> |
|
31 | <%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project) %> | |
29 | <br /> |
|
32 | <br /> | |
30 | <em><%= @content.author ? link_to_user(@content.author) : l(:label_user_anonymous) |
|
33 | <em><%= @content.author ? link_to_user(@content.author) : l(:label_user_anonymous) | |
31 | %>, <%= format_time(@content.updated_on) %> </em><br /> |
|
34 | %>, <%= format_time(@content.updated_on) %> </em><br /> | |
32 | <%=h @content.comments %> |
|
35 | <%=h @content.comments %> | |
33 | </p> |
|
36 | </p> | |
34 | <hr /> |
|
37 | <hr /> | |
35 | <% end %> |
|
38 | <% end %> | |
36 |
|
39 | |||
37 | <%= render(:partial => "wiki/content", :locals => {:content => @content}) %> |
|
40 | <%= render(:partial => "wiki/content", :locals => {:content => @content}) %> | |
38 |
|
41 | |||
39 | <%= link_to_attachments @page %> |
|
42 | <%= link_to_attachments @page %> | |
40 |
|
43 | |||
41 | <% if @editable && authorize_for('wiki', 'add_attachment') %> |
|
44 | <% if @editable && authorize_for('wiki', 'add_attachment') %> | |
42 | <div id="wiki_add_attachment"> |
|
45 | <div id="wiki_add_attachment"> | |
43 | <p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;", |
|
46 | <p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;", | |
44 | :id => 'attach_files_link' %></p> |
|
47 | :id => 'attach_files_link' %></p> | |
45 | <%= form_tag({:controller => 'wiki', :action => 'add_attachment', |
|
48 | <%= form_tag({:controller => 'wiki', :action => 'add_attachment', | |
46 | :project_id => @project, :id => @page.title}, |
|
49 | :project_id => @project, :id => @page.title}, | |
47 | :multipart => true, :id => "add_attachment_form", |
|
50 | :multipart => true, :id => "add_attachment_form", | |
48 | :style => "display:none;") do %> |
|
51 | :style => "display:none;") do %> | |
49 | <div class="box"> |
|
52 | <div class="box"> | |
50 | <p><%= render :partial => 'attachments/form' %></p> |
|
53 | <p><%= render :partial => 'attachments/form' %></p> | |
51 | </div> |
|
54 | </div> | |
52 | <%= submit_tag l(:button_add) %> |
|
55 | <%= submit_tag l(:button_add) %> | |
53 | <%= link_to l(:button_cancel), {}, :onclick => "$('#add_attachment_form').hide(); return false;" %> |
|
56 | <%= link_to l(:button_cancel), {}, :onclick => "$('#add_attachment_form').hide(); return false;" %> | |
54 | <% end %> |
|
57 | <% end %> | |
55 | </div> |
|
58 | </div> | |
56 | <% end %> |
|
59 | <% end %> | |
57 |
|
60 | |||
58 | <% other_formats_links do |f| %> |
|
61 | <% other_formats_links do |f| %> | |
59 | <%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %> |
|
62 | <%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %> | |
60 | <%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %> |
|
63 | <%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %> | |
61 | <%= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %> |
|
64 | <%= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %> | |
62 | <% end if User.current.allowed_to?(:export_wiki_pages, @project) %> |
|
65 | <% end if User.current.allowed_to?(:export_wiki_pages, @project) %> | |
63 |
|
66 | |||
64 | <% content_for :sidebar do %> |
|
67 | <% content_for :sidebar do %> | |
65 | <%= render :partial => 'sidebar' %> |
|
68 | <%= render :partial => 'sidebar' %> | |
66 | <% end %> |
|
69 | <% end %> | |
67 |
|
70 | |||
68 | <% html_title @page.pretty_title %> |
|
71 | <% html_title @page.pretty_title %> |
General Comments 0
You need to be logged in to leave comments.
Login now