summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2018-11-05 02:40:04 +0000
committerGo MAEDA <maeda@farend.jp>2018-11-05 02:40:04 +0000
commitce7931a9564c5645a5d13ef588d4dd757f1f651f (patch)
treea778b7ba28fc9eb9706c915f62c93a35712da212
parent2f1c9f54119763aae616fd9e9a3408198ee40620 (diff)
downloadredmine-ce7931a9564c5645a5d13ef588d4dd757f1f651f.tar.gz
redmine-ce7931a9564c5645a5d13ef588d4dd757f1f651f.zip
Previous/Next link on repository page disappears when switching to "View differences" tab (#26576, #29730).
Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@17620 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/views/repositories/diff.html.erb27
1 files changed, 27 insertions, 0 deletions
diff --git a/app/views/repositories/diff.html.erb b/app/views/repositories/diff.html.erb
index 889a65f7e..3dcc0fdc7 100644
--- a/app/views/repositories/diff.html.erb
+++ b/app/views/repositories/diff.html.erb
@@ -1,4 +1,31 @@
<% if @changeset && @changeset_to.nil? %>
+<div class="contextual">
+ &#171;
+ <% unless @changeset.previous.nil? -%>
+ <%= link_to_revision(@changeset.previous, @repository,
+ :text => l(:label_previous), :accesskey => accesskey(:previous)) %>
+ <% else -%>
+ <%= l(:label_previous) %>
+ <% end -%>
+|
+ <% unless @changeset.next.nil? -%>
+ <%= link_to_revision(@changeset.next, @repository,
+ :text => l(:label_next), :accesskey => accesskey(:next)) %>
+ <% else -%>
+ <%= l(:label_next) %>
+ <% end -%>
+ &#187;&nbsp;
+
+ <%= form_tag({:controller => 'repositories',
+ :action => 'revision',
+ :id => @project,
+ :repository_id => @repository.identifier_param,
+ :rev => nil},
+ :method => :get) do %>
+ <%= text_field_tag 'rev', @rev, :size => 8 %>
+ <%= submit_tag 'OK', :name => nil %>
+ <% end %>
+</div>
<%= render :partial => 'changeset' %>
<% else %>
<h2><%= l(:label_revision) %> <%= @diff_format_revisions %> <%= @path %></h2>