Skip to content

Commit f35cf28

Browse files
committed
Add new column 'repository' to the list of code comments
1 parent f4acbaa commit f35cf28

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

code_comments/comments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Comments(object):
1313

1414
def __init__(self, req, env):
1515
self.req, self.env = req, env
16-
self.valid_sorting_methods = ('id', 'author', 'time', 'path', 'text')
16+
self.valid_sorting_methods = ('id', 'author', 'time', 'reponame', 'path', 'text')
1717

1818
def comment_from_row(self, row):
1919
return Comment(self.req, self.env, row)

code_comments/templates/comments.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ <h1>Code Comments</h1>
4949
<td>$comment.id</td>
5050
<th>$comment.author</th>
5151
<th>${comment.formatted_date()}</th>
52+
<td>$comment.reponame</td>
5253
<td>${comment.path_link_tag()}</td>
5354
<td>$comment.html</td>
5455
<td>${comment.get_ticket_links()}</td>

code_comments/web.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ def href_with_page(page):
243243

244244
def prepare_sortable_headers(self):
245245
displayed_sorting_methods = \
246-
('id', 'author', 'time', 'path', 'text')
246+
('id', 'author', 'time', 'reponame', 'path', 'text')
247247
displayed_sorting_method_names = \
248-
('ID', 'Author', 'Date', 'Path', 'Text')
248+
('ID', 'Author', 'Date', 'Repository', 'Path', 'Text')
249249
query_args = self.req.args
250250
if 'page' in query_args:
251251
del query_args['page']

0 commit comments

Comments
 (0)