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