use new toolbar in revision view

pull/2823/head
Florian Kraft 10 years ago
parent e2f35f1961
commit f932b3e963
  1. 2
      app/assets/stylesheets/layout/_toolbar.sass
  2. 47
      app/views/repositories/revision.html.erb

@ -62,8 +62,6 @@
a.last, .last
margin-right: 0
.title-container
h2
border: 0

@ -27,34 +27,29 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<% content_for :action_menu_specific do %>
&#171;
<% unless @changeset.previous.nil? -%>
<%= link_to_revision(@changeset.previous, @project, :text => l(:label_previous)) %>
<% else -%>
<%= l(:label_previous) %>
<% end -%>
|
<% unless @changeset.next.nil? -%>
<%= link_to_revision(@changeset.next, @project, :text => l(:label_next)) %>
<% else -%>
<%= l(:label_next) %>
<% end -%>
&#187;&nbsp;
<%= styled_form_tag({:controller => '/repositories', :action => 'revision', :project_id => @project}, :method => :get) do %>
<div class="choice">
<div class="choice--select">
<%= styled_text_field_tag 'rev', @rev, :size => 8 %>
</div>
<div class="choice--button">
<%= submit_tag 'OK', :name => nil, class: 'button -highlight' %>
</div>
</div>
<% end %>
<% content_for :toolbar do %>
<li class="toolbar-item">
<% if @changeset.previous.nil? %>
<button class="button" disabled="disabled"><%= l(:label_previous) %></button>
<% else %>
<%= link_to_revision(@changeset.previous, @project, text: l(:label_previous), class: 'button') %>
<% end %>
</li>
<li class="toolbar-item">
<% if @changeset.next.nil? %>
<button class="button" disabled="disabled"><%= l(:label_next) %></button>
<% else %>
<%= link_to_revision(@changeset.next, @project, text: l(:label_next), class: 'button') %>
<% end %>
</li>
<li class="toolbar-item">
<%= form_tag({:controller => '/repositories', :action => 'revision', :project_id => @project}, :method => :get) do %>
<%= text_field_tag :rev, @rev, placeholder: l(:label_revision) %>
<% end %>
</li>
<% end %>
<h2><%= l(:label_revision) %> <%= format_revision(@changeset) %></h2>
<%= render :partial => 'layouts/action_menu_specific' %>
<%= render :partial => 'layouts/toolbar' %>
<p><% if @changeset.scmid %>ID: <%= h(@changeset.scmid) %><br />
<% end %>
<span class="author"><%= authoring(@changeset.committed_on, @changeset.author) %></span></p>

Loading…
Cancel
Save