show.html.erb
72 lines
| 3.9 KiB
| text/plain
|
TextLexer
|
r330 | <div class="contextual"> | ||
|
r1400 | <% if @editable %> | ||
|
r7852 | <%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) if @content.current_version? %> | ||
|
r2666 | <%= watcher_tag(@page, User.current) %> | ||
|
r4182 | <%= 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? %> | ||||
|
r7852 | <%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') if @content.current_version? %> | ||
|
r4182 | <%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') %> | ||
|
r7852 | <%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') unless @content.current_version? %> | ||
|
r1400 | <% end %> | ||
|
r4182 | <%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %> | ||
|
r330 | </div> | ||
|
r6062 | <%= wiki_page_breadcrumb(@page) %> | ||
|
r1689 | |||
|
r7852 | <% unless @content.current_version? %> | ||
|
r6297 | <p> | ||
|
r6294 | <%= link_to(("\xc2\xab " + l(:label_previous)), | ||
|
r6291 | :action => 'show', :id => @page.title, :project_id => @page.project, | ||
:version => (@content.version - 1)) + " - " if @content.version > 1 %> | ||||
|
r580 | <%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %> | ||
|
r8333 | <%= '('.html_safe + link_to(l(:label_diff), :controller => 'wiki', :action => 'diff', | ||
|
r6291 | :id => @page.title, :project_id => @page.project, | ||
|
r8333 | :version => @content.version) + ')'.html_safe if @content.version > 1 %> - | ||
|
r6294 | <%= link_to((l(:label_next) + " \xc2\xbb"), :action => 'show', | ||
|
r6291 | :id => @page.title, :project_id => @page.project, | ||
:version => (@content.version + 1)) + " - " if @content.version < @page.content.version %> | ||||
|
r4189 | <%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project) %> | ||
|
r330 | <br /> | ||
|
r6291 | <em><%= @content.author ? link_to_user(@content.author) : l(:label_user_anonymous) | ||
%>, <%= format_time(@content.updated_on) %> </em><br /> | ||||
|
r476 | <%=h @content.comments %> | ||
|
r330 | </p> | ||
<hr /> | ||||
<% end %> | ||||
|
r561 | <%= render(:partial => "wiki/content", :locals => {:content => @content}) %> | ||
|
r330 | |||
|
r2114 | <%= link_to_attachments @page %> | ||
|
r538 | |||
|
r1400 | <% if @editable && authorize_for('wiki', 'add_attachment') %> | ||
|
r2506 | <div id="wiki_add_attachment"> | ||
|
r1166 | <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> | ||||
|
r9346 | <%= form_tag({:controller => 'wiki', :action => 'add_attachment', | ||
:project_id => @project, :id => @page.title}, | ||||
:multipart => true, :id => "add_attachment_form", | ||||
:style => "display:none;") do %> | ||||
|
r1166 | <div class="box"> | ||
<p><%= render :partial => 'attachments/form' %></p> | ||||
</div> | ||||
|
r538 | <%= submit_tag l(:button_add) %> | ||
|
r1166 | <%= link_to l(:button_cancel), {}, :onclick => "Element.hide('add_attachment_form'); Element.show('attach_files_link'); return false;" %> | ||
|
r538 | <% end %> | ||
|
r2506 | </div> | ||
|
r538 | <% end %> | ||
|
r699 | |||
|
r2331 | <% other_formats_links do |f| %> | ||
|
r7851 | <%= 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]} %> | ||||
|
r3257 | <% end if User.current.allowed_to?(:export_wiki_pages, @project) %> | ||
|
r1010 | |||
|
r699 | <% content_for :header_tags do %> | ||
<%= stylesheet_link_tag 'scm' %> | ||||
<% end %> | ||||
|
r704 | |||
|
r736 | <% content_for :sidebar do %> | ||
<%= render :partial => 'sidebar' %> | ||||
<% end %> | ||||
|
r7445 | <% html_title @page.pretty_title %> | ||