annotate rhodecode/templates/files/files_browser.html @ 2031:82a88013a3fd

merge 1.3 into stable
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 26 Feb 2012 17:25:09 +0200
parents 752b0a7b7679 f91d3f9b7230
children ecd59c28f432
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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>
1756
Marcin Kuzminski <marcin@python-works.com>
parents: 1737
diff changeset
14 <a class="ui-btn" href="${c.url_prev}" title="${_('previous revision')}">&laquo;</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)}
1756
Marcin Kuzminski <marcin@python-works.com>
parents: 1737
diff changeset
16 <a class="ui-btn" href="${c.url_next}" title="${_('next revision')}">&raquo;</a>
Marcin Kuzminski <marcin@python-works.com>
parents: 1737
diff changeset
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
Marcin Kuzminski <marcin@python-works.com>
parents: 1737
diff changeset
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
Marcin Kuzminski <marcin@python-works.com>
parents: 1737
diff changeset
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>
144
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
50 <th>${_('Revision')}</th>
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>
1699
623b228cf325 cleaned up JS files in files templates.
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
73 ${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")}
144
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
74 </td>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
75 <td>
583
95b746f2f0ed fixed nasty bug when browsing on renames.
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
76 %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
77 ${h.format_byte_size(node.size,binary=True)}
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1810
diff changeset
78 %endif
144
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
79 </td>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
80 <td>
495
15f837c62fa5 added mimetypes to files
Marcin Kuzminski <marcin@python-works.com>
parents: 416
diff changeset
81 %if node.is_file():
15f837c62fa5 added mimetypes to files
Marcin Kuzminski <marcin@python-works.com>
parents: 416
diff changeset
82 ${node.mimetype}
15f837c62fa5 added mimetypes to files
Marcin Kuzminski <marcin@python-works.com>
parents: 416
diff changeset
83 %endif
15f837c62fa5 added mimetypes to files
Marcin Kuzminski <marcin@python-works.com>
parents: 416
diff changeset
84 </td>
15f837c62fa5 added mimetypes to files
Marcin Kuzminski <marcin@python-works.com>
parents: 416
diff changeset
85 <td>
144
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
86 %if node.is_file():
1770
184557472f5c Implements #304
Marcin Kuzminski <marcin@python-works.com>
parents: 1764
diff changeset
87 <div class="tooltip" title="${node.last_changeset.message}">
184557472f5c Implements #304
Marcin Kuzminski <marcin@python-works.com>
parents: 1764
diff changeset
88 <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
89 </div>
144
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
90 %endif
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
91 </td>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
92 <td>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
93 %if node.is_file():
904
82aaf4e71817 reimplemented tooltip, refactored tooltip_title into title for proper html,
Marcin Kuzminski <marcin@python-works.com>
parents: 887
diff changeset
94 <span class="tooltip" title="${node.last_changeset.date}">
887
3c0cae9b58cf shorten last modified column in files listing
Marcin Kuzminski <marcin@python-works.com>
parents: 884
diff changeset
95 ${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
96 %endif
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
97 </td>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
98 <td>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
99 %if node.is_file():
1764
39b49c999efb fixes issue #320.
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
100 <span title="${node.last_changeset.author}">
39b49c999efb fixes issue #320.
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
101 ${h.person(node.last_changeset.author)}
39b49c999efb fixes issue #320.
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
102 </span>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1810
diff changeset
103 %endif
144
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
104 </td>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
105 </tr>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
106 %endfor
1452
8585fbf3ed06 Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents: 1304
diff changeset
107 </tbody>
8585fbf3ed06 Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents: 1304
diff changeset
108 <tbody id="tbody_filtered" style="display:none">
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1810
diff changeset
109 </tbody>
144
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
110 </table>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 128
diff changeset
111 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1810
diff changeset
112 </div>