annotate app/views/wiki/show.rhtml @ 1452:d6b9fd02bb89 feature_36_js_refactoring

Deprecated develoment branch.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Fri, 11 Oct 2013 17:01:24 +0100
parents 94944d00e43c
children
rev   line source
Chris@0 1 <div class="contextual">
Chris@0 2 <% if @editable %>
chris@37 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 %>
Chris@0 4 <%= watcher_tag(@page, User.current) %>
chris@37 5 <%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %>
chris@37 6 <%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %>
chris@37 7 <%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') if @content.version == @page.content.version %>
chris@37 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') %>
chris@37 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 %>
Chris@0 10 <% end %>
chris@37 11 <%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
Chris@0 12 </div>
Chris@0 13
chris@37 14 <%= breadcrumb(@page.ancestors.reverse.collect {|parent| link_to h(parent.pretty_title), {:id => parent.title, :project_id => parent.project}}) %>
Chris@0 15
Chris@0 16 <% if @content.version != @page.content.version %>
Chris@0 17 <p>
chris@37 18 <%= link_to(('&#171; ' + l(:label_previous)), :action => 'show', :id => @page.title, :project_id => @page.project, :version => (@content.version - 1)) + " - " if @content.version > 1 %>
Chris@0 19 <%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %>
chris@37 20 <%= '(' + link_to('diff', :controller => 'wiki', :action => 'diff', :id => @page.title, :project_id => @page.project, :version => @content.version) + ')' if @content.version > 1 %> -
chris@37 21 <%= link_to((l(:label_next) + ' &#187;'), :action => 'show', :id => @page.title, :project_id => @page.project, :version => (@content.version + 1)) + " - " if @content.version < @page.content.version %>
chris@37 22 <%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project) %>
Chris@0 23 <br />
Chris@0 24 <em><%= @content.author ? @content.author.name : "anonyme" %>, <%= format_time(@content.updated_on) %> </em><br />
Chris@0 25 <%=h @content.comments %>
Chris@0 26 </p>
Chris@0 27 <hr />
Chris@0 28 <% end %>
Chris@0 29
Chris@0 30 <%= render(:partial => "wiki/content", :locals => {:content => @content}) %>
Chris@0 31
Chris@0 32 <%= link_to_attachments @page %>
Chris@0 33
Chris@0 34 <% if @editable && authorize_for('wiki', 'add_attachment') %>
Chris@0 35 <div id="wiki_add_attachment">
Chris@0 36 <p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;",
Chris@0 37 :id => 'attach_files_link' %></p>
chris@37 38 <% form_tag({ :controller => 'wiki', :action => 'add_attachment', :project_id => @project, :id => @page.title }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
Chris@0 39 <div class="box">
Chris@0 40 <p><%= render :partial => 'attachments/form' %></p>
Chris@0 41 </div>
Chris@0 42 <%= submit_tag l(:button_add) %>
Chris@0 43 <%= link_to l(:button_cancel), {}, :onclick => "Element.hide('add_attachment_form'); Element.show('attach_files_link'); return false;" %>
Chris@0 44 <% end %>
Chris@0 45 </div>
Chris@0 46 <% end %>
Chris@0 47
Chris@0 48 <% other_formats_links do |f| %>
chris@37 49 <%= f.link_to 'HTML', :url => {:id => @page.title, :version => @content.version} %>
chris@37 50 <%= f.link_to 'TXT', :url => {:id => @page.title, :version => @content.version} %>
Chris@0 51 <% end if User.current.allowed_to?(:export_wiki_pages, @project) %>
Chris@0 52
Chris@0 53 <% content_for :header_tags do %>
Chris@0 54 <%= stylesheet_link_tag 'scm' %>
Chris@0 55 <% end %>
Chris@0 56
Chris@0 57 <% content_for :sidebar do %>
Chris@0 58 <%= render :partial => 'sidebar' %>
Chris@0 59 <% end %>
Chris@0 60
Chris@0 61 <% html_title @page.pretty_title %>