Mercurial > kallithea
comparison 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 |
comparison
equal
deleted
inserted
replaced
484:d3f701d912bd | 485:9836541b0509 |
---|---|
6 </dd> | 6 </dd> |
7 <dt>${_('Size')}</dt> | 7 <dt>${_('Size')}</dt> |
8 <dd>${h.format_byte_size(c.files_list.size,binary=True)}</dd> | 8 <dd>${h.format_byte_size(c.files_list.size,binary=True)}</dd> |
9 <dt>${_('Options')}</dt> | 9 <dt>${_('Options')}</dt> |
10 <dd>${h.link_to(_('show annotation'), | 10 <dd>${h.link_to(_('show annotation'), |
11 h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))} | 11 h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))} |
12 / ${h.link_to(_('show as raw'), | |
13 h.url('files_raw_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))} | |
12 / ${h.link_to(_('download as raw'), | 14 / ${h.link_to(_('download as raw'), |
13 h.url('files_raw_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))} | 15 h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))} |
14 </dd> | 16 </dd> |
15 <dt>${_('History')}</dt> | 17 <dt>${_('History')}</dt> |
16 <dd> | 18 <dd> |
17 <div> | 19 <div> |
18 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} | 20 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} |
30 <div class="code-header"> | 32 <div class="code-header"> |
31 <div class="revision">${c.files_list.name}@r${c.files_list.last_changeset.revision}:${c.files_list.last_changeset._short}</div> | 33 <div class="revision">${c.files_list.name}@r${c.files_list.last_changeset.revision}:${c.files_list.last_changeset._short}</div> |
32 <div class="commit">"${c.files_list.last_changeset.message}"</div> | 34 <div class="commit">"${c.files_list.last_changeset.message}"</div> |
33 </div> | 35 </div> |
34 <div class="code-body"> | 36 <div class="code-body"> |
35 ${h.pygmentize(c.files_list,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")} | 37 % if c.files_list.size < c.file_size_limit: |
38 ${h.pygmentize(c.files_list,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")} | |
39 %else: | |
40 ${_('File is to big to display')} ${h.link_to(_('show as raw'), | |
41 h.url('files_raw_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))} | |
42 %endif | |
36 </div> | 43 </div> |
37 </div> | 44 </div> |
38 | 45 |
39 <script type="text/javascript"> | 46 <script type="text/javascript"> |
40 YAHOO.util.Event.onDOMReady(function(){ | 47 YAHOO.util.Event.onDOMReady(function(){ |