diff --git a/trac/attachment.py b/trac/attachment.py
|
a
|
b
|
|
| 497 | 497 | attachment = resource_realm(id=id).child('attachment', filename) |
| 498 | 498 | if 'ATTACHMENT_VIEW' in req.perm(attachment): |
| 499 | 499 | yield (get_resource_url(self.env, attachment, req.href), |
| 500 | | "%s: %s" % (get_resource_shortname(self.env, |
| 501 | | attachment.parent), |
| 502 | | filename), |
| | 500 | get_resource_shortname(self.env, attachment), |
| 503 | 501 | datetime.fromtimestamp(time, utc), author, |
| 504 | 502 | shorten_result(desc, terms)) |
| 505 | 503 | |
| … |
… |
|
| 530 | 528 | |
| 531 | 529 | def get_resource_description(self, resource, format=None, **kwargs): |
| 532 | 530 | if format == 'compact': |
| 533 | | return '%s:%s' % (get_resource_shortname(self.env, |
| 534 | | resource.parent), |
| 535 | | resource.filename) |
| | 531 | return '%s (%s)' % (resource.id, |
| | 532 | get_resource_name(self.env, resource.parent)) |
| 536 | 533 | elif format == 'summary': |
| 537 | 534 | return Attachment(self.env, resource).description |
| 538 | 535 | if resource.id: |
| 539 | | return _("Attachment '%(id)s' in %(parent)s", id=resource.id, |
| | 536 | return _('Attachment "%(id)s" in %(parent)s', id=resource.id, |
| 540 | 537 | parent=get_resource_name(self.env, resource.parent)) |
| 541 | 538 | else: |
| 542 | 539 | return _("Attachments of %(parent)s", |