Changeset 3372 for backrefpatch
- Timestamp:
- 03/16/08 16:12:55 (8 months ago)
- Files:
-
- backrefpatch/0.11/backref.patch (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
backrefpatch/0.11/backref.patch
r2507 r3372 1 1 Index: trac/ticket/web_ui.py 2 2 =================================================================== 3 --- trac/ticket/web_ui.py (revision 5856)3 --- trac/ticket/web_ui.py (revision 6697) 4 4 +++ trac/ticket/web_ui.py (working copy) 5 @@ -4 32,6 +432,8 @@5 @@ -476,6 +476,8 @@ 6 6 # Store a timestamp for detecting "mid air collisions" 7 7 'timestamp': str(ticket.time_changed)}) … … 9 9 + data['backrefs'] = self._get_backrefs(context, ticket) 10 10 + 11 self._insert_ticket_data( context, data, get_reporter_id(req, 'author'),12 field_changes)13 14 @@ - 892,6 +894,39 @@11 self._insert_ticket_data(req, ticket, data, 12 get_reporter_id(req, 'author'), field_changes) 13 14 @@ -1000,6 +1002,39 @@ 15 15 for key in field_changes: 16 16 ticket[key] = field_changes[key]['new'] … … 50 50 + 51 51 def _prepare_fields(self, req, ticket): 52 context = Context.from_request(req, ticket.resource) 52 53 fields = [] 53 for field in ticket.fields:54 54 Index: trac/ticket/templates/ticket.html 55 55 =================================================================== 56 --- trac/ticket/templates/ticket.html (revision 5856)56 --- trac/ticket/templates/ticket.html (revision 6697) 57 57 +++ trac/ticket/templates/ticket.html (working copy) 58 @@ -205,6 +205,21 @@ 59 ${wiki_to_html(context, ticket.description, escape_newlines=True)} 58 @@ -186,6 +186,21 @@ 60 59 </div> 60 <br py:if="not ticket.description" style="clear: both" /> 61 61 </div> 62 62 + … … 80 80 Index: trac/versioncontrol/web_ui/changeset.py 81 81 =================================================================== 82 --- trac/versioncontrol/web_ui/changeset.py (revision 5856)82 --- trac/versioncontrol/web_ui/changeset.py (revision 6697) 83 83 +++ trac/versioncontrol/web_ui/changeset.py (working copy) 84 @@ - 594,6 +594,8 @@84 @@ -611,6 +611,8 @@ 85 85 info = None 86 86 changes.append(info) # the sequence should be immutable … … 89 89 + 90 90 data.update({'has_diffs': has_diffs, 'changes': changes, 'xhr': xhr, 91 'filestats': filestats, 91 'filestats': filestats, 'annotated': annotated, 92 92 'files': files, 'location': self._get_location(files), 93 @@ -9 07,6 +909,42 @@93 @@ -931,6 +933,42 @@ 94 94 old=data['old_rev']) + query 95 95 return tag.a(label, class_="changeset", title=title, href=href) … … 136 136 Index: trac/versioncontrol/templates/changeset.html 137 137 =================================================================== 138 --- trac/versioncontrol/templates/changeset.html (revision 5856)138 --- trac/versioncontrol/templates/changeset.html (revision 6697) 139 139 +++ trac/versioncontrol/templates/changeset.html (working copy) 140 @@ -1 30,6 +130,19 @@140 @@ -116,6 +116,19 @@ 141 141 </py:when> 142 142 <py:otherwise><pre>${changeset.message}</pre></py:otherwise> … … 160 160 Index: trac/wiki/web_ui.py 161 161 =================================================================== 162 --- trac/wiki/web_ui.py (revision 5856)162 --- trac/wiki/web_ui.py (revision 6697) 163 163 +++ trac/wiki/web_ui.py (working copy) 164 @@ - 514,6 +514,8 @@165 WikiSystem(self.env).get_pages(prefix) if 'WIKI_VIEW'166 in req.perm(context(id=t))]164 @@ -491,6 +491,8 @@ 165 WikiSystem(self.env).get_pages(prefix) if 166 'WIKI_VIEW' in req.perm('wiki', template)] 167 167 168 168 + data['backrefs'] = self._get_backrefs(context, page) … … 170 170 # -- prev/up/next links 171 171 if prev_version: 172 add_link(req, 'prev', req.href.wiki(page.name,173 @@ -53 5,6 +537,35 @@174 })175 return 'wiki_view.html', data, None172 add_link(req, 'prev', 173 @@ -532,6 +534,35 @@ 174 action='diff', 175 version=page.version)) 176 176 177 177 + def _get_backrefs(self, context, page): … … 209 209 Index: trac/wiki/templates/wiki_view.html 210 210 =================================================================== 211 --- trac/wiki/templates/wiki_view.html (revision 5856)211 --- trac/wiki/templates/wiki_view.html (revision 6697) 212 212 +++ trac/wiki/templates/wiki_view.html (working copy) 213 @@ - 61,6 +61,16 @@213 @@ -43,6 +43,16 @@ 214 214 215 215 ${list_of_attachments(attachments, compact=True)} … … 225 225 + </py:if> 226 226 + 227 <py:with vars="modify_perm = 'WIKI_MODIFY' in perm( context);228 delete_perm = 'WIKI_DELETE' in perm( context);229 admin_perm = 'WIKI_ADMIN' in perm( context)">227 <py:with vars="modify_perm = 'WIKI_MODIFY' in perm(page.resource); 228 delete_perm = 'WIKI_DELETE' in perm(page.resource); 229 admin_perm = 'WIKI_ADMIN' in perm(page.resource)">
