Project

General

Profile

Actions

Defect #29730

closed

Previous/Next link on repository page disappear when switching to "View differences" tab

Added by Go MAEDA about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
SCM
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

See the screenshots below.


Files

changes-tab@2x.png (33.1 KB) changes-tab@2x.png Go MAEDA, 2018-10-04 17:44
diff-tab@2x.png (35.6 KB) diff-tab@2x.png Go MAEDA, 2018-10-04 17:44
fix-29730.patch (1.19 KB) fix-29730.patch Mizuki ISHIKAWA, 2018-10-15 06:40

Related issues

Related to Redmine - Feature #26576: Use tabs to switch between file changes and diff of a commitClosedJean-Philippe Lang

Actions
Has duplicate Redmine - Feature #8254: Add previous/next functionality in diffsClosed2011-04-30

Actions
Actions #1

Updated by Go MAEDA about 6 years ago

  • Related to Feature #26576: Use tabs to switch between file changes and diff of a commit added
Actions #2

Updated by Mizuki ISHIKAWA about 6 years ago

By applying this patch I think that the Previous/Next link will be displayed.

Actions #3

Updated by Go MAEDA about 6 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed. Thank you for fixing this issue.

Actions #4

Updated by Marius BÄ‚LTEANU about 6 years ago

  • Target version set to 4.0.0
Actions #5

Updated by Go MAEDA about 6 years ago

  • Status changed from Closed to Reopened
  • Target version changed from 4.0.0 to Candidate for next major release
  • Resolution deleted (Fixed)

The patch breaks some tests. Reverted the change.

Show

Actions #6

Updated by Mizuki ISHIKAWA about 6 years ago

Go MAEDA wrote:

The patch breaks some tests. Reverted the change.

I'm sorry, I missed the result of the test.
If you add the following code to the patch of #29730#note-2 , the tests should succeed.

diff --git a/app/views/repositories/diff.html.erb b/app/views/repositories/diff.html.erb
index 12875f21ee..3dcc0fdc79 100644
--- a/app/views/repositories/diff.html.erb
+++ b/app/views/repositories/diff.html.erb
@@ -1,3 +1,4 @@
+<% if @changeset && @changeset_to.nil? %>
 <div class="contextual">
   &#171;
   <% unless @changeset.previous.nil? -%>
@@ -25,7 +26,6 @@
     <%= submit_tag 'OK', :name => nil %>
   <% end %>
 </div>
-<% if @changeset && @changeset_to.nil? %>
 <%= render :partial => 'changeset' %>
 <% else %>
 <h2><%= l(:label_revision) %> <%= @diff_format_revisions %> <%= @path %></h2>
diff --git a/tmp/test/empty b/tmp/test/empty
deleted file mode 100644
index e69de29bb2..0000000000
Actions #7

Updated by Go MAEDA about 6 years ago

  • Status changed from Reopened to Closed
  • Target version deleted (Candidate for next major release)

Committed the patch again. Thanks.

I don't set the target version of this issue because I think this is a fix for #26576, one of a new feature of Redmine 4.0.0 which is not released yet (no releases are affected by this issue).

Actions #8

Updated by Go MAEDA almost 6 years ago

  • Has duplicate Feature #8254: Add previous/next functionality in diffs added
Actions

Also available in: Atom PDF