mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-05 17:36:27 +00:00
Merge branch 'frontend_fix' into 'dev'
Frontend changes See merge request federez/re2o!296
This commit is contained in:
commit
38e1cabddd
16 changed files with 624 additions and 427 deletions
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -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
|
||||
```
|
||||
|
|
|
@ -14,4 +14,5 @@ libjs-jquery
|
|||
libjs-jquery-ui
|
||||
libjs-jquery-timepicker
|
||||
libjs-bootstrap
|
||||
fonts-font-awesome
|
||||
graphviz
|
||||
|
|
|
@ -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" %}">
|
||||
|
|
Binary file not shown.
|
@ -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
|
||||
|
|
|
@ -1,38 +1,22 @@
|
|||
/* 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;
|
||||
|
|
|
@ -21,189 +21,332 @@
|
|||
// General options
|
||||
//=====================================
|
||||
// Times the canvas is refreshed a second
|
||||
var FPS = 30;
|
||||
let FPS = 30;
|
||||
// Determine the length of the trail (0=instant disappear, maximum=window.innerHeight=no disappear)
|
||||
var TRAIL_TIME = 5;
|
||||
let TRAIL_TIME = 5;
|
||||
// The color of the characters
|
||||
var RAIN_COLOR = "#00F";
|
||||
let RAIN_COLOR = "#00F";
|
||||
// The characters displayed
|
||||
var CHARACTERS = "田由甲申甴电甶男甸甹町画甼甽甾甿畀畁畂畃畄畅畆畇畈畉畊畋界畍畎畏畐畑".split("");
|
||||
let CHARACTERS = "田由甲申甴电甶男甸甹町画甼甽甾甿畀畁畂畃畄畅畆畇畈畉畊畋界畍畎畏畐畑".split("");
|
||||
// The font size used to display the characters
|
||||
var FONT_SIZE = 10;
|
||||
let FONT_SIZE = 10;
|
||||
// The maximum number of characters displayed by column
|
||||
var MAX_CHAR = 7;
|
||||
let MAX_CHAR = 7;
|
||||
|
||||
var Sapphire = function () {
|
||||
var sapphire = {
|
||||
let Sapphire;
|
||||
|
||||
Sapphire = function () {
|
||||
let sapphire = {
|
||||
triggerHandle: undefined,
|
||||
activated: false,
|
||||
runOnce: false,
|
||||
activated: false,
|
||||
runOnce: false,
|
||||
|
||||
getClass: function(elt, main, name) { elt.obj = main.getElementsByClassName(name); },
|
||||
getTag: function(elt, main, name) { elt.obj = main.getElementsByTagName(name); },
|
||||
getClass: function (elt, main, name) {
|
||||
elt.obj = main.getElementsByClassName(name);
|
||||
},
|
||||
getTag: function (elt, main, name) {
|
||||
elt.obj = main.getElementsByTagName(name);
|
||||
},
|
||||
|
||||
getProp: function(elt) {
|
||||
for (var i=0 ; i<elt.obj.length ; i++) {
|
||||
for (var p in elt.prop) {
|
||||
if ( p === "color" ) { elt.prop[p][i] = elt.obj[i].style.color; }
|
||||
else if ( p === "bgColor" ) { elt.prop[p][i] = elt.obj[i].style.backgroundColor; }
|
||||
else if ( p === "display" ) { elt.prop[p][i] = elt.obj[i].style.display; }
|
||||
getProp: function (elt) {
|
||||
for (let i = 0; i < elt.obj.length; i++) {
|
||||
for (let p in elt.prop) {
|
||||
if (p === "color") {
|
||||
elt.prop[p][i] = elt.obj[i].style.color;
|
||||
}
|
||||
else if (p === "bgColor") {
|
||||
elt.prop[p][i] = elt.obj[i].style.backgroundColor;
|
||||
}
|
||||
else if (p === "display") {
|
||||
elt.prop[p][i] = elt.obj[i].style.display;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
alterProp: function(elt) {
|
||||
for (var i=0 ; i<elt.obj.length ; i++) {
|
||||
for (var p in elt.prop) {
|
||||
if ( p === "color" ) { elt.obj[i].style.color = "white"; }
|
||||
else if ( p === "bgColor" ) { elt.obj[i].style.backgroundColor = "transparent"; }
|
||||
else if ( p === "display" ) { elt.obj[i].style.display = "none"; }
|
||||
alterProp: function (elt) {
|
||||
for (let i = 0; i < elt.obj.length; i++) {
|
||||
for (let p in elt.prop) {
|
||||
if (p === "color") {
|
||||
elt.obj[i].style.color = "white";
|
||||
}
|
||||
else if (p === "bgColor") {
|
||||
elt.obj[i].style.backgroundColor = "transparent";
|
||||
}
|
||||
else if (p === "display") {
|
||||
elt.obj[i].style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
revertProp: function(elt) {
|
||||
for (var i=0 ; i<elt.obj.length ; i++) {
|
||||
for (var p in elt.prop) {
|
||||
if ( p === "color" ) { elt.obj[i].style.color = elt.prop[p][i]; }
|
||||
else if ( p === "bgColor" ) { elt.obj[i].style.backgroundColor = elt.prop[p][i]; }
|
||||
else if ( p === "display" ) { elt.obj[i].style.display = elt.prop[p][i]; }
|
||||
revertProp: function (elt) {
|
||||
for (let i = 0; i < elt.obj.length; i++) {
|
||||
for (let p in elt.prop) {
|
||||
if (p === "color") {
|
||||
elt.obj[i].style.color = elt.prop[p][i];
|
||||
}
|
||||
else if (p === "bgColor") {
|
||||
elt.obj[i].style.backgroundColor = elt.prop[p][i];
|
||||
}
|
||||
else if (p === "display") {
|
||||
elt.obj[i].style.display = elt.prop[p][i];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
elts: {
|
||||
alerts: {
|
||||
obj: undefined,
|
||||
prop: {bgColor: []},
|
||||
get: function(main) { sapphire.getClass(this, main, "alert"); sapphire.getProp(this); },
|
||||
alter: function() { sapphire.alterProp(this); },
|
||||
revert: function() { sapphire.revertProp(this); }
|
||||
obj: undefined,
|
||||
prop: {bgColor: []},
|
||||
get: function (main) {
|
||||
sapphire.getClass(this, main, "alert");
|
||||
sapphire.getProp(this);
|
||||
},
|
||||
alter: function () {
|
||||
sapphire.alterProp(this);
|
||||
},
|
||||
revert: function () {
|
||||
sapphire.revertProp(this);
|
||||
}
|
||||
},
|
||||
btns: {
|
||||
obj: undefined,
|
||||
prop: {color: [], bgColor: []},
|
||||
get: function(main) { sapphire.getClass(this, main, "btn"); sapphire.getProp(this); },
|
||||
alter: function() { sapphire.alterProp(this); },
|
||||
revert: function() { sapphire.revertProp(this); }
|
||||
obj: undefined,
|
||||
prop: {color: [], bgColor: []},
|
||||
get: function (main) {
|
||||
sapphire.getClass(this, main, "btn");
|
||||
sapphire.getProp(this);
|
||||
},
|
||||
alter: function () {
|
||||
sapphire.alterProp(this);
|
||||
},
|
||||
revert: function () {
|
||||
sapphire.revertProp(this);
|
||||
}
|
||||
},
|
||||
body: {
|
||||
obj: undefined,
|
||||
prop: {color: []},
|
||||
get: function(main) {
|
||||
obj: undefined,
|
||||
prop: {color: []},
|
||||
get: function () {
|
||||
this.obj = document.body;
|
||||
for (var p in this.prop) { if ( p === "color" ) { this.prop[p] = this.obj.style.color; } }
|
||||
for (let p in this.prop) {
|
||||
if (p === "color") {
|
||||
this.prop[p] = this.obj.style.color;
|
||||
}
|
||||
}
|
||||
},
|
||||
alter: function() { for (var p in this.prop) { if ( p === "color" ) { this.obj.style.color = "white"; } } },
|
||||
revert: function() { for (var p in this.prop) { if ( p === "color" ) { this.obj.style.color = this.prop[p]; } } }
|
||||
alter: function () {
|
||||
for (let p in this.prop) {
|
||||
if (p === "color") {
|
||||
this.obj.style.color = "white";
|
||||
}
|
||||
}
|
||||
},
|
||||
revert: function () {
|
||||
for (let p in this.prop) {
|
||||
if (p === "color") {
|
||||
this.obj.style.color = this.prop[p];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
captions: {
|
||||
obj: undefined,
|
||||
prop: {color: []},
|
||||
get: function(main) { sapphire.getClass(this, main, "caption"); sapphire.getProp(this); },
|
||||
alter: function() { sapphire.alterProp(this); },
|
||||
revert: function() { sapphire.revertProp(this); }
|
||||
obj: undefined,
|
||||
prop: {color: []},
|
||||
get: function (main) {
|
||||
sapphire.getClass(this, main, "caption");
|
||||
sapphire.getProp(this);
|
||||
},
|
||||
alter: function () {
|
||||
sapphire.alterProp(this);
|
||||
},
|
||||
revert: function () {
|
||||
sapphire.revertProp(this);
|
||||
}
|
||||
},
|
||||
helps: {
|
||||
obj: undefined,
|
||||
prop: {color: []},
|
||||
get: function(main) { sapphire.getClass(this, main, "help-block"); sapphire.getProp(this); },
|
||||
alter: function() { sapphire.alterProp(this); },
|
||||
revert: function() { sapphire.revertProp(this); }
|
||||
obj: undefined,
|
||||
prop: {color: []},
|
||||
get: function (main) {
|
||||
sapphire.getClass(this, main, "help-block");
|
||||
sapphire.getProp(this);
|
||||
},
|
||||
alter: function () {
|
||||
sapphire.alterProp(this);
|
||||
},
|
||||
revert: function () {
|
||||
sapphire.revertProp(this);
|
||||
}
|
||||
},
|
||||
hrs: {
|
||||
obj: undefined,
|
||||
prop: {display: []},
|
||||
get: function(main) { sapphire.getTag(this, main, "hr"); sapphire.getProp(this); },
|
||||
alter: function() { sapphire.alterProp(this); },
|
||||
revert: function() { sapphire.revertProp(this); }
|
||||
obj: undefined,
|
||||
prop: {display: []},
|
||||
get: function (main) {
|
||||
sapphire.getTag(this, main, "hr");
|
||||
sapphire.getProp(this);
|
||||
},
|
||||
alter: function () {
|
||||
sapphire.alterProp(this);
|
||||
},
|
||||
revert: function () {
|
||||
sapphire.revertProp(this);
|
||||
}
|
||||
},
|
||||
inputs: {
|
||||
obj: undefined,
|
||||
prop: {color: [], bgColor: []},
|
||||
get: function(main) { sapphire.getTag(this, main, "input"); sapphire.getProp(this); },
|
||||
alter: function() { sapphire.alterProp(this); },
|
||||
revert: function() { sapphire.revertProp(this); }
|
||||
obj: undefined,
|
||||
prop: {color: [], bgColor: []},
|
||||
get: function (main) {
|
||||
sapphire.getTag(this, main, "input");
|
||||
sapphire.getProp(this);
|
||||
},
|
||||
alter: function () {
|
||||
sapphire.alterProp(this);
|
||||
},
|
||||
revert: function () {
|
||||
sapphire.revertProp(this);
|
||||
}
|
||||
},
|
||||
listGroups: {
|
||||
obj: undefined,
|
||||
prop: {color: [], bgColor: []},
|
||||
get: function(main) { sapphire.getClass(this, main, "list-group-item"); sapphire.getProp(this); },
|
||||
alter: function() { sapphire.alterProp(this); },
|
||||
revert: function() { sapphire.revertProp(this); }
|
||||
obj: undefined,
|
||||
prop: {color: [], bgColor: []},
|
||||
get: function (main) {
|
||||
sapphire.getClass(this, main, "list-group-item");
|
||||
sapphire.getProp(this);
|
||||
},
|
||||
alter: function () {
|
||||
sapphire.alterProp(this);
|
||||
},
|
||||
revert: function () {
|
||||
sapphire.revertProp(this);
|
||||
}
|
||||
},
|
||||
paginations: {
|
||||
obj: [],
|
||||
prop: {bgColor: []},
|
||||
get: function(main) {
|
||||
var a = main.getElementsByClassName("pagination");
|
||||
for (var i=0 ; i<a.length ; i++) {
|
||||
this.obj[i] = []; this.prop.bgColor[i] = [];
|
||||
for (var j=0 ; j<a[i].children.length ; j++) {
|
||||
obj: [],
|
||||
prop: {bgColor: []},
|
||||
get: function (main) {
|
||||
let a = main.getElementsByClassName("pagination");
|
||||
for (let i = 0; i < a.length; i++) {
|
||||
this.obj[i] = [];
|
||||
this.prop.bgColor[i] = [];
|
||||
for (let j = 0; j < a[i].children.length; j++) {
|
||||
this.obj[i][j] = a[i].children[j].children[0];
|
||||
this.prop.bgColor[i][j] = this.obj[i][j].style.backgroundColor;
|
||||
}
|
||||
}
|
||||
},
|
||||
alter: function () {
|
||||
for (var i=0 ; i<this.obj.length ; i++)
|
||||
for (var j=0 ; j<this.obj[i].length ; j++)
|
||||
for (var p in this.prop)
|
||||
if ( p === "bgColor" ) { this.obj[i][j].style.backgroundColor = "transparent"; }
|
||||
alter: function () {
|
||||
for (let i = 0; i < this.obj.length; i++)
|
||||
for (let j = 0; j < this.obj[i].length; j++)
|
||||
for (let p in this.prop)
|
||||
if (p === "bgColor") {
|
||||
this.obj[i][j].style.backgroundColor = "transparent";
|
||||
}
|
||||
},
|
||||
revert: function() {
|
||||
for (var i=0 ; i<this.obj.length ; i++)
|
||||
for (var j=0 ; j<this.obj[i].length ; j++)
|
||||
for (var p in this.prop)
|
||||
if ( p === "bgColor" ) { this.obj[i][j].style.backgroundColor = this.prop[p][i][j]; }
|
||||
revert: function () {
|
||||
for (let i = 0; i < this.obj.length; i++)
|
||||
for (let j = 0; j < this.obj[i].length; j++)
|
||||
for (let p in this.prop)
|
||||
if (p === "bgColor") {
|
||||
this.obj[i][j].style.backgroundColor = this.prop[p][i][j];
|
||||
}
|
||||
}
|
||||
},
|
||||
panelHeadings: {
|
||||
obj: undefined,
|
||||
prop: {bgColor: [], color: []},
|
||||
get: function(main) { sapphire.getClass(this, main, "panel-heading"); sapphire.getProp(this); },
|
||||
alter: function() { sapphire.alterProp(this); },
|
||||
revert: function() { sapphire.revertProp(this); }
|
||||
obj: undefined,
|
||||
prop: {bgColor: [], color: []},
|
||||
get: function (main) {
|
||||
sapphire.getClass(this, main, "panel-heading");
|
||||
sapphire.getProp(this);
|
||||
},
|
||||
alter: function () {
|
||||
sapphire.alterProp(this);
|
||||
},
|
||||
revert: function () {
|
||||
sapphire.revertProp(this);
|
||||
}
|
||||
},
|
||||
panels: {
|
||||
obj: undefined,
|
||||
prop: {bgColor: []},
|
||||
get: function(main) { sapphire.getClass(this, main, "panel"); sapphire.getProp(this); },
|
||||
alter: function() { sapphire.alterProp(this); },
|
||||
revert: function() { sapphire.revertProp(this); }
|
||||
obj: undefined,
|
||||
prop: {bgColor: []},
|
||||
get: function (main) {
|
||||
sapphire.getClass(this, main, "panel");
|
||||
sapphire.getProp(this);
|
||||
},
|
||||
alter: function () {
|
||||
sapphire.alterProp(this);
|
||||
},
|
||||
revert: function () {
|
||||
sapphire.revertProp(this);
|
||||
}
|
||||
},
|
||||
selects: {
|
||||
obj: undefined,
|
||||
prop: {color: [], bgColor: []},
|
||||
get: function(main) { sapphire.getTag(this, main, "select"); sapphire.getProp(this); },
|
||||
alter: function() { sapphire.alterProp(this); },
|
||||
revert: function() { sapphire.revertProp(this); }
|
||||
obj: undefined,
|
||||
prop: {color: [], bgColor: []},
|
||||
get: function (main) {
|
||||
sapphire.getTag(this, main, "select");
|
||||
sapphire.getProp(this);
|
||||
},
|
||||
alter: function () {
|
||||
sapphire.alterProp(this);
|
||||
},
|
||||
revert: function () {
|
||||
sapphire.revertProp(this);
|
||||
}
|
||||
},
|
||||
sidenavs: {
|
||||
obj: undefined,
|
||||
prop: {bgColor: []},
|
||||
get: function(main) { sapphire.getClass(this, main, "sidenav"); sapphire.getProp(this); },
|
||||
alter: function() { sapphire.alterProp(this); },
|
||||
revert: function() { sapphire.revertProp(this); }
|
||||
obj: undefined,
|
||||
prop: {bgColor: []},
|
||||
get: function (main) {
|
||||
sapphire.getClass(this, main, "sidenav");
|
||||
sapphire.getProp(this);
|
||||
},
|
||||
alter: function () {
|
||||
sapphire.alterProp(this);
|
||||
},
|
||||
revert: function () {
|
||||
sapphire.revertProp(this);
|
||||
}
|
||||
},
|
||||
tds: {
|
||||
obj: undefined,
|
||||
prop: {bgColor: []},
|
||||
get: function(main) { sapphire.getTag(this, main, "td"); sapphire.getProp(this); },
|
||||
alter: function() { sapphire.alterProp(this); },
|
||||
revert: function() { sapphire.revertProp(this); }
|
||||
obj: undefined,
|
||||
prop: {bgColor: []},
|
||||
get: function (main) {
|
||||
sapphire.getTag(this, main, "td");
|
||||
sapphire.getProp(this);
|
||||
},
|
||||
alter: function () {
|
||||
sapphire.alterProp(this);
|
||||
},
|
||||
revert: function () {
|
||||
sapphire.revertProp(this);
|
||||
}
|
||||
},
|
||||
thumbnails: {
|
||||
obj: undefined,
|
||||
prop: {bgColor: []},
|
||||
get: function(main) { sapphire.getClass(this, main, "thumbnail"); sapphire.getProp(this); },
|
||||
alter: function() { sapphire.alterProp(this); },
|
||||
revert: function() { sapphire.revertProp(this); }
|
||||
obj: undefined,
|
||||
prop: {bgColor: []},
|
||||
get: function (main) {
|
||||
sapphire.getClass(this, main, "thumbnail");
|
||||
sapphire.getProp(this);
|
||||
},
|
||||
alter: function () {
|
||||
sapphire.alterProp(this);
|
||||
},
|
||||
revert: function () {
|
||||
sapphire.revertProp(this);
|
||||
}
|
||||
},
|
||||
trs: {
|
||||
obj: undefined,
|
||||
prop: {bgColor: []},
|
||||
get: function(main) { sapphire.getTag(this, main, "tr"); sapphire.getProp(this); },
|
||||
alter: function() { sapphire.alterProp(this); },
|
||||
revert: function() { sapphire.revertProp(this); }
|
||||
obj: undefined,
|
||||
prop: {bgColor: []},
|
||||
get: function (main) {
|
||||
sapphire.getTag(this, main, "tr");
|
||||
sapphire.getProp(this);
|
||||
},
|
||||
alter: function () {
|
||||
sapphire.alterProp(this);
|
||||
},
|
||||
revert: function () {
|
||||
sapphire.revertProp(this);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -212,35 +355,39 @@ var Sapphire = function () {
|
|||
drops: undefined,
|
||||
canvas: undefined,
|
||||
|
||||
init: function() {
|
||||
var main = document.getElementById("main");
|
||||
for (var e in sapphire.elts) { sapphire.elts[e].get(main); }
|
||||
init: function () {
|
||||
let main = document.getElementById("main");
|
||||
for (let e in sapphire.elts) {
|
||||
sapphire.elts[e].get(main);
|
||||
}
|
||||
},
|
||||
|
||||
resize: function() {
|
||||
var ctx = sapphire.canvas.getContext("2d");
|
||||
var img = ctx.getImageData( 0, 0, sapphire.canvas.width, sapphire.canvas.height );
|
||||
resize: function () {
|
||||
let ctx = sapphire.canvas.getContext("2d");
|
||||
let img = ctx.getImageData(0, 0, sapphire.canvas.width, sapphire.canvas.height);
|
||||
sapphire.canvas.width = window.innerWidth;
|
||||
sapphire.canvas.height = window.innerHeight;
|
||||
ctx.fillStyle = "rgba(0, 0, 0, 1)";
|
||||
ctx.fillRect(0, 0, sapphire.canvas.width, sapphire.canvas.height);
|
||||
ctx.putImageData( img, 0, 0 );
|
||||
sapphire.columns = sapphire.canvas.width/FONT_SIZE;
|
||||
sapphire.alpha = Math.max( 0, Math.min( 1, TRAIL_TIME / ( sapphire.canvas.height/FONT_SIZE ) ) );
|
||||
var newDrops = [];
|
||||
for(var x = 0; x < sapphire.columns; x++) {
|
||||
if ( sapphire.drops && sapphire.drops[x] ) { newDrops[x] = sapphire.drops[x] }
|
||||
ctx.putImageData(img, 0, 0);
|
||||
sapphire.columns = sapphire.canvas.width / FONT_SIZE;
|
||||
sapphire.alpha = Math.max(0, Math.min(1, TRAIL_TIME / (sapphire.canvas.height / FONT_SIZE)));
|
||||
let newDrops = [];
|
||||
for (let x = 0; x < sapphire.columns; x++) {
|
||||
if (sapphire.drops && sapphire.drops[x]) {
|
||||
newDrops[x] = sapphire.drops[x]
|
||||
}
|
||||
else {
|
||||
newDrops[x] = [];
|
||||
var nb = Math.floor(Math.random()*MAX_CHAR);
|
||||
for (var y = 0; y < nb; y++)
|
||||
let nb = Math.floor(Math.random() * MAX_CHAR);
|
||||
for (let y = 0; y < nb; y++)
|
||||
newDrops[x][y] = 0;
|
||||
}
|
||||
}
|
||||
sapphire.drops = newDrops;
|
||||
},
|
||||
|
||||
run: function() {
|
||||
run: function () {
|
||||
sapphire.canvas = document.createElement("canvas");
|
||||
document.body.appendChild(sapphire.canvas);
|
||||
sapphire.canvas.style.position = "fixed";
|
||||
|
@ -248,23 +395,23 @@ var Sapphire = function () {
|
|||
sapphire.canvas.style.left = 0;
|
||||
sapphire.canvas.style.top = 0;
|
||||
|
||||
var ctx = sapphire.canvas.getContext("2d");
|
||||
let ctx = sapphire.canvas.getContext("2d");
|
||||
ctx.fillStyle = "rgba(0, 0, 0, 1)";
|
||||
ctx.fillRect(0, 0, sapphire.canvas.width, sapphire.canvas.height);
|
||||
|
||||
function attenuateBackground() {
|
||||
ctx.fillStyle = "rgba(0, 0, 0, "+sapphire.alpha+")";
|
||||
ctx.fillStyle = "rgba(0, 0, 0, " + sapphire.alpha + ")";
|
||||
ctx.fillRect(0, 0, sapphire.canvas.width, sapphire.canvas.height);
|
||||
}
|
||||
|
||||
function drawMatrixRainDrop() {
|
||||
ctx.fillStyle = RAIN_COLOR;
|
||||
ctx.font = FONT_SIZE + "px arial";
|
||||
for(var i = 0; i < sapphire.drops.length; i++) {
|
||||
for (var j = 0; j < sapphire.drops[i].length; j++) {
|
||||
var text = CHARACTERS[Math.floor(Math.random()*CHARACTERS.length)];
|
||||
ctx.fillText(text, i*FONT_SIZE, sapphire.drops[i][j]*FONT_SIZE);
|
||||
if(sapphire.drops[i][j]*FONT_SIZE > sapphire.canvas.height && Math.random() > 0.975)
|
||||
for (let i = 0; i < sapphire.drops.length; i++) {
|
||||
for (let j = 0; j < sapphire.drops[i].length; j++) {
|
||||
let text = CHARACTERS[Math.floor(Math.random() * CHARACTERS.length)];
|
||||
ctx.fillText(text, i * FONT_SIZE, sapphire.drops[i][j] * FONT_SIZE);
|
||||
if (sapphire.drops[i][j] * FONT_SIZE > sapphire.canvas.height && Math.random() > 0.975)
|
||||
sapphire.drops[i][j] = 0;
|
||||
sapphire.drops[i][j]++;
|
||||
}
|
||||
|
@ -278,19 +425,29 @@ var Sapphire = function () {
|
|||
|
||||
sapphire.resize();
|
||||
window.addEventListener('resize', sapphire.resize);
|
||||
sapphire.triggerHandle = setInterval(drawEverything, 1000/FPS);
|
||||
sapphire.triggerHandle = setInterval(drawEverything, 1000 / FPS);
|
||||
},
|
||||
|
||||
stop: function() {
|
||||
stop: function () {
|
||||
window.removeEventListener('resize', sapphire.resize);
|
||||
clearInterval(sapphire.triggerHandle);
|
||||
sapphire.canvas.parentNode.removeChild(sapphire.canvas);
|
||||
},
|
||||
|
||||
alterElts: function() { for (var e in sapphire.elts) { sapphire.elts[e].alter(main); } },
|
||||
revertElts: function() { for (var e in sapphire.elts) { sapphire.elts[e].revert(main); } },
|
||||
alterElts: function () {
|
||||
for (let e in sapphire.elts) {
|
||||
let main = document.getElementById("main");
|
||||
sapphire.elts[e].alter(main);
|
||||
}
|
||||
},
|
||||
revertElts: function () {
|
||||
for (let e in sapphire.elts) {
|
||||
let main = document.getElementById("main");
|
||||
sapphire.elts[e].revert(main);
|
||||
}
|
||||
},
|
||||
|
||||
activate: function() {
|
||||
activate: function () {
|
||||
if (!sapphire.runOnce) {
|
||||
sapphire.runOnce = true;
|
||||
sapphire.init();
|
||||
|
@ -306,11 +463,7 @@ var Sapphire = function () {
|
|||
sapphire.revertElts();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return sapphire;
|
||||
}
|
||||
|
||||
var s = Sapphire();
|
||||
Konami(s.activate);
|
||||
|
||||
};
|
|
@ -39,224 +39,245 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<meta property="og:image" content="{% static 'images/logo_re2o.svg' %}"/>
|
||||
<meta property="og:image:type" content="image/svg"/>
|
||||
<meta property="og:image:alt" content="The Re2o logo"/>
|
||||
<meta property="og:description" content="{% trans "Networking managing website endorsed by FedeRez." %}" />
|
||||
<script defer src="https://use.fontawesome.com/releases/v5.0.8/js/all.js"></script>
|
||||
{# Load CSS and JavaScript #}
|
||||
{% bootstrap_css %}
|
||||
<link href="/static/css/typeaheadjs.css" rel="stylesheet">
|
||||
<link href="/static/css/bootstrap-tokenfield.css" rel="stylesheet">
|
||||
<meta property="og:description" content="{% trans "Networking managing website endorsed by FedeRez." %}" />
|
||||
|
||||
{# Load CSS #}
|
||||
{% bootstrap_css %}
|
||||
<link href="{% static 'css/typeaheadjs.css' %}" rel="stylesheet">
|
||||
<link href="{% static 'css/bootstrap-tokenfield.css' %}" rel="stylesheet">
|
||||
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet">
|
||||
<link href="{% static 'css/base.css' %}" rel="stylesheet">
|
||||
|
||||
{% bootstrap_javascript %}
|
||||
<script src="/static/js/typeahead/typeahead.js"></script>
|
||||
<script src="/static/js/handlebars/handlebars.js"></script>
|
||||
<script src="/static/js/konami/konami.js"></script>
|
||||
<script src="/static/js/sapphire.js"> var s=Sapphire(); Konami(s.activate); </script>
|
||||
<script src="/static/js/bootstrap-tokenfield/bootstrap-tokenfield.js"></script>
|
||||
<script src="/static/js/shortcuts.js"></script>
|
||||
<link rel="stylesheet" href="{% static 'css/base.css' %}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="shortcut icon" type="image/svg" href="{% static 'images/logo_re2o.svg' %}">
|
||||
<title>{{ name_website }} : {% block title %}{% trans "Home" %}{% endblock %}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="wrap">
|
||||
<nav class="navbar navbar-inverse">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/">
|
||||
<img src="{% static 'images/logo_re2o_navbar.svg' %}" height=32>
|
||||
{{ name_website }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="myNavbar">
|
||||
<ul class="nav navbar-nav">
|
||||
{% can_view_any_app users machines cotisations %}
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-users"></i> {% trans "Users" %}<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
{% can_view_app users %}
|
||||
<li><a href="{% url 'users:index' %}"><i class="fa fa-user"></i> {% trans "Manage the users" %}</a></li>
|
||||
<li><a href="{% url 'users:index-clubs' %}"><i class="fa fa-users"></i> {% trans "Manage the clubs" %}</a></li>
|
||||
{% acl_end %}
|
||||
{% can_view_app machines %}
|
||||
<li><a href="{% url 'machines:index' %}"><i class="fa fa-desktop"></i> {% trans "Manage the machines" %}</a></li>
|
||||
{% acl_end %}
|
||||
{% can_view_app cotisations %}
|
||||
<li><a href="{% url 'cotisations:index' %}"><i class="fa fa-dollar-sign"></i> {% trans "Manage the subscriptions" %}</a></li>
|
||||
{% acl_end %}
|
||||
</ul>
|
||||
</li>
|
||||
{% acl_end %}
|
||||
{% can_view_app topologie %}
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-sitemap"></i> {% trans "Topology" %}<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{% url "topologie:index" %}"><i class="fa fa-microchip"></i> {% trans "Switches" %}</a></li>
|
||||
<li><a href="{% url "topologie:index-ap" %}"><i class="fa fa-wifi"></i> {% trans "Access points" %}</a></li>
|
||||
<li><a href="{% url "topologie:index-room" %}"><i class="fa fa-home"></i> {% trans "Rooms" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% acl_end %}
|
||||
{% can_view_app logs %}
|
||||
<li><a href="{% url "logs:index" %}"><i class="fa fa-chart-area"></i> {% trans "Statistics" %}</a></li>
|
||||
{% acl_end %}
|
||||
{% can_view_app preferences %}
|
||||
<body id="main">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/">
|
||||
<img src="{% static 'images/logo_re2o_navbar.svg' %}" height=32>
|
||||
{{ name_website }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="myNavbar">
|
||||
<ul class="nav navbar-nav">
|
||||
{% can_view_any_app users machines cotisations %}
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-users"></i> {% trans "Users" %}<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
{% can_view_app users %}
|
||||
<li><a href="{% url 'users:index' %}"><i class="fa fa-user"></i> {% trans "Manage the users" %}</a></li>
|
||||
<li><a href="{% url 'users:index-clubs' %}"><i class="fa fa-users"></i> {% trans "Manage the clubs" %}</a></li>
|
||||
{% acl_end %}
|
||||
{% can_view_app machines %}
|
||||
<li><a href="{% url 'machines:index' %}"><i class="fa fa-desktop"></i> {% trans "Manage the machines" %}</a></li>
|
||||
{% acl_end %}
|
||||
{% can_view_app cotisations %}
|
||||
<li><a href="{% url 'cotisations:index' %}"><i class="fa fa-eur"></i> {% trans "Manage the subscriptions" %}</a></li>
|
||||
{% acl_end %}
|
||||
</ul>
|
||||
</li>
|
||||
{% acl_end %}
|
||||
{% can_view_app topologie %}
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-sitemap"></i> {% trans "Topology" %}<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{% url "topologie:index" %}"><i class="fa fa-microchip"></i> {% trans "Switches" %}</a></li>
|
||||
<li><a href="{% url "topologie:index-ap" %}"><i class="fa fa-wifi"></i> {% trans "Access points" %}</a></li>
|
||||
<li><a href="{% url "topologie:index-room" %}"><i class="fa fa-home"></i> {% trans "Rooms" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% acl_end %}
|
||||
{% can_view_app logs %}
|
||||
<li><a href="{% url "logs:index" %}"><i class="fa fa-area-chart"></i> {% trans "Statistics" %}</a></li>
|
||||
{% acl_end %}
|
||||
{% can_view_app preferences %}
|
||||
<li>
|
||||
<a href="{% url 'preferences:display-options' %}">
|
||||
<i class="fa fa-cogs"></i> {% trans "Administration" %}
|
||||
</a>
|
||||
</li>
|
||||
{% acl_end %}
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-info"></i> {% trans "More information" %}<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{% url 'about' %}"><i class="fa fa-info-circle"></i> {% trans "About" %}</a></li>
|
||||
<li><a href="{% url 'contact' %}"><i class="fa fa-at"></i> {% trans "Contact" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% if not request.user.is_authenticated %}
|
||||
{% if var_sa %}
|
||||
<li>
|
||||
<a href="{% url 'preferences:display-options' %}">
|
||||
<i class="fa fa-cogs"></i> {% trans "Administration" %}
|
||||
<a href="{% url 'users:new-user' %}">
|
||||
<i class="fa fa-user-plus"></i> {% trans "Sign up" %}
|
||||
</a>
|
||||
</li>
|
||||
{% acl_end %}
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fas fa-info"></i> {% trans "More information" %}<span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{% url 'about' %}"><i class="fa fa-info-circle"></i> {% trans "About" %}</a></li>
|
||||
<li><a href="{% url 'contact' %}"><i class="fas fa-at"></i> {% trans "Contact" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% if not request.user.is_authenticated %}
|
||||
{% if var_sa %}
|
||||
<li>
|
||||
<a href="{% url 'users:new-user' %}">
|
||||
<i class="fa fa-user-plus"></i> {% trans "Sign up" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a id="toggle_login" href="{% url 'login' %}">
|
||||
<i class="fa fa-sign-in-alt"></i> {% trans "Log in" %}
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
{% can_view_any_app users machines cotisations %}
|
||||
<li>
|
||||
<form action="{% url "search:search"%}" class="navbar-form" role="search">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="{% trans "Search" %}" name="q" id="search-term" {% if search_term %}value="{{ search_term }}"{% endif %}>
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
|
||||
<a href="{% url "search:searchp" %}" class="btn btn-default" role="button"><i class="fa fa-plus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</li>
|
||||
{% acl_end %}
|
||||
{% endif %}
|
||||
{% if request.user.is_authenticated %}
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-user-circle"></i> {{ request.user.pseudo|slice:":15" }} <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{% url "users:mon-profil" %}"><i class="fa fa-user"></i> {% trans "My profile" %}</a></li>
|
||||
<li><a id="toggle_login" href="{% url 'logout' %}"><i class="fa fa-sign-out-alt"></i> {% trans "Log out" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
{% include 'buttons/setlang.html' %}
|
||||
<a id="toggle_login" href="{% url 'login' %}">
|
||||
<i class="fa fa-sign-in"></i> {% trans "Log in" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
{% can_view_any_app users machines cotisations %}
|
||||
<li>
|
||||
<form action="{% url "search:search"%}" class="navbar-form" role="search">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="{% trans "Search" %}" name="q" id="search-term" {% if search_term %}value="{{ search_term }}"{% endif %}>
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
|
||||
<a href="{% url "search:searchp" %}" class="btn btn-default" role="button"><i class="fa fa-plus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</li>
|
||||
{% acl_end %}
|
||||
{% endif %}
|
||||
{% if request.user.is_authenticated %}
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-user-circle"></i> {{ request.user.pseudo|slice:":15" }} <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{% url "users:mon-profil" %}"><i class="fa fa-user"></i> {% trans "My profile" %}</a></li>
|
||||
<li><a id="toggle_login" href="{% url 'logout' %}"><i class="fa fa-sign-out"></i> {% trans "Log out" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
{% include 'buttons/setlang.html' %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container-fluid text-center">
|
||||
<div class="row content">
|
||||
<div class="col-sm-2 sidenav pt4">
|
||||
<div class="panel panel-default">
|
||||
<div class="text-left list-group">
|
||||
{% block sidebar %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div id="main" class="container-fluid text-center">
|
||||
<div class="row content">
|
||||
<div class="col-sm-2 sidenav">
|
||||
<div class="panel panel-default">
|
||||
<div class="text-left list-group">
|
||||
{% block sidebar %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8 text-left">
|
||||
{# Display django.contrib.messages as Bootstrap alerts #}
|
||||
{% bootstrap_messages %}
|
||||
<hr>
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
<div class="col-sm-2 sidenav">
|
||||
<div class="panel panel-default">
|
||||
{% if request_user.is_authenticated %}
|
||||
<div class="panel-heading">
|
||||
<h4>{{ request_user.name }} {{ request_user.surname }}</h4>
|
||||
</div>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th scope="row">{% trans "Username" %}</th>
|
||||
<td class="text-right">{{ request_user.pseudo }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans "Room" %}</th>
|
||||
<td class="text-right">{{ request_user.room }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans "Internet access" %}</th>
|
||||
<td class="text-right">
|
||||
{% if request_user.has_access %}
|
||||
<i class="text-success">{% blocktrans with request.user.end_access|date:"d b Y" as date %}Until {{ date }}{% endblocktrans %}</i>
|
||||
{% else %}
|
||||
<i class="text-danger">{% trans "Disabled" %}</i>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans "Membership" %}</th>
|
||||
<td class="text-right">
|
||||
{% if request_user.is_adherent %}
|
||||
<i class="text-success">{% blocktrans with request_user.end_adhesion|date:"d b Y" as date %}Until {{ date }}{% endblocktrans %}</i>
|
||||
{% else %}
|
||||
<i class="text-danger">{% trans "Not a member" %}</i>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="list-group">
|
||||
<a class="list-group-item list-group-item-info" role="button"href="{% url "users:mon-profil" %}">
|
||||
<i class="fa fa-user-circle"></i>
|
||||
{% trans "View my profile" %}
|
||||
</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>{% trans "You are not logged in." %}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-sm-8 text-left pt4">
|
||||
{# Display django.contrib.messages as Bootstrap alerts #}
|
||||
{% bootstrap_messages %}
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
<div class="col-sm-2 sidenav pt4">
|
||||
<div class="panel panel-default">
|
||||
{% if request_user.is_authenticated %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4>{% blocktrans count interfaces|length as nb %}{{ nb }} active machine{% plural %}{{ nb }} active machines{% endblocktrans %}</h4>
|
||||
</div>
|
||||
<ul class="list-group">
|
||||
{% for interface in interfaces|slice:":5" %}
|
||||
<div class="list-group-item">{{interface}}</div>
|
||||
{% endfor %}
|
||||
{% if interfaces|length > 5 %}
|
||||
<a class="list-group-item list-group-item-info" role="button" href="{% url "users:mon-profil" %}">
|
||||
<i class="fa fa-plus"></i>
|
||||
{% trans "View my machines" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<div class="panel-heading">
|
||||
<h4>{{ request_user.name }} {{ request_user.surname }}</h4>
|
||||
</div>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th scope="row">{% trans "Username" %}</th>
|
||||
<td class="text-right">{{ request_user.pseudo }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans "Room" %}</th>
|
||||
<td class="text-right">{{ request_user.room }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans "Internet access" %}</th>
|
||||
<td class="text-right">
|
||||
{% if request_user.has_access %}
|
||||
<i class="text-success">{% blocktrans with request.user.end_access|date:"d b Y" as date %}Until {{ date }}{% endblocktrans %}</i>
|
||||
{% else %}
|
||||
<i class="text-danger">{% trans "Disabled" %}</i>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans "Membership" %}</th>
|
||||
<td class="text-right">
|
||||
{% if request_user.is_adherent %}
|
||||
<i class="text-success">{% blocktrans with request_user.end_adhesion|date:"d b Y" as date %}Until {{ date }}{% endblocktrans %}</i>
|
||||
{% else %}
|
||||
<i class="text-danger">{% trans "Not a member" %}</i>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="list-group">
|
||||
<a class="list-group-item list-group-item-info" role="button"href="{% url "users:mon-profil" %}">
|
||||
<i class="fa fa-user-circle"></i>
|
||||
{% trans "View my profile" %}
|
||||
</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>{% trans "You are not logged in." %}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if request_user.is_authenticated %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4>{% blocktrans count interfaces|length as nb %}{{ nb }} active machine{% plural %}{{ nb }} active machines{% endblocktrans %}</h4>
|
||||
</div>
|
||||
<ul class="list-group">
|
||||
{% for interface in interfaces|slice:":5" %}
|
||||
<div class="list-group-item">{{interface}}</div>
|
||||
{% endfor %}
|
||||
{% if interfaces|length > 5 %}
|
||||
<a class="list-group-item list-group-item-info" role="button" href="{% url "users:mon-profil" %}">
|
||||
<i class="fa fa-plus"></i>
|
||||
{% trans "View my machines" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="navbar">
|
||||
<div class="containerfluid text-center">
|
||||
<p> <a href="\\{{request.get_host}}/about/">Re2o 2016-2018</a> </p>
|
||||
<footer class="text-muted">
|
||||
<div class="container">
|
||||
<p class="pull-right">
|
||||
<a href="#">{% trans "Back to top" %}</a>
|
||||
</p>
|
||||
<p>{{ name_website }} {% trans "powered by" %} Re2o 2016–2018</p>
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
Brought to you with <i class="fa fa-heart text-danger"></i>.
|
||||
{% endblocktrans %}
|
||||
<a href="{{ request.scheme }}://{{ request.get_host }}/about/">{% trans "About this website" %}</a>.
|
||||
</p>
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
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.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{# Load JavaScript #}
|
||||
{% bootstrap_javascript %}
|
||||
<script src="/static/js/typeahead/typeahead.js"></script>
|
||||
<script src="/static/js/handlebars/handlebars.js"></script>
|
||||
<script src="/static/js/konami/konami.js"></script>
|
||||
<script src="/static/js/sapphire.js"></script>
|
||||
<script>
|
||||
// Konami activate sapphire
|
||||
let s = Sapphire();
|
||||
Konami(s.activate);
|
||||
</script>
|
||||
<script src="/static/js/bootstrap-tokenfield/bootstrap-tokenfield.js"></script>
|
||||
<script src="/static/js/shortcuts.js"></script>
|
||||
|
||||
{# Read the documentation for more information #}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Binary file not shown.
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue