## -*- coding: utf-8 -*- <%inherit file="/base/base.mako"/> <%def name="robots()"> %if c.gist.gist_type != 'public': %else: ${parent.robots()} %endif <%def name="title()"> ${_('Gist')} · ${c.gist.gist_access_id} %if c.rhodecode_name: · ${h.branding(c.rhodecode_name)} %endif <%def name="breadcrumbs_links()"> ${_('Gist')} · ${c.gist.gist_access_id} <%def name="menu_bar_nav()"> ${self.menu_items(active='gists')} <%def name="main()">
${self.breadcrumbs()}
${c.gist.gist_url()}
%if c.is_super_admin or c.gist.gist_owner == c.rhodecode_user.user_id:
${h.secure_form(h.route_path('gist_delete', gist_id=c.gist.gist_access_id), request=request)} ${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 ${_('Copy content')} %if c.is_super_admin or c.gist.gist_owner == c.rhodecode_user.user_id: ${h.link_to(_('Edit'), h.route_path('gist_edit', gist_id=c.gist.gist_access_id), class_="btn btn-mini")} %endif ${h.link_to(_('Show as Raw'), h.route_path('gist_show_formatted', gist_id=c.gist.gist_access_id, revision='tip', format='raw'), class_="btn btn-mini")}
%if c.gist.gist_type != 'public': ${_('Private Gist')} %endif ${c.gist.gist_description} ${_('Expires')}: %if c.gist.gist_expires == -1: ${_('never')} %else: ${h.age_component(h.time_to_utcdatetime(c.gist.gist_expires))} %endif
${self.gravatar_with_user(c.file_last_commit.author, 16, tooltip=True)} - ${_('created')} ${h.age_component(c.file_last_commit.date)}
${h.urlify_commit_message(c.file_last_commit.message, None)}
## iterate over the files % for file in c.files: <% renderer = c.render and h.renderer_from_filename(file.path, exclude=['.txt', '.TXT'])%>
%if renderer: ${h.render(file.content, renderer=renderer)} %else: ${h.pygmentize(file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} %endif
%endfor