##// END OF EJS Templates
meta: fix write condition.
meta: fix write condition.

File last commit:

r2126:a8550f9e default
r2539:b5550006 default
Show More
show.mako
118 lines | 5.0 KiB | application/x-mako | MakoHtmlLexer
templating: use .mako as extensions for template files.
r1282 ## -*- coding: utf-8 -*-
<%inherit file="/base/base.mako"/>
<%def name="robots()">
%if c.gist.gist_type != 'public':
<meta name="robots" content="noindex, nofollow">
%else:
${parent.robots()}
%endif
</%def>
<%def name="title()">
${_('Gist')} &middot; ${c.gist.gist_access_id}
%if c.rhodecode_name:
&middot; ${h.branding(c.rhodecode_name)}
%endif
</%def>
<%def name="breadcrumbs_links()">
${_('Gist')} &middot; ${c.gist.gist_access_id}
</%def>
<%def name="menu_bar_nav()">
${self.menu_items(active='gists')}
</%def>
<%def name="main()">
<div class="box">
<!-- box / title -->
<div class="title">
${self.breadcrumbs()}
%if c.rhodecode_user.username != h.DEFAULT_USER:
<ul class="links">
<li>
dan
gists: migrated gists controller to pyramid view.
r1891 <a href="${h.route_path('gists_new')}" class="btn btn-primary">${_(u'Create New Gist')}</a>
templating: use .mako as extensions for template files.
r1282 </li>
</ul>
%endif
</div>
gists: add copy url to clipboard helper icon.
r2126
templating: use .mako as extensions for template files.
r1282 <div class="table">
<div id="files_data">
<div id="codeblock" class="codeblock">
<div class="code-header">
gists: add copy url to clipboard helper icon.
r2126 <div class="gist_url">
<code>
${c.gist.gist_url()} <span class="icon-clipboard clipboard-action" data-clipboard-text="${c.gist.gist_url()}" title="${_('Copy the url')}"></span>
</code>
</div>
templating: use .mako as extensions for template files.
r1282 <div class="stats">
%if h.HasPermissionAny('hg.admin')() or c.gist.gist_owner == c.rhodecode_user.user_id:
<div class="remove_gist">
forms: unified usage of h.secure_form. Make sure we ALWAYS pass in...
r2105 ${h.secure_form(h.route_path('gist_delete', gist_id=c.gist.gist_access_id), request=request)}
templating: use .mako as extensions for template files.
r1282 ${h.submit('remove_gist', _('Delete'),class_="btn btn-mini btn-danger",onclick="return confirm('"+_('Confirm to delete this Gist')+"');")}
${h.end_form()}
</div>
%endif
<div class="buttons">
## only owner should see that
gists: add copy url to clipboard helper icon.
r2126 <a href="#copySource" onclick="return false;" class="btn btn-mini icon-clipboard clipboard-action" data-clipboard-text="${c.files[0].content}">${_('Copy content')}</a>
gists: allow copy content to clipboard
r2121
templating: use .mako as extensions for template files.
r1282 %if h.HasPermissionAny('hg.admin')() or c.gist.gist_owner == c.rhodecode_user.user_id:
dan
gists: migrated gists controller to pyramid view.
r1891 ${h.link_to(_('Edit'), h.route_path('gist_edit', gist_id=c.gist.gist_access_id), class_="btn btn-mini")}
templating: use .mako as extensions for template files.
r1282 %endif
dan
gists: migrated gists controller to pyramid view.
r1891 ${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")}
templating: use .mako as extensions for template files.
r1282 </div>
<div class="left" >
%if c.gist.gist_type != 'public':
<span class="tag tag-ok disabled">${_('Private Gist')}</span>
%endif
<span> ${c.gist.gist_description}</span>
<span>${_('Expires')}:
%if c.gist.gist_expires == -1:
${_('never')}
%else:
${h.age_component(h.time_to_utcdatetime(c.gist.gist_expires))}
%endif
</span>
gists: add copy url to clipboard helper icon.
r2126
templating: use .mako as extensions for template files.
r1282 </div>
</div>
<div class="author">
dan
tooltip: use consistent h.tooltip usage to set tooltips.
r1843 <div title="${h.tooltip(c.file_last_commit.author)}">
templating: use .mako as extensions for template files.
r1282 ${self.gravatar_with_user(c.file_last_commit.author, 16)} - ${_('created')} ${h.age_component(c.file_last_commit.date)}
</div>
</div>
dan
gists: migrated gists controller to pyramid view.
r1891 <div class="commit">${h.urlify_commit_message(c.file_last_commit.message, None)}</div>
templating: use .mako as extensions for template files.
r1282 </div>
## iterate over the files
% for file in c.files:
<% renderer = c.render and h.renderer_from_filename(file.path, exclude=['.txt', '.TXT'])%>
dan
gists: migrated gists controller to pyramid view.
r1891 <!--
<div id="${h.FID('G', file.path)}" class="stats" >
templating: use .mako as extensions for template files.
r1282 <a href="${c.gist.gist_url()}">ΒΆ</a>
<b >${file.path}</b>
<div>
dan
gists: migrated gists controller to pyramid view.
r1891 ${h.link_to(_('Show as raw'), h.route_path('gist_show_formatted_path', gist_id=c.gist.gist_access_id, revision=file.commit.raw_id, format='raw', f_path=file.path), class_="btn btn-mini")}
templating: use .mako as extensions for template files.
r1282 </div>
dan
gists: migrated gists controller to pyramid view.
r1891 </div>
-->
templating: use .mako as extensions for template files.
r1282 <div class="code-body textarea text-area editor">
%if renderer:
${h.render(file.content, renderer=renderer)}
%else:
${h.pygmentize(file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
%endif
</div>
%endfor
</div>
</div>
</div>
</div>
</%def>