##// END OF EJS Templates
svn: show empty dirs nicer
dan -
r3941:d82329b8 default
parent child Browse files
Show More
@@ -1,83 +1,94 b''
1 1 <%
2 2 if request.GET.get('at'):
3 3 query={'at': request.GET.get('at')}
4 4 else:
5 5 query=None
6 6 %>
7 7 <div id="file-tree-wrapper" class="browser-body ${('full-load' if c.full_load else '')}">
8 8 <table class="code-browser rctable repo_summary">
9 9 <thead>
10 10 <tr>
11 11 <th>${_('Name')}</th>
12 12 <th>${_('Size')}</th>
13 13 <th>${_('Modified')}</th>
14 14 <th>${_('Last Commit')}</th>
15 15 <th>${_('Author')}</th>
16 16 </tr>
17 17 </thead>
18 18
19 19 <tbody id="tbody">
20 20 <tr>
21 21 <td colspan="5">
22
23 22 ${h.files_breadcrumbs(c.repo_name,c.commit.raw_id,c.file.path, request.GET.get('at'), limit_items=True)}
24
25 23 </td>
26 24 </tr>
27 %for cnt,node in enumerate(c.file):
28 <tr class="parity${cnt%2}">
25
26 <% has_files = False %>
27 % for cnt,node in enumerate(c.file):
28 <% has_files = True %>
29 <tr class="parity${(cnt % 2)}">
29 30 <td class="td-componentname">
30 31 % if node.is_submodule():
31 32 <span class="submodule-dir">
32 33 % if node.url.startswith('http://') or node.url.startswith('https://'):
33 34 <a href="${node.url}">
34 35 <i class="icon-directory browser-dir"></i>${node.name}
35 36 </a>
36 37 % else:
37 38 <i class="icon-directory browser-dir"></i>${node.name}
38 39 % endif
39 40 </span>
40 41 % else:
41 42
42 43 <a href="${h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=h.safe_unicode(node.path), _query=query)}">
43 44 <i class="${('icon-file-text browser-file' if node.is_file() else 'icon-directory browser-dir')}"></i>${node.name}
44 45 </a>
45 46 % endif
46 47 </td>
47 48 %if node.is_file():
48 49 <td class="td-size" data-attr-name="size">
49 50 % if c.full_load:
50 51 <span data-size="${node.size}">${h.format_byte_size_binary(node.size)}</span>
51 52 % else:
52 53 ${_('Loading ...')}
53 54 % endif
54 55 </td>
55 56 <td class="td-time" data-attr-name="modified_at">
56 57 % if c.full_load:
57 58 <span data-date="${node.last_commit.date}">${h.age_component(node.last_commit.date)}</span>
58 59 % endif
59 60 </td>
60 61 <td class="td-hash" data-attr-name="commit_id">
61 62 % if c.full_load:
62 63 <div class="tooltip" title="${h.tooltip(node.last_commit.message)}">
63 64 <pre data-commit-id="${node.last_commit.raw_id}">r${node.last_commit.idx}:${node.last_commit.short_id}</pre>
64 65 </div>
65 66 % endif
66 67 </td>
67 68 <td class="td-user" data-attr-name="author">
68 69 % if c.full_load:
69 70 <span data-author="${node.last_commit.author}" title="${h.tooltip(node.last_commit.author)}">${h.gravatar_with_user(request, node.last_commit.author)|n}</span>
70 71 % endif
71 72 </td>
72 73 %else:
73 74 <td></td>
74 75 <td></td>
75 76 <td></td>
76 77 <td></td>
77 78 %endif
78 79 </tr>
79 %endfor
80 % endfor
81
82 % if not has_files:
83 <tr>
84 <td colspan="5">
85 ##empty-dir mostly SVN
86 &nbsp;
87 </td>
88 </tr>
89 % endif
90
80 91 </tbody>
81 92 <tbody id="tbody_filtered"></tbody>
82 93 </table>
83 94 </div>
General Comments 0
You need to be logged in to leave comments. Login now