diff --git a/cotisations/templates/cotisations/aff_cotisations.html b/cotisations/templates/cotisations/aff_cotisations.html index b9a1a810..4d2cd3ee 100644 --- a/cotisations/templates/cotisations/aff_cotisations.html +++ b/cotisations/templates/cotisations/aff_cotisations.html @@ -59,7 +59,17 @@ with this program; if not, write to the Free Software Foundation, Inc., {% for facture in facture_list %} {{ facture.user }} - {{ facture.name }} + + + {% for article in facture.name_detailed %} + + + + {% endfor %} +
+ {{ article }} +
+ {{ facture.prix_total }} {{ facture.paiement }} {{ facture.date }} diff --git a/cotisations/templates/cotisations/aff_profil.html b/cotisations/templates/cotisations/aff_profil.html index a6e21624..28da5341 100644 --- a/cotisations/templates/cotisations/aff_profil.html +++ b/cotisations/templates/cotisations/aff_profil.html @@ -52,89 +52,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% if facture_list %} -
- {% if facture_list.paginator %} - {% include 'pagination.html' with list=facture_list %} - {% endif %} - - - - - - - - - - - - - - - {% for facture in facture_list %} - - - - - - - - - - - {% endfor %} -
- {% trans "User" as tr_user %} - {% include 'buttons/sort.html' with prefix='cotis' col='user' text=tr_user %} - {% trans "Designation" %}{% trans "Total price" %} - {% trans "Payment method" as tr_payment_method %} - {% include 'buttons/sort.html' with prefix='cotis' col='paiement' text=tr_payment_method %} - - {% trans "Date" as tr_date %} - {% include 'buttons/sort.html' with prefix='cotis' col='date' text=tr_date %} - - {% trans "Invoice ID" as tr_invoice_id %} - {% include 'buttons/sort.html' with prefix='cotis' col='id' text=tr_invoice_id %} -
{{ facture.user }} - - {% for article in facture.name_detailed %} - - - - {% endfor %} -
- {{ article }} -
-
{{ facture.prix_total }}{{ facture.paiement }}{{ facture.date }}{{ facture.id }} - {% can_edit facture %} - {% include 'buttons/edit.html' with href='cotisations:edit-facture' id=facture.id %} - {% acl_else %} - {% trans "Controlled invoice" %} - {% acl_end %} - {% can_delete facture %} - {% include 'buttons/suppr.html' with href='cotisations:del-facture' id=facture.id %} - {% acl_end %} - {% history_button facture %} - - {% if facture.valid %} - - {% trans "PDF" %} - - {% else %} - {% trans "Invalidated invoice" %} - {% endif %} - {% if facture.control and facture.is_subscription %} - - {% trans "Voucher" %} - - {% endif %} -
- - {% if facture_list.paginator %} - {% include 'pagination.html' with list=facture_list %} - {% endif %} -
- {% else %} -

{% trans "No invoice" %}

+ {% include 'cotisations/aff_cotisations.html' with facture_list=facture_list %} + {% else %} +

{% trans "No invoice" %}

{% endif %}
diff --git a/machines/templates/machines/aff_iptype.html b/machines/templates/machines/aff_iptype.html index 7cf710c2..ce436c6b 100644 --- a/machines/templates/machines/aff_iptype.html +++ b/machines/templates/machines/aff_iptype.html @@ -28,39 +28,75 @@ with this program; if not, write to the Free Software Foundation, Inc., {% load logs_extra %} {% load i18n %} -
- - - - - - - - - - - - - - - {% for type in iptype_list %} - - - - - - - - - - - - {% endfor %} -
{% trans "IP type" %}{% trans "Extension" %}{% blocktrans %}"infra" right required{% endblocktrans %}{% trans "IPv4 range" %}{% trans "v6 prefix" %}{% trans "DNSSEC reverse v4/v6" %}{% trans "On VLAN(s)" %}{% trans "Default ports opening" %}
{{ type.name }}{{ type.extension }}{{ type.need_infra|tick }}{{ type.domaine_ip_start }}-{{ type.domaine_ip_stop }}{% if type.ip_network %} on - {{ type.ip_network }}{% endif %}{{ type.prefix_v6 }}/{{ type.prefix_v6_length }}{{ type.reverse_v4|tick }}/{{ type.reverse_v6|tick }}{{ type.vlan }}{{ type.ouverture_ports }} +{% if iptype_list.paginator %} + {% include 'pagination.html' with list=iptype_list %} +{% endif %} + +{% for type in iptype_list %} +
+
+
+
+
+

