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