Commit 38e1cabd authored by klafyvel's avatar klafyvel

Merge branch 'frontend_fix' into 'dev'

Frontend changes

See merge request federez/re2o!296
parents 1f1063bf 67a7b2b3
......@@ -150,3 +150,17 @@ On some database engines (postgreSQL) you also need to update the id sequences:
```bash
python3 manage.py sqlsequencereset cotisations | python3 manage.py dbshell
```
## MR 296: Frontend changes
Install fonts-font-awesome
```bash
apt-get -y install fonts-font-awesome
```
Collec new statics
```bash
python3 manage.py collectstatic
```
......@@ -29,15 +29,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block sidebar %}
{% can_view_app logs %}
<a class="list-group-item list-group-item-info" href="{% url "logs:index" %}">
<i class="fa fa-clipboard-list"></i>
<i class="fa fa-clipboard"></i>
{% trans "Summary" %}
</a>
<a class="list-group-item list-group-item-info" href="{% url "logs:stats-logs" %}">
<i class="fa fa-calendar-alt"></i>
<i class="fa fa-calendar"></i>
{% trans "Events" %}
</a>
<a class="list-group-item list-group-item-info" href="{% url "logs:stats-general" %}">
<i class="fa fa-chart-area"></i>
<i class="fa fa-area-chart"></i>
{% trans "General" %}
</a>
<a class="list-group-item list-group-item-info" href="{% url "logs:stats-models" %}">
......
......@@ -87,7 +87,7 @@ msgstr "À propos de %(AssoName)s"
#: templates/re2o/about.html:36
msgid ""
"Re2o is an administration tool initiated by <a href=\"https://rezometz.org/"
"\">Rezo Supelec Metz</a> and a few members of other <a href=\"https://"
"\">Rezo Metz</a> and a few members of other <a href=\"https://"
"federez.net\">FedeRez</a> associations around the summer 2016.<br /> It is "
"intended to be a tool independant from any network infrastructure so it can "
"be setup in \"a few steps\". This tool is entirely free and available under "
......@@ -98,11 +98,11 @@ msgid ""
"to contact us and come help us build the future of Re2o."
msgstr ""
"Re2o est un outil d'administration initié par <a href=\"https://rezometz.org/"
"\">Rézo Supélec Metz</a> et quelques membres d'autres assocations de <a href="
"\">Rézo Metz</a> et quelques membres d'autres associations de <a href="
"\"https://federez.net\">FedeRez</a> autour de l'été 2016.<br /> Il se veut "
"être un outil indépendant de toute infrastructure réseau pour pouvoir être "
"installé en \"quelques étapes\". Cet outil est entièrement gratuit et est "
"disponible sous license GNU Public License v2 (GPLv2) sur le<a href="
"disponible sous licence GNU Public Licence v2 (GPLv2) sur le <a href="
"\"https://gitlab.federez.net/federez/re2o/\">gitlab de FedeRez</a>.<br />\n"
"Les mainteneurs de Re2o sont de fiers bénévoles venant principalement "
"d'écoles d'ingénieurs françaises (mais pas seulement) qui ont donné beaucoup "
......
......@@ -174,6 +174,7 @@ BOOTSTRAP_BASE_URL = '/javascript/bootstrap/'
# Use only absolute paths with '/' delimiters even on Windows
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static').replace('\\', '/'),
"/usr/share/fonts-font-awesome/",
)
# Directory where the static files served by the server are stored
STATIC_ROOT = os.path.join(BASE_DIR, 'static_files')
......
......@@ -35,7 +35,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<h2>{% trans "About Re2o" %}</h2>
<p>{% blocktrans trimmed %}
Re2o is an administration tool initiated by
<a href="https://rezometz.org/">Rezo Supelec Metz</a> and a few
<a href="https://rezometz.org/">Rezo Metz</a> and a few
members of other <a href="https://federez.net">FedeRez</a> associations
around the summer 2016.<br />
It is intended to be a tool independant from any network infrastructure
......
......@@ -31,9 +31,9 @@ def tick(valeur, autoescape=False):
if isinstance(valeur,bool):
if valeur == True:
result = '<i style="color: #1ECA18;" class="fas fa-check"></i>'
result = '<i style="color: #1ECA18;" class="fa fa-check"></i>'
else:
result = '<i style="color: #D10115;" class="fas fa-times"></i>'
result = '<i style="color: #D10115;" class="fa fa-times"></i>'
return mark_safe(result)
else: # if the value is not a boolean, display it as if tick was not called
......
/* Sticky footer hacks */
html, body {
height: 100%;
}
#wrap {
min-height: 100%;
}
#main {
overflow: auto;
padding-bottom:60px; /* this needs to be bigger than footer height*/
}
/* Footer */
footer {
position: relative;
margin-top: -50px; /* negative value of footer height */
height: 50px;
clear:both;
padding-top:20px;
background-color: #222222;
/*background: -webkit-linear-gradient(left, red, red 16.6%, orange 16.6%, orange, orange 33.3%, yellow 33.3%, yellow, yellow 50%, green 50%, green, green 66.6%, blue 66.6%, blue, blue 83.3%, violet 83.3%,violet); */
color: white;
padding: 15px;
padding-top: 3rem;
padding-bottom: 3rem;
}
footer a {
color: white;
text-decoration: underline;
footer p {
margin-bottom: .25rem;
}
/* Remove the navbar's default margin-bottom and rounded borders */
.navbar {
margin-bottom: 0;
border-radius: 0;
/* Move the space between navbar and content in the content */
.navbar { margin-bottom: 0; }
.pt4 { padding-top: 1.5rem!important; }
/* Reserv space for icons and align */
a > i.fa {
display: inline-block;
width: 26px;
text-align: center;
}
/* Reduce the padding for the logo in the navbar-brand so the 32px-high logo
......@@ -47,6 +31,20 @@ footer a {
display: initial;
}
/* Make navbar look less Bootstraped */
.navbar-inverse {
background-color: #612210;
border-color: #f9a01b;
}
.navbar-inverse .navbar-brand {
color: #ffffff;
}
.navbar-inverse .navbar-nav > li > a {
color: #d6d6d6;
}
/* Add right colors for buttons in dropdown in navbar-inverse (else it is light
* gray on white bg and white when hovered */
.navbar-inverse .dropdown-menu .btn-link {
......@@ -73,10 +71,11 @@ footer a {
overflow: auto;
}
/* Set gray background color and 100% height */
/* Set gray background color */
.sidenav {
padding-top: 20px;
background-color: #f1f1f1;
border: 1px solid #e0e0e0;
border-radius: 0 0 5px 5px;
}
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
vertical-align: middle;
......
This diff is collapsed.
This diff is collapsed.
......@@ -26,6 +26,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% trans "Edit" as tr_edit %}
<a class="btn btn-primary btn-sm" role="button" title="{{ desc|default:tr_edit }}" href="{% url href id %}">
<i class="fa fa-pencil-alt"></i>
<i class="fa fa-pencil"></i>
</a>
......@@ -82,11 +82,11 @@ msgstr "Statistiques"
msgid "Administration"
msgstr "Administration"
#: base.html:119
#: base.html:112
msgid "More information"
msgstr "Plus d'informations"
#: base.html:121
#: base.html:114
msgid "About"
msgstr "À propos"
......@@ -162,6 +162,30 @@ msgstr[1] "%(nb)s machines actives"
msgid "View my machines"
msgstr "Voir mes machines"
#: base.html:257
msgid "Back to top"
msgstr "Retour en haut"
#: base.html:259
msgid "powered by"
msgstr "propulsé par"
#: base.html:261
msgid "Brought to you with <i class=\"fa fa-heart text-danger\"></i>."
msgstr "Codé avec <i class=\"fa fa-heart text-danger\"></i>."
#: base.html:264
msgid "About this website"
msgstr "À propos de ce site"
#: base.html:267
msgid ""
"This software is under the terms of the "
"<a href=\"http://www.gnu.org/licenses/gpl-2.0.txt\" target=\"_blank\" rel=\"nofollow\">GPLv2</a> License."
msgstr ""
"Ce logiciel est sous les termes de la licence "
"<a href=\"http://www.gnu.org/licenses/gpl-2.0.txt\" target=\"_blank\" rel=\"nofollow\">GPLv2</a>."
#: buttons/add.html:27
msgid "Add"
msgstr "Ajouter"
......
......@@ -24,33 +24,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% endcomment %}
{% load bootstrap3 %}
{% load i18n %}
{% block title %}{% trans "Log in" %}{% endblock %}
{% block content %}
{% if form.errors %}
<p>{% trans "Your username and password didn't match. Please try again." %}</p>
{% endif %}
{% if next %}
{% if user.is_authenticated %}
<p>{% trans "Your account doesn't have access to this page. To proceed,
please log in with an account that has access." %}</p>
{% else %}
<p>{% trans "Please log in to see this page." %}</p>
{% endif %}
{% endif %}
<p><form method="post" action="{% url 'login' %}">
{% csrf_token %}
{% bootstrap_form form %}
<button class="btn btn-success" type="submit"><span class="glyphicon glyphicon-log-in"></span> {% trans "Log in" %}</button>
<input type="hidden" name="next" value="{{ next }}" />
</form></p>
<p><a class="btn btn-warning btn-sm" role="button" href="{% url 'users:reset-password' %}"> {% trans "Forgotten password?" %}</a></p>
<form method="post" action="{% url 'login' %}">
{% csrf_token %}
{% bootstrap_form form %}
<button class="btn btn-success" type="submit"><span
class="glyphicon glyphicon-log-in"></span> {% trans "Log in" %}</button>
</form>
<p><a class="btn btn-warning btn-sm" role="button"
href="{% url 'users:reset-password' %}"> {% trans "Forgotten password?" %}</a></p>
{% endblock %}
......@@ -55,7 +55,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="panel-body dashboard">
{% can_create Facture %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'cotisations:new-facture' users.id %}">
<i class="fas fa-sign-in-alt"></i> {% trans "Pay for a connection" %}
<i class="fa fa-sign-in"></i> {% trans "Pay for a connection" %}
</a>
{% acl_else %}
{% trans "Ask for someone with the appropriate rights to pay for a connection." %}
......@@ -68,7 +68,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="panel-body dashboard">
{% can_create Facture %}
<a class="btn btn-success btn-sm" role="button" href="{% url 'cotisations:new-facture' users.id %}">
<i class="fas fa-sign-in-alt"></i> {% trans "Extend the connection period" %}
<i class="fa fa-sign-in"></i> {% trans "Extend the connection period" %}
</a>
{% acl_end %}
</div>
......@@ -79,11 +79,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="col-sm-6 col-md-4">
<div class="panel panel-info">
<div class="panel-heading dashboard" data-parent="#accordion" data-toggle="collapse" data-target="#collapse4">
{{ users.solde }} <i class="fas fa-euro-sign"></i>
{{ users.solde }} <i class="fa fa-eur"></i>
</div>
<div class="panel-body dashboard">
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:credit-solde' users.id %}">
<i class="fa fa-euro-sign"></i> {% trans "Refill the balance" %}
<i class="fa fa-eur"></i> {% trans "Refill the balance" %}
</a>
</div>
</div>
......@@ -240,7 +240,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ users.solde }} €
{% if user_solde %}
<a class="btn btn-primary btn-sm" style='float:right' role="button" href="{% url 'cotisations:credit-solde' users.pk%}">
<i class="fa fa-euro-sign"></i>
<i class="fa fa-eur"></i>
{% trans "Refill" %}
</a>
{% endif %}
......@@ -345,7 +345,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="panel panel-default">
<div class="panel-heading clearfix profil" data-parent="#accordion" data-toggle="collapse" data-target="#collapse4">
<h3 class="panel-title pull-left">
<i class="fa fa-euro-sign"></i>
<i class="fa fa-eur"></i>
{% trans "Subscriptions" %}
</h3>
</div>
......@@ -353,12 +353,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="panel-body">
{% can_create Facture %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:new-facture' users.id %}">
<i class="fa fa-euro-sign"></i>
<i class="fa fa-eur"></i>
{% trans "Add as subscription" %}
</a>
{% if user_solde %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:credit-solde' users.id %}">
<i class="fa fa-euro-sign"></i>
<i class="fa fa-eur"></i>
{% trans "Edit the balance" %}
</a>
{% endif%}
......@@ -433,7 +433,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="panel-body">
{% can_edit users %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:edit-email-settings' users.id %}">
<i class="fa fa-pencil-alt"></i>{% trans " Edit email settings" %}
<i class="fa fa-pencil"></i>{% trans " Edit email settings" %}
</a>
{% acl_end %}
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment