2007-03-12 20:59:02 +03:00
|
|
|
<div class="contextual">
|
2008-05-04 19:05:38 +04:00
|
|
|
<% if @editable %>
|
2011-11-29 00:12:03 +04:00
|
|
|
<%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) if @content.current_version? %>
|
2009-05-25 23:02:28 +04:00
|
|
|
<%= watcher_tag(@page, User.current) %>
|
2010-10-27 20:27:06 +04:00
|
|
|
<%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %>
|
|
|
|
<%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %>
|
2011-11-29 00:12:03 +04:00
|
|
|
<%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') if @content.current_version? %>
|
2010-10-27 20:27:06 +04:00
|
|
|
<%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') %>
|
2011-11-29 00:12:03 +04:00
|
|
|
<%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') unless @content.current_version? %>
|
2008-05-04 19:05:38 +04:00
|
|
|
<% end %>
|
2010-10-27 20:27:06 +04:00
|
|
|
<%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
|
2007-03-12 20:59:02 +03:00
|
|
|
</div>
|
|
|
|
|
2011-07-04 23:56:38 +04:00
|
|
|
<%= wiki_page_breadcrumb(@page) %>
|
2008-07-26 15:46:24 +04:00
|
|
|
|
2011-11-29 00:12:03 +04:00
|
|
|
<% unless @content.current_version? %>
|
2011-08-12 03:40:37 +04:00
|
|
|
<p>
|
2011-08-06 04:50:35 +04:00
|
|
|
<%= link_to(("\xc2\xab " + l(:label_previous)),
|
2011-08-06 04:49:28 +04:00
|
|
|
:action => 'show', :id => @page.title, :project_id => @page.project,
|
|
|
|
:version => (@content.version - 1)) + " - " if @content.version > 1 %>
|
2007-07-14 15:25:03 +04:00
|
|
|
<%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %>
|
2011-08-12 05:35:07 +04:00
|
|
|
<%= '(' + link_to(l(:label_diff), :controller => 'wiki', :action => 'diff',
|
2011-08-06 04:49:28 +04:00
|
|
|
:id => @page.title, :project_id => @page.project,
|
|
|
|
:version => @content.version) + ')' if @content.version > 1 %> -
|
2011-08-06 04:50:35 +04:00
|
|
|
<%= link_to((l(:label_next) + " \xc2\xbb"), :action => 'show',
|
2011-08-06 04:49:28 +04:00
|
|
|
:id => @page.title, :project_id => @page.project,
|
|
|
|
:version => (@content.version + 1)) + " - " if @content.version < @page.content.version %>
|
2010-10-29 01:25:38 +04:00
|
|
|
<%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project) %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<br />
|
2011-08-06 04:49:28 +04:00
|
|
|
<em><%= @content.author ? link_to_user(@content.author) : l(:label_user_anonymous)
|
|
|
|
%>, <%= 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
|
|
|
|
2008-12-09 19:54:46 +03:00
|
|
|
<%= link_to_attachments @page %>
|
2007-05-26 19:42:37 +04:00
|
|
|
|
2008-05-04 19:05:38 +04:00
|
|
|
<% if @editable && authorize_for('wiki', 'add_attachment') %>
|
2009-03-12 21:17:35 +03:00
|
|
|
<div id="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>
|
2010-10-27 20:27:06 +04:00
|
|
|
<% form_tag({ :controller => 'wiki', :action => 'add_attachment', :project_id => @project, :id => @page.title }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
|
2008-02-29 22:46:58 +03:00
|
|
|
<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 %>
|
2009-03-12 21:17:35 +03:00
|
|
|
</div>
|
2007-05-26 19:42:37 +04:00
|
|
|
<% end %>
|
2007-09-06 21:06:07 +04:00
|
|
|
|
2009-01-29 16:53:17 +03:00
|
|
|
<% other_formats_links do |f| %>
|
2011-11-29 00:04:38 +04:00
|
|
|
<%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
|
|
|
|
<%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %>
|
|
|
|
<%= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %>
|
2010-02-06 12:30:53 +03:00
|
|
|
<% end if User.current.allowed_to?(:export_wiki_pages, @project) %>
|
2007-12-22 15:47:23 +03:00
|
|
|
|
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 %>
|
|
|
|
|
2011-10-02 22:45:17 +04:00
|
|
|
<% html_title @page.pretty_title %>
|