Chris@909:
Chris@909: <% if @editable %> Chris@909: <%= 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: <%= watcher_tag(@page, User.current) %> Chris@909: <%= 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: <%= 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: <%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') if @content.current_version? %> Chris@909: <%= 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: <%= 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: <% end %> Chris@909: <%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %> Chris@909:
Chris@909: Chris@909: <%= wiki_page_breadcrumb(@page) %> Chris@909: Chris@909: <% unless @content.current_version? %> Chris@909:

Chris@909: <%= link_to(("\xc2\xab " + l(:label_previous)), Chris@909: :action => 'show', :id => @page.title, :project_id => @page.project, Chris@909: :version => (@content.version - 1)) + " - " if @content.version > 1 %> Chris@909: <%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %> Chris@909: <%= '(' + link_to(l(:label_diff), :controller => 'wiki', :action => 'diff', Chris@909: :id => @page.title, :project_id => @page.project, Chris@909: :version => @content.version) + ')' if @content.version > 1 %> - Chris@909: <%= link_to((l(:label_next) + " \xc2\xbb"), :action => 'show', Chris@909: :id => @page.title, :project_id => @page.project, Chris@909: :version => (@content.version + 1)) + " - " if @content.version < @page.content.version %> Chris@909: <%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project) %> Chris@909:
Chris@909: <%= @content.author ? link_to_user(@content.author) : l(:label_user_anonymous) Chris@909: %>, <%= format_time(@content.updated_on) %>
Chris@909: <%=h @content.comments %> Chris@909:

Chris@909:
Chris@909: <% end %> Chris@909: Chris@909: <%= render(:partial => "wiki/content", :locals => {:content => @content}) %> Chris@909: Chris@909: <%= link_to_attachments @page %> Chris@909: Chris@909: <% if @editable && authorize_for('wiki', 'add_attachment') %> Chris@909:
Chris@909:

<%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;", Chris@909: :id => 'attach_files_link' %>

Chris@909: <% 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:
Chris@909:

<%= render :partial => 'attachments/form' %>

Chris@909:
Chris@909: <%= submit_tag l(:button_add) %> Chris@909: <%= link_to l(:button_cancel), {}, :onclick => "Element.hide('add_attachment_form'); Element.show('attach_files_link'); return false;" %> Chris@909: <% end %> Chris@909:
Chris@909: <% end %> Chris@909: Chris@909: <% other_formats_links do |f| %> Chris@909: <%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %> Chris@909: <%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %> Chris@909: <%= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %> Chris@909: <% end if User.current.allowed_to?(:export_wiki_pages, @project) %> Chris@909: Chris@909: <% content_for :header_tags do %> Chris@909: <%= stylesheet_link_tag 'scm' %> Chris@909: <% end %> Chris@909: Chris@909: <% content_for :sidebar do %> Chris@909: <%= render :partial => 'sidebar' %> Chris@909: <% end %> Chris@909: Chris@909: <% html_title @page.pretty_title %>