Browse Source

Merge branch 'jd-titles' of FFDN/coin into master

jocelyn 6 years ago
parent
commit
cd91957f19
33 changed files with 83 additions and 24 deletions
  1. 3 0
      README.md
  2. 2 0
      coin/billing/templates/billing/invoice.html
  3. 8 1
      coin/isp_database/context_processors.py
  4. 1 0
      coin/members/templates/members/contact.html
  5. 2 0
      coin/members/templates/members/detail.html
  6. 2 0
      coin/members/templates/members/index.html
  7. 2 0
      coin/members/templates/members/invoices.html
  8. 2 0
      coin/members/templates/members/registration/activate.html
  9. 2 0
      coin/members/templates/members/registration/activation_complete.html
  10. 2 0
      coin/members/templates/members/registration/login.html
  11. 3 0
      coin/members/templates/members/registration/password_change_base.html
  12. 1 3
      coin/members/templates/members/registration/password_change_done.html
  13. 3 2
      coin/members/templates/members/registration/password_change_form.html
  14. 3 0
      coin/members/templates/members/registration/password_reset_base.html
  15. 1 1
      coin/members/templates/members/registration/password_reset_complete.html
  16. 1 1
      coin/members/templates/members/registration/password_reset_confirm.html
  17. 2 1
      coin/members/templates/members/registration/password_reset_done.html
  18. 1 1
      coin/members/templates/members/registration/password_reset_form.html
  19. 3 0
      coin/members/templates/members/registration/registration_base.html
  20. 1 1
      coin/members/templates/members/registration/registration_closed.html
  21. 1 1
      coin/members/templates/members/registration/registration_complete.html
  22. 2 1
      coin/members/templates/members/registration/registration_form.html
  23. 2 0
      coin/members/templates/members/subscriptions.html
  24. 5 0
      coin/settings_base.py
  25. 4 3
      coin/static/css/local.css
  26. 1 1
      coin/templates/admin/base_site.html
  27. 9 2
      coin/templates/base.html
  28. 3 1
      hardware_provisioning/templates/hardware_provisioning/item_borrow.html
  29. 2 1
      hardware_provisioning/templates/hardware_provisioning/item_list.html
  30. 2 0
      hardware_provisioning/templates/hardware_provisioning/list.html
  31. 3 1
      hardware_provisioning/templates/hardware_provisioning/return.html
  32. 3 1
      hardware_provisioning/templates/hardware_provisioning/transfer.html
  33. 1 1
      vpn/templates/vpn/vpn.html

+ 3 - 0
README.md

