annotate pylons_app/templates/files/files_source.html @ 485:9836541b0509 celery

added limit for showing pygemntized source codes larger than 250kb.
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 18 Sep 2010 00:50:54 +0200
parents 0ebec9b88d13
children 15f837c62fa5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 278
diff changeset
1 <dl>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 278
diff changeset
2 <dt>${_('Last revision')}</dt>
410
9a7ae16ff53e fixes translations, style updates.
Marcin Kuzminski <marcin@python-works.com>
parents: 387
diff changeset
3 <dd>
9a7ae16ff53e fixes translations, style updates.
Marcin Kuzminski <marcin@python-works.com>
parents: 387
diff changeset
4 ${h.link_to("r%s:%s" % (c.files_list.last_changeset.revision,c.files_list.last_changeset._short),
9a7ae16ff53e fixes translations, style updates.
Marcin Kuzminski <marcin@python-works.com>
parents: 387
diff changeset
5 h.url('files_home',repo_name=c.repo_name,revision=c.files_list.last_changeset._short,f_path=c.f_path))}
9a7ae16ff53e fixes translations, style updates.
Marcin Kuzminski <marcin@python-works.com>
parents: 387
diff changeset
6 </dd>
128
9deb6f1d5b90 Implemented file history.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7 <dt>${_('Size')}</dt>
167
e5a25c57c97f files source updated to use webhelpers huminizer for file size, and added link to annotation
Marcin Kuzminski <marcin@python-works.com>
parents: 158
diff changeset
8 <dd>${h.format_byte_size(c.files_list.size,binary=True)}</dd>
128
9deb6f1d5b90 Implemented file history.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
9 <dt>${_('Options')}</dt>
278
ed7abf925696 #4: changes proposed by feedback to annotation
Marcin Kuzminski <marcin@python-works.com>
parents: 267
diff changeset
10 <dd>${h.link_to(_('show annotation'),
485
9836541b0509 added limit for showing pygemntized source codes larger than 250kb.
Marcin Kuzminski <marcin@python-works.com>
parents: 413
diff changeset
11 h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))}
9836541b0509 added limit for showing pygemntized source codes larger than 250kb.
Marcin Kuzminski <marcin@python-works.com>
parents: 413
diff changeset
12 / ${h.link_to(_('show as raw'),
9836541b0509 added limit for showing pygemntized source codes larger than 250kb.
Marcin Kuzminski <marcin@python-works.com>
parents: 413
diff changeset
13 h.url('files_raw_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))}
278
ed7abf925696 #4: changes proposed by feedback to annotation
Marcin Kuzminski <marcin@python-works.com>
parents: 267
diff changeset
14 / ${h.link_to(_('download as raw'),
485
9836541b0509 added limit for showing pygemntized source codes larger than 250kb.
Marcin Kuzminski <marcin@python-works.com>
parents: 413
diff changeset
15 h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))}
278
ed7abf925696 #4: changes proposed by feedback to annotation
Marcin Kuzminski <marcin@python-works.com>
parents: 267
diff changeset
16 </dd>
128
9deb6f1d5b90 Implemented file history.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
17 <dt>${_('History')}</dt>
9deb6f1d5b90 Implemented file history.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18 <dd>
410
9a7ae16ff53e fixes translations, style updates.
Marcin Kuzminski <marcin@python-works.com>
parents: 387
diff changeset
19 <div>
9a7ae16ff53e fixes translations, style updates.
Marcin Kuzminski <marcin@python-works.com>
parents: 387
diff changeset
20 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')}
144
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 129
diff changeset
21 ${h.hidden('diff2',c.files_list.last_changeset._short)}
413
0ebec9b88d13 added jump to revision from file history.
Marcin Kuzminski <marcin@python-works.com>
parents: 410
diff changeset
22 ${h.select('diff1',c.files_list.last_changeset._short,c.file_history)}
0ebec9b88d13 added jump to revision from file history.
Marcin Kuzminski <marcin@python-works.com>
parents: 410
diff changeset
23 ${h.submit('diff','diff to revision',class_="ui-button ui-widget ui-state-default ui-corner-all")}
0ebec9b88d13 added jump to revision from file history.
Marcin Kuzminski <marcin@python-works.com>
parents: 410
diff changeset
24 ${h.submit('show_rev','show at revision',class_="ui-button ui-widget ui-state-default ui-corner-all")}
128
9deb6f1d5b90 Implemented file history.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
25 ${h.end_form()}
410
9a7ae16ff53e fixes translations, style updates.
Marcin Kuzminski <marcin@python-works.com>
parents: 387
diff changeset
26 </div>
128
9deb6f1d5b90 Implemented file history.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
27 </dd>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 278
diff changeset
28 </dl>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 278
diff changeset
29
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 278
diff changeset
30
128
9deb6f1d5b90 Implemented file history.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
31 <div id="body" class="codeblock">
144
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 129
diff changeset
32 <div class="code-header">
158
f905f45c457e moved diff libs to vcs. updated htmls and css for diff and source
Marcin Kuzminski <marcin@python-works.com>
parents: 148
diff changeset
33 <div class="revision">${c.files_list.name}@r${c.files_list.last_changeset.revision}:${c.files_list.last_changeset._short}</div>
387
2a18192fbd1e templating updates (font sizes)
Marcin Kuzminski <marcin@python-works.com>
parents: 362
diff changeset
34 <div class="commit">"${c.files_list.last_changeset.message}"</div>
144
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 129
diff changeset
35 </div>
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 129
diff changeset
36 <div class="code-body">
485
9836541b0509 added limit for showing pygemntized source codes larger than 250kb.
Marcin Kuzminski <marcin@python-works.com>
parents: 413
diff changeset
37 % if c.files_list.size < c.file_size_limit:
9836541b0509 added limit for showing pygemntized source codes larger than 250kb.
Marcin Kuzminski <marcin@python-works.com>
parents: 413
diff changeset
38 ${h.pygmentize(c.files_list,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")}
9836541b0509 added limit for showing pygemntized source codes larger than 250kb.
Marcin Kuzminski <marcin@python-works.com>
parents: 413
diff changeset
39 %else:
9836541b0509 added limit for showing pygemntized source codes larger than 250kb.
Marcin Kuzminski <marcin@python-works.com>
parents: 413
diff changeset
40 ${_('File is to big to display')} ${h.link_to(_('show as raw'),
9836541b0509 added limit for showing pygemntized source codes larger than 250kb.
Marcin Kuzminski <marcin@python-works.com>
parents: 413
diff changeset
41 h.url('files_raw_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))}
9836541b0509 added limit for showing pygemntized source codes larger than 250kb.
Marcin Kuzminski <marcin@python-works.com>
parents: 413
diff changeset
42 %endif
144
ea89ac73bef8 Update css +file browsing and diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 129
diff changeset
43 </div>
413
0ebec9b88d13 added jump to revision from file history.
Marcin Kuzminski <marcin@python-works.com>
parents: 410
diff changeset
44 </div>
0ebec9b88d13 added jump to revision from file history.
Marcin Kuzminski <marcin@python-works.com>
parents: 410
diff changeset
45
0ebec9b88d13 added jump to revision from file history.
Marcin Kuzminski <marcin@python-works.com>
parents: 410
diff changeset
46 <script type="text/javascript">
0ebec9b88d13 added jump to revision from file history.
Marcin Kuzminski <marcin@python-works.com>
parents: 410
diff changeset
47 YAHOO.util.Event.onDOMReady(function(){
0ebec9b88d13 added jump to revision from file history.
Marcin Kuzminski <marcin@python-works.com>
parents: 410
diff changeset
48 YAHOO.util.Event.addListener('show_rev','click',function(e){
0ebec9b88d13 added jump to revision from file history.
Marcin Kuzminski <marcin@python-works.com>
parents: 410
diff changeset
49 YAHOO.util.Event.preventDefault(e);
0ebec9b88d13 added jump to revision from file history.
Marcin Kuzminski <marcin@python-works.com>
parents: 410
diff changeset
50 var cs = YAHOO.util.Dom.get('diff1').value;
0ebec9b88d13 added jump to revision from file history.
Marcin Kuzminski <marcin@python-works.com>
parents: 410
diff changeset
51 var url = "${h.url('files_home',repo_name=c.repo_name,revision='__CS__',f_path=c.f_path)}".replace('__CS__',cs);
0ebec9b88d13 added jump to revision from file history.
Marcin Kuzminski <marcin@python-works.com>
parents: 410
diff changeset
52 window.location = url;
0ebec9b88d13 added jump to revision from file history.
Marcin Kuzminski <marcin@python-works.com>
parents: 410
diff changeset
53 });
0ebec9b88d13 added jump to revision from file history.
Marcin Kuzminski <marcin@python-works.com>
parents: 410
diff changeset
54 });
0ebec9b88d13 added jump to revision from file history.
Marcin Kuzminski <marcin@python-works.com>
parents: 410
diff changeset
55 </script>