1
0
mirror of https://gitnet.fr/deblan/gist.git synced 2021-08-14 08:30:49 +02:00

If no gist

This commit is contained in:
Simon Vieille 2015-11-23 22:04:48 +01:00
parent 13ceb37df7
commit b98915509a
3 changed files with 30 additions and 22 deletions

View File

@ -19,6 +19,7 @@ app:
my:
title: 'My gists'
nothing: 'Nothing yet!'
gist:
untitled: 'Untitled'

View File

@ -19,6 +19,7 @@ app:
my:
title: 'Mes Gists'
nothing: 'Rien pour le moment !'
gist:
untitled: 'Sans titre'

View File

@ -11,30 +11,36 @@
</div>
<div class="panel-body">
<div class="tab-content">
{% for gist in user.gists %}
<div class="commit">
<p>
<strong>{{ gist.title ? gist.title : 'gist.untitled'|trans }}</strong>,
{{ gist.createdAt|date('date.format'|trans) }}
</p>
<p>
<button class="btn btn-info btn-sm">
{{ gist.type }}
</button>
{% set gists = user.gists %}
{% if not gist.cipher %}
<a href="{{ path('view', {gist: gist.file}) }}" class="btn btn-warning btn-sm">
View
</a>
{% else %}
<button class="btn btn-error btn-sm">
<span class="glyphicon glyphicon-lock"></span>
{% if gists|length == 0 %}
{{ 'my.nothing'|trans }}
{% else %}
{% for gist in user.gists %}
<div class="commit">
<p>
<strong>{{ gist.title ? gist.title : 'gist.untitled'|trans }}</strong>,
{{ gist.createdAt|date('date.format'|trans) }}
</p>
<p>
<button class="btn btn-info btn-sm">
{{ gist.type }}
</button>
{% endif %}
</p>
</div>
{% endfor %}
{% if not gist.cipher %}
<a href="{{ path('view', {gist: gist.file}) }}" class="btn btn-warning btn-sm">
View
</a>
{% else %}
<button class="btn btn-error btn-sm">
<span class="glyphicon glyphicon-lock"></span>
</button>
{% endif %}
</p>
</div>
{% endfor %}
{% endif %}
</div>
</div>
</div>