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

Merge branch 'dev-master'

This commit is contained in:
Simon Vieille 2017-04-23 16:59:29 +02:00
commit 43db48a715
4 changed files with 108 additions and 108 deletions

View File

@ -24,19 +24,19 @@
<p>
{{ form_errors(form._username) }}
{{ form_widget(form._username) }}
</p>
</p>
<p>
{{ form_errors(form._password) }}
{{ form_widget(form._password) }}
</p>
</p>
<p>
{{ form_errors(form._remember_me) }}
{{ form_widget(form._remember_me) }}
{{ form_label(form._remember_me) }}
</p>
</p>
<p>
<input type="submit" class="btn btn-primary" value="{{ 'form.submit'|trans }}">
</p>

View File

@ -1,52 +1,52 @@
{% extends 'base.html.twig' %}
{% block title %}
{{ 'login.register.title'|trans }}
{{ 'login.register.title'|trans }}
{% endblock %}
{% block body %}
<div class="row">
{% if error %}
<div class="col-md-12">
<div class="alert alert-warning">
{{ error }}
</div>
</div>
{% endif %}
{% if success %}
<div class="col-md-12">
<div class="alert alert-success">
{{ success }}
</div>
</div>
{% else %}
<form action="{{ path('register') }}" method="post" id="main-form">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
{{ 'login.register.title'|trans }}
</div>
<div class="panel-body">
<p>
{{ form_errors(form.username) }}
{{ form_widget(form.username) }}
</p>
<p>
{{ form_errors(form.password) }}
{{ form_widget(form.password) }}
</p>
<p>
<input type="submit" class="btn btn-primary" value="{{ 'form.submit'|trans }}">
</p>
{% if error %}
<div class="col-md-12">
<div class="alert alert-warning">
{{ error }}
</div>
</div>
{% endif %}
{{ form_rest(form) }}
</div>
</div>
</div>
</form>
{% endif %}
{% if success %}
<div class="col-md-12">
<div class="alert alert-success">
{{ success }}
</div>
</div>
{% else %}
<form action="{{ path('register') }}" method="post" id="main-form">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
{{ 'login.register.title'|trans }}
</div>
<div class="panel-body">
<p>
{{ form_errors(form.username) }}
{{ form_widget(form.username) }}
</p>
<p>
{{ form_errors(form.password) }}
{{ form_widget(form.password) }}
</p>
<p>
<input type="submit" class="btn btn-primary" value="{{ 'form.submit'|trans }}">
</p>
{{ form_rest(form) }}
</div>
</div>
</div>
</form>
{% endif %}
</div>
{% endblock %}

View File

@ -29,14 +29,14 @@
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
{{ 'my.title'|trans }}
{{ 'my.title'|trans }}
<div class="pull-right actions">
<a href="{{ path('home', app.request.attributes.get('_route_params')) }}" class="btn btn-success btn-sm">
<span class="glyphicon glyphicon-copy"></span>
{{ 'gist.action.add'|trans }}
</a>
</div>
</div>
</div>
<div class="panel-body">
<div class="tab-content">
<div id="form-deletion">
@ -109,9 +109,9 @@
</div>
</form>
{% if gists.nbResults == 0 %}
{{ 'my.nothing'|trans }}
{% else %}
{% if gists.nbResults == 0 %}
{{ 'my.nothing'|trans }}
{% else %}
{% set pager %}
{% if gists.haveToPaginate %}
{% set params = app.request.attributes.get('_route_params')|merge({filter: app.request.query.get('filter', [])}) %}
@ -170,45 +170,45 @@
{{ pager }}
{% for gist in gists %}
<div class="commit">
<p>
<strong>{{ gist.title ? gist.title : 'gist.untitled'|trans }}</strong>,
{{ gist.createdAt|date('date.format'|trans) }}
</p>
{% for gist in 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>
<p>
<button class="btn btn-info btn-sm">
{{ gist.type }}
</button>
{% if not gist.cipher %}
<a href="{{ path('view', {gist: gist.file}) }}" class="btn btn-warning btn-sm">
{{ 'gist.action.view'|trans }}
</a>
{% else %}
<button class="btn btn-error btn-sm">
<span class="glyphicon glyphicon-lock"></span>
</button>
{% endif %}
{% if not gist.cipher %}
<a href="{{ path('view', {gist: gist.file}) }}" class="btn btn-warning btn-sm">
{{ 'gist.action.view'|trans }}
</a>
{% else %}
<button class="btn btn-error btn-sm">
<span class="glyphicon glyphicon-lock"></span>
</button>
{% endif %}
<button class="btn btn-delete btn-sm" data-id="{{ gist.id }}">
<span class="glyphicon btn-delete glyphicon-remove" data-id="{{ gist.id }}"></span>
</button>
</p>
</div>
{% endfor %}
</p>
</div>
{% endfor %}
{{ pager }}
{% endif %}
</div>
</div>
</div>
{% endif %}
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
{{ 'login.login.form.password.placeholder'|trans }}
</div>
{{ 'login.login.form.password.placeholder'|trans }}
</div>
<div class="panel-body">
<div class="tab-content">
<form action="{{ path('my', params) }}" method="post">
@ -230,6 +230,6 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -37,32 +37,32 @@
</a>
</li>
{% if user %}
<li>
<a href="{{ path('my') }}">
{{ 'app.menu.my.my.title'|trans }}
</a>
</li>
<li>
<a href="{{ path('logout', {target_url: path('home')}) }}">
{{ 'app.menu.my.logout.title'|trans }}
</a>
</li>
{% elseif app.enable_login %}
<li>
<a href="{{ path('login') }}">
{{ 'app.menu.my.login.title'|trans }}
</a>
</li>
{% if user %}
<li>
<a href="{{ path('my') }}">
{{ 'app.menu.my.my.title'|trans }}
</a>
</li>
<li>
<a href="{{ path('logout', {target_url: path('home')}) }}">
{{ 'app.menu.my.logout.title'|trans }}
</a>
</li>
{% elseif app.enable_login %}
<li>
<a href="{{ path('login') }}">
{{ 'app.menu.my.login.title'|trans }}
</a>
</li>
{% if app.enable_registration %}
<li>
<a href="{{ path('register') }}">
{{ 'app.menu.my.register.title'|trans }}
</a>
</li>
{% endif %}
{% endif %}
{% if app.enable_registration %}
<li>
<a href="{{ path('register') }}">
{{ 'app.menu.my.register.title'|trans }}
</a>
</li>
{% endif %}
{% endif %}
<li>
<a href="https://gitnet.fr/deblan/gist/src/master/README.md">
{{ 'app.menu.about.title'|trans }}