Mercurial > kallithea
annotate rhodecode/templates/files/files_browser.html @ 1603:53d076664e08 beta
Changed order of add file form inputs.
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 27 Oct 2011 00:26:24 +0200 |
parents | 6ff50754d22d |
children | 752b0a7b7679 623b228cf325 |
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"> |
1304
5a96551ee9c0
gui-improvments
Marcin Kuzminski <marcin@python-works.com>
parents:
1176
diff
changeset
|
13 <span class="rev">${_('view')}@rev</span> |
1553
6ff50754d22d
UX improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1486
diff
changeset
|
14 <a class="ui-button-small" 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)} |
1553
6ff50754d22d
UX improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1486
diff
changeset
|
16 <a class="ui-button-small" href="${c.url_next}" title="${_('next revision')}">»</a> |
1304
5a96551ee9c0
gui-improvments
Marcin Kuzminski <marcin@python-works.com>
parents:
1176
diff
changeset
|
17 ## ${h.submit('view',_('view'),class_="ui-button-small")} |
949
3bc10f10f2f6
fixed file browsing ui and css
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
18 </div> |
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"> |
1553
6ff50754d22d
UX improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1486
diff
changeset
|
27 <a class="ui-button-small" 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> |
1486
92f0065ba238
hide add new file button if user has no permission for it
Marcin Kuzminski <marcin@python-works.com>
parents:
1483
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"> |
6ff50754d22d
UX improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1486
diff
changeset
|
31 <a class="ui-button-small" 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> |
92f0065ba238
hide add new file button if user has no permission for it
Marcin Kuzminski <marcin@python-works.com>
parents:
1483
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"> |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
37 ${h.files_breadcrumbs(c.repo_name,c.changeset.raw_id,c.files_list.path)}/<input type="text" value="type to search..." name="filter" size="25" id="node_filter" autocomplete="off"> |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
38 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
39 <script type="text/javascript"> |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
40 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
41 YUE.on('stay_at_branch','click',function(e){ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
42 if(e.target.checked){ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
43 var uri = "${h.url.current(branch='__BRANCH__')}" |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
44 uri = uri.replace('__BRANCH__',e.target.value); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
45 window.location = uri; |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
46 } |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
47 else{ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
48 window.location = "${h.url.current()}"; |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
49 } |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
50 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
51 }) |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
52 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
53 var n_filter = YUD.get('node_filter'); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
54 var F = YAHOO.namespace('node_filter'); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
55 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
56 var url = '${h.url("files_nodelist_home",repo_name="__REPO__",revision="__REVISION__",f_path="__FPATH__")}'; |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
57 var node_url = '${h.url("files_home",repo_name="__REPO__",revision="__REVISION__",f_path="__FPATH__")}'; |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
58 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
59 url = url.replace('__REPO__','${c.repo_name}'); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
60 url = url.replace('__REVISION__','${c.changeset.raw_id}'); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
61 url = url.replace('__FPATH__','${c.files_list.path}'); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
62 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
63 node_url = node_url.replace('__REPO__','${c.repo_name}'); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
64 node_url = node_url.replace('__REVISION__','${c.changeset.raw_id}'); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
65 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
66 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
67 F.filterTimeout = null; |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
68 var nodes = null; |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
69 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
70 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
71 F.initFilter = function(){ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
72 YUD.setStyle('node_filter_box_loading','display',''); |
1483
7b67b0dcad6d
Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
1452
diff
changeset
|
73 YUD.setStyle('search_activate_id','display','none'); |
7b67b0dcad6d
Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
1452
diff
changeset
|
74 YUD.setStyle('add_node_id','display','none'); |
1452
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
75 YUC.initHeader('X-PARTIAL-XHR',true); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
76 YUC.asyncRequest('GET',url,{ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
77 success:function(o){ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
78 nodes = JSON.parse(o.responseText); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
79 YUD.setStyle('node_filter_box_loading','display','none'); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
80 YUD.setStyle('node_filter_box','display',''); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
81 }, |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
82 failure:function(o){ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
83 console.log('failed to load'); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
84 } |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
85 },null); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
86 } |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
87 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
88 F.updateFilter = function(e) { |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
89 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
90 return function(){ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
91 // Reset timeout |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
92 F.filterTimeout = null; |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
93 var query = e.target.value; |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
94 var match = []; |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
95 var matches = 0; |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
96 var matches_max = 20; |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
97 if (query != ""){ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
98 for(var i=0;i<nodes.length;i++){ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
99 var pos = nodes[i].toLowerCase().indexOf(query) |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
100 if(query && pos != -1){ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
101 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
102 matches++ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
103 //show only certain amount to not kill browser |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
104 if (matches > matches_max){ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
105 break; |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
106 } |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
107 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
108 var n = nodes[i]; |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
109 var n_hl = n.substring(0,pos) |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
110 +"<b>{0}</b>".format(n.substring(pos,pos+query.length)) |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
111 +n.substring(pos+query.length) |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
112 match.push('<tr><td><a class="browser-file" href="{0}">{1}</a></td><td colspan="5"></td></tr>'.format(node_url.replace('__FPATH__',n),n_hl)); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
113 } |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
114 if(match.length >= matches_max){ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
115 match.push('<tr><td>{0}</td><td colspan="5"></td></tr>'.format("${_('search truncated')}")); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
116 } |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
117 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
118 } |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
119 } |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
120 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
121 if(query != ""){ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
122 YUD.setStyle('tbody','display','none'); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
123 YUD.setStyle('tbody_filtered','display',''); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
124 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
125 if (match.length==0){ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
126 match.push('<tr><td>{0}</td><td colspan="5"></td></tr>'.format("${_('no matching files')}")); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
127 } |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
128 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
129 YUD.get('tbody_filtered').innerHTML = match.join(""); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
130 } |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
131 else{ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
132 YUD.setStyle('tbody','display',''); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
133 YUD.setStyle('tbody_filtered','display','none'); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
134 } |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
135 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
136 } |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
137 } |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
138 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
139 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
140 YUE.on(YUD.get('filter_activate'),'click',function(){ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
141 F.initFilter(); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
142 }) |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
143 YUE.on(n_filter,'click',function(){ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
144 n_filter.value = ''; |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
145 }); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
146 YUE.on(n_filter,'keyup',function(e){ |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
147 clearTimeout(F.filterTimeout); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
148 F.filterTimeout = setTimeout(F.updateFilter(e),600); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
149 }); |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
150 </script> |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
151 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
152 </div> |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
153 </div> |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
154 </div> |
884
322b53be49cc
Fixed url bug when using numeric revision in file browser,
Marcin Kuzminski <marcin@python-works.com>
parents:
740
diff
changeset
|
155 </div> |
949
3bc10f10f2f6
fixed file browsing ui and css
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
156 |
149
b3c93efd1c97
Updated template for summary (archives links)
Marcin Kuzminski <marcin@python-works.com>
parents:
145
diff
changeset
|
157 <div class="browser-body"> |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
158 <table class="code-browser"> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
159 <thead> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
160 <tr> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
161 <th>${_('Name')}</th> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
162 <th>${_('Size')}</th> |
495
15f837c62fa5
added mimetypes to files
Marcin Kuzminski <marcin@python-works.com>
parents:
416
diff
changeset
|
163 <th>${_('Mimetype')}</th> |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
164 <th>${_('Revision')}</th> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
165 <th>${_('Last modified')}</th> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
166 <th>${_('Last commiter')}</th> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
167 </tr> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
168 </thead> |
1452
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
169 |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
170 <tbody id="tbody"> |
633
fcf599cd3404
Move changes for git implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
583
diff
changeset
|
171 %if c.files_list.parent: |
497
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
172 <tr class="parity0"> |
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
173 <td> |
644
c8bd0e6cc3da
some changes for #45.
Marcin Kuzminski <marcin@python-works.com>
parents:
633
diff
changeset
|
174 ${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")} |
497
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
175 </td> |
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
176 <td></td> |
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
177 <td></td> |
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
178 <td></td> |
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
179 <td></td> |
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
180 <td></td> |
633
fcf599cd3404
Move changes for git implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
583
diff
changeset
|
181 </tr> |
497
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
182 %endif |
fb0c3af6031b
Implemented locking for task, to prevent for running the same tasks,
Marcin Kuzminski <marcin@python-works.com>
parents:
495
diff
changeset
|
183 |
740
9279dfedcf93
fixed python2.5 incompatible enumerate calls
Marcin Kuzminski <marcin@python-works.com>
parents:
668
diff
changeset
|
184 %for cnt,node in enumerate(c.files_list): |
887
3c0cae9b58cf
shorten last modified column in files listing
Marcin Kuzminski <marcin@python-works.com>
parents:
884
diff
changeset
|
185 <tr class="parity${cnt%2}"> |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
186 <td> |
1176
014c9a58a0d9
fixes for issues #137 and #116 safe_unicode is now default for handling file names
Marcin Kuzminski <marcin@python-works.com>
parents:
1150
diff
changeset
|
187 ${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))} |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
188 </td> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
189 <td> |
583
95b746f2f0ed
fixed nasty bug when browsing on renames.
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
190 %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
|
191 ${h.format_byte_size(node.size,binary=True)} |
583
95b746f2f0ed
fixed nasty bug when browsing on renames.
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
192 %endif |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
193 </td> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
194 <td> |
495
15f837c62fa5
added mimetypes to files
Marcin Kuzminski <marcin@python-works.com>
parents:
416
diff
changeset
|
195 %if node.is_file(): |
15f837c62fa5
added mimetypes to files
Marcin Kuzminski <marcin@python-works.com>
parents:
416
diff
changeset
|
196 ${node.mimetype} |
15f837c62fa5
added mimetypes to files
Marcin Kuzminski <marcin@python-works.com>
parents:
416
diff
changeset
|
197 %endif |
15f837c62fa5
added mimetypes to files
Marcin Kuzminski <marcin@python-works.com>
parents:
416
diff
changeset
|
198 </td> |
15f837c62fa5
added mimetypes to files
Marcin Kuzminski <marcin@python-works.com>
parents:
416
diff
changeset
|
199 <td> |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
200 %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
|
201 <span class="tooltip" title="${node.last_changeset.raw_id}"> |
1150
f3d8ff6f96cc
Added better looking revision for filebrowser
Marcin Kuzminski <marcin@python-works.com>
parents:
1100
diff
changeset
|
202 ${'r%s:%s' % (node.last_changeset.revision,node.last_changeset.short_id)}</span> |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
203 %endif |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
204 </td> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
205 <td> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
206 %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
|
207 <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
|
208 ${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
|
209 %endif |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
210 </td> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
211 <td> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
212 %if node.is_file(): |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
213 ${node.last_changeset.author} |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
214 %endif |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
215 </td> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
216 </tr> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
217 %endfor |
1452
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
218 </tbody> |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
219 <tbody id="tbody_filtered" style="display:none"> |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
220 </tbody> |
144
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
221 </table> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
222 </div> |
ea89ac73bef8
Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
128
diff
changeset
|
223 </div> |