{{ type.name }}

+
+
+

{{ type.extension }}

+
+
+ {% if type.need_infra %} + {% trans "Infra right required" %} + {% else %} + {% trans "Infra right not required" %} + {% endif %} +
+
{% can_edit type %} {% include 'buttons/edit.html' with href='machines:edit-iptype' id=type.id %} {% acl_end %} {% history_button type %} -
+
+ + + +
+
+
+
+ {% trans "IPv4 range" %} + {{ type.domaine_ip_start }} - {{ type.domaine_ip_stop }} + {% if type.ip_network %} + on + {{ type.ip_network }}{% endif %} +
+
+ {% trans "v6 prefix" %} + {{ type.prefix_v6 }} /{{ type.prefix_v6_length }} +
+
+
+
+
+ {% trans "DNSSEC reverse v4/v6" %} +
+ {{ type.reverse_v4|tick }}/{{ type.reverse_v6|tick }} +
+
+ {% trans "On VLAN(s)" %} +
+ {{ type.vlan }} +
+
+ {% trans "Default ports opening" %} +
+ {{ type.ouverture_ports }} +
+
+
+
+{% endfor %} + +{% if iptype_list.paginator %} + {% include 'pagination.html' with list=iptype_list %} +{% endif %} diff --git a/machines/templates/machines/aff_machines.html b/machines/templates/machines/aff_machines.html index 77b65546..75eb47c6 100644 --- a/machines/templates/machines/aff_machines.html +++ b/machines/templates/machines/aff_machines.html @@ -26,43 +26,22 @@ with this program; if not, write to the Free Software Foundation, Inc., {% load logs_extra %} {% load i18n %} -
- {% if machines_list.paginator %} - {% include 'pagination.html' with list=machines_list go_to_id="machines" %} - {% endif %} +{% if machines_list.paginator %} + {% include 'pagination.html' with list=machines_list %} +{% endif %} - - - - - - - - - - {% trans "DNS name" as tr_dns_name %} - - - - - - - {% for machine in machines_list %} - - - - - {% for interface in machine.interface_set.all %} - - - - - - - - - - - {% if ipv6_enabled and interface.ipv6 != 'None' %} - - - - {% endif %} - {% if interface.domain.related_domain.all %} - - - - {% endif %} - {% endfor %} - - - + {% can_create Domain interface.id %} +
  • + + + {% trans "Manage the aliases" %} + +
  • + {% acl_end %} + {% can_create Ipv6List interface.id %} +
  • + + + {% trans "Manage the IPv6 addresses" %} + +
  • + {% acl_end %} + {% can_create SshFp interface.machine.id %} +
  • + + + {% trans "Manage the SSH fingerprints" %} + +
  • + {% acl_end %} + {% can_create OuverturePortList %} +
  • + + + {% trans "Manage the ports configuration" %} + +
  • + {% acl_end %} + + + {% history_button interface %} + {% can_delete interface %} + {% include 'buttons/suppr.html' with href='machines:del-interface' id=interface.id %} + {% acl_end %} + + + +
    +
    +
    +
      +
    • + {{ interface.get_vendor }} +
    • +
    +
    + {% if ipv6_enabled and interface.ipv6 != 'None' %} +
    +
      + {% for ipv6 in interface.ipv6.all %} +
    • + {{ ipv6 }} +
    • + {% endfor %} +
    +
    + {% endif %} + {% if interface.domain.related_domain.all %} +
    +
      + {% for al in interface.domain.related_domain.all %} +
    • + + {{ al }} + + +
    • + {% endfor %} +
    +
    + {% endif %} +
    +
    + {%if machine.interface_set.count > 1 %} +
    + {% endif %} {% endfor %} - -
    {% include 'buttons/sort.html' with prefix='machine' col='name' text=tr_dns_name %}{% trans "Type" %}{% trans "MAC address" %}{% trans "IP address" %}{% trans "Actions" %}
    - {% trans "No name" as tr_no_name %} - {% trans "View the profile" as tr_view_the_profile %} - {% if machine.active %} - - {% else %} - {% trans "Deactivated" %}: - {% endif %} - {{ machine.get_name|default:tr_no_name }} - - {{ machine.user }} - - +{% for machine in machines_list %} +
    +
    +
    +
    +
    + {% trans "No name" as tr_no_name %} + {{ machine.user }} + + {{ machine.get_name|default:tr_no_name }} +
    +
    {% can_create Interface machine.id %} {% trans "Create an interface" as tr_create_an_interface %} {% include 'buttons/add.html' with href='machines:new-interface' id=machine.id desc=tr_create_an_interface %} @@ -71,156 +50,165 @@ with this program; if not, write to the Free Software Foundation, Inc., {% can_delete machine %} {% include 'buttons/suppr.html' with href='machines:del-machine' id=machine.id %} {% acl_end %} -
    - {% if interface.domain.related_domain.all %} - {{ interface.domain }} - - {% else %} - {{ interface.domain }} - {% endif %} - - {{ interface.machine_type }} - - {{ interface.mac_address }} - - - IPv4 {{ interface.ipv4 }} -
    - {% if ipv6_enabled and interface.ipv6 != 'None' %} - IPv6 - - {% endif %} -
    -
    -
    - - -
    - {% history_button interface %} - {% can_delete interface %} - {% include 'buttons/suppr.html' with href='machines:del-interface' id=interface.id %} +
    + + + +
    + {% for interface in machine.interface_set.all %} +
    +
    +
    + {% trans "DNS name"%}: +
    + {% if interface.domain.related_domain.all %} + {{ interface.domain }} + + {% else %} + {{ interface.domain }} + {% endif %} +
    +
    + {% trans "Type" %}: +
    + {{ interface.machine_type }} +
    +
    + {% trans "MAC address" %}: +
    + {{ interface.mac_address }} + +
    +
    + IPv4 {{ interface.ipv4 }} +
    + {% if interface.ipv6.count > 0 %} + IPv6 + + {% else %} + {% trans "No IPv6" %} + {% endif %} +
    +
    +
    + +
    -
    -
    -
      -
    • - {{ interface.get_vendor }} -
    • -
    -
    -
    -
    -
      - {% for ipv6 in interface.ipv6.all %} -
    • - {{ ipv6 }} -
    • - {% endfor %} -
    -
    -
    -
    -
      - {% for al in interface.domain.related_domain.all %} -
    • - - {{ al }} - - -
    • - {% endfor %} -
    -
    -
    +
    + - - {% if machines_list.paginator %} - {% include 'pagination.html' with list=machines_list go_to_id="machines" %} - {% endif %} - diff --git a/machines/templates/machines/aff_portlist.html b/machines/templates/machines/aff_portlist.html new file mode 100644 index 00000000..b01f407c --- /dev/null +++ b/machines/templates/machines/aff_portlist.html @@ -0,0 +1,106 @@ +{% 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 design %} + +{% load acl %} +{% load logs_extra %} +{% load i18n %} + +{% if port_list.paginator %} + {% include 'pagination.html' with list=port_list %} +{% endif %} + +{% for ports in port_list %} +
    +
    +
    +
    +
    +

    {{ ports.name }}

    +
    +
    + {% can_edit ports %} + {% include 'buttons/edit.html' with href='machines:edit-portlist' id=ports.id %} + {% acl_end %} + {% can_delete ports %} + {% include 'buttons/suppr.html' with href='machines:del-portlist' id=ports.id %} + {% acl_end %} +
    +
    +
    +
    +
    +
    +
    +
    + {% trans "TCP (input)" %} +
    + {% for p in ports.tcp_ports_in %}{{ p.show_port }}, {% endfor %} +
    +
    + {% trans "TCP (output)" %} +
    + {% for p in ports.tcp_ports_out %}{{ p.show_port }}, {% endfor %} +
    +
    + {% trans "UDP (input)" %} +
    + {% for p in ports.udp_ports_in %}{{ p.show_port }}, {% endfor %} +
    +
    + {% trans "UDP (output)" %} +
    + {% for p in ports.udp_ports_out %}{{ p.show_port }}, {% endfor %} +
    +
    +
    +
    + +
    +{% endfor %} + +{% if port_list.paginator %} + {% include 'pagination.html' with list=port_list %} +{% endif %} + diff --git a/machines/templates/machines/aff_profil.html b/machines/templates/machines/aff_profil.html index 4b2650ed..e1afb7cc 100644 --- a/machines/templates/machines/aff_profil.html +++ b/machines/templates/machines/aff_profil.html @@ -34,238 +34,20 @@ with this program; if not, write to the Free Software Foundation, Inc., {% trans "Machines" %} {{ nb_machines }} - -
    -
    - - - {% trans "Add a machine" %} -
    -
    - {% if machines_list %} -
    - {% if machines_list.paginator %} - {% include 'pagination.html' with list=machines_list go_to_id="machines" %} - {% endif %} - - - - - - - - - - - {% trans "DNS name" as tr_dns_name %} - - - - - - - {% for machine in machines_list %} - - - - - {% for interface in machine.interface_set.all %} - - - - - - - - - - - {% if ipv6_enabled and interface.ipv6 != 'None' %} - - - - {% endif %} - {% if interface.domain.related_domain.all %} - - - - {% endif %} - {% endfor %} - - - - {% endfor %} - -
    {% include 'buttons/sort.html' with prefix='machine' col='name' text=tr_dns_name %}{% trans "Type" %}{% trans "MAC address" %}{% trans "IP address" %}{% trans "Actions" %}
    - {% trans "No name" as tr_no_name %} - {% trans "View the profile" as tr_view_the_profile %} - {% if machine.active %} - - {% else %} - {% trans "Deactivated" %}: - {% endif %} - {{ machine.get_name|default:tr_no_name }} - - {{ machine.user }} - - - {% can_create Interface machine.id %} - {% trans "Create an interface" as tr_create_an_interface %} - {% include 'buttons/add.html' with href='machines:new-interface' id=machine.id desc=tr_create_an_interface %} - {% acl_end %} - {% history_button machine %} - {% can_delete machine %} - {% include 'buttons/suppr.html' with href='machines:del-machine' id=machine.id %} - {% acl_end %} -
    - {% if interface.domain.related_domain.all %} - {{ interface.domain }} - - {% else %} - {{ interface.domain }} - {% endif %} - - {{ interface.machine_type }} - - {{ interface.mac_address }} - - - IPv4 {{ interface.ipv4 }} -
    - {% if ipv6_enabled and interface.ipv6 != 'None' %} - IPv6 - - {% endif %} -
    -
    -
    - - -
    - {% history_button interface %} - {% can_delete interface %} - {% include 'buttons/suppr.html' with href='machines:del-interface' id=interface.id %} - {% acl_end %} -
    -
    -
    -
      -
    • - {{ interface.get_vendor }} -
    • -
    -
    -
    -
    -
      - {% for ipv6 in interface.ipv6.all %} -
    • - {{ ipv6 }} -
    • - {% endfor %} -
    -
    -
    -
    -
      - {% for al in interface.domain.related_domain.all %} -
    • - - {{ al }} - - -
    • - {% endfor %} -
    -
    -
    - - - - {% if machines_list.paginator %} - {% include 'pagination.html' with list=machines_list go_to_id="machines" %} - {% endif %} -
    - {% else %} -

    {% trans "No machine" %}

    - {% endif %} +
    + +
    + {% if machines_list %} + {% include 'machines/aff_machines.html' with machines_list=machines_list %} + {% else %} +

    {%trans "No machines" %}

    + {% endif %}
    diff --git a/machines/templates/machines/index_iptype.html b/machines/templates/machines/index_iptype.html index 65f78f74..38a3a8ad 100644 --- a/machines/templates/machines/index_iptype.html +++ b/machines/templates/machines/index_iptype.html @@ -30,6 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% block title %}{% trans "Machines" %}{% endblock %} {% block content %} +

    {% trans "List of IP types" %}

    {% can_create IpType %} @@ -39,5 +40,6 @@ with this program; if not, write to the Free Software Foundation, Inc., {% trans "Delete one or several IP types" %} +
    {% include 'machines/aff_iptype.html' with iptype_list=iptype_list %} {% endblock %} diff --git a/machines/templates/machines/index_portlist.html b/machines/templates/machines/index_portlist.html index 671f8e74..867e51d0 100644 --- a/machines/templates/machines/index_portlist.html +++ b/machines/templates/machines/index_portlist.html @@ -14,52 +14,7 @@ {% trans "Add a configuration" %} {% acl_end %} - - - - - - - - - - - - - {% for pl in port_list %} - - - - - - - - - {% endfor %} -
    {% trans "Name" %}{% trans "TCP (input)" %}{% trans "TCP (output)" %}{% trans "UDP (input)" %}{% trans "UDP (output)" %}{% trans "Machines" %}
    {{ pl.name }}{% for p in pl.tcp_ports_in %}{{ p.show_port }}, {% endfor %}{% for p in pl.tcp_ports_out %}{{ p.show_port }}, {% endfor %}{% for p in pl.udp_ports_in %}{{ p.show_port }}, {% endfor %}{% for p in pl.udp_ports_out %}{{ p.show_port }}, {% endfor %} - {% if pl.interface_set.all %} - - {% endif %} - - {% can_edit pl %} - {% include 'buttons/edit.html' with href='machines:edit-portlist' id=pl.id %} - {% acl_end %} - {% can_delete pl %} - {% include 'buttons/suppr.html' with href='machines:del-portlist' id=pl.id %} - {% acl_end %} -
    +

    + + {% include 'machines/aff_portlist.html' with port_list=port_list %} {% endblock %} diff --git a/machines/views.py b/machines/views.py index 76d12eca..811bf2a0 100644 --- a/machines/views.py +++ b/machines/views.py @@ -1351,11 +1351,13 @@ def aff_profil(request, user): @can_view_all(IpType) def index_iptype(request): """View used to display the list of existing types of IP.""" + pagination_large_number = GeneralOption.get_cached_value("pagination_large_number") iptype_list = ( IpType.objects.select_related("extension") .select_related("vlan") .order_by("name") ) + iptype_list = re2o_paginator(request, iptype_list, pagination_large_number) return render(request, "machines/index_iptype.html", {"iptype_list": iptype_list}) diff --git a/multi_op/templates/multi_op/aff_room_state.html b/multi_op/templates/multi_op/aff_room_state.html index bdfdd98b..f58e8148 100644 --- a/multi_op/templates/multi_op/aff_room_state.html +++ b/multi_op/templates/multi_op/aff_room_state.html @@ -30,44 +30,79 @@ with this program; if not, write to the Free Software Foundation, Inc., {% include 'pagination.html' with list=room_list %} {% endif %} - - - - {% trans "Room" as tr_room %} - {% trans "Building" as tr_building %} - - - - - - - - - - - {% for room in room_list %} - - - - - - - - - - - {% endfor %} -
    {% include 'buttons/sort.html' with prefix='building' col='name' text=tr_building %}{% include 'buttons/sort.html' with prefix='room' col='name' text=tr_room %}{% trans "Connnected to" %}{% trans "User" %}{% trans "Details" %}{% trans "End of subscription on" %}{% trans "Internet access" %}{% trans "Action" %}
    {{ room.building }}{{ room.name }}{% if room.port_set.all %}{{ asso_name }}{% else %}{% trans "Other operator" %}{% endif %}{% if room.adherent %}{{ room.adherent }}{% else %} {% trans "None" %}{% endif %}{{ room.details }}{% if room.adherent.is_adherent %}{% else %}{% endif %}{% if room.adherent.end_adhesion %}{{ room.adherent.end_adhesion}}{% else %}{% trans "Non member" %}{% endif %} - {% if room.adherent.has_access == True %} - {% trans "Active" %} - {% else %} - {% trans "Disabled" %} - {% endif %} - - {% if room.port_set.all %} - - {% endif %} -
    +{%for room in room_list %} +
    +
    +
    +
    +
    +

    {{ room.building }} - {{room.name }}

    +
    +
    + {% if room.port_set.all %} + + {% endif %} +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + +
    {% trans "User"%}{% trans "Connected to"%}{% trans "End of subscription on" %}{% trans "Internet access" %}
    + {% if room.adherent %} + {{ room.adherent }} + {% else %} + {% trans "None" %} + {% endif %} + + {% if room.port_set.all %} + {{ asso_name }} + {% else %} + {% trans "Other operator" %} + {% endif %} + + {% if room.adherent.is_adherent %} + + {% else %} + + {% endif %} + {% if room.adherent.end_adhesion %} + {{ room.adherent.end_adhesion}} + {% else %} + {% trans "Non member" %} + {% endif %} + + + {% if room.adherent.has_access == True %} + {% trans "Active" %} + {% else %} + {% trans "Disabled" %} + {% endif %} +
    +
    +
    + {% if room.details %} + + {% endif %} +
    +{% endfor %} {% if room_list.paginator %} {% include 'pagination.html' with list=room_list %} diff --git a/preferences/templates/preferences/aff_service.html b/preferences/templates/preferences/aff_service.html index fa7df1a3..baa08feb 100644 --- a/preferences/templates/preferences/aff_service.html +++ b/preferences/templates/preferences/aff_service.html @@ -25,32 +25,40 @@ with this program; if not, write to the Free Software Foundation, Inc., {% load logs_extra %} {% load i18n %} - - - - - - - - - - - {% for service in service_list %} - - - - - - - - {% endfor %} -
    {% trans "Name" %}{% trans "URL" %}{% trans "Description" %}{% trans "Image" %}
    {{ service.name }}{{ service.url }}{{ service.description }}{{ service.image }} - {% can_edit service %} - {% include 'buttons/edit.html' with href='preferences:edit-service' id=service.id %} - {% acl_end %} - {% can_delete service %} - {% include 'buttons/suppr.html' with href='preferences:del-service' id=service.id %} - {% acl_end %} - {% history_button service %} -
    - +{% for service in service_list %} +
    +
    +
    +
    +
    +

    {{ service.name }}

    +
    +
    + {% can_edit service %} + {% include 'buttons/edit.html' with href='preferences:edit-service' id=service.id %} + {% acl_end %} + {% can_delete service %} + {% include 'buttons/suppr.html' with href='preferences:del-service' id=service.id %} + {% acl_end %} + {% history_button service %} +
    +
    +
    +
    +
    + {{ service.description }} +
    + +
    +{% endfor %} diff --git a/re2o/templates/re2o/contact.html b/re2o/templates/re2o/contact.html index f508932e..bf97c288 100644 --- a/re2o/templates/re2o/contact.html +++ b/re2o/templates/re2o/contact.html @@ -39,13 +39,21 @@ with this program; if not, write to the Free Software Foundation, Inc., {% for contact in contacts %}
    -

    {{ contact.get_name }}

    -
    -
    -
    {{ contact.commentary}}
    - -
    +
    +
    +
    +
    +

    {{ contact.get_name }}

    +
    + +
    +
    +
    + {{ contact.commentary}} +
    {% endfor %} diff --git a/templates/base.html b/templates/base.html index 559e12a0..e4bde7f3 100644 --- a/templates/base.html +++ b/templates/base.html @@ -217,7 +217,46 @@ with this program; if not, write to the Free Software Foundation, Inc.,

    {{ request_user.name }} {{ request_user.surname }}

    - +
    + + + + + + + + + + + + +
    + {% trans "Username" %} +
    + {{ request_user.pseudo }} +
    + {% trans "Room" %} +
    + {{ request_user.room }} +
    + {% trans "Internet access" %} +
    + {% if request_user.has_access %} + {% blocktrans with end_access_date=request.user.end_access|date:"d b Y" %}Until {{ end_access_date }}{% endblocktrans %} + {% else %} + {% trans "Disabled" %} + {% endif %} +
    + {% trans "Membership" %} +
    + {% if request_user.is_adherent %} + {% blocktrans with end_adhesion_date=request_user.end_adhesion|date:"d b Y" %}Until {{ end_adhesion_date }}{% endblocktrans %} + {% else %} + {% trans "Non member" %} + {% endif %} +
    + + @@ -266,7 +305,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
    {% trans "Username" %} {{ request_user.pseudo }}
    + + + + + + + + + + + + {% endif %} + + + +
    {% trans "Default for" %}{% trans "RADIUS settings" %}{% trans "Speed limit" %}{% trans "MAC address limit" %}
    + {{ port_profile.profil_default }} + {% if port_profile.profil_default%} + {% if port_profile.on_dormitory %}{% blocktrans with dorm=port_profile.on_dormitory %} on {{ dorm }}{% endblocktrans %}{% else %}{% trans "Everywhere" %}{% endif %} + {% endif %} + + {% trans "RADIUS type: " %}{{ port_profile.radius_type }} + {% if port_profile.radius_type == "MAC-radius" %} +
    + {% trans "RADIUS mode: " %}{{ port_profile.radius_mode }}
    {{ port_profile.speed }}{{ port_profile.mac_limit }}
    +
    +
    + {% if port_profile.security_parameters_enabled %} + {% endif %} - - - - - - - - - - - - - - - - {% for port_profile in port_profile_list %} - - - - - - {% endif %} - - - - - - {% endfor %} -
    {% trans "Name" %}{% trans "Default for" %}{% trans "VLANs" %}{% trans "RADIUS settings" %}{% trans "Speed limit" %}{% trans "MAC address limit" %}{% trans "Security" %}
    {{ port_profile.name }}{{ port_profile.profil_default }} {% if port_profile.profil_default%} - {% if port_profile.on_dormitory %}{% blocktrans with dorm=port_profile.on_dormitory %} on {{ dorm }}{% endblocktrans %}{% else %}{% trans "Everywhere" %}{% endif %}{% endif %} - {% if port_profile.vlan_untagged %} - {% trans "Untagged: " %}{{ port_profile.vlan_untagged }} -
    - {% endif %} - {% if port_profile.vlan_tagged.all %} - {% trans "Tagged: " %}{{ port_profile.vlan_tagged.all|join:", " }} - {% endif %} -
    - {% trans "RADIUS type: " %}{{ port_profile.radius_type }} - {% if port_profile.radius_type == "MAC-radius" %} -
    - {% trans "RADIUS mode: " %}{{ port_profile.radius_mode }}
    {{ port_profile.speed }}{{ port_profile.mac_limit }}{{ port_profile.security_parameters_enabled|join:"
    " }}
    - {% can_edit port_profile %} - {% include 'buttons/edit.html' with href='topologie:edit-port-profile' id=port_profile.id %} - {% acl_end %} - {% history_button port_profile %} - {% can_delete port_profile %} - {% include 'buttons/suppr.html' with href='topologie:del-port-profile' id=port_profile.id %} - {% acl_end %} -
    - - {% if port_profile_list.paginator %} - {% include 'pagination.html' with list=port_profile_list %} - {% endif %} - + - +{% endfor %} diff --git a/topologie/templates/topologie/aff_switch.html b/topologie/templates/topologie/aff_switch.html index e2866aba..e75d41a2 100644 --- a/topologie/templates/topologie/aff_switch.html +++ b/topologie/templates/topologie/aff_switch.html @@ -26,45 +26,24 @@ with this program; if not, write to the Free Software Foundation, Inc., {% load logs_extra %} {% load i18n %} -
    - {% if switch_list.paginator %} - {% include 'pagination.html' with list=switch_list %} - {% endif %} +{% if switch_list.paginator %} + {% include 'pagination.html' with list=switch_list %} +{% endif %} - - - - {% trans "DNS name" as tr_dns %} - - {% trans "IPv4 address" as tr_ip %} - - {% trans "Switch bay" as tr_bay %} - - {% trans "Ports" as tr_ports %} - - {% trans "Stack" as tr_stack %} - - - - - - - - {% for switch in switch_list %} - - - - - - - - - - - - {% endfor %} -
    {% include 'buttons/sort.html' with prefix='switch' col='dns' text=tr_dns %}{% include 'buttons/sort.html' with prefix='switch' col='ip' text=tr_ip %}{% include 'buttons/sort.html' with prefix='switch' col='loc' text=tr_bay %}{% include 'buttons/sort.html' with prefix='switch' col='ports' text=tr_ports %}{% include 'buttons/sort.html' with prefix='switch' col='stack' text=tr_stack %}{% trans "Stack member ID" %}{% trans "Switch model" %}{% trans "Details" %}
    - - {{ switch }} +{% for switch in switch_list %} +{{ switch.interface_set.first.ipv4 }}{{ switch.switchbay }}{{ switch.number }}{{ switch.stack.name }}{{ switch.stack_member_id }}{{ switch.model }}{{ switch.interface_set.first.details }} + +
    + {% trans "Switch bay" as tr_bay %} {{switch.switchbay}} +
    +
    {% can_edit switch %} {% include 'buttons/edit.html' with href='topologie:edit-switch' id=switch.id %} {% acl_end %} @@ -75,14 +54,51 @@ with this program; if not, write to the Free Software Foundation, Inc., {% can_create Port %} {% trans "Creation of ports" as tr_creation %} {% include 'buttons/add.html' with href='topologie:create-ports' id=switch.id desc=tr_creation %} - {% acl_end %} -
    - - {% if switch_list.paginator %} - {% include 'pagination.html' with list=switch_list %} + {% acl_end %} +
    + + + +
    +
    +
    +
    + {% trans "IPv4 address"%} +
    + {{ switch.interface_set.first.ipv4 }} +
    +
    + {% trans "Ports"%} +
    + {{ switch.number }} +
    +
    + {% trans "Stack"%} +
    + {{ switch.stack.name }} +
    +
    + {% trans "Stack member ID" %} +
    + {{ switch.stack_member_id }} +
    +
    + {% trans "Switch model" %} +
    + {{ switch.model }} +
    +
    +
    +
    + {% if switch.interface_set.first.details %} + {% endif %} +{% endfor %} + +{% if switch_list.paginator %} + {% include 'pagination.html' with list=switch_list %} +{% endif %}