annotate app/views/wiki/show.html.erb @ 1327:287f201c2802 redmine-2.2-integration

Add italic
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Wed, 19 Jun 2013 20:56:22 +0100
parents 433d4f72a19b
children 622f24f53b42 261b3d9a4903
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@1115 5 <%= watcher_tag(@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@909 20 <p>
Chris@909 21 <%= link_to(("\xc2\xab " + l(:label_previous)),
Chris@909 22 :action => 'show', :id => @page.title, :project_id => @page.project,
Chris@1115 23 :version => @content.previous.version) + " - " if @content.previous %>
Chris@0 24 <%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %>
Chris@1115 25 <%= '('.html_safe + link_to(l(:label_diff), :controller => 'wiki', :action => 'diff',
Chris@909 26 :id => @page.title, :project_id => @page.project,
Chris@1115 27 :version => @content.version) + ')'.html_safe if @content.previous %> -
Chris@909 28 <%= link_to((l(:label_next) + " \xc2\xbb"), :action => 'show',
Chris@909 29 :id => @page.title, :project_id => @page.project,
Chris@1115 30 :version => @content.next.version) + " - " if @content.next %>
Chris@1115 31 <%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project, :version => nil) %>
Chris@0 32 <br />
Chris@909 33 <em><%= @content.author ? link_to_user(@content.author) : l(:label_user_anonymous)
Chris@909 34 %>, <%= format_time(@content.updated_on) %> </em><br />
Chris@0 35 <%=h @content.comments %>
Chris@0 36 </p>
Chris@0 37 <hr />
Chris@0 38 <% end %>
Chris@0 39
Chris@0 40 <%= render(:partial => "wiki/content", :locals => {:content => @content}) %>
Chris@0 41
Chris@0 42 <%= link_to_attachments @page %>
Chris@0 43
Chris@0 44 <% if @editable && authorize_for('wiki', 'add_attachment') %>
Chris@0 45 <div id="wiki_add_attachment">
Chris@1115 46 <p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;",
Chris@0 47 :id => 'attach_files_link' %></p>
Chris@1115 48 <%= form_tag({:controller => 'wiki', :action => 'add_attachment',
Chris@1115 49 :project_id => @project, :id => @page.title},
Chris@1115 50 :multipart => true, :id => "add_attachment_form",
Chris@1115 51 :style => "display:none;") do %>
Chris@0 52 <div class="box">
Chris@0 53 <p><%= render :partial => 'attachments/form' %></p>
Chris@0 54 </div>
Chris@0 55 <%= submit_tag l(:button_add) %>
Chris@1115 56 <%= link_to l(:button_cancel), {}, :onclick => "$('#add_attachment_form').hide(); return false;" %>
Chris@0 57 <% end %>
Chris@0 58 </div>
Chris@0 59 <% end %>
Chris@0 60
Chris@0 61 <% other_formats_links do |f| %>
Chris@909 62 <%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
Chris@909 63 <%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %>
Chris@909 64 <%= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %>
Chris@0 65 <% end if User.current.allowed_to?(:export_wiki_pages, @project) %>
Chris@0 66
Chris@0 67 <% content_for :sidebar do %>
Chris@0 68 <%= render :partial => 'sidebar' %>
Chris@0 69 <% end %>
Chris@0 70
Chris@0 71 <% html_title @page.pretty_title %>