annotate app/views/wiki/show.html.erb @ 1519:afce8026aaeb redmine-2.4-integration

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