Edgewall Software
Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#11517 closed enhancement (fixed)

Link from wiki diff page to head revision

Reported by: Ryan J Ollos Owned by: Jun Omae
Priority: normal Milestone: 1.0.2
Component: wiki system Version:
Severity: normal Keywords:
Cc: Jun Omae Branch:
Release Notes:

Resource name on diff view page links to latest version of the resource.

API Changes:
Internal Changes:

Description

Consider the following page: /wiki/TracFaq?action=diff&version=10. Whenever I'm on a wiki diff page such as that one (which I usually arrive at via a diff link in an RSS feed entry), and I wish to navigate to the HEAD revision, I click on the TracFaq link. However, this directs to the upper revision in the diff, /wiki/TracFaq?version=10. Since Version 9 is a link to /wiki/TracFaq?version=9 and Version 10 is a link to /wiki/TracFaq?version=10, it seems to make sense to have TracFaq link to the latest revision, /wiki/TracFaq.

Attachments (0)

Change History (4)

in reply to:  description comment:1 by Jun Omae, 7 years ago

Cc: Jun Omae added

Agreed. I've been felt painful because the diff view of wiki page doesn't have a link to latest page.

  • trac/templates/diff_view.html

    diff --git a/trac/templates/diff_view.html b/trac/templates/diff_view.html
    index 3c74b8a..b30e77c 100644
    a b  
    1818        <py:when test="old_version"><i18n:msg params="old, new, name">Changes between
    1919          <a href="${old_url or url_of(resource, version=old_version)}">Version $old_version</a> and
    2020          <a href="${new_url or url_of(resource, version=new_version)}">Version $new_version</a> of
    21           <a href="${url or url_of(resource)}">${name or name_of(resource)}</a>
     21          <a href="${url or url_of(resource, version=None)}">${name or name_of(resource)}</a>
    2222        </i18n:msg></py:when>
    2323        <py:when test="old_version == 0"><i18n:msg params="new, name">Changes between
    2424          <a href="${old_url or url_of(resource, version=0)}">Initial Version</a> and
    2525          <a href="${new_url or url_of(resource, version=new_version)}">Version $new_version</a> of
    26           <a href="${url or url_of(resource)}">${name or name_of(resource)}</a>
     26          <a href="${url or url_of(resource, version=None)}">${name or name_of(resource)}</a>
    2727        </i18n:msg></py:when>
    2828        <py:otherwise><i18n:msg params="new, name">Changes from
    2929          <a href="${new_url or url_of(resource, version=new_version)}">Version $new_version</a> of
    30           <a href="${url or url_of(resource)}">${name or name_of(resource)}</a>
     30          <a href="${url or url_of(resource, version=None)}">${name or name_of(resource)}</a>
    3131        </i18n:msg></py:otherwise>
    3232      </h1>
    3333      <form method="post" id="prefs" action="${diff_url or url_of(resource)}">

comment:2 by Ryan J Ollos, 7 years ago

Milestone: next-stable-1.0.x1.0.2
Owner: set to Ryan J Ollos
Status: newassigned

I've tested the change and found it works well. Functional test has been added in log:rjollos.git:t11517.

comment:3 by Ryan J Ollos, 7 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed to 1.0-stable in [12552] and merged to trunk in [12553]. Thanks Jun!

comment:4 by Ryan J Ollos, 7 years ago

Owner: changed from Ryan J Ollos to Jun Omae

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.