annotate app/views/wiki/.svn/text-base/show.rhtml.svn-base @ 0:513646585e45

* Import Redmine trunk SVN rev 3859
author Chris Cannam
date Fri, 23 Jul 2010 15:52:44 +0100
parents
children 94944d00e43c
rev   line source
Chris@0 1 <div class="contextual">
Chris@0 2 <% if @editable %>
Chris@0 3 <%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :page => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) if @content.version == @page.content.version %>
Chris@0 4 <%= watcher_tag(@page, User.current) %>
Chris@0 5 <%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :page => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %>
Chris@0 6 <%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :page => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %>
Chris@0 7 <%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :page => @page.title}, :class => 'icon icon-move') if @content.version == @page.content.version %>
Chris@0 8 <%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :page => @page.title}, :method => :post, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') %>
Chris@0 9 <%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :page => @page.title, :version => @content.version }, :class => 'icon icon-cancel') if @content.version < @page.content.version %>
Chris@0 10 <% end %>
Chris@0 11 <%= link_to_if_authorized(l(:label_history), {:action => 'history', :page => @page.title}, :class => 'icon icon-history') %>
Chris@0 12 </div>
Chris@0 13
Chris@0 14 <%= breadcrumb(@page.ancestors.reverse.collect {|parent| link_to h(parent.pretty_title), {:page => parent.title}}) %>
Chris@0 15
Chris@0 16 <% if @content.version != @page.content.version %>
Chris@0 17 <p>
Chris@0 18 <%= link_to(('&#171; ' + l(:label_previous)), :action => 'index', :page => @page.title, :version => (@content.version - 1)) + " - " if @content.version > 1 %>
Chris@0 19 <%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %>
Chris@0 20 <%= '(' + link_to('diff', :controller => 'wiki', :action => 'diff', :page => @page.title, :version => @content.version) + ')' if @content.version > 1 %> -
Chris@0 21 <%= link_to((l(:label_next) + ' &#187;'), :action => 'index', :page => @page.title, :version => (@content.version + 1)) + " - " if @content.version < @page.content.version %>
Chris@0 22 <%= link_to(l(:label_current_version), :action => 'index', :page => @page.title) %>
Chris@0 23 <br />
Chris@0 24 <em><%= @content.author ? @content.author.name : "anonyme" %>, <%= format_time(@content.updated_on) %> </em><br />
Chris@0 25 <%=h @content.comments %>
Chris@0 26 </p>
Chris@0 27 <hr />
Chris@0 28 <% end %>
Chris@0 29
Chris@0 30 <%= render(:partial => "wiki/content", :locals => {:content => @content}) %>
Chris@0 31
Chris@0 32 <%= link_to_attachments @page %>
Chris@0 33
Chris@0 34 <% if @editable && authorize_for('wiki', 'add_attachment') %>
Chris@0 35 <div id="wiki_add_attachment">
Chris@0 36 <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 37 :id => 'attach_files_link' %></p>
Chris@0 38 <% form_tag({ :controller => 'wiki', :action => 'add_attachment', :page => @page.title }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
Chris@0 39 <div class="box">
Chris@0 40 <p><%= render :partial => 'attachments/form' %></p>
Chris@0 41 </div>
Chris@0 42 <%= submit_tag l(:button_add) %>
Chris@0 43 <%= link_to l(:button_cancel), {}, :onclick => "Element.hide('add_attachment_form'); Element.show('attach_files_link'); return false;" %>
Chris@0 44 <% end %>
Chris@0 45 </div>
Chris@0 46 <% end %>
Chris@0 47
Chris@0 48 <% other_formats_links do |f| %>
Chris@0 49 <%= f.link_to 'HTML', :url => {:page => @page.title, :version => @content.version} %>
Chris@0 50 <%= f.link_to 'TXT', :url => {:page => @page.title, :version => @content.version} %>
Chris@0 51 <% end if User.current.allowed_to?(:export_wiki_pages, @project) %>
Chris@0 52
Chris@0 53 <% content_for :header_tags do %>
Chris@0 54 <%= stylesheet_link_tag 'scm' %>
Chris@0 55 <% end %>
Chris@0 56
Chris@0 57 <% content_for :sidebar do %>
Chris@0 58 <%= render :partial => 'sidebar' %>
Chris@0 59 <% end %>
Chris@0 60
Chris@0 61 <% html_title @page.pretty_title %>