Mercurial > kallithea
comparison pylons_app/templates/files/files_annotate.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 | 9a7ae16ff53e |
children | 47f4c7ff245b |
comparison
equal
deleted
inserted
replaced
484:d3f701d912bd | 485:9836541b0509 |
---|---|
21 <div class="title"> | 21 <div class="title"> |
22 ${self.breadcrumbs()} | 22 ${self.breadcrumbs()} |
23 </div> | 23 </div> |
24 <div class="table"> | 24 <div class="table"> |
25 <div id="files_data"> | 25 <div id="files_data"> |
26 <h2>${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cur_rev,c.file.path)}</h2> | 26 <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cur_rev,c.file.path)}</h3> |
27 <dl class="overview"> | 27 <dl class="overview"> |
28 <dt>${_('Last revision')}</dt> | 28 <dt>${_('Last revision')}</dt> |
29 <dd>${h.link_to("r%s:%s" % (c.file.last_changeset.revision,c.file.last_changeset._short), | 29 <dd>${h.link_to("r%s:%s" % (c.file.last_changeset.revision,c.file.last_changeset._short), |
30 h.url('files_annotate_home',repo_name=c.repo_name,revision=c.file.last_changeset._short,f_path=c.f_path))} </dd> | 30 h.url('files_annotate_home',repo_name=c.repo_name,revision=c.file.last_changeset._short,f_path=c.f_path))} </dd> |
31 <dt>${_('Size')}</dt> | 31 <dt>${_('Size')}</dt> |
32 <dd>${h.format_byte_size(c.file.size,binary=True)}</dd> | 32 <dd>${h.format_byte_size(c.file.size,binary=True)}</dd> |
33 <dt>${_('Options')}</dt> | 33 <dt>${_('Options')}</dt> |
34 <dd>${h.link_to(_('show source'), | 34 <dd>${h.link_to(_('show source'), |
35 h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))} | 35 h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))} |
36 / ${h.link_to(_('show as raw'), | |
37 h.url('files_raw_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))} | |
36 / ${h.link_to(_('download as raw'), | 38 / ${h.link_to(_('download as raw'), |
37 h.url('files_raw_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))} | 39 h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))} |
38 </dd> | 40 </dd> |
39 </dl> | 41 </dl> |
40 <div id="body" class="codeblock"> | 42 <div id="body" class="codeblock"> |
41 <div class="code-header"> | 43 <div class="code-header"> |
42 <div class="revision">${c.file.name}@r${c.file.last_changeset.revision}:${c.file.last_changeset._short}</div> | 44 <div class="revision">${c.file.name}@r${c.file.last_changeset.revision}:${c.file.last_changeset._short}</div> |
43 <div class="commit">"${c.file_msg}"</div> | 45 <div class="commit">"${c.file_msg}"</div> |
44 </div> | 46 </div> |
45 <div class="code-body"> | 47 <div class="code-body"> |
46 ${h.pygmentize_annotation(c.file,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")} | 48 % if c.file.size < c.file_size_limit: |
49 ${h.pygmentize_annotation(c.file,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")} | |
50 %else: | |
51 ${_('File is to big to display')} ${h.link_to(_('show as raw'), | |
52 h.url('files_raw_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))} | |
53 %endif | |
47 </div> | 54 </div> |
48 </div> | 55 </div> |
49 </div> | 56 </div> |
50 </div> | 57 </div> |
51 </div> | 58 </div> |