8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-24 20:33:11 +00:00

Title block for compatibility

This commit is contained in:
Alexandre Iooss 2019-02-18 19:24:35 +01:00 committed by Alexandre IOOSS
parent 0c49a3b077
commit 46cb6dddb3

View file

@ -33,274 +33,302 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %} {% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}> <html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
<head prefix="og: http://ogp.me/ns#"> <head prefix="og: http://ogp.me/ns#">
{# Open Graph for social media #} {# Open Graph for social media #}
<meta property="og:title" content="{{ name_website }}" /> <meta property="og:title" content="{{ name_website }}"/>
<meta property="og:type" content="website" /> <meta property="og:type" content="website"/>
<meta property="og:url" content="{{ request.scheme }}://{{ request.get_host }}/" /> <meta property="og:url" content="{{ request.scheme }}://{{ request.get_host }}/"/>
<meta property="og:image" content="{% static 'images/logo_re2o.svg' %}"/> <meta property="og:image" content="{% static 'images/logo_re2o.svg' %}"/>
<meta property="og:image:type" content="image/svg"/> <meta property="og:image:type" content="image/svg"/>
<meta property="og:image:alt" content="The Re2o logo"/> <meta property="og:image:alt" content="The Re2o logo"/>
<meta property="og:description" content="{% trans "Networking managing website endorsed by FedeRez." %}" /> <meta property="og:description" content="{% trans "Networking managing website endorsed by FedeRez." %}"/>
{# Preload JavaScript #} {# Preload JavaScript #}
{% bootstrap_javascript %} {% bootstrap_javascript %}
<script src="/static/js/typeahead/typeahead.js"></script> <script src="/static/js/typeahead/typeahead.js"></script>
<script src="/static/js/bootstrap-tokenfield/bootstrap-tokenfield.js"></script> <script src="/static/js/bootstrap-tokenfield/bootstrap-tokenfield.js"></script>
<script src="{% static 'js/collapse-from-url.js' %}"></script> <script src="{% static 'js/collapse-from-url.js' %}"></script>
{# Load CSS #} {# Load CSS #}
{% bootstrap_css %} {% bootstrap_css %}
<link href="{% static 'css/typeaheadjs.css' %}" rel="stylesheet"> <link href="{% static 'css/typeaheadjs.css' %}" rel="stylesheet">
<link href="{% static 'css/bootstrap-tokenfield.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/font-awesome.min.css' %}" rel="stylesheet">
<link href="{% static 'css/base.css' %}" rel="stylesheet"> <link href="{% static 'css/base.css' %}" rel="stylesheet">
{% block extrastyle %}{% endblock %} {% block extrastyle %}{% endblock %}
{# Favicon with iOS, Android, touchbar support #} {# Favicon with iOS, Android, touchbar support #}
<link rel="apple-touch-icon" sizes="180x180" href="{% static 'favicon/apple-touch-icon.png' %}"> <link rel="apple-touch-icon" sizes="180x180" href="{% static 'favicon/apple-touch-icon.png' %}">
<link rel="icon" type="image/png" sizes="32x32" href="{% static 'favicon/favicon-32x32.png' %}"> <link rel="icon" type="image/png" sizes="32x32" href="{% static 'favicon/favicon-32x32.png' %}">
<link rel="icon" type="image/png" sizes="16x16" href="{% static 'favicon/favicon-16x16.png' %}"> <link rel="icon" type="image/png" sizes="16x16" href="{% static 'favicon/favicon-16x16.png' %}">
<link rel="manifest" href="{% static 'favicon/site.webmanifest' %}"> <link rel="manifest" href="{% static 'favicon/site.webmanifest' %}">
<link rel="mask-icon" href="{% static 'favicon/safari-pinned-tab.svg' %}" color="#5bbad5"> <link rel="mask-icon" href="{% static 'favicon/safari-pinned-tab.svg' %}" color="#5bbad5">
<link rel="shortcut icon" href="{% static 'favicon/favicon.ico' %}"> <link rel="shortcut icon" href="{% static 'favicon/favicon.ico' %}">
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
{# Do not allow zooming on devices #} {# Do not allow zooming on devices #}
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ name_website }} : {% block title %}{% trans "Home" %}{% endblock %}</title> <title>{{ name_website }} : {% block title %}{% trans "Home" %}{% endblock %}</title>
{% block extrahead %}{% endblock %} {% block extrahead %}{% endblock %}
</head> </head>
<body id="main"> <body id="main">
<nav class="navbar navbar-inverse navbar-static-top"> <nav class="navbar navbar-inverse navbar-static-top">
<div class="container-fluid"> <div class="container-fluid">
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"> <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> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="navbar-brand" href="/"> <a class="navbar-brand" href="/">
<img src="{% static 'images/logo_re2o_navbar.svg' %}" height=32> <img src="{% static 'images/logo_re2o_navbar.svg' %}" height=32>
{{ name_website }} {{ 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> </a>
</div> </li>
<div class="collapse navbar-collapse" id="myNavbar"> {% acl_end %}
<ul class="nav navbar-nav"> </ul>
{% can_view_any_app users machines cotisations %} <ul class="nav navbar-nav navbar-right">
<li class="dropdown"> <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> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
<ul class="dropdown-menu"> aria-expanded="false"><i class="fa fa-info"></i> {% trans "More information" %}<span
{% can_view_app users %} class="caret"></span></a>
<li><a href="{% url 'users:index' %}"><i class="fa fa-user"></i> {% trans "Manage the users" %}</a></li> <ul class="dropdown-menu">
<li><a href="{% url 'users:index-clubs' %}"><i class="fa fa-users"></i> {% trans "Manage the clubs" %}</a></li> <li><a href="{% url 'about' %}"><i class="fa fa-info-circle"></i> {% trans "About" %}</a></li>
{% acl_end %} <li><a href="{% url 'contact' %}"><i class="fa fa-at"></i> {% trans "Contact" %}</a></li>
{% can_view_app machines %} </ul>
<li><a href="{% url 'machines:index' %}"><i class="fa fa-desktop"></i> {% trans "Manage the machines" %}</a></li> </li>
{% acl_end %} {% if not request.user.is_authenticated %}
{% can_view_app cotisations %} {% if var_sa %}
<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> <li>
<a href="{% url 'preferences:display-options' %}"> <a href="{% url 'users:new-user' %}">
<i class="fa fa-cogs"></i> {% trans "Administration" %} <i class="fa fa-user-plus"></i> {% trans "Sign up" %}
</a> </a>
</li> </li>
{% acl_end %} {% endif %}
</ul> <li>
<ul class="nav navbar-nav navbar-right"> <a id="toggle_login" href="{% url 'login' %}">
<li class="dropdown"> <i class="fa fa-sign-in"></i> {% trans "Log in" %}
<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> </a>
<ul class="dropdown-menu"> </li>
<li><a href="{% url 'about' %}"><i class="fa fa-info-circle"></i> {% trans "About" %}</a></li> {% else %}
<li><a href="{% url 'contact' %}"><i class="fa fa-at"></i> {% trans "Contact" %}</a></li> {% can_view_any_app users machines cotisations %}
</ul> <li>
</li> <form action="{% url 'search:search' %}" class="navbar-form" role="search">
{% if not request.user.is_authenticated %} <div class="input-group">
{% if var_sa %} <input type="text" class="form-control" placeholder="{% trans "Search" %}" name="q"
<li> id="search-term" {% if search_term %}value="{{ search_term }}"{% endif %}>
<a href="{% url 'users:new-user' %}"> <div class="input-group-btn">
<i class="fa fa-user-plus"></i> {% trans "Sign up" %} <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
</a> <a href="{% url 'search:searchp' %}" class="btn btn-default" role="button"><i
</li> class="fa fa-plus"></i></a>
{% endif %} </div>
<li> </div>
<a id="toggle_login" href="{% url 'login' %}"> </form>
<i class="fa fa-sign-in"></i> {% trans "Log in" %} </li>
</a> {% acl_end %}
</li> {% endif %}
{% else %} {% if request.user.is_authenticated %}
{% can_view_any_app users machines cotisations %} <li class="dropdown">
<li> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
<form action="{% url 'search:search' %}" class="navbar-form" role="search"> aria-expanded="false"><i class="fa fa-user-circle"></i> {{ request.user.pseudo|slice:":15" }}
<div class="input-group"> <span class="caret"></span></a>
<input type="text" class="form-control" placeholder="{% trans "Search" %}" name="q" id="search-term" {% if search_term %}value="{{ search_term }}"{% endif %}> <ul class="dropdown-menu">
<div class="input-group-btn"> <li><a href="{% url 'users:mon-profil' %}"><i
<button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button> class="fa fa-user"></i> {% trans "My profile" %}</a></li>
<a href="{% url 'search:searchp' %}" class="btn btn-default" role="button"><i class="fa fa-plus"></i></a> <li><a id="toggle_login" href="{% url 'logout' %}"><i
</div> class="fa fa-sign-out"></i> {% trans "Log out" %}</a></li>
</div> </ul>
</form> </li>
</li> {% endif %}
{% acl_end %} <li>
{% endif %} {% include 'buttons/setlang.html' %}
{% if request.user.is_authenticated %} </li>
<li class="dropdown"> </ul>
<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> </div>
<ul class="dropdown-menu"> </div>
<li><a href="{% url 'users:mon-profil' %}"><i class="fa fa-user"></i> {% trans "My profile" %}</a></li> </nav>
<li><a id="toggle_login" href="{% url 'logout' %}"><i class="fa fa-sign-out"></i> {% trans "Log out" %}</a></li>
</ul> <div class="container-fluid text-center">
</li> <div class="row content">
{% endif %} <div class="col-sm-2 sidenav pt4">
<li> <div class="panel panel-default">
{% include 'buttons/setlang.html' %} <div class="text-left list-group">
</li> {% block sidebar %}
</ul> {% endblock %}
</div> </div>
</div> </div>
</nav> </div>
<div class="col-sm-8 text-left pt4">
{# Display breadcrumbs #}
{% block breadcrumbs %}{% endblock %}
<div class="container-fluid text-center"> {# Some pages need a title block #}
<div class="row content"> {% block content_title %}{% if title %}<h2>{{ title }}</h2>{% endif %}{% endblock %}
<div class="col-sm-2 sidenav pt4">
<div class="panel panel-default"> {# Display django.contrib.messages as Bootstrap alerts #}
<div class="text-left list-group"> {% bootstrap_messages %}
{% block sidebar %} {% block content %}{% endblock %}
{% endblock %} </div>
</div> <div class="col-sm-2 sidenav pt4">
<div class="panel panel-default">
{% if request_user.is_authenticated %}
<div class="panel-heading">
<h4>{{ request_user.name }} {{ request_user.surname }}</h4>
</div> </div>
</div> <table class="table">
<div class="col-sm-8 text-left pt4"> <tr>
{# Display breadcrumbs #} <th scope="row">{% trans "Username" %}</th>
{% block breadcrumbs %}{% endblock %} <td class="text-right">{{ request_user.pseudo }}</td>
</tr>
{# Display django.contrib.messages as Bootstrap alerts #} <tr>
{% bootstrap_messages %} <th scope="row">{% trans "Room" %}</th>
{% block content %}{% endblock %} <td class="text-right">{{ request_user.room }}</td>
</div> </tr>
<div class="col-sm-2 sidenav pt4"> <tr>
<div class="panel panel-default"> <th scope="row">{% trans "Internet access" %}</th>
{% if request_user.is_authenticated %} <td class="text-right">
<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 %} {% 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> <i class="text-success">
{% blocktrans with end_access_date=request.user.end_access|date:"d b Y" %}Until
{{ end_access_date }}{% endblocktrans %}</i>
{% else %} {% else %}
<i class="text-danger">{% trans "Disabled" %}</i> <i class="text-danger">{% trans "Disabled" %}</i>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row">{% trans "Membership" %}</th> <th scope="row">{% trans "Membership" %}</th>
<td class="text-right"> <td class="text-right">
{% if request_user.is_adherent %} {% 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> <i class="text-success">
{% blocktrans with end_adhesion_date=request_user.end_adhesion|date:"d b Y" %}
Until {{ end_adhesion_date }}{% endblocktrans %}</i>
{% else %} {% else %}
<i class="text-danger">{% trans "Non member" %}</i> <i class="text-danger">{% trans "Non member" %}</i>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
</table> </table>
<div class="list-group"> <div class="list-group">
<a class="list-group-item list-group-item-info" role="button"href="{% url 'users:mon-profil' %}"> <a class="list-group-item list-group-item-info" role="button"
<i class="fa fa-user-circle"></i> href="{% url 'users:mon-profil' %}">
{% trans "View my profile" %} <i class="fa fa-user-circle"></i>
</a> {% trans "View my profile" %}
</div> </a>
{% else %}
<div class="panel-body">
<p>{% trans "You are not logged in." %}</p>
</div>
{% endif %}
</div> </div>
{% if request_user.is_authenticated %} {% else %}
<div class="panel panel-default"> <div class="panel-body">
<div class="panel-heading"> <p>{% trans "You are not logged in." %}</p>
<h4>{% blocktrans count interfaces|length as nb %}{{ nb }} active machine{% plural %}{{ nb }} active machines{% endblocktrans %}</h4> </div>
</div> {% endif %}
<ul class="list-group"> </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" %} {% for interface in interfaces|slice:":5" %}
<div class="list-group-item">{{ interface }}</div> <div class="list-group-item">{{ interface }}</div>
{% endfor %} {% endfor %}
{% if interfaces|length > 5 %} {% if interfaces|length > 5 %}
<a class="list-group-item list-group-item-info" role="button" href="{% url 'users:mon-profil' %}"> <a class="list-group-item list-group-item-info" role="button"
href="{% url 'users:mon-profil' %}">
<i class="fa fa-plus"></i> <i class="fa fa-plus"></i>
{% trans "View my machines" %} {% trans "View my machines" %}
</a> </a>
{% endif %} {% endif %}
</ul> </ul>
</div>
{% endif %}
</div> </div>
</div> {% endif %}
</div> </div>
</div>
</div>
<footer class="text-muted"> <footer class="text-muted">
<div class="container"> <div class="container">
<p class="pull-right"> <p class="pull-right">
<a href="#">{% trans "Back to top" %}</a> <a href="#">{% trans "Back to top" %}</a>
</p> </p>
<p>{{ name_website }} {% trans "powered by" %} Re2o 2016&ndash;2018</p> <p>{{ name_website }} {% trans "powered by" %} Re2o 2016&ndash;2018</p>
<p> <p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
Brought to you with <i class="fa fa-heart text-danger"></i>. Brought to you with <i class="fa fa-heart text-danger"></i>.
{% endblocktrans %} {% endblocktrans %}
<a href="{{ request.scheme }}://{{ request.get_host }}/about/">{% trans "About this website" %}</a>. <a href="{{ request.scheme }}://{{ request.get_host }}/about/">{% trans "About this website" %}</a>.
</p> </p>
<p> <p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
This software is under the terms of the 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. <a href="http://www.gnu.org/licenses/gpl-2.0.txt" target="_blank" rel="nofollow">GPLv2</a> License.
{% endblocktrans %} {% endblocktrans %}
</p> </p>
</div> </div>
</footer> </footer>
{# Load JavaScript #} {# Load JavaScript #}
<script src="/static/js/konami/konami.js"></script> <script src="/static/js/konami/konami.js"></script>
<script src="/static/js/sapphire.js"></script> <script src="/static/js/sapphire.js"></script>
<script> <script>
// Konami activate sapphire // Konami activate sapphire
let s = Sapphire(); let s = Sapphire();
Konami(s.activate); Konami(s.activate);
</script> </script>
<script src="/static/js/shortcuts.js"></script> <script src="/static/js/shortcuts.js"></script>
{# Read the documentation for more information #} {# Read the documentation for more information #}
</body> </body>
</html> </html>