Mercurial > kallithea
comparison rhodecode/templates/admin/gists/show.html @ 3840:dc4644865e8b beta
Implemented simple gist functionality ref #530.
- creation of public/private gists with given lifetime
- rhodecode-gist CLI for quick gist creation
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 11 May 2013 20:24:02 +0200 |
parents | |
children | ad4a680113b7 |
comparison
equal
deleted
inserted
replaced
3839:9dec870411e0 | 3840:dc4644865e8b |
---|---|
1 ## -*- coding: utf-8 -*- | |
2 <%inherit file="/base/base.html"/> | |
3 | |
4 <%def name="title()"> | |
5 ${_('gist')}:${c.gist.gist_access_id} · ${c.rhodecode_name} | |
6 </%def> | |
7 | |
8 <%def name="breadcrumbs_links()"> | |
9 ${_('Gist')} · gist:${c.gist.gist_access_id} | |
10 </%def> | |
11 | |
12 <%def name="page_nav()"> | |
13 ${self.menu('gists')} | |
14 </%def> | |
15 | |
16 <%def name="main()"> | |
17 <div class="box"> | |
18 <!-- box / title --> | |
19 <div class="title"> | |
20 ${self.breadcrumbs()} | |
21 %if c.rhodecode_user.username != 'default': | |
22 <ul class="links"> | |
23 <li> | |
24 <span>${h.link_to(_(u'Create new gist'), h.url('new_gist'))}</span> | |
25 </li> | |
26 </ul> | |
27 %endif | |
28 </div> | |
29 <div class="table"> | |
30 <div id="files_data"> | |
31 <div id="body" class="codeblock"> | |
32 <div class="code-header"> | |
33 <div class="stats"> | |
34 <div class="left" style="margin: -4px 0px 0px 0px"> | |
35 %if c.gist.gist_type == 'public': | |
36 <div class="ui-btn green badge">${_('Public gist')}</div> | |
37 %else: | |
38 <div class="ui-btn yellow badge">${_('Private gist')}</div> | |
39 %endif | |
40 </div> | |
41 <span style="color: #AAA"> | |
42 %if c.gist.gist_expires == -1: | |
43 ${_('Expires')}: ${_('never')} | |
44 %else: | |
45 ${_('Expires')}: ${h.age(h.time_to_datetime(c.gist.gist_expires))} | |
46 %endif | |
47 </span> | |
48 <div class="left item last">${c.gist.gist_description}</div> | |
49 <div class="buttons"> | |
50 ## only owner should see that | |
51 %if c.gist.owner.username == c.rhodecode_user.username: | |
52 ##${h.link_to(_('Edit'),h.url(''),class_="ui-btn")} | |
53 ##${h.link_to(_('Delete'),h.url(''),class_="ui-btn red")} | |
54 %endif | |
55 </div> | |
56 </div> | |
57 | |
58 <div class="author"> | |
59 <div class="gravatar"> | |
60 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.file_changeset.author),16)}"/> | |
61 </div> | |
62 <div title="${c.file_changeset.author}" class="user">${h.person(c.file_changeset.author)} - ${_('created')} ${h.age(c.file_changeset.date)}</div> | |
63 </div> | |
64 <div class="commit">${h.urlify_commit(c.file_changeset.message,c.repo_name)}</div> | |
65 </div> | |
66 </div> | |
67 | |
68 ## iterate over the files | |
69 % for file in c.files: | |
70 <div style="border: 1px solid #EEE;margin-top:20px"> | |
71 <div id="${h.FID('G', file.path)}" class="stats" style="border-bottom: 1px solid #DDD;padding: 8px 14px;"> | |
72 <b>${file.path}</b> | |
73 ##<div class="buttons"> | |
74 ## ${h.link_to(_('Show as raw'),h.url(''),class_="ui-btn")} | |
75 ##</div> | |
76 </div> | |
77 <div class="code-body"> | |
78 ${h.pygmentize(file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} | |
79 </div> | |
80 </div> | |
81 %endfor | |
82 </div> | |
83 </div> | |
84 | |
85 | |
86 </div> | |
87 </%def> |