2007-03-12 20:59:02 +03:00
|
|
|
<div class="contextual">
|
2007-10-05 22:05:41 +04:00
|
|
|
<%= 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 %>
|
2007-09-09 21:05:38 +04:00
|
|
|
<%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :page => @page.title}, :class => 'icon icon-move') if @content.version == @page.content.version %>
|
2007-05-25 20:44:50 +04:00
|
|
|
<%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :page => @page.title}, :method => :post, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') %>
|
2007-08-29 20:52:35 +04:00
|
|
|
<%= 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 %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<%= link_to(l(:label_history), {:action => 'history', :page => @page.title}, :class => 'icon icon-history') %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% if @content.version != @page.content.version %>
|
|
|
|
<p>
|
|
|
|
<%= link_to(('« ' + l(:label_previous)), :action => 'index', :page => @page.title, :version => (@content.version - 1)) + " - " if @content.version > 1 %>
|
2007-07-14 15:25:03 +04:00
|
|
|
<%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %>
|
|
|
|
<%= '(' + link_to('diff', :controller => 'wiki', :action => 'diff', :page => @page.title, :version => @content.version) + ')' if @content.version > 1 %> -
|
2007-03-12 20:59:02 +03:00
|
|
|
<%= link_to((l(:label_next) + ' »'), :action => 'index', :page => @page.title, :version => (@content.version + 1)) + " - " if @content.version < @page.content.version %>
|
|
|
|
<%= link_to(l(:label_current_version), :action => 'index', :page => @page.title) %>
|
|
|
|
<br />
|
|
|
|
<em><%= @content.author ? @content.author.name : "anonyme" %>, <%= format_time(@content.updated_on) %> </em><br />
|
2007-04-25 19:06:20 +04:00
|
|
|
<%=h @content.comments %>
|
2007-03-12 20:59:02 +03:00
|
|
|
</p>
|
|
|
|
<hr />
|
|
|
|
<% end %>
|
|
|
|
|
2007-06-14 22:26:27 +04:00
|
|
|
<%= render(:partial => "wiki/content", :locals => {:content => @content}) %>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
2007-05-26 19:42:37 +04:00
|
|
|
<%= link_to_attachments @page.attachments, :delete_url => (authorize_for('wiki', 'destroy_attachment') ? {:controller => 'wiki', :action => 'destroy_attachment', :page => @page.title} : nil) %>
|
|
|
|
|
|
|
|
<% if authorize_for('wiki', 'add_attachment') %>
|
2008-02-29 22:46:58 +03:00
|
|
|
<p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;",
|
|
|
|
:id => 'attach_files_link' %></p>
|
|
|
|
<% form_tag({ :controller => 'wiki', :action => 'add_attachment', :page => @page.title }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
|
|
|
|
<div class="box">
|
|
|
|
<p><%= render :partial => 'attachments/form' %></p>
|
|
|
|
</div>
|
2007-05-26 19:42:37 +04:00
|
|
|
<%= submit_tag l(:button_add) %>
|
2008-02-29 22:46:58 +03:00
|
|
|
<%= link_to l(:button_cancel), {}, :onclick => "Element.hide('add_attachment_form'); Element.show('attach_files_link'); return false;" %>
|
2007-05-26 19:42:37 +04:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2007-09-06 21:06:07 +04:00
|
|
|
|
2007-12-22 15:47:23 +03:00
|
|
|
<div class="contextual">
|
|
|
|
<%= l(:label_export_to) %>
|
|
|
|
<%= link_to 'HTML', {:page => @page.title, :export => 'html', :version => @content.version}, :class => 'icon icon-html' %>,
|
|
|
|
<%= link_to 'TXT', {:page => @page.title, :export => 'txt', :version => @content.version}, :class => 'icon icon-txt' %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2007-09-06 21:06:07 +04:00
|
|
|
<% content_for :header_tags do %>
|
|
|
|
<%= stylesheet_link_tag 'scm' %>
|
|
|
|
<% end %>
|
2007-09-08 00:52:45 +04:00
|
|
|
|
2007-09-22 17:17:49 +04:00
|
|
|
<% content_for :sidebar do %>
|
|
|
|
<%= render :partial => 'sidebar' %>
|
|
|
|
<% end %>
|
|
|
|
|
2008-01-03 01:41:53 +03:00
|
|
|
<% html_title @page.pretty_title %>
|