|
|
|
@ -1,20 +1,23 @@
|
|
|
|
|
<div class="project_r_h">
|
|
|
|
|
<div class="project_r_h" xmlns="http://www.w3.org/1999/html">
|
|
|
|
|
<h2 class="project_h2">Wiki</h2>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="contextual">
|
|
|
|
|
<% if @editable %>
|
|
|
|
|
<% if @content.current_version? %>
|
|
|
|
|
<%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %>
|
|
|
|
|
<%= watcher_link(@page, User.current) %>
|
|
|
|
|
<div class="wiki_page">
|
|
|
|
|
<div class="wiki_page_con">
|
|
|
|
|
<div class="contextual">
|
|
|
|
|
<% if @editable %>
|
|
|
|
|
<% if @content.current_version? %>
|
|
|
|
|
|
|
|
|
|
<%#= watcher_link(@page, User.current) %>
|
|
|
|
|
<%#= 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? %>
|
|
|
|
|
<%#= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') %>
|
|
|
|
|
<%= 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') %>
|
|
|
|
|
<%= link_to_if_authorized("", {:action => 'destroy', :id => @page.title}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :class => 'pic_del fr') %>
|
|
|
|
|
<%= link_to_if_authorized("", {:action => 'edit', :id => @page.title}, :class => 'pic_edit fr', :accesskey => accesskey(:edit)) %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
|
|
|
|
|
<%#= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
|
|
|
|
|
</div>
|
|
|
|
|
<%= wiki_page_breadcrumb(@page) %>
|
|
|
|
|
<% unless @content.current_version? %>
|
|
|
|
@ -40,28 +43,37 @@
|
|
|
|
|
</p>
|
|
|
|
|
<hr />
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<%= render(:partial => "wiki/content", :locals => {:content => @content}) %>
|
|
|
|
|
<%= link_to_attachments @page %>
|
|
|
|
|
<%= link_to_attachment_project @page, :author => false %>
|
|
|
|
|
<!--<a href="javascript:void(0)" class=" c_orange fl ml20 fl">zhang<span class="c_grey"> 2014-08-04 10:09</span></a>-->
|
|
|
|
|
</div>
|
|
|
|
|
<!--wiki new-->
|
|
|
|
|
<% if @editable && authorize_for('wiki', 'add_attachment') %>
|
|
|
|
|
<div id="wiki_add_attachment">
|
|
|
|
|
<p>
|
|
|
|
|
<%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;",
|
|
|
|
|
:id => 'attach_files_link' %></p>
|
|
|
|
|
|
|
|
|
|
<div class=" mb10">
|
|
|
|
|
<%= link_to l(:label_upload_files), {}, :onclick => "$('#add_attachment_form').show(); return false;",
|
|
|
|
|
:id => 'attach_files_link',
|
|
|
|
|
:class => "blue_u_btn fl mr10" %>
|
|
|
|
|
<%= form_tag({:controller => 'wiki', :action => 'add_attachment',
|
|
|
|
|
:project_id => @project, :id => @page.title},
|
|
|
|
|
:multipart => true, :id => "add_attachment_form",
|
|
|
|
|
:style => "display:none;") do %>
|
|
|
|
|
<div class="box">
|
|
|
|
|
<p>
|
|
|
|
|
<%= render :partial => 'attachments/form' %>
|
|
|
|
|
|
|
|
|
|
<div class="box">
|
|
|
|
|
<p> <br/><br/>
|
|
|
|
|
<%= render :partial => 'attachments/form_project' %>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<%= submit_tag l(:button_add) %>
|
|
|
|
|
<%= link_to l(:button_cancel), {}, :onclick => "$('#add_attachment_form').hide(); return false;" %>
|
|
|
|
|
<a remote="true" href="javascript:void(0)" class="blue_btn fl " onclick="$('#add_attachment_form').submit();">
|
|
|
|
|
<%= l(:button_add) %>
|
|
|
|
|
</a>
|
|
|
|
|
<%= link_to l(:button_cancel), {}, :onclick => "$('#add_attachment_form').hide(); return false;", :class => "grey_btn ml10 fl" %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
<br/>
|
|
|
|
|
<% other_formats_links do |f| %>
|
|
|
|
|
<%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
|
|
|
|
|
<%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %>
|
|
|
|
@ -83,3 +95,4 @@
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
</div>
|