aboutsummaryrefslogtreecommitdiff
path: root/rhodecode/templates/files/files_browser.html
blob: 9df7b1f069059202e5e47f269f1eb2f71de96b3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<%def name="file_class(node)">
	%if node.is_file():
		<%return "browser-file" %>
	%else:
		<%return "browser-dir"%>
	%endif
</%def>
<div id="body" class="browserblock">
	<div class="browser-header">
		${h.form(h.url.current())}
		<div class="info_box">
          <span >${_('view')}@rev</span> 
          <a href="${c.url_prev}">&laquo;</a>
          ${h.text('at_rev',value=c.rev_nr,size=3)}
          <a href="${c.url_next}">&raquo;</a>
          ${h.submit('view','view')}
	    </div>           
		${h.end_form()}
	</div>
	<div class="browser-body">
		<table class="code-browser">
		         <thead>
		             <tr>
		                 <th>${_('Name')}</th>
		                 <th>${_('Size')}</th>
		                 <th>${_('Mimetype')}</th>
		                 <th>${_('Revision')}</th>
		                 <th>${_('Last modified')}</th>
		                 <th>${_('Last commiter')}</th>
		             </tr>
		         </thead>

          		% if c.files_list.parent:
         		<tr class="parity0">
	          		<td>		          		
	          			${h.link_to('..',h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.files_list.parent.path),class_="browser-dir")}
	          		</td>
	          		<td></td>
	          		<td></td>
	          		<td></td>
	          		<td></td>
	          		<td></td>
				</tr>	          		
          		%endif
		         	
		    %for cnt,node in enumerate(c.files_list):
				<tr class="parity${(cnt+1)%2}">
		             <td>
						${h.link_to(node.name,h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=node.path),class_=file_class(node))}
		             </td>
		             <td>
		             %if node.is_file():
		             	${h.format_byte_size(node.size,binary=True)}
		             %endif	
		             </td>
		             <td>
		              %if node.is_file():
		                  ${node.mimetype}
		              %endif
		             </td>
		             <td>
	             	  %if node.is_file():
	             		  ${node.last_changeset.revision}
	             	  %endif
		             </td>
		             <td>
		              %if node.is_file():
		                  ${h.age(node.last_changeset._ctx.date())} - ${node.last_changeset.date}
		              %endif
		             </td>
		             <td>
		              %if node.is_file():
		                  ${node.last_changeset.author}
		              %endif                    
		             </td>
				</tr>
			%endfor
		</table>
	</div>
</div>