Show More
@@ -1,38 +1,49 b'' | |||
|
1 | 1 | % if c.formatted_results: |
|
2 | 2 | |
|
3 | 3 | <table class="rctable search-results"> |
|
4 | 4 | <tr> |
|
5 | 5 | <th>${_('Repository')}</th> |
|
6 | 6 | <th>${_('File')}</th> |
|
7 | ##TODO: add 'Last Change' and 'Author' here | |
|
7 | <th>${_('Size')}</th> | |
|
8 | <th>${_('Lines')}</th> | |
|
8 | 9 | </tr> |
|
9 | 10 | %for entry in c.formatted_results: |
|
10 | 11 | ## search results are additionally filtered, and this check is just a safe gate |
|
11 | 12 | % if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(entry['repository'], 'search results path check'): |
|
12 | 13 | <tr class="body"> |
|
13 | 14 | <td class="td-componentname"> |
|
14 | 15 | %if h.get_repo_type_by_name(entry.get('repository')) == 'hg': |
|
15 | 16 | <i class="icon-hg"></i> |
|
16 | 17 | %elif h.get_repo_type_by_name(entry.get('repository')) == 'git': |
|
17 | 18 | <i class="icon-git"></i> |
|
18 | 19 | %elif h.get_repo_type_by_name(entry.get('repository')) == 'svn': |
|
19 | 20 | <i class="icon-svn"></i> |
|
20 | 21 | %endif |
|
21 | 22 | ${h.link_to(entry['repository'], h.route_path('repo_summary',repo_name=entry['repository']))} |
|
22 | 23 | </td> |
|
23 | 24 | <td class="td-componentname"> |
|
24 | 25 | ${h.link_to(h.literal(entry['f_path']), |
|
25 | 26 | h.route_path('repo_files',repo_name=entry['repository'],commit_id='tip',f_path=entry['f_path']))} |
|
26 | 27 | </td> |
|
28 | <td> | |
|
29 | %if entry.get('size'): | |
|
30 | ${h.format_byte_size_binary(entry['size'])} | |
|
31 | %endif | |
|
32 | </td> | |
|
33 | <td> | |
|
34 | %if entry.get('lines'): | |
|
35 | ${entry.get('lines', 0.)} ${_ungettext('line', 'lines', entry.get('lines', 0.))} | |
|
36 | %endif | |
|
37 | </td> | |
|
27 | 38 | </tr> |
|
28 | 39 | % endif |
|
29 | 40 | %endfor |
|
30 | 41 | </table> |
|
31 | 42 | |
|
32 | 43 | %if c.cur_query: |
|
33 | 44 | <div class="pagination-wh pagination-left"> |
|
34 | 45 | ${c.formatted_results.pager('$link_previous ~2~ $link_next')} |
|
35 | 46 | </div> |
|
36 | 47 | %endif |
|
37 | 48 | |
|
38 | 49 | % endif |
General Comments 0
You need to be logged in to leave comments.
Login now