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