@@ -373,6 +373,9 @@ MEMBERSHIP_FEE_REMINDER_DATES = [
 - `MEMBER_CAN_EDIT_VPN_CONF`: Allow members to edit some part of their vpn configuration
 - `DEBUG` : Enable debug for development **do not use in production** : display
    stracktraces and enable [django-debug-toolbar](https://django-debug-toolbar.readthedocs.io).
+- `SITE_TITLE`: the base of site title (displayed in browser window/tab title)
+- `SITE_HEADER`: the site header (displayed in all pages as page header)
+- `SITE_LOGO_URL`: URL to website logo (by default, this is an ascii-duck)
 
 Accounting logs
 ---------------

+ 2 - 0
coin/billing/templates/billing/invoice.html

@@ -1,5 +1,7 @@
 {% extends "base.html" %}
 
+{% block title %}Facture N°{{ invoice.number }} - {{ block.super }}{% endblock %}
+
 {% block content %}
 <div class="row">
     <div class="large-8 columns">

+ 8 - 1
coin/isp_database/context_processors.py

@@ -1,9 +1,16 @@
 # -*- coding: utf-8 -*-
 from __future__ import unicode_literals
 
+from django.conf import settings
+
 from coin.isp_database.models import ISPInfo
 
 def branding(request):
     """ Just a shortcut to get the ISP object in templates
     """
-    return {'branding': ISPInfo.objects.first()}
+    return {
+        'branding': ISPInfo.objects.first(),
+        'SITE_HEADER': settings.SITE_HEADER,
+        'SITE_TITLE': settings.SITE_TITLE,
+        'SITE_LOGO_URL': settings.SITE_LOGO_URL,
+    }

+ 1 - 0
coin/members/templates/members/contact.html

@@ -1,4 +1,5 @@
 {% extends "base.html" %}
+{% block title %}Contact / Support - {{ block.super }}{% endblock %}
 
 {% block content %}
 <div class="row">

+ 2 - 0
coin/members/templates/members/detail.html

@@ -1,5 +1,7 @@
 {% extends "base.html" %}
 
+{% block title %}Mes informations - {{ block.super }}{% endblock %}
+
 {% block content %}
 <div class="row">
     <div class="large-12 columns">

+ 2 - 0
coin/members/templates/members/index.html

@@ -1,5 +1,7 @@
 {% extends "base.html" %}
 
+{% block title %}Tableau de bord - {{ block.super }}{% endblock %}
+
 {% block content %}
 <div class="row">
     <div class="large-12 columns">

+ 2 - 0
coin/members/templates/members/invoices.html

@@ -1,5 +1,7 @@
 {% extends "base.html" %}
 
+{% block title %}Factures & paiements - {{ block.super }}{% endblock %}
+
 {% block content %}
 
 {% if handle_balance %}

+ 2 - 0
coin/members/templates/members/registration/activate.html

@@ -1,6 +1,8 @@
 {% extends "base.html" %}
 {% load i18n %}
 
+{% block title %}Activation échouée - {{ block.super }}{% endblock %}
+
 {% block content %}
 
 <p>L'activation de votre compte a échoué ou ce dernier a déjà été activé.</p>

+ 2 - 0
coin/members/templates/members/registration/activation_complete.html

@@ -1,6 +1,8 @@
 {% extends "base.html" %}
 {% load i18n %}
 
+{% block title %}Compte créé - {{ block.super }}{% endblock %}
+
 {% block content %}
 
 <h2>Compte adhérent créé</h2>

+ 2 - 0
coin/members/templates/members/registration/login.html

@@ -1,6 +1,8 @@
 {% extends "base.html" %}
 {% load i18n %}
 
+{% block title %}Connexion - {{ block.super }}{% endblock %}
+
 {% block content %}
 
 <div class="row">

+ 3 - 0
coin/members/templates/members/registration/password_change_base.html

@@ -0,0 +1,3 @@
+{% extends "base.html" %}
+
+{% block title %}Modification du mot de passe - {{ block.super }}{% endblock %}

+ 1 - 3
coin/members/templates/members/registration/password_change_done.html

@@ -1,8 +1,6 @@
-{% extends "base.html" %}
+{% extends "members/registration/password_change_base.html" %}
 {% load i18n %}
 
-{% block title %}{% trans 'Password change successful' %}{% endblock %}
-
 {% block content %}
 <div class="row">
     <div class="large-12 columns">

+ 3 - 2
coin/members/templates/members/registration/password_change_form.html

@@ -1,4 +1,5 @@
-{% extends "base.html" %}
+{% extends "members/registration/password_change_base.html" %}
+
 {% load i18n static %}
 
 {% block content %}
@@ -45,4 +46,4 @@
 
 <script type="text/javascript">document.getElementById("id_old_password").focus();</script>
 
-{% endblock %}
+{% endblock %}

+ 3 - 0
coin/members/templates/members/registration/password_reset_base.html

@@ -0,0 +1,3 @@
+{% extends "base.html" %}
+
+{% block title %}Ré-initialisation du mot de passe - {{ block.super }}{% endblock %}

+ 1 - 1
coin/members/templates/members/registration/password_reset_complete.html

@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "members/registration/password_reset_base.html" %}
 {% load i18n %}
 
 {% block content %}

+ 1 - 1
coin/members/templates/members/registration/password_reset_confirm.html

@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "members/registration/password_reset_base.html" %}
 {% load i18n %}
 
 {% block content %}

+ 2 - 1
coin/members/templates/members/registration/password_reset_done.html

@@ -1,4 +1,5 @@
-{% extends "base.html" %}
+{% extends "members/registration/password_reset_base.html" %}
+
 {% load i18n %}
 
 {% block content %}

+ 1 - 1
coin/members/templates/members/registration/password_reset_form.html

@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "members/registration/password_reset_base.html" %}
 {% load staticfiles %}
 {% load i18n %}
 

+ 3 - 0
coin/members/templates/members/registration/registration_base.html

@@ -0,0 +1,3 @@
+{% extends "base.html" %}
+
+{% block title %}Création de compte - {{ block.super }}{% endblock %}

+ 1 - 1
coin/members/templates/members/registration/registration_closed.html

@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "members/registration/registration_base.html" %}
 {% load i18n %}
 
 {% block content %}

+ 1 - 1
coin/members/templates/members/registration/registration_complete.html

@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "members/registration/registration_base.html" %}
 {% load i18n %}
 
 {% block content %}

+ 2 - 1
coin/members/templates/members/registration/registration_form.html

@@ -1,4 +1,5 @@
-{% extends "base.html" %}
+{% extends "members/registration/registration_base.html" %}
+
 {% load i18n %}
 
 {% block content %}

+ 2 - 0
coin/members/templates/members/subscriptions.html

@@ -1,5 +1,7 @@
 {% extends "base.html" %}
 
+{% block title %}Mes abonnements - {{ block.super }}{% endblock %}
+
 {% block content %}
 <h2>Mes abonnements</h2>
 

+ 5 - 0
coin/settings_base.py

@@ -289,6 +289,11 @@ MEMBERSHIP_FEE_REMINDER_DATES = [
     {'months': +1},  # 1 month after
 ]
 
+# Customize template titles
+SITE_TITLE = "COIN - SI"
+SITE_HEADER = "COIN est un Outil pour un Internet Neutre"
+SITE_LOGO_URL = ''
+
 # Pattern used to display a unique reference for any subscription
 # Helpful for bank wire transfer identification
 SUBSCRIPTION_REFERENCE = 'REF-{subscription.offer.reference}-{subscription.pk}'

+ 4 - 3
coin/static/css/local.css

