Show More
@@ -1,112 +1,116 b'' | |||||
1 | <%namespace name="base" file="/base/base.mako"/> |
|
1 | <%namespace name="base" file="/base/base.mako"/> | |
2 |
|
2 | |||
3 | <%doc> |
|
3 | <%doc> | |
4 | Please note the content of this file is cached, so changes here might not be reflected when editing. |
|
4 | Please note the content of this file is cached, so changes here might not be reflected when editing. | |
5 | add ?no-cache=true into the file url to disable caches. |
|
5 | add ?no-cache=true into the file url to disable caches. | |
6 |
|
6 | |||
7 | e.g |
|
7 | e.g | |
8 | http://docker-dev:10020/ipython/files/master/IPython/frontend/html/notebook/static?no-cache=1 |
|
8 | http://docker-dev:10020/ipython/files/master/IPython/frontend/html/notebook/static?no-cache=1 | |
9 |
|
9 | |||
10 | </%doc> |
|
10 | </%doc> | |
11 | <% |
|
11 | <% | |
12 | at_ref = request.GET.get('at') |
|
12 | at_ref = request.GET.get('at') | |
13 | if at_ref: |
|
13 | if at_ref: | |
14 | query={'at': at_ref} |
|
14 | query={'at': at_ref} | |
15 | default_landing_ref = at_ref or c.rhodecode_db_repo.landing_ref_name |
|
15 | default_landing_ref = at_ref or c.rhodecode_db_repo.landing_ref_name | |
16 | else: |
|
16 | else: | |
17 | query=None |
|
17 | query=None | |
18 | default_landing_ref = c.commit.raw_id |
|
18 | default_landing_ref = c.commit.raw_id | |
19 | %> |
|
19 | %> | |
20 | <div id="file-tree-wrapper" class="browser-body ${('full-load' if c.full_load else '')}"> |
|
20 | <div id="file-tree-wrapper" class="browser-body ${('full-load' if c.full_load else '')}"> | |
21 | <table class="code-browser rctable table-bordered"> |
|
21 | <table class="code-browser rctable table-bordered"> | |
22 | <thead> |
|
22 | <thead> | |
23 | <tr> |
|
23 | <tr> | |
24 | <th>${_('Name')}</th> |
|
24 | <th>${_('Name')}</th> | |
25 | <th>${_('Size')}</th> |
|
25 | <th>${_('Size')}</th> | |
26 | <th>${_('Modified')}</th> |
|
26 | <th>${_('Modified')}</th> | |
27 | <th>${_('Last Commit')}</th> |
|
27 | <th>${_('Last Commit')}</th> | |
28 | <th>${_('Author')}</th> |
|
28 | <th>${_('Author')}</th> | |
29 | </tr> |
|
29 | </tr> | |
30 | </thead> |
|
30 | </thead> | |
31 |
|
31 | |||
32 | <tbody id="tbody"> |
|
32 | <tbody id="tbody"> | |
33 | <tr> |
|
33 | <tr> | |
34 | <td colspan="5"> |
|
34 | <td colspan="5"> | |
35 | ${h.files_breadcrumbs(c.repo_name, c.rhodecode_db_repo.repo_type, c.commit.raw_id, c.file.path, c.rhodecode_db_repo.landing_ref_name, request.GET.get('at'), limit_items=True)} |
|
35 | ${h.files_breadcrumbs(c.repo_name, c.rhodecode_db_repo.repo_type, c.commit.raw_id, c.file.path, c.rhodecode_db_repo.landing_ref_name, request.GET.get('at'), limit_items=True)} | |
36 | </td> |
|
36 | </td> | |
37 | </tr> |
|
37 | </tr> | |
38 |
|
38 | |||
39 | <% has_files = False %> |
|
39 | <% has_files = False %> | |
40 | % if not c.file.is_submodule(): |
|
40 | % if not c.file.is_submodule(): | |
41 | % for cnt, node in enumerate(c.file): |
|
41 | % for cnt, node in enumerate(c.file): | |
42 | <% has_files = True %> |
|
42 | <% has_files = True %> | |
43 | <tr class="parity${(cnt % 2)}"> |
|
43 | <tr class="parity${(cnt % 2)}"> | |
44 | <td class="td-componentname"> |
|
44 | <td class="td-componentname"> | |
45 | % if node.is_submodule(): |
|
45 | % if node.is_submodule(): | |
46 | <span class="submodule-dir"> |
|
46 | <span class="submodule-dir"> | |
47 | % if node.url.startswith('http://') or node.url.startswith('https://'): |
|
47 | % if node.url.startswith('http://') or node.url.startswith('https://'): | |
48 | <a href="${node.url}"> |
|
48 | <a href="${node.url}"> | |
49 | <i class="icon-directory browser-dir"></i><span class="tooltip-hovercard" data-hovercard-alt="${node.url}" data-hovercard-url="javascript:renderTemplate('submoduleHovercard', {'submodule_url':'${node.url}'})">${node.name}</span> |
|
49 | <i class="icon-directory browser-dir"></i><span class="tooltip-hovercard" data-hovercard-alt="${node.url}" data-hovercard-url="javascript:renderTemplate('submoduleHovercard', {'submodule_url':'${node.url}'})">${node.name}</span> | |
50 | </a> |
|
50 | </a> | |
51 | % else: |
|
51 | % else: | |
52 | <i class="icon-directory browser-dir"></i><span class="tooltip-hovercard" data-hovercard-alt="${node.url}" data-hovercard-url="javascript:renderTemplate('submoduleHovercard', {'submodule_url':'${node.url}'})">${node.name}</span> |
|
52 | <i class="icon-directory browser-dir"></i><span class="tooltip-hovercard" data-hovercard-alt="${node.url}" data-hovercard-url="javascript:renderTemplate('submoduleHovercard', {'submodule_url':'${node.url}'})">${node.name}</span> | |
53 | % endif |
|
53 | % endif | |
54 | </span> |
|
54 | </span> | |
55 | % else: |
|
55 | % else: | |
56 | <a href="${h.repo_files_by_ref_url(c.repo_name, c.rhodecode_db_repo.repo_type, f_path=h.safe_str(node.path), ref_name=default_landing_ref, commit_id=c.commit.raw_id, query=query)}"> |
|
56 | <a href="${h.repo_files_by_ref_url(c.repo_name, c.rhodecode_db_repo.repo_type, f_path=h.safe_str(node.path), ref_name=default_landing_ref, commit_id=c.commit.raw_id, query=query)}"> | |
57 | <i class="${('icon-file-text browser-file' if node.is_file() else 'icon-directory browser-dir')}"></i>${node.name} |
|
57 | <i class="${('icon-file-text browser-file' if node.is_file() else 'icon-directory browser-dir')}"></i>${node.name} | |
58 | </a> |
|
58 | </a> | |
59 | % endif |
|
59 | % endif | |
60 | </td> |
|
60 | </td> | |
61 | %if node.is_file(): |
|
61 | %if node.is_file(): | |
62 | <td class="td-size" data-attr-name="size"> |
|
62 | <td class="td-size" data-attr-name="size"> | |
63 | % if c.full_load: |
|
63 | % if c.full_load: | |
64 | <span data-size="${node.size}">${h.format_byte_size_binary(node.size)}</span> |
|
64 | <span data-size="${node.size}">${h.format_byte_size_binary(node.size)}</span> | |
65 | % else: |
|
65 | % else: | |
66 | ${_('Loading ...')} |
|
66 | ${_('Loading ...')} | |
67 | % endif |
|
67 | % endif | |
68 | </td> |
|
68 | </td> | |
69 | <td class="td-time" data-attr-name="modified_at"> |
|
69 | <td class="td-time" data-attr-name="modified_at"> | |
70 | % if c.full_load: |
|
70 | % if c.full_load: | |
71 | <span data-date="${node.last_commit.date}">${h.age_component(node.last_commit.date)}</span> |
|
71 | <span data-date="${node.last_commit.date}">${h.age_component(node.last_commit.date)}</span> | |
72 | % endif |
|
72 | % endif | |
73 | </td> |
|
73 | </td> | |
74 | <td class="td-hash" data-attr-name="commit_id"> |
|
74 | <td class="td-hash" data-attr-name="commit_id"> | |
75 | % if c.full_load: |
|
75 | % if c.full_load: | |
76 | <div class="tooltip-hovercard" data-hovercard-alt="${node.last_commit.message}" data-hovercard-url="${h.route_path('hovercard_repo_commit', repo_name=c.repo_name, commit_id=node.last_commit.raw_id)}"> |
|
76 | <div class="tooltip-hovercard" data-hovercard-alt="${node.last_commit.message}" data-hovercard-url="${h.route_path('hovercard_repo_commit', repo_name=c.repo_name, commit_id=node.last_commit.raw_id)}"> | |
77 | <pre data-commit-id="${node.last_commit.raw_id}">r${node.last_commit.idx}:${node.last_commit.short_id}</pre> |
|
77 | <pre data-commit-id="${node.last_commit.raw_id}">r${node.last_commit.idx}:${node.last_commit.short_id}</pre> | |
78 | </div> |
|
78 | </div> | |
79 | % endif |
|
79 | % endif | |
80 | </td> |
|
80 | </td> | |
81 | <td class="td-user" data-attr-name="author"> |
|
81 | <td class="td-user" data-attr-name="author"> | |
82 | % if c.full_load: |
|
82 | % if c.full_load: | |
83 | <span data-author="${node.last_commit.author}">${h.gravatar_with_user(request, node.last_commit.author, tooltip=True)|n}</span> |
|
83 | <span data-author="${node.last_commit.author}">${h.gravatar_with_user(request, node.last_commit.author, tooltip=True)|n}</span> | |
84 | % endif |
|
84 | % endif | |
85 | </td> |
|
85 | </td> | |
86 | %else: |
|
86 | %else: | |
87 | <td></td> |
|
87 | <td></td> | |
88 | <td></td> |
|
88 | <td></td> | |
89 | <td></td> |
|
89 | <td></td> | |
90 | <td></td> |
|
90 | <td></td> | |
91 | %endif |
|
91 | %endif | |
92 | </tr> |
|
92 | </tr> | |
93 | % endfor |
|
93 | % endfor | |
94 | % endif |
|
94 | % endif | |
95 |
|
95 | |||
96 | % if not has_files: |
|
96 | % if not has_files: | |
97 | <tr> |
|
97 | <tr> | |
98 | <td colspan="5"> |
|
98 | <td colspan="5"> | |
99 | ##empty-dir mostly SVN |
|
99 | ##empty-dir mostly SVN | |
100 |
|
100 | |||
101 | ## submodule if we somehow endup |
|
101 | ## submodule if we somehow endup | |
102 | % if c.file.is_submodule(): |
|
102 | % if c.file.is_submodule(): | |
103 |
<span class="submodule-dir"> |
|
103 | <span class="submodule-dir"> | |
|
104 | <strong>Submodule Node</strong><br/> | |||
|
105 | ${h.escape(c.file.name)} | |||
|
106 | <pre>${c.file.url}</pre> | |||
|
107 | </span> | |||
104 | %endif |
|
108 | %endif | |
105 | </td> |
|
109 | </td> | |
106 | </tr> |
|
110 | </tr> | |
107 | % endif |
|
111 | % endif | |
108 |
|
112 | |||
109 | </tbody> |
|
113 | </tbody> | |
110 | <tbody id="tbody_filtered"></tbody> |
|
114 | <tbody id="tbody_filtered"></tbody> | |
111 | </table> |
|
115 | </table> | |
112 | </div> |
|
116 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now