To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / wiki / show.html.erb @ 1591:63650ae64bf2
History | View | Annotate | Download (3.96 KB)
| 1 |
<div class="contextual"> |
|---|---|
| 2 |
<% if @editable %>
|
| 3 |
<% if @content.current_version? %>
|
| 4 |
<%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %>
|
| 5 |
<%= watcher_link(@page, User.current) %>
|
| 6 |
<%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %>
|
| 7 |
<%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %>
|
| 8 |
<%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') %>
|
| 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') %>
|
| 10 |
<% else %>
|
| 11 |
<%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') %>
|
| 12 |
<% end %>
|
| 13 |
<% end %>
|
| 14 |
<%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
|
| 15 |
</div>
|
| 16 |
|
| 17 |
<%= wiki_page_breadcrumb(@page) %>
|
| 18 |
|
| 19 |
<% unless @content.current_version? %>
|
| 20 |
<%= title [@page.pretty_title, project_wiki_page_path(@page.project, @page.title, :version => nil)],
|
| 21 |
[l(:label_history), history_project_wiki_page_path(@page.project, @page.title)],
|
| 22 |
"#{l(:label_version)} #{@content.version}" %>
|
| 23 |
|
| 24 |
<p>
|
| 25 |
<%= link_to(("\xc2\xab " + l(:label_previous)),
|
| 26 |
:action => 'show', :id => @page.title, :project_id => @page.project,
|
| 27 |
:version => @content.previous.version) + " - " if @content.previous %>
|
| 28 |
<%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %>
|
| 29 |
<%= '('.html_safe + link_to(l(:label_diff), :controller => 'wiki', :action => 'diff',
|
| 30 |
:id => @page.title, :project_id => @page.project,
|
| 31 |
:version => @content.version) + ')'.html_safe if @content.previous %> -
|
| 32 |
<%= link_to((l(:label_next) + " \xc2\xbb"), :action => 'show',
|
| 33 |
:id => @page.title, :project_id => @page.project,
|
| 34 |
:version => @content.next.version) + " - " if @content.next %>
|
| 35 |
<%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project, :version => nil) %>
|
| 36 |
<br /> |
| 37 |
<em><%= @content.author ? link_to_user(@content.author) : l(:label_user_anonymous) |
| 38 |
%>, <%= format_time(@content.updated_on) %> </em><br /> |
| 39 |
<%=h @content.comments %>
|
| 40 |
</p>
|
| 41 |
<hr /> |
| 42 |
<% end %>
|
| 43 |
|
| 44 |
<%= render(:partial => "wiki/content", :locals => {:content => @content}) %>
|
| 45 |
|
| 46 |
<%= link_to_attachments @page %>
|
| 47 |
|
| 48 |
<% if @editable && authorize_for('wiki', 'add_attachment') %>
|
| 49 |
<div id="wiki_add_attachment"> |
| 50 |
<p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;", |
| 51 |
:id => 'attach_files_link' %></p> |
| 52 |
<%= form_tag({:controller => 'wiki', :action => 'add_attachment',
|
| 53 |
:project_id => @project, :id => @page.title},
|
| 54 |
:multipart => true, :id => "add_attachment_form",
|
| 55 |
:style => "display:none;") do %>
|
| 56 |
<div class="box"> |
| 57 |
<p><%= render :partial => 'attachments/form' %></p> |
| 58 |
</div>
|
| 59 |
<%= submit_tag l(:button_add) %>
|
| 60 |
<%= link_to l(:button_cancel), {}, :onclick => "$('#add_attachment_form').hide(); return false;" %>
|
| 61 |
<% end %>
|
| 62 |
</div>
|
| 63 |
<% end %>
|
| 64 |
|
| 65 |
<% other_formats_links do |f| %>
|
| 66 |
<%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
|
| 67 |
<%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %>
|
| 68 |
<%= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %>
|
| 69 |
<% end if User.current.allowed_to?(:export_wiki_pages, @project) %>
|
| 70 |
|
| 71 |
<% content_for :sidebar do %>
|
| 72 |
<%= render :partial => 'sidebar' %>
|
| 73 |
<% end %>
|
| 74 |
|
| 75 |
<% html_title @page.pretty_title %>
|