mirror of https://gitlab.federez.net/re2o/re2o
Browse Source
The menus of the navbar is reorganized The footer is changed into a navbar The right sidebar is placed to the left The left sidebar is deleted Header navbar and leftsidebar are now fixed Physical grouing is split into 4 viewsrelease-2.9
18 changed files with 898 additions and 611 deletions
@ -0,0 +1,42 @@ |
|||||
|
function adjustHeader(){ |
||||
|
/* This function is here to adjust the header if the header navbar |
||||
|
goes into two lines. This can't happen if the width is sm or less, |
||||
|
and we shouldn't adjust in this case. */ |
||||
|
if ($(window).width() >= 768) { |
||||
|
$('body').css('padding-top', $("#navbar-header").height()); |
||||
|
$('.sidenav-left').css('top', $("#navbar-header").height()); |
||||
|
} else { |
||||
|
$('body').css('padding-top', ''); |
||||
|
$('.sidenav-left').css('top', ''); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function listenSubmenu() { |
||||
|
/* Add listeners on sm screen or less for submenus. */ |
||||
|
if ($(window).width() < 767) { |
||||
|
$('.dropdown-menu a').click(function (e) { |
||||
|
if ($(this).next('.submenu').length) { |
||||
|
e.preventDefault(); |
||||
|
$(this).next('.submenu').toggle(); |
||||
|
} |
||||
|
$('.dropdown').on('hide.bs.dropdown', function () { |
||||
|
$(this).find('.submenu').hide(); |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/* We need to apply those functions at init and when the screen is resized. */ |
||||
|
|
||||
|
$(window).resize(function () { |
||||
|
adjustHeader(); |
||||
|
listenSubmenu(); |
||||
|
}); |
||||
|
|
||||
|
adjustHeader(); |
||||
|
listenSubmenu(); |
||||
|
|
||||
|
|
||||
|
$(document).on('click', '.dropdown-menu', function (e) { |
||||
|
e.stopPropagation(); |
||||
|
}); |
||||
@ -0,0 +1,53 @@ |
|||||
|
{% comment %} |
||||
|
Re2o est un logiciel d'administration développé initiallement au rezometz. Il |
||||
|
se veut agnostique au réseau considéré, de manière à être installable en |
||||
|
quelques clics. |
||||
|
|
||||
|
Copyright © 2017 Lara Kermarec |
||||
|
Copyright © 2017 Augustin Lemesle |
||||
|
|
||||
|
This program is free software; you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation; either version 2 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
This program is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU General Public License along |
||||
|
with this program; if not, write to the Free Software Foundation, Inc., |
||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||||
|
{% endcomment %} |
||||
|
|
||||
|
{% load i18n %} |
||||
|
{% load static %} |
||||
|
<nav class="navbar navbar-default navbar-static-bottom"> |
||||
|
<div class="container-fluid"> |
||||
|
<p class="navbar-text">{{ name_website }} {% trans "powered by" %} Re2o 2016–2020. |
||||
|
{% blocktrans trimmed %} |
||||
|
Brought to you with <i class="fa fa-heart text-danger"></i>. |
||||
|
{% endblocktrans %}</p> |
||||
|
<ul class="nav navbar-nav"> |
||||
|
<li> |
||||
|
<a href="{% url 'about' %}"> |
||||
|
<i class="fa fa-info-circle"></i> {% trans "About" %} |
||||
|
</a> |
||||
|
</li> |
||||
|
</ul> |
||||
|
<ul class="nav navbar-nav navbar-right"> |
||||
|
<li> |
||||
|
<a href="#"> |
||||
|
<i class="fa fa-arrow-up"></i> {% trans "Top" %} |
||||
|
</a> |
||||
|
</li> |
||||
|
<p class="navbar-text">{% 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> |
||||
|
|
||||
|
</ul> |
||||
|
</div> |
||||
|
</nav> |
||||
@ -0,0 +1,322 @@ |
|||||
|
{% comment %} |
||||
|
Re2o est un logiciel d'administration développé initiallement au rezometz. Il |
||||
|
se veut agnostique au réseau considéré, de manière à être installable en |
||||
|
quelques clics. |
||||
|
|
||||
|
Copyright © 2017 Lara Kermarec |
||||
|
Copyright © 2017 Augustin Lemesle |
||||
|
|
||||
|
This program is free software; you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation; either version 2 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
This program is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU General Public License along |
||||
|
with this program; if not, write to the Free Software Foundation, Inc., |
||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||||
|
{% endcomment %} |
||||
|
|
||||
|
{% load static %} |
||||
|
{% load acl %} |
||||
|
{% load i18n %} |
||||
|
<nav class="navbar navbar-inverse navbar-fixed-top" id="navbar-header"> |
||||
|
<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 %} |
||||
|
<li class="nav-item dropdown"> |
||||
|
<a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown"><i class="fa fa-users"></i> |
||||
|
{% trans "Users" %}<span class="caret"></span></a> |
||||
|
<ul class="dropdown-menu"> |
||||
|
{% can_view_app users %} |
||||
|
<li><a class="dropdown-item" href="#"><i class="fa fa-users"></i> |
||||
|
{% trans "Users and clubs" %} » </a> |
||||
|
<ul class="submenu dropdown-menu"> |
||||
|
<li><a class="dropdown-item" href="{% url 'users:index' %}"><i class="fa fa-user"></i> |
||||
|
{% trans "Users" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'users:index-clubs' %}"><i |
||||
|
class="fa fa-users"></i> |
||||
|
{% trans "Clubs" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'users:index-white' %}"><i |
||||
|
class="fa fa-user-plus"></i> |
||||
|
{% trans "Whitelists" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'users:index-ban' %}"><i |
||||
|
class="fa fa-user-times"></i> |
||||
|
{% trans "Bans" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'users:mass-archive' %}"><i |
||||
|
class="fa fa-archive"></i> |
||||
|
{% trans "Massively archive" %}</a></li> |
||||
|
</ul> |
||||
|
</li> |
||||
|
{% acl_end %} |
||||
|
{% can_view_app machines %} |
||||
|
<li><a class="dropdown-item" href="{% url 'machines:index' %}"><i class="fa fa-laptop"></i> |
||||
|
{% trans "Machines" %}</a></li> |
||||
|
{% acl_end %} |
||||
|
{% can_view_app users %} |
||||
|
<li><a class="dropdown-item" href="{% url 'users:index-listright' %}"><i |
||||
|
class="fa fa-object-group"></i> |
||||
|
{% trans "Groups" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="#"><i class="fa fa-plus"></i> {% trans "Advanced" %} |
||||
|
» </a> |
||||
|
<ul class="submenu dropdown-menu"> |
||||
|
<li><a class="dropdown-item" href="{% url 'users:index-school' %}"><i |
||||
|
class="fa fa-graduation-cap"></i> |
||||
|
{% trans "Schools" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'users:index-shell' %}"><i |
||||
|
class="fa fa-terminal"></i> |
||||
|
{% trans "Shells" %}</a></li> |
||||
|
</ul> |
||||
|
</li> |
||||
|
{% acl_end %} |
||||
|
{% for app, template in optionnal_templates_navbar_user_list %} |
||||
|
{% if app != 'cotisations' and app != 'topologie' and app != 'logs' %} |
||||
|
{{ template }} |
||||
|
{% endif %} |
||||
|
{% endfor %} |
||||
|
</ul> |
||||
|
</li> |
||||
|
{% acl_end %} |
||||
|
{% can_view_app cotisations %} |
||||
|
<li class="nav-item dropdown"> |
||||
|
<a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown"><i class="fa fa-eur"></i> |
||||
|
{% trans "Treasury" %}<span class="caret"></span></a> |
||||
|
<ul class="dropdown-menu"> |
||||
|
<li><a class="dropdown-item" href="#"><i class="fa fa-file"></i> |
||||
|
{% trans "Invoices" %} » </a> |
||||
|
<ul class="submenu dropdown-menu"> |
||||
|
<li><a class="dropdown-item" href="{% url 'cotisations:control' %}"><i |
||||
|
class="fa fa-eye"></i> |
||||
|
{% trans "Control invoices" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'cotisations:index' %}"><i |
||||
|
class="fa fa-file"></i> |
||||
|
{% trans "Invoices" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'cotisations:index-custom-invoice' %}"><i |
||||
|
class="fa fa-file-text"></i> |
||||
|
{% trans "Cutsom invoices" %}</a></li> |
||||
|
</ul> |
||||
|
</li> |
||||
|
<li><a class="dropdown-item" href="{% url 'cotisations:index-cost-estimate' %}"><i |
||||
|
class="fa fa-files-o"></i> |
||||
|
{% trans "Cost estimates" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="#"><i class="fa fa-money"></i> |
||||
|
{% trans "Advanced" %} |
||||
|
» </a> |
||||
|
<ul class="submenu dropdown-menu"> |
||||
|
<li><a class="dropdown-item" href="{% url 'cotisations:index-banque' %}"><i |
||||
|
class="fa fa-bank"></i> |
||||
|
{% trans "Banks" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'cotisations:index-article' %}"><i |
||||
|
class="fa fa-barcode"></i> |
||||
|
{% trans "Articles" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'cotisations:index-paiement' %}"><i |
||||
|
class="fa fa-credit-card"></i> |
||||
|
{% trans "Payment methods" %}</a></li> |
||||
|
</ul> |
||||
|
</li> |
||||
|
{% for app, template in optionnal_templates_navbar_user_list %} |
||||
|
{% if app == 'cotisations' %} |
||||
|
{{ template }} |
||||
|
{% endif %} |
||||
|
{% endfor %} |
||||
|
</ul> |
||||
|
</li> |
||||
|
{% acl_end %} |
||||
|
{% can_view_app topologie %} |
||||
|
<li class="nav-item dropdown"> |
||||
|
<a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown"><i class="fa fa-sitemap"></i> |
||||
|
{% trans "Topology" %}<span class="caret"></span></a> |
||||
|
<ul class="dropdown-menu"> |
||||
|
<li><a class="dropdown-item" href="#"><i class="fa fa-microchip"></i> |
||||
|
{% trans "Switches" %} » </a> |
||||
|
<ul class="submenu dropdown-menu"> |
||||
|
<li><a class="dropdown-item" href="{% url 'topologie:index' %}"><i |
||||
|
class="fa fa-microchip"></i> |
||||
|
{% trans "Switches" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'topologie:index-model-switch' %}"><i |
||||
|
class="fa fa-object-group"></i> |
||||
|
{% trans "Switch models" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'topologie:index-module' %}"><i |
||||
|
class="fa fa-puzzle-piece"></i> |
||||
|
{% trans "Switch modules" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'topologie:index-switch-bay' %}"><i class="fa fa-wrench"></i> |
||||
|
{% trans "Switch bays" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'topologie:index-stack' %}"><i class="fa fa-server"></i> |
||||
|
{% trans "Stacks" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'topologie:index-port-profile' %}"><i |
||||
|
class="fa fa-cog"></i> |
||||
|
{% trans "Port profiles" %}</a></li> |
||||
|
</ul> |
||||
|
</li> |
||||
|
<li><a class="dropdown-item" href="#"><i class="fa fa-building"></i> |
||||
|
{% trans "Infrastructure" %} |
||||
|
» </a> |
||||
|
<ul class="submenu dropdown-menu"> |
||||
|
<li><a class="dropdown-item" href="{% url 'topologie:index-dormitory' %}"><i class="fa fa-bank"></i> |
||||
|
{% trans "Dormitories" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'topologie:index-building' %}"><i class="fa fa-home"></i> |
||||
|
{% trans "Buildings" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'topologie:index-room' %}"><i |
||||
|
class="fa fa-bed"></i> |
||||
|
{% trans "Rooms" %}</a></li> |
||||
|
</ul> |
||||
|
</li> |
||||
|
<li><a class="dropdown-item" href="{% url 'topologie:index-ap' %}"><i class="fa fa-wifi"></i> |
||||
|
{% trans "Access points" %}</a></li> |
||||
|
|
||||
|
{% for app, template in optionnal_templates_navbar_user_list %} |
||||
|
{% if app == 'topologie' %} |
||||
|
{{ template }} |
||||
|
{% endif %} |
||||
|
{% endfor %} |
||||
|
</ul> |
||||
|
</li> |
||||
|
{% acl_end %} |
||||
|
{% can_view_app logs %} |
||||
|
<li class="nav-item dropdown"> |
||||
|
<a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown"><i class="fa fa-area-chart"></i> |
||||
|
{% trans "Statistics" %}<span class="caret"></span></a> |
||||
|
<ul class="dropdown-menu"> |
||||
|
<li><a class="dropdown-item" href="{% url 'logs:index' %}"><i class="fa fa-clipboard"></i> |
||||
|
{% trans "Summary" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'logs:stats-logs' %}"><i class="fa fa-calendar"></i> |
||||
|
{% trans "Events" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'logs:stats-general' %}"><i class="fa fa-area-chart"></i> |
||||
|
{% trans "General" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'logs:stats-models' %}"><i class="fa fa-database"></i> |
||||
|
{% trans "Database" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'logs:stats-users' %}"><i class="fa fa-plug"></i> |
||||
|
{% trans "Wiring actions" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'logs:stats-actions' %}"><i class="fa fa-users"></i> |
||||
|
{% trans "Users" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'logs:stats-search-machine' %}"><i class="fa fa-laptop"></i> |
||||
|
{% trans "Machine history" %}</a></li> |
||||
|
{% for app, template in optionnal_templates_navbar_user_list %} |
||||
|
{% if app == 'logs' %} |
||||
|
{{ template }} |
||||
|
{% endif %} |
||||
|
{% endfor %} |
||||
|
</ul> |
||||
|
</li> |
||||
|
{% acl_end %} |
||||
|
{% can_view_any_app preferences users machines %} |
||||
|
<li class="nav-item dropdown"> |
||||
|
<a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown"><i class="fa fa-cogs"></i> |
||||
|
{% trans "Administration" %}<span class="caret"></span></a> |
||||
|
<ul class="dropdown-menu"> |
||||
|
{% can_view_app preferences %} |
||||
|
<li><a class="dropdown-item" href="{% url 'preferences:display-options' %}"><i |
||||
|
class="fa fa-cogs"></i> |
||||
|
{% trans "General" %}</a></li> |
||||
|
{% acl_end %} |
||||
|
{% can_view_app users %} |
||||
|
<li><a class="dropdown-item" href="{% url 'users:index-serviceusers' %}"><i |
||||
|
class="fa fa-address-book"></i> |
||||
|
{% trans "LDAP service users" %}</a></li> |
||||
|
{% acl_end %} |
||||
|
{% can_view_app machines %} |
||||
|
<li><a class="dropdown-item" href="{% url 'machines:index-service' %}"><i |
||||
|
class="fa fa-wrench"></i> |
||||
|
{% trans "Services" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'machines:index-machinetype' %}"><i |
||||
|
class="fa fa-laptop"></i> |
||||
|
{% trans "Machine types" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="#"><i class="fa fa-globe"></i> |
||||
|
{% trans "Network" %} » </a> |
||||
|
<ul class="submenu dropdown-menu"> |
||||
|
<li><a class="dropdown-item" href="{% url 'machines:index-iptype' %}"><i |
||||
|
class="fa fa-ellipsis-h"></i> |
||||
|
{% trans "IP ranges" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'machines:index-vlan' %}"><i |
||||
|
class="fa fa-object-group"></i> |
||||
|
{% trans "VLANs" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'machines:index-extension' %}"><i |
||||
|
class="fa fa-wrench"></i> |
||||
|
{% trans "Extensions and zones" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'machines:index-nas' %}"><i |
||||
|
class="fa fa-certificate"></i> |
||||
|
{% trans "NAS" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'machines:index-role' %}"><i |
||||
|
class="fa fa-server"></i> |
||||
|
{% trans "Server roles" %}</a></li> |
||||
|
<li><a class="dropdown-item" href="{% url 'machines:index-portlist' %}"><i |
||||
|
class="fa fa-cog"></i> |
||||
|
{% trans "Ports openings" %}</a></li> |
||||
|
</ul> |
||||
|
</li> |
||||
|
{% acl_end %} |
||||
|
</ul> |
||||
|
</li> |
||||
|
{% acl_end %} |
||||
|
</ul> |
||||
|
<ul class="nav navbar-nav navbar-right"> |
||||
|
<li><a href="{% url 'contact' %}"><i class="fa fa-at"></i> {% trans "Contact" %}</a> |
||||
|
{% if not request.user.is_authenticated %} |
||||
|
{% for template in optionnal_templates_navbar_logout_list %} |
||||
|
{{ template }} |
||||
|
{% endfor %} |
||||
|
{% 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"></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"></i> |
||||
|
{% trans "Log out" %}</a></li> |
||||
|
</ul> |
||||
|
</li> |
||||
|
{% endif %} |
||||
|
<li> |
||||
|
{% include 'buttons/setlang.html' %} |
||||
|
</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
</div> |
||||
|
</nav> |
||||
@ -0,0 +1,136 @@ |
|||||
|
{% comment %} |
||||
|
Re2o est un logiciel d'administration développé initiallement au rezometz. Il |
||||
|
se veut agnostique au réseau considéré, de manière à être installable en |
||||
|
quelques clics. |
||||
|
|
||||
|
Copyright © 2017 Lara Kermarec |
||||
|
Copyright © 2017 Augustin Lemesle |
||||
|
|
||||
|
This program is free software; you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation; either version 2 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
This program is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU General Public License along |
||||
|
with this program; if not, write to the Free Software Foundation, Inc., |
||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||||
|
{% endcomment %} |
||||
|
|
||||
|
{% load i18n %} |
||||
|
|
||||
|
<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 visible-sm visible-md"> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<b>{% trans "Username" %}</b> |
||||
|
<br> |
||||
|
{{ request_user.pseudo }} |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<b>{% trans "Room" %}</b> |
||||
|
<br> |
||||
|
{{ request_user.room }} |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<b>{% trans "Internet access" %}</b> |
||||
|
<br> |
||||
|
{% if request_user.has_access %} |
||||
|
<i class="text-success">{% blocktrans with end_access_date=request.user.end_access|date:"d b Y" %}Until |
||||
|
{{ end_access_date }}{% endblocktrans %}</i> |
||||
|
{% else %} |
||||
|
<i class="text-danger">{% trans "Disabled" %}</i> |
||||
|
{% endif %} |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<b>{% trans "Membership" %}</b> |
||||
|
<br> |
||||
|
{% if request_user.is_adherent %} |
||||
|
<i class="text-success">{% blocktrans with end_adhesion_date=request_user.end_adhesion|date:"d b Y" %}Until |
||||
|
{{ end_adhesion_date }}{% endblocktrans %}</i> |
||||
|
{% else %} |
||||
|
<i class="text-danger">{% trans "Non member" %}</i> |
||||
|
{% endif %} |
||||
|
</td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
|
||||
|
<table class="table visible-xs visible-lg"> |
||||
|
<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 end_access_date=request.user.end_access|date:"d b Y" %}Until |
||||
|
{{ end_access_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 end_adhesion_date=request_user.end_adhesion|date:"d b Y" %}Until |
||||
|
{{ end_adhesion_date }}{% endblocktrans %}</i> |
||||
|
{% else %} |
||||
|
<i class="text-danger">{% trans "Non 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 %} |
||||
|
<div class="panel-body"> |
||||
|
<p>{% trans "You are not logged in." %}</p> |
||||
|
</div> |
||||
|
{% 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" style="word-break: break-all">{{ 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 %} |
||||
@ -0,0 +1,42 @@ |
|||||
|
{% extends 'topologie/sidebar.html' %} |
||||
|
{% comment %} |
||||
|
Re2o est un logiciel d'administration développé initiallement au rezometz. Il |
||||
|
se veut agnostique au réseau considéré, de manière à être installable en |
||||
|
quelques clics. |
||||
|
|
||||
|
Copyright © 2017 Gabriel Détraz |
||||
|
Copyright © 2017 Lara Kermarec |
||||
|
Copyright © 2017 Augustin Lemesle |
||||
|
|
||||
|
This program is free software; you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation; either version 2 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
This program is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU General Public License along |
||||
|
with this program; if not, write to the Free Software Foundation, Inc., |
||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||||
|
{% endcomment %} |
||||
|
|
||||
|
{% load bootstrap3 %} |
||||
|
{% load acl %} |
||||
|
{% load i18n %} |
||||
|
|
||||
|
{% block title %}{% trans "Topology" %}{% endblock %} |
||||
|
|
||||
|
{% block content %} |
||||
|
<h2>{% trans "Buildings" %}</h2> |
||||
|
{% can_create Building %} |
||||
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-building' %}"> |
||||
|
<i class="fa fa-plus"></i> {% trans "Add a building" %} |
||||
|
</a> |
||||
|
<hr> |
||||
|
{% acl_end %} |
||||
|
{% include 'topologie/aff_building.html' with building_list=building_list %} |
||||
|
{% endblock %} |
||||
|
|
||||
@ -0,0 +1,41 @@ |
|||||
|
{% extends 'topologie/sidebar.html' %} |
||||
|
{% comment %} |
||||
|
Re2o est un logiciel d'administration développé initiallement au rezometz. Il |
||||
|
se veut agnostique au réseau considéré, de manière à être installable en |
||||
|
quelques clics. |
||||
|
|
||||
|
Copyright © 2017 Gabriel Détraz |
||||
|
Copyright © 2017 Lara Kermarec |
||||
|
Copyright © 2017 Augustin Lemesle |
||||
|
|
||||
|
This program is free software; you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation; either version 2 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
This program is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU General Public License along |
||||
|
with this program; if not, write to the Free Software Foundation, Inc., |
||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||||
|
{% endcomment %} |
||||
|
|
||||
|
{% load bootstrap3 %} |
||||
|
{% load acl %} |
||||
|
{% load i18n %} |
||||
|
|
||||
|
{% block title %}{% trans "Topology" %}{% endblock %} |
||||
|
|
||||
|
{% block content %} |
||||
|
<h2>{% trans "Stacks" %}</h2> |
||||
|
{% can_create Stack %} |
||||
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-stack' %}"> |
||||
|
<i class="fa fa-plus"></i> {% trans "Add a stack" %} |
||||
|
</a> |
||||
|
{% acl_end %} |
||||
|
{% include 'topologie/aff_stacks.html' with stack_list=stack_list %} |
||||
|
{% endblock %} |
||||
|
|
||||
@ -0,0 +1,42 @@ |
|||||
|
{% extends 'topologie/sidebar.html' %} |
||||
|
{% comment %} |
||||
|
Re2o est un logiciel d'administration développé initiallement au rezometz. Il |
||||
|
se veut agnostique au réseau considéré, de manière à être installable en |
||||
|
quelques clics. |
||||
|
|
||||
|
Copyright © 2017 Gabriel Détraz |
||||
|
Copyright © 2017 Lara Kermarec |
||||
|
Copyright © 2017 Augustin Lemesle |
||||
|
|
||||
|
This program is free software; you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation; either version 2 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
This program is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU General Public License along |
||||
|
with this program; if not, write to the Free Software Foundation, Inc., |
||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||||
|
{% endcomment %} |
||||
|
|
||||
|
{% load bootstrap3 %} |
||||
|
{% load acl %} |
||||
|
{% load i18n %} |
||||
|
|
||||
|
{% block title %}{% trans "Topology" %}{% endblock %} |
||||
|
|
||||
|
{% block content %} |
||||
|
<h2>{% trans "Switch bays" %}</h2> |
||||
|
{% can_create SwitchBay %} |
||||
|
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-switch-bay' %}"> |
||||
|
<i class="fa fa-plus"></i> {% trans "Add a switch bay" %} |
||||
|
</a> |
||||
|
<hr> |
||||
|
{% acl_end %} |
||||
|
{% include 'topologie/aff_switch_bay.html' with switch_bay_list=switch_bay_list %} |
||||
|
{% endblock %} |
||||
|
|
||||
Loading…
Reference in new issue