annotate app/views/wiki/show.html.erb @ 929:5f33065ddc4b redmine-1.3

Update to Redmine SVN rev 9414 on 1.3-stable branch
author Chris Cannam
date Wed, 27 Jun 2012 14:54:18 +0100
parents cbb26bc654de
children 433d4f72a19b
rev   line source
Chris@0 1 <div class="contextual">
Chris@0 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@0 4 <%= watcher_tag(@page, User.current) %>
chris@37 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@37 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@37 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@0 10 <% end %>
chris@37 11 <%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
Chris@0 12 </div>
Chris@0 13
Chris@909 14 <%= wiki_page_breadcrumb(@page) %>
Chris@0 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@0 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@37 28 <%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project) %>
Chris@0 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@0 32 <%=h @content.comments %>
Chris@0 33 </p>
Chris@0 34 <hr />
Chris@0 35 <% end %>
Chris@0 36
Chris@0 37 <%= render(:partial => "wiki/content", :locals => {:content => @content}) %>
Chris@0 38
Chris@0 39 <%= link_to_attachments @page %>
Chris@0 40
Chris@0 41 <% if @editable && authorize_for('wiki', 'add_attachment') %>
Chris@0 42 <div id="wiki_add_attachment">
Chris@0 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@0 44 :id => 'attach_files_link' %></p>
chris@37 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@0 46 <div class="box">
Chris@0 47 <p><%= render :partial => 'attachments/form' %></p>
Chris@0 48 </div>
Chris@0 49 <%= submit_tag l(:button_add) %>
Chris@0 50 <%= link_to l(:button_cancel), {}, :onclick => "Element.hide('add_attachment_form'); Element.show('attach_files_link'); return false;" %>
Chris@0 51 <% end %>
Chris@0 52 </div>
Chris@0 53 <% end %>
Chris@0 54
Chris@0 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@0 59 <% end if User.current.allowed_to?(:export_wiki_pages, @project) %>
Chris@0 60
Chris@0 61 <% content_for :header_tags do %>
Chris@0 62 <%= stylesheet_link_tag 'scm' %>
Chris@0 63 <% end %>
Chris@0 64
Chris@0 65 <% content_for :sidebar do %>
Chris@0 66 <%= render :partial => 'sidebar' %>
Chris@0 67 <% end %>
Chris@0 68
Chris@0 69 <% html_title @page.pretty_title %>