Mercurial > kallithea
annotate rhodecode/templates/files/files_browser.html @ 3019:e85380f05a5e beta
implements #657 added table rendering support for markdown
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 23 Nov 2012 13:27:34 +0100 |
parents | 269c6e0b54cc |
children | 63e58ef80ef1 b4f401524060 |
rev | line source |
---|---|
128
9deb6f1d5b90
Implemented file history.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 <%def name="file_class(node)"> |
9deb6f1d5b90
Implemented file history.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 %if node.is_file(): |
9deb6f1d5b90
Implemented file history.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 <%return "browser-file" %> |
9deb6f1d5b90
Implemented file history.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 %else: |
9deb6f1d5b90
Implemented file history.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 <%return "browser-dir"%> |
9deb6f1d5b90
Implemented file history.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 %endif |
9deb6f1d5b90
Implemented file history.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 </%def> |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
8 <div id="body" class="browserblock"> |
949
3bc10f10f2f6
fixed file browsing ui and css
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
9 <div class="browser-header"> |
3bc10f10f2f6
fixed file browsing ui and css
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
10 <div class="browser-nav"> |
3bc10f10f2f6
fixed file browsing ui and css
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
11 ${h.form(h.url.current())} |
3bc10f10f2f6
fixed file browsing ui and css
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
12 <div class="info_box"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1810
diff
changeset
|
13 <span class="rev">${_('view')}@rev</span> |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2427
diff
changeset
|
14 <a class="ui-btn ypjax-link" href="${c.url_prev}" title="${_('previous revision')}">«</a> |
1452
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
15 ${h.text('at_rev',value=c.changeset.revision,size=5)} |
2686
269c6e0b54cc
Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents:
2427
diff
changeset
|
16 <a class="ui-btn ypjax-link" href="${c.url_next}" title="${_('next revision')}">»</a> |
1756 | 17 ## ${h.submit('view',_('view'),class_="ui-btn")} |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1810
diff
changeset
|
18 </div> |
949
3bc10f10f2f6
fixed file browsing ui and css
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
19 ${h.end_form()} |
3bc10f10f2f6
fixed file browsing ui and css
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
20 </div> |
3bc10f10f2f6
fixed file browsing ui and css
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
21 <div class="browser-branch"> |
3bc10f10f2f6
fixed file browsing ui and css
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
22 ${h.checkbox('stay_at_branch',c.changeset.branch,c.changeset.branch==c.branch)} |
3bc10f10f2f6
fixed file browsing ui and css
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
23 <label>${_('follow current branch')}</label> |
3bc10f10f2f6
fixed file browsing ui and css
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
24 </div> |
1452
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
25 <div class="browser-search"> |
1483
7b67b0dcad6d
Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
1452
diff
changeset
|
26 <div id="search_activate_id" class="search_activate"> |
1756 | 27 <a class="ui-btn" id="filter_activate" href="#">${_('search file list')}</a> |
1483
7b67b0dcad6d
Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
1452
diff
changeset
|
28 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1810
diff
changeset
|
29 % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
1553
6ff50754d22d
UX improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1486
diff
changeset
|
30 <div id="add_node_id" class="add_node"> |
1756 | 31 <a class="ui-btn" href="${h.url('files_add_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path)}">${_('add new file')}</a> |
1486
92f0065ba238
hide add new file button if user has no permission for it
Marcin Kuzminski <marcin@python-works.com>
parents:
1483
diff
changeset
|
32 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1810
diff
changeset
|
33 % endif |
1452
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
34 <div> |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
35 <div id="node_filter_box_loading" style="display:none">${_('Loading file list...')}</div> |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
36 <div id="node_filter_box" style="display:none"> |
1810
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
37 ${h.files_breadcrumbs(c.repo_name,c.changeset.raw_id,c.file.path)}/<input class="init" type="text" value="type to search..." name="filter" size="25" id="node_filter" autocomplete="off"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1810
diff
changeset
|
38 </div> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1810
diff
changeset
|
39 </div> |
1452
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
40 </div> |
884
322b53be49cc
Fixed url bug when using numeric revision in file browser,
Marcin Kuzminski <marcin@python-works.com>
parents:
740
diff
changeset
|
41 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1810
diff
changeset
|
42 |
149
b3c93efd1c97
Updated template for summary (archives links)
Marcin Kuzminski <marcin@python-works.com>
parents:
145
diff
changeset
|
43 <div class="browser-body"> |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
44 <table class="code-browser"> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
45 <thead> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
46 <tr> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
47 <th>${_('Name')}</th> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
48 <th>${_('Size')}</th> |
495
15f837c62fa5
added mimetypes to files
Marcin Kuzminski <marcin@python-works.com>
parents:
416
diff
changeset
|
49 <th>${_('Mimetype')}</th> |
2084
feb0fccdcf83
fixed vcs issue with last_changeset for filenodes
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
50 <th>${_('Last Revision')}</th> |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
51 <th>${_('Last modified')}</th> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
52 <th>${_('Last commiter')}</th> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
53 </tr> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
54 </thead> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1810
diff
changeset
|
55 |
1452
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
56 <tbody id="tbody"> |
1737
61eda8bf70d0
new files views
Marcin Kuzminski <marcin@python-works.com>
parents:
1729
diff
changeset
|
57 %if c.file.parent: |
497
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
58 <tr class="parity0"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1810
diff
changeset
|
59 <td> |
1737
61eda8bf70d0
new files views
Marcin Kuzminski <marcin@python-works.com>
parents:
1729
diff
changeset
|
60 ${h.link_to('..',h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.file.parent.path),class_="browser-dir ypjax-link")} |
497
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
61 </td> |
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
62 <td></td> |
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
63 <td></td> |
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
64 <td></td> |
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
65 <td></td> |
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
66 <td></td> |
633
fcf599cd3404
Move changes for git implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
583
diff
changeset
|
67 </tr> |
497
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
68 %endif |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1810
diff
changeset
|
69 |
1737
61eda8bf70d0
new files views
Marcin Kuzminski <marcin@python-works.com>
parents:
1729
diff
changeset
|
70 %for cnt,node in enumerate(c.file): |
887
3c0cae9b58cf
shorten last modified column in files listing
Marcin Kuzminski <marcin@python-works.com>
parents:
884
diff
changeset
|
71 <tr class="parity${cnt%2}"> |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
72 <td> |
2232
49dc09e9f076
Implements subrepos view inside filebrowser
Marcin Kuzminski <marcin@python-works.com>
parents:
2084
diff
changeset
|
73 %if node.is_submodule(): |
49dc09e9f076
Implements subrepos view inside filebrowser
Marcin Kuzminski <marcin@python-works.com>
parents:
2084
diff
changeset
|
74 ${h.link_to(node.name,node.url or '#',class_="submodule-dir ypjax-link")} |
49dc09e9f076
Implements subrepos view inside filebrowser
Marcin Kuzminski <marcin@python-works.com>
parents:
2084
diff
changeset
|
75 %else: |
49dc09e9f076
Implements subrepos view inside filebrowser
Marcin Kuzminski <marcin@python-works.com>
parents:
2084
diff
changeset
|
76 ${h.link_to(node.name, h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=h.safe_unicode(node.path)),class_=file_class(node)+" ypjax-link")} |
49dc09e9f076
Implements subrepos view inside filebrowser
Marcin Kuzminski <marcin@python-works.com>
parents:
2084
diff
changeset
|
77 %endif: |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
78 </td> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
79 <td> |
583
95b746f2f0ed
fixed nasty bug when browsing on renames.
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
80 %if node.is_file(): |
497
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
81 ${h.format_byte_size(node.size,binary=True)} |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1810
diff
changeset
|
82 %endif |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
83 </td> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
84 <td> |
495
15f837c62fa5
added mimetypes to files
Marcin Kuzminski <marcin@python-works.com>
parents:
416
diff
changeset
|
85 %if node.is_file(): |
15f837c62fa5
added mimetypes to files
Marcin Kuzminski <marcin@python-works.com>
parents:
416
diff
changeset
|
86 ${node.mimetype} |
15f837c62fa5
added mimetypes to files
Marcin Kuzminski <marcin@python-works.com>
parents:
416
diff
changeset
|
87 %endif |
15f837c62fa5
added mimetypes to files
Marcin Kuzminski <marcin@python-works.com>
parents:
416
diff
changeset
|
88 </td> |
15f837c62fa5
added mimetypes to files
Marcin Kuzminski <marcin@python-works.com>
parents:
416
diff
changeset
|
89 <td> |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
90 %if node.is_file(): |
2427
f467c75544af
Added h.tooltip to all places that tooltip_title is used.
Marcin Kuzminski <marcin@python-works.com>
parents:
2416
diff
changeset
|
91 <div class="tooltip" title="${h.tooltip(node.last_changeset.message)}"> |
1770
184557472f5c
Implements #304
Marcin Kuzminski <marcin@python-works.com>
parents:
1764
diff
changeset
|
92 <pre>${'r%s:%s' % (node.last_changeset.revision,node.last_changeset.short_id)}</pre> |
184557472f5c
Implements #304
Marcin Kuzminski <marcin@python-works.com>
parents:
1764
diff
changeset
|
93 </div> |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
94 %endif |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
95 </td> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
96 <td> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
97 %if node.is_file(): |
2427
f467c75544af
Added h.tooltip to all places that tooltip_title is used.
Marcin Kuzminski <marcin@python-works.com>
parents:
2416
diff
changeset
|
98 <span class="tooltip" title="${h.tooltip(h.fmt_date(node.last_changeset.date))}"> |
887
3c0cae9b58cf
shorten last modified column in files listing
Marcin Kuzminski <marcin@python-works.com>
parents:
884
diff
changeset
|
99 ${h.age(node.last_changeset.date)}</span> |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
100 %endif |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
101 </td> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
102 <td> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
103 %if node.is_file(): |
1764
39b49c999efb
fixes issue #320.
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
104 <span title="${node.last_changeset.author}"> |
39b49c999efb
fixes issue #320.
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
105 ${h.person(node.last_changeset.author)} |
39b49c999efb
fixes issue #320.
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
106 </span> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1810
diff
changeset
|
107 %endif |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
108 </td> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
109 </tr> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
110 %endfor |
1452
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
111 </tbody> |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
112 <tbody id="tbody_filtered" style="display:none"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1810
diff
changeset
|
113 </tbody> |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
114 </table> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
115 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1810
diff
changeset
|
116 </div> |