Chris@1464:
Chris@1464: <% if @editable %> Chris@1464: <% if @content.current_version? %> Chris@1464: <%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %> Chris@1464: <%= watcher_link(@page, User.current) %> Chris@1464: <%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %> Chris@1464: <%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %> Chris@1464: <%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') %> Chris@1464: <%= 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@1464: <% else %> Chris@1464: <%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') %> Chris@1464: <% end %> Chris@1464: <% end %> Chris@1464: <%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %> Chris@1464:
Chris@1464: Chris@1464: <%= wiki_page_breadcrumb(@page) %> Chris@1464: Chris@1464: <% unless @content.current_version? %> Chris@1464: <%= title [@page.pretty_title, project_wiki_page_path(@page.project, @page.title, :version => nil)], Chris@1464: [l(:label_history), history_project_wiki_page_path(@page.project, @page.title)], Chris@1464: "#{l(:label_version)} #{@content.version}" %> Chris@1464: Chris@1464:

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

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

<%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;", Chris@1464: :id => 'attach_files_link' %>

Chris@1464: <%= form_tag({:controller => 'wiki', :action => 'add_attachment', Chris@1464: :project_id => @project, :id => @page.title}, Chris@1464: :multipart => true, :id => "add_attachment_form", Chris@1464: :style => "display:none;") do %> Chris@1464:
Chris@1464:

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

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