use toolbar in the plugin

Signed-off-by: Florian Kraft <f.kraft@finn.de>
pull/6827/head
Florian Kraft 10 years ago
parent fc8d47fddf
commit 073a6e6c7e
  1. 2
      app/views/documents/edit.html.erb
  2. 16
      app/views/documents/index.html.erb
  3. 3
      app/views/documents/new.html.erb
  4. 26
      app/views/documents/show.html.erb

@ -30,7 +30,7 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<h2><%= Document.model_name.human %></h2>
<%= toolbar title: Document.model_name.human %>
<%= labelled_tabular_form_for @document, url: project_document_path(@document) do |f| -%>
<%= render partial: "documents/form", locals: { f: f } %>

@ -30,13 +30,15 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<div class="contextual">
<%= link_to_if_authorized l(:label_document_new),
{:controller => '/documents', :action => 'new', :project_id => @project},
:class => 'icon icon-add' %>
</div>
<h2><%=l(:label_document_plural)%></h2>
<%= toolbar title: l(:label_document_plural) do %>
<% if authorize_for(:documents, :new) %>
<li class="toolbar-item">
<%= link_to({:controller => '/documents', :action => 'new', :project_id => @project}, class: 'button -alt-highlight') do %>
<i class="button--icon icon-add"></i> <%= l(:label_document_new) %>
<% end %>
</li>
<% end %>
<% end %>
<% if @grouped.empty? %>
<p class="nodata"><%= l(:label_no_data) %></p>

@ -29,8 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<h2><%=l(:label_document_new)%></h2>
<%= toolbar title: l(:label_document_new) %>
<%= labelled_tabular_form_for @document, url: project_documents_path(@project), html: { multipart: true } do |f| -%>
<%= render :partial => 'documents/form', locals: { f: f } %>

@ -30,15 +30,24 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<div class="contextual">
<%= link_to_if_authorized l(:button_edit), {:controller => '/documents', :action => 'edit', :id => @document}, :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
<%= link_to_if_authorized l(:button_delete), {:controller => '/documents', :action => 'destroy', :id => @document}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-delete' %>
</div>
<h2><%=h @document.title %></h2>
<% html_title h(@document.title) -%>
<%= toolbar title: @document.title, subtitle: "#{@document.category.name} - #{format_date @document.created_on}" do %>
<% if authorize_for(:documents, :edit) %>
<li class="toolbar-item">
<%= link_to({:controller => '/documents', :action => 'edit', :id => @document}, class: 'button', accesskey: accesskey(:edit)) do %>
<i class="button--icon icon-edit"></i> <%= l(:button_edit) %>
<% end %>
</li>
<% end %>
<% if authorize_for(:documents, :destroy) %>
<li class="toolbar-item">
<%= link_to({:controller => '/documents', :action => 'destroy', :id => @document}, class: 'button', data: { :confirm => l(:text_are_you_sure) }, :method => :delete) do %>
<i class="button--icon icon-delete"></i> <%= l(:button_delete) %>
<% end %>
</li>
<% end %>
<% end %>
<p><em><%=h @document.category.name %><br />
<%= format_date @document.created_on %></em></p>
<div class="wiki">
<%= textilizable @document.description, :attachments => @document.attachments %>
</div>
@ -57,4 +66,3 @@ See doc/COPYRIGHT.rdoc for more details.
<% end %>
<% end %>
<% html_title h(@document.title) -%>

Loading…
Cancel
Save