To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / app / views / wiki / show.html.erb @ 1298:4f746d8966dd

History | View | Annotate | Download (3.72 KB)

1 0:513646585e45 Chris
<div class="contextual">
2
<% if @editable %>
3 1115:433d4f72a19b Chris
<% 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 1295:622f24f53b42 Chris
  <%= watcher_link(@page, User.current) %>
6 1115:433d4f72a19b Chris
  <%= 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 0:513646585e45 Chris
<% end %>
14 37:94944d00e43c chris
<%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
15 0:513646585e45 Chris
</div>
16
17 909:cbb26bc654de Chris
<%= wiki_page_breadcrumb(@page) %>
18 0:513646585e45 Chris
19 909:cbb26bc654de Chris
<% unless @content.current_version? %>
20
    <p>
21
    <%= link_to(("\xc2\xab " + l(:label_previous)),
22
                :action => 'show', :id => @page.title, :project_id => @page.project,
23 1115:433d4f72a19b Chris
                :version => @content.previous.version) + " - " if @content.previous %>
24 0:513646585e45 Chris
    <%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %>
25 1115:433d4f72a19b Chris
    <%= '('.html_safe + link_to(l(:label_diff), :controller => 'wiki', :action => 'diff',
26 909:cbb26bc654de Chris
                      :id => @page.title, :project_id => @page.project,
27 1115:433d4f72a19b Chris
                      :version => @content.version) + ')'.html_safe if @content.previous %> -
28 909:cbb26bc654de Chris
    <%= link_to((l(:label_next) + " \xc2\xbb"), :action => 'show',
29
                :id => @page.title, :project_id => @page.project,
30 1115:433d4f72a19b Chris
                :version => @content.next.version) + " - " if @content.next %>
31
    <%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project, :version => nil) %>
32 0:513646585e45 Chris
    <br />
33 909:cbb26bc654de Chris
    <em><%= @content.author ? link_to_user(@content.author) : l(:label_user_anonymous)
34
         %>, <%= format_time(@content.updated_on) %> </em><br />
35 0:513646585e45 Chris
    <%=h @content.comments %>
36
    </p>
37
    <hr />
38
<% end %>
39
40
<%= render(:partial => "wiki/content", :locals => {:content => @content}) %>
41
42
<%= link_to_attachments @page %>
43
44
<% if @editable && authorize_for('wiki', 'add_attachment') %>
45
<div id="wiki_add_attachment">
46 1115:433d4f72a19b Chris
<p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;",
47 0:513646585e45 Chris
                                             :id => 'attach_files_link' %></p>
48 1115:433d4f72a19b Chris
<%= form_tag({:controller => 'wiki', :action => 'add_attachment',
49
              :project_id => @project, :id => @page.title},
50
             :multipart => true, :id => "add_attachment_form",
51
             :style => "display:none;") do %>
52 0:513646585e45 Chris
  <div class="box">
53
  <p><%= render :partial => 'attachments/form' %></p>
54
  </div>
55
<%= submit_tag l(:button_add) %>
56 1115:433d4f72a19b Chris
<%= link_to l(:button_cancel), {}, :onclick => "$('#add_attachment_form').hide(); return false;" %>
57 0:513646585e45 Chris
<% end %>
58
</div>
59
<% end %>
60
61
<% other_formats_links do |f| %>
62 909:cbb26bc654de Chris
  <%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
63
  <%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %>
64
  <%= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %>
65 0:513646585e45 Chris
<% end if User.current.allowed_to?(:export_wiki_pages, @project) %>
66
67
<% content_for :sidebar do %>
68
  <%= render :partial => 'sidebar' %>
69
<% end %>
70
71
<% html_title @page.pretty_title %>