## -*- coding: utf-8 -*- <%inherit file="/base/base.html"/> <%def name="title()"> ${_('Gist')} · ${c.gist.gist_access_id} %if c.rhodecode_name: · ${c.rhodecode_name} %endif <%def name="breadcrumbs_links()"> ${_('Gist')} · ${c.gist.gist_access_id} / ${_('URL')}: ${c.gist.gist_url()} <%def name="page_nav()"> ${self.menu('gists')} <%def name="main()">
${self.breadcrumbs()} %if c.rhodecode_user.username != 'default': %endif
%if c.gist.gist_type == 'public':
${_('Public Gist')}
%else:
${_('Private Gist')}
%endif
${c.gist.gist_description}
%if c.gist.gist_expires == -1: ${_('Expires')}: ${_('never')} %else: ${_('Expires')}: ${h.age(h.time_to_datetime(c.gist.gist_expires))} %endif
%if h.HasPermissionAny('hg.admin')() or c.gist.gist_owner == c.rhodecode_user.user_id:
${h.form(url('gist', gist_id=c.gist.gist_id),method='delete')} ${h.submit('remove_gist', _('Delete'),class_="btn btn-mini btn-danger",onclick="return confirm('"+_('Confirm to delete this Gist')+"');")} ${h.end_form()}
%endif
## only owner should see that %if h.HasPermissionAny('hg.admin')() or c.gist.gist_owner == c.rhodecode_user.user_id: ${h.link_to(_('Edit'),h.url('edit_gist', gist_id=c.gist.gist_access_id),class_="btn btn-mini")} %endif ${h.link_to(_('Show as Raw'),h.url('formatted_gist', gist_id=c.gist.gist_access_id, format='raw'),class_="btn btn-mini")}
gravatar
${h.person(c.file_changeset.author)} - ${_('created')} ${h.age(c.file_changeset.date)}
${h.urlify_commit(c.file_changeset.message,c.repo_name)}
## iterate over the files % for file in c.files:
ΒΆ ${file.path}
${h.link_to(_('Show as raw'),h.url('formatted_gist_file', gist_id=c.gist.gist_access_id, format='raw', revision=file.changeset.raw_id, f_path=file.path),class_="btn btn-mini")}
${h.pygmentize(file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
%endfor