@@ -1,68 +1,68 | |||||
1 | <div class="contextual"> |
|
1 | <div class="contextual"> | |
2 | <% if @editable %> |
|
2 | <% if @editable %> | |
3 | <%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) if @content.version == @page.content.version %> |
|
3 | <%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) if @content.version == @page.content.version %> | |
4 | <%= watcher_tag(@page, User.current) %> |
|
4 | <%= watcher_tag(@page, User.current) %> | |
5 | <%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %> |
|
5 | <%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %> | |
6 | <%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %> |
|
6 | <%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %> | |
7 | <%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') if @content.version == @page.content.version %> |
|
7 | <%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') if @content.version == @page.content.version %> | |
8 | <%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') %> |
|
8 | <%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') %> | |
9 | <%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') if @content.version < @page.content.version %> |
|
9 | <%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') if @content.version < @page.content.version %> | |
10 | <% end %> |
|
10 | <% end %> | |
11 | <%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %> |
|
11 | <%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %> | |
12 | </div> |
|
12 | </div> | |
13 |
|
13 | |||
14 | <%= wiki_page_breadcrumb(@page) %> |
|
14 | <%= wiki_page_breadcrumb(@page) %> | |
15 |
|
15 | |||
16 | <% if @content.version != @page.content.version %> |
|
16 | <% if @content.version != @page.content.version %> | |
17 | <p> |
|
17 | <p> | |
18 |
<%= link_to(( |
|
18 | <%= link_to(("\xc2\xab " + l(:label_previous)), | |
19 | :action => 'show', :id => @page.title, :project_id => @page.project, |
|
19 | :action => 'show', :id => @page.title, :project_id => @page.project, | |
20 | :version => (@content.version - 1)) + " - " if @content.version > 1 %> |
|
20 | :version => (@content.version - 1)) + " - " if @content.version > 1 %> | |
21 | <%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %> |
|
21 | <%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %> | |
22 | <%= '(' + link_to('diff', :controller => 'wiki', :action => 'diff', |
|
22 | <%= '(' + link_to('diff', :controller => 'wiki', :action => 'diff', | |
23 | :id => @page.title, :project_id => @page.project, |
|
23 | :id => @page.title, :project_id => @page.project, | |
24 | :version => @content.version) + ')' if @content.version > 1 %> - |
|
24 | :version => @content.version) + ')' if @content.version > 1 %> - | |
25 |
<%= link_to((l(:label_next) + |
|
25 | <%= link_to((l(:label_next) + " \xc2\xbb"), :action => 'show', | |
26 | :id => @page.title, :project_id => @page.project, |
|
26 | :id => @page.title, :project_id => @page.project, | |
27 | :version => (@content.version + 1)) + " - " if @content.version < @page.content.version %> |
|
27 | :version => (@content.version + 1)) + " - " if @content.version < @page.content.version %> | |
28 | <%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project) %> |
|
28 | <%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project) %> | |
29 | <br /> |
|
29 | <br /> | |
30 | <em><%= @content.author ? link_to_user(@content.author) : l(:label_user_anonymous) |
|
30 | <em><%= @content.author ? link_to_user(@content.author) : l(:label_user_anonymous) | |
31 | %>, <%= format_time(@content.updated_on) %> </em><br /> |
|
31 | %>, <%= format_time(@content.updated_on) %> </em><br /> | |
32 | <%=h @content.comments %> |
|
32 | <%=h @content.comments %> | |
33 | </p> |
|
33 | </p> | |
34 | <hr /> |
|
34 | <hr /> | |
35 | <% end %> |
|
35 | <% end %> | |
36 |
|
36 | |||
37 | <%= render(:partial => "wiki/content", :locals => {:content => @content}) %> |
|
37 | <%= render(:partial => "wiki/content", :locals => {:content => @content}) %> | |
38 |
|
38 | |||
39 | <%= link_to_attachments @page %> |
|
39 | <%= link_to_attachments @page %> | |
40 |
|
40 | |||
41 | <% if @editable && authorize_for('wiki', 'add_attachment') %> |
|
41 | <% if @editable && authorize_for('wiki', 'add_attachment') %> | |
42 | <div id="wiki_add_attachment"> |
|
42 | <div id="wiki_add_attachment"> | |
43 | <p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;", |
|
43 | <p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;", | |
44 | :id => 'attach_files_link' %></p> |
|
44 | :id => 'attach_files_link' %></p> | |
45 | <% form_tag({ :controller => 'wiki', :action => 'add_attachment', :project_id => @project, :id => @page.title }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %> |
|
45 | <% form_tag({ :controller => 'wiki', :action => 'add_attachment', :project_id => @project, :id => @page.title }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %> | |
46 | <div class="box"> |
|
46 | <div class="box"> | |
47 | <p><%= render :partial => 'attachments/form' %></p> |
|
47 | <p><%= render :partial => 'attachments/form' %></p> | |
48 | </div> |
|
48 | </div> | |
49 | <%= submit_tag l(:button_add) %> |
|
49 | <%= submit_tag l(:button_add) %> | |
50 | <%= link_to l(:button_cancel), {}, :onclick => "Element.hide('add_attachment_form'); Element.show('attach_files_link'); return false;" %> |
|
50 | <%= link_to l(:button_cancel), {}, :onclick => "Element.hide('add_attachment_form'); Element.show('attach_files_link'); return false;" %> | |
51 | <% end %> |
|
51 | <% end %> | |
52 | </div> |
|
52 | </div> | |
53 | <% end %> |
|
53 | <% end %> | |
54 |
|
54 | |||
55 | <% other_formats_links do |f| %> |
|
55 | <% other_formats_links do |f| %> | |
56 | <%= f.link_to 'HTML', :url => {:id => @page.title, :version => @content.version} %> |
|
56 | <%= f.link_to 'HTML', :url => {:id => @page.title, :version => @content.version} %> | |
57 | <%= f.link_to 'TXT', :url => {:id => @page.title, :version => @content.version} %> |
|
57 | <%= f.link_to 'TXT', :url => {:id => @page.title, :version => @content.version} %> | |
58 | <% end if User.current.allowed_to?(:export_wiki_pages, @project) %> |
|
58 | <% end if User.current.allowed_to?(:export_wiki_pages, @project) %> | |
59 |
|
59 | |||
60 | <% content_for :header_tags do %> |
|
60 | <% content_for :header_tags do %> | |
61 | <%= stylesheet_link_tag 'scm' %> |
|
61 | <%= stylesheet_link_tag 'scm' %> | |
62 | <% end %> |
|
62 | <% end %> | |
63 |
|
63 | |||
64 | <% content_for :sidebar do %> |
|
64 | <% content_for :sidebar do %> | |
65 | <%= render :partial => 'sidebar' %> |
|
65 | <%= render :partial => 'sidebar' %> | |
66 | <% end %> |
|
66 | <% end %> | |
67 |
|
67 | |||
68 | <% html_title h(@page.pretty_title) %> |
|
68 | <% html_title h(@page.pretty_title) %> |
General Comments 0
You need to be logged in to leave comments.
Login now