Edgewall Software
Modify

Opened 7 years ago

Closed 7 years ago

#12864 closed defect (fixed)

Wrong "None bytes" in title attribute of size column in repository browser

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.2.3
Component: version control/browser Version: 1.0.15
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Fix incorrect None bytes in repository browser when Node.content_length is None.

API Changes:
Internal Changes:

Description

$ curl -s https://trac.edgewall.org/demo-1.0/browser | grep -F 'title="None'
        <span title="None bytes"></span>
        <span title="None bytes"></span>
        <span title="None bytes"></span>
        <span title="None bytes"></span>
        <span title="None bytes"></span>
  • trac/versioncontrol/templates/dir_entries.html

     
    2525                                order=order if order != 'name' else None, desc=desc)}">$entry.name</a>
    2626      </td>
    2727      <td class="size">
    28         <span title="${_('%(size)s bytes', size=entry.content_length)}">${pretty_size(entry.content_length)}</span>
     28        <span py:if="entry.content_length is not None"
     29              title="${_('%(size)s bytes', size=entry.content_length)}">${
     30          pretty_size(entry.content_length)}</span>
    2931        <a py:if="entry.raw_href" href="$entry.raw_href" class="${'trac-ziplink' if isdir else 'trac-rawlink'}"
    3032           title="${_('Download as Zip archive') if isdir else _('Download')}">&#8203;</a>
    3133      </td>

Attachments (0)

Change History (4)

comment:1 by Jun Omae, 7 years ago

The same issue existed in trunk with Jinja2 template. It has been fixed in [16135/trunk/trac/versioncontrol/templates/dir_entries.html].

comment:2 by Jun Omae, 7 years ago

Release Notes: modified (diff)

Proposed changes with unit tests in [3a4b957f3/jomae.git].

comment:3 by Ryan J Ollos, 7 years ago

Looks good to me.

comment:4 by Jun Omae, 7 years ago

Resolution: fixed
Status: assignedclosed

Thanks. Committed in [16206].

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.