Defect #29730

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

Added by Go MAEDA about 3 years ago. Updated almost 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:SCM
Target version:-
Resolution: Affected version:

Description

See the screenshots below.

changes-tab@2x.png (33.1 KB) Go MAEDA, 2018-10-04 17:44

diff-tab@2x.png (35.6 KB) Go MAEDA, 2018-10-04 17:44

fix-29730.patch Magnifier (1.19 KB) 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 commit Closed
Duplicated by Redmine - Feature #8254: Add previous/next functionality in diffs Closed 2011-04-30

Associated revisions

Revision 17605
Added by Go MAEDA almost 3 years ago

Previous/Next link on repository page disappears when switching to "View differences" tab (#26576, #29730).

Patch by Mizuki ISHIKAWA.

Revision 17606
Added by Go MAEDA almost 3 years ago

Reverted r17605 that breaks some tests (#26576, #29730).

Revision 17620
Added by Go MAEDA almost 3 years ago

Previous/Next link on repository page disappears when switching to "View differences" tab (#26576, #29730).

Patch by Mizuki ISHIKAWA.

History

#1 Updated by Go MAEDA about 3 years ago

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

#2 Updated by Mizuki ISHIKAWA about 3 years ago

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

#3 Updated by Go MAEDA almost 3 years ago

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

Committed. Thank you for fixing this issue.

#4 Updated by Marius BALTEANU almost 3 years ago

  • Target version set to 4.0.0

#5 Updated by Go MAEDA almost 3 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.

#6 Updated by Mizuki ISHIKAWA almost 3 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

#7 Updated by Go MAEDA almost 3 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).

#8 Updated by Go MAEDA over 2 years ago

  • Duplicated by Feature #8254: Add previous/next functionality in diffs added

Also available in: Atom PDF