Merge pull request #29 from floriank/fix/18330-harmonize-headings

[18330] use toolbar in the plugin
pull/6827/head
Jan Sandbrink 10 years ago
commit 63f00c9589
  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| -%> <%= labelled_tabular_form_for @document, url: project_document_path(@document) do |f| -%>
<%= render partial: "documents/form", locals: { f: f } %> <%= render partial: "documents/form", locals: { f: f } %>

@ -30,13 +30,15 @@ See doc/COPYRIGHT.rdoc for more details.
++#%> ++#%>
<div class="contextual"> <%= toolbar title: l(:label_document_plural) do %>
<%= link_to_if_authorized l(:label_document_new), <% if authorize_for(:documents, :new) %>
{:controller => '/documents', :action => 'new', :project_id => @project}, <li class="toolbar-item">
:class => 'icon icon-add' %> <%= link_to({:controller => '/documents', :action => 'new', :project_id => @project}, class: 'button -alt-highlight') do %>
</div> <i class="button--icon icon-add"></i> <%= l(:label_document_new) %>
<% end %>
<h2><%=l(:label_document_plural)%></h2> </li>
<% end %>
<% end %>
<% if @grouped.empty? %> <% if @grouped.empty? %>
<p class="nodata"><%= l(:label_no_data) %></p> <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. See doc/COPYRIGHT.rdoc for more details.
++#%> ++#%>
<%= toolbar title: l(:label_document_new) %>
<h2><%=l(:label_document_new)%></h2>
<%= labelled_tabular_form_for @document, url: project_documents_path(@project), html: { multipart: true } do |f| -%> <%= labelled_tabular_form_for @document, url: project_documents_path(@project), html: { multipart: true } do |f| -%>
<%= render :partial => 'documents/form', locals: { f: f } %> <%= render :partial => 'documents/form', locals: { f: f } %>

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

Loading…
Cancel
Save