From: Go MAEDA Date: Mon, 5 Nov 2018 02:40:04 +0000 (+0000) Subject: Previous/Next link on repository page disappears when switching to "View differences... X-Git-Tag: 4.0.0~65 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ce7931a9564c5645a5d13ef588d4dd757f1f651f;p=redmine.git 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 --- 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? %> +
+ « + <% 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 -%> + »  + + <%= 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 %> +
<%= render :partial => 'changeset' %> <% else %>

<%= l(:label_revision) %> <%= @diff_format_revisions %> <%= @path %>