##// END OF EJS Templates
shorten last modified column in files listing
marcink -
r887:3c0cae9b beta
parent child Browse files
Show More
@@ -1,98 +1,100 b''
1 <%def name="file_class(node)">
1 <%def name="file_class(node)">
2 %if node.is_file():
2 %if node.is_file():
3 <%return "browser-file" %>
3 <%return "browser-file" %>
4 %else:
4 %else:
5 <%return "browser-dir"%>
5 <%return "browser-dir"%>
6 %endif
6 %endif
7 </%def>
7 </%def>
8 <div id="body" class="browserblock">
8 <div id="body" class="browserblock">
9 <div class="browser-header">
9 <div class="browser-header">
10 ${h.form(h.url.current())}
10 ${h.form(h.url.current())}
11 <div class="info_box">
11 <div class="info_box">
12 <span >${_('view')}@rev</span>
12 <span >${_('view')}@rev</span>
13 <a href="${c.url_prev}" title="${_('previous revision')}">&laquo;</a>
13 <a href="${c.url_prev}" title="${_('previous revision')}">&laquo;</a>
14 ${h.text('at_rev',value=c.changeset.revision,size=3)}
14 ${h.text('at_rev',value=c.changeset.revision,size=3)}
15 <a href="${c.url_next}" title="${_('next revision')}">&raquo;</a>
15 <a href="${c.url_next}" title="${_('next revision')}">&raquo;</a>
16 ${h.submit('view','view')}
16 ${h.submit('view','view')}
17 </div>
17 </div>
18 ${h.end_form()}
18 ${h.end_form()}
19 </div>
19 </div>
20 <div class="browser-branch">
20 <div class="browser-branch">
21 ${h.checkbox('stay_at_branch',c.changeset.branch,c.changeset.branch==c.branch)}
21 ${h.checkbox('stay_at_branch',c.changeset.branch,c.changeset.branch==c.branch)}
22 <label>${_('follow current branch')}</label>
22 <label>${_('follow current branch')}</label>
23 <script type="text/javascript">
23 <script type="text/javascript">
24 YUE.on('stay_at_branch','click',function(e){
24 YUE.on('stay_at_branch','click',function(e){
25 if(e.target.checked){
25 if(e.target.checked){
26 var uri = "${h.url.current(branch='__BRANCH__')}"
26 var uri = "${h.url.current(branch='__BRANCH__')}"
27 uri = uri.replace('__BRANCH__',e.target.value);
27 uri = uri.replace('__BRANCH__',e.target.value);
28 window.location = uri;
28 window.location = uri;
29 }
29 }
30 else{
30 else{
31 window.location = "${h.url.current()}";
31 window.location = "${h.url.current()}";
32 }
32 }
33
33
34 })
34 })
35 </script>
35 </script>
36 </div>
36 </div>
37 <div style="clear:both"></div>
37 <div style="clear:both"></div>
38 <div class="browser-body">
38 <div class="browser-body">
39 <table class="code-browser">
39 <table class="code-browser">
40 <thead>
40 <thead>
41 <tr>
41 <tr>
42 <th>${_('Name')}</th>
42 <th>${_('Name')}</th>
43 <th>${_('Size')}</th>
43 <th>${_('Size')}</th>
44 <th>${_('Mimetype')}</th>
44 <th>${_('Mimetype')}</th>
45 <th>${_('Revision')}</th>
45 <th>${_('Revision')}</th>
46 <th>${_('Last modified')}</th>
46 <th>${_('Last modified')}</th>
47 <th>${_('Last commiter')}</th>
47 <th>${_('Last commiter')}</th>
48 </tr>
48 </tr>
49 </thead>
49 </thead>
50
50
51 %if c.files_list.parent:
51 %if c.files_list.parent:
52 <tr class="parity0">
52 <tr class="parity0">
53 <td>
53 <td>
54 ${h.link_to('..',h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.files_list.parent.path),class_="browser-dir")}
54 ${h.link_to('..',h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.files_list.parent.path),class_="browser-dir")}
55 </td>
55 </td>
56 <td></td>
56 <td></td>
57 <td></td>
57 <td></td>
58 <td></td>
58 <td></td>
59 <td></td>
59 <td></td>
60 <td></td>
60 <td></td>
61 </tr>
61 </tr>
62 %endif
62 %endif
63
63
64 %for cnt,node in enumerate(c.files_list):
64 %for cnt,node in enumerate(c.files_list):
65 <tr class="parity${cnt+1%2}">
65 <tr class="parity${cnt%2}">
66 <td>
66 <td>
67 ${h.link_to(node.name,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=node.path),class_=file_class(node))}
67 ${h.link_to(node.name,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=node.path),class_=file_class(node))}
68 </td>
68 </td>
69 <td>
69 <td>
70 %if node.is_file():
70 %if node.is_file():
71 ${h.format_byte_size(node.size,binary=True)}
71 ${h.format_byte_size(node.size,binary=True)}
72 %endif
72 %endif
73 </td>
73 </td>
74 <td>
74 <td>
75 %if node.is_file():
75 %if node.is_file():
76 ${node.mimetype}
76 ${node.mimetype}
77 %endif
77 %endif
78 </td>
78 </td>
79 <td>
79 <td>
80 %if node.is_file():
80 %if node.is_file():
81 <span class="tooltip" tooltip_title="${node.last_changeset.raw_id}">${node.last_changeset.revision}</span>
81 <span class="tooltip" tooltip_title="${node.last_changeset.raw_id}">
82 ${node.last_changeset.revision}</span>
82 %endif
83 %endif
83 </td>
84 </td>
84 <td>
85 <td>
85 %if node.is_file():
86 %if node.is_file():
86 ${node.last_changeset.date} - ${h.age(node.last_changeset.date)}
87 <span class="tooltip" tooltip_title="${node.last_changeset.date}">
88 ${h.age(node.last_changeset.date)}</span>
87 %endif
89 %endif
88 </td>
90 </td>
89 <td>
91 <td>
90 %if node.is_file():
92 %if node.is_file():
91 ${node.last_changeset.author}
93 ${node.last_changeset.author}
92 %endif
94 %endif
93 </td>
95 </td>
94 </tr>
96 </tr>
95 %endfor
97 %endfor
96 </table>
98 </table>
97 </div>
99 </div>
98 </div> No newline at end of file
100 </div>
General Comments 0
You need to be logged in to leave comments. Login now