@@ -10,7 +10,7 @@ h1 {
     font-size: 2.2em;
     margin-bottom: 1em;
 }
-h1:before {
+h1 .default-logo:after {
     content: "\\_o<";
     color: #FF6600;
     font-weight: normal;
@@ -22,10 +22,11 @@ h1:before {
     width: 25%;
 }
 
-h1:hover:before {
+h1 .default-logo:hover:after {
     content: "\\_x<";
 }
-h1:hover:after {
+
+pPh1:hover:after {
     position: absolute;
     text-align: center;
     z-index: -1;

+ 1 - 1
coin/templates/admin/base_site.html

@@ -9,7 +9,7 @@
     {% include 'autocomplete_light/static.html' %}
 {% endblock %}
 
-{% block title %}COIN ☺ Admin{% endblock %}
+{% block title %}Admin - COIN - {{ branding.shortname|capfirst }} SI{% endblock %}
 
 {% block branding %}
 {% hijack_notification %}

+ 9 - 2
coin/templates/base.html

@@ -5,7 +5,7 @@
 <head>
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>{% block title %}COIN - {{ branding.shortname|capfirst }} SI{% endblock %}</title>
+    <title>{% block title %}{{ SITE_TITLE }}{% endblock %}</title>
     <link rel="stylesheet" href="{% static "css/foundation.css"%}" />
     <link rel="stylesheet" href="{% static "css/font-awesome.min.css"%}" />
     <link rel="stylesheet" href="{% static "css/local.css" %}" />
@@ -34,7 +34,14 @@
             <div class="show-for-medium-up">
                 <div class="row">
                     <div class="large-12">
-                        <h1><a href="{% url 'home' %}">COIN est un Outil pour un Internet Neutre</a></h1>
+                        <h1>
+                            {% if SITE_LOGO_URL %}
+                            <img class="medium-3 large-3 columns" src="{{ SITE_LOGO_URL }}" alt="" />
+                            {% else %}
+                            <span class="default-logo">&nbsp;</span>
+                            {% endif %}
+                            <a href="{% url 'home' %}">{{ SITE_HEADER }}</a>
+                        </h1>
                     </div>
                 </div>
             </div>

+ 3 - 1
hardware_provisioning/templates/hardware_provisioning/item_borrow.html

@@ -1,5 +1,7 @@
 {% extends 'hardware_provisioning/base.html' %}
 
+{% block title %}Confirmation d'emprunt - {{ block.super }}{% endblock %}
+
 {% block content %}
 
 <p>Je déclare emprunter le matériel <strong>{{item }} ({{ item.type }}</strong>) à compter de ce jour.</p>
@@ -11,4 +13,4 @@
            value="Oui oui, c'est bien ça."/>
 </form>
 
-{% endblock %}
+{% endblock %}

+ 2 - 1
hardware_provisioning/templates/hardware_provisioning/item_list.html

@@ -1,5 +1,6 @@
 {% extends "hardware_provisioning/base.html" %}
 
+{% block title %}Emprunt d'objet - {{ block.super }}{% endblock %}
 {% block content %}
 <h2>J'emprunte à l'association…</h2>
 
@@ -35,4 +36,4 @@
     </tbody>
 
 </table>
-{% endblock %}
+{% endblock %}

+ 2 - 0
hardware_provisioning/templates/hardware_provisioning/list.html

@@ -1,5 +1,7 @@
 {% extends "hardware_provisioning/base.html" %}
 
+{% block title %}Mon matériel - {{ block.super }}{% endblock %}
+
 {% block content %}
 {% if view  == 'old' %}
 <h2>L'association m'a prêté…</h2>

+ 3 - 1
hardware_provisioning/templates/hardware_provisioning/return.html

@@ -1,5 +1,7 @@
 {% extends "hardware_provisioning/base.html" %}
 
+{% block title %}Retour de matériel - {{ block.super }}{% endblock %}
+
 {% block content %}
 <h2>Retour de matériel</h2>
 <p>
@@ -10,4 +12,4 @@
   <input class="success button" type="submit"
          value="Oui oui, c'est bien ça."/>
 </form>
-{% endblock %}
+{% endblock %}

+ 3 - 1
hardware_provisioning/templates/hardware_provisioning/transfer.html

@@ -1,5 +1,7 @@
 {% extends "hardware_provisioning/base.html" %}
 
+{% block title %}Transfert de matériel - {{ block.super }}{% endblock %}
+
 {% block content %}
 <h2>Transfert de matériel</h2>
 <p>
@@ -15,4 +17,4 @@
   <input class="success button" type="submit"
          value="Oui oui, c'est bien ça."/>
 </form>
-{% endblock %}
+{% endblock %}

+ 1 - 1
vpn/templates/vpn/vpn.html

@@ -1,7 +1,7 @@
 {% extends "base.html" %}
 
 {% load subnets %}
-
+{% block title %}Configuration du VPN {{ object.offersubscription.get_subscription_reference }} - {{ block.super }}{% endblock %}
 {% block content %}
 <div class="row">
     <h2>Configuration du VPN</h2>