Mercurial > kallithea
comparison rhodecode/templates/files/files_source.html @ 1737:61eda8bf70d0 beta
new files views
- compated space
- nicer gui
- code garden
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 27 Nov 2011 03:17:17 +0200 |
parents | 623b228cf325 |
children | 60a00fd76d58 |
comparison
equal
deleted
inserted
replaced
1736:e2d76554d2c6 | 1737:61eda8bf70d0 |
---|---|
1 <dl> | 1 <dl> |
2 <dt>${_('Revision')}</dt> | 2 <dt style="padding-top:10px;font-size:16px">${_('History')}</dt> |
3 <dd> | |
4 ${h.link_to("r%s:%s" % (c.files_list.last_changeset.revision,h.short_id(c.files_list.last_changeset.raw_id)), | |
5 h.url('changeset_home',repo_name=c.repo_name,revision=c.files_list.last_changeset.raw_id))} | |
6 </dd> | |
7 <dt>${_('Size')}</dt> | |
8 <dd>${h.format_byte_size(c.files_list.size,binary=True)}</dd> | |
9 <dt>${_('Mimetype')}</dt> | |
10 <dd>${c.files_list.mimetype}</dd> | |
11 <dt>${_('Options')}</dt> | |
12 <dd>${h.link_to(_('show annotation'), | |
13 h.url('files_annotate_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} | |
14 / ${h.link_to(_('show as raw'), | |
15 h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} | |
16 / ${h.link_to(_('download as raw'), | |
17 h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} | |
18 % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): | |
19 % if not c.files_list.is_binary: | |
20 / ${h.link_to(_('edit'), | |
21 h.url('files_edit_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} | |
22 % endif | |
23 % endif | |
24 </dd> | |
25 <dt>${_('History')}</dt> | |
26 <dd> | 3 <dd> |
27 <div> | 4 <div> |
28 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} | 5 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} |
29 ${h.hidden('diff2',c.files_list.last_changeset.raw_id)} | 6 ${h.hidden('diff2',c.file.last_changeset.raw_id)} |
30 ${h.select('diff1',c.files_list.last_changeset.raw_id,c.file_history)} | 7 ${h.select('diff1',c.file.last_changeset.raw_id,c.file_history)} |
31 ${h.submit('diff','diff to revision',class_="ui-button-small")} | 8 ${h.submit('diff','diff to revision',class_="ui-button-small")} |
32 ${h.submit('show_rev','show at revision',class_="ui-button-small")} | 9 ${h.submit('show_rev','show at revision',class_="ui-button-small")} |
33 ${h.end_form()} | 10 ${h.end_form()} |
34 </div> | 11 </div> |
35 </dd> | 12 </dd> |
36 </dl> | 13 </dl> |
37 | 14 |
38 | 15 |
39 <div id="body" class="codeblock"> | 16 <div id="body" class="codeblock"> |
40 <div class="code-header"> | 17 <div class="code-header"> |
41 <div class="revision">${c.files_list.name}@r${c.files_list.last_changeset.revision}:${h.short_id(c.files_list.last_changeset.raw_id)}</div> | 18 <div class="stats"> |
42 <div class="commit">"${c.files_list.last_changeset.message}"</div> | 19 <div class="left"><img src="${h.url('/images/icons/file.png')}"/></div> |
20 <div class="left item">${h.link_to("r%s:%s" % (c.file.last_changeset.revision,h.short_id(c.file.last_changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.last_changeset.raw_id))}</div> | |
21 <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div> | |
22 <div class="left item last">${c.file.mimetype}</div> | |
23 <div class="buttons"> | |
24 ${h.link_to(_('show annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path),class_="ui-button-small")} | |
25 ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path),class_="ui-button-small")} | |
26 ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path),class_="ui-button-small")} | |
27 % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): | |
28 % if not c.file.is_binary: | |
29 ${h.link_to(_('edit'),h.url('files_edit_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path),class_="ui-button-small")} | |
30 % endif | |
31 % endif | |
32 </div> | |
33 </div> | |
34 <div class="author"> | |
35 <div class="gravatar"> | |
36 <img alt="gravatar" src="${h.gravatar_url(h.email(c.changeset.author),16)}"/> | |
37 </div> | |
38 <div title="${h.email_or_none(c.changeset.author)}" class="user">${h.person(c.changeset.author)}</div> | |
39 </div> | |
40 <div class="commit">${c.file.last_changeset.message}</div> | |
43 </div> | 41 </div> |
44 <div class="code-body"> | 42 <div class="code-body"> |
45 %if c.files_list.is_binary: | 43 %if c.file.is_binary: |
46 ${_('Binary file (%s)') % c.files_list.mimetype} | 44 ${_('Binary file (%s)') % c.file.mimetype} |
47 %else: | 45 %else: |
48 % if c.files_list.size < c.cut_off_limit: | 46 % if c.file.size < c.cut_off_limit: |
49 ${h.pygmentize(c.files_list,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} | 47 ${h.pygmentize(c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} |
50 %else: | 48 %else: |
51 ${_('File is too big to display')} ${h.link_to(_('show as raw'), | 49 ${_('File is too big to display')} ${h.link_to(_('show as raw'), |
52 h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} | 50 h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} |
53 %endif | 51 %endif |
54 <script type="text/javascript"> | 52 <script type="text/javascript"> |