Project

General

Profile

0001-templates-reduce-duplication-of-messages-block-41618.patch

Frédéric Péters (de retour le 27 mai), 11 April 2020 02:58 PM

Download (9.01 KB)

View differences:

Subject: [PATCH] templates: reduce duplication of messages block (#41618)

 static/includes/_misc.scss                          |  2 +-
 static/minint/initial.css                           |  4 ++--
 templates/authentic2/base.html                      | 12 ------------
 templates/combo/page_template.html                  | 13 +++++++++++--
 templates/fargo/base.html                           | 12 ------------
 templates/theme.html                                |  4 ++--
 .../variants/grenoble-metropole-2019/theme.html     |  9 ---------
 templates/variants/hautes-alpes-2018/theme.html     |  9 ---------
 templates/variants/minint/theme.html                |  9 ---------
 templates/variants/montpellier/base.html            | 12 ------------
 templates/variants/montpellier/theme.html           |  9 ---------
 templates/variants/strasbourg-2018/theme.html       |  9 ---------
 templates/variants/villeurbanne-2018/theme.html     |  9 ---------
 13 files changed, 16 insertions(+), 97 deletions(-)
static/includes/_misc.scss
272 272
	box-sizing: content-box;
273 273
	background: $color;
274 274
	color: text-color($color);
275
	margin: 1rem 0;
275
	margin: 0 0 1rem 0;
276 276
	padding: 0.5rem;
277 277
	padding-left: 4rem;
278 278
	position: relative;
static/minint/initial.css
466 466
  top: 120px;
467 467
  left: 1200px; }
468 468

  
469
#messages.messages-login {
469
#messages {
470 470
  position: static; }
471 471

  
472
#messages.messages-login li {
472
#messages li {
473 473
  margin: 0px;
474 474
  margin-left: 100px;
475 475
  margin-right: 100px; }
templates/authentic2/base.html
12 12
  {% endblock %}
13 13
{% endblock %}
14 14

  
15
{% block messages %}
16
{% if messages %}
17
  <div id="messages" class="messages-login">
18
    <ul class="messages">
19
      {% for message in messages %}
20
      <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
21
      {% endfor %}
22
    </ul>
23
  </div>
24
{% endif %}
25
{% endblock %}
26

  
27 15
{% block extra-top-head %}
28 16
  {% block extrascripts %}
29 17
  {% endblock %}
templates/combo/page_template.html
99 99
{% endblock %}
100 100

  
101 101
{% block messages %}
102
{{ block.super }}
103
{% placeholder "messages" %}
102
{% skeleton_extra_placeholder messages %}
103
{% if messages %}
104
  <div id="messages">
105
    <ul class="messages">
106
        {% for message in messages %}
107
        <li{% if message.tags %} class="{{ message.tags }}"{% endif %}><p>{{ message }}</p></li>
108
        {% endfor %}
109
    </ul>
110
  </div>
111
{% endif %}
112
{% end_skeleton_extra_placeholder %}
104 113
{% endblock %}
105 114

  
106 115
{% block content %}
templates/fargo/base.html
1 1
{% extends theme_base %}
2

  
3
{% block messages %}
4
{% if messages %}
5
  <div id="messages" class="messages-login">
6
    <ul class="messages">
7
      {% for message in messages %}
8
      <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
9
      {% endfor %}
10
    </ul>
11
  </div>
12
{% endif %}
13
{% endblock %}
templates/theme.html
116 116
{% block content-messages %}
117 117
{% block messages %}
118 118
{% if messages %}
119
  <div id="messages" class="messages-login">
119
  <div id="messages">
120 120
    <ul class="messages">
121 121
        {% for message in messages %}
122
        <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
122
        <li{% if message.tags %} class="{{ message.tags }}"{% endif %}><p>{{ message }}</p></li>
123 123
        {% endfor %}
124 124
    </ul>
125 125
  </div>
templates/variants/grenoble-metropole-2019/theme.html
69 69
<div id="main-content-wrapper">
70 70
  <div id="main-content">
71 71
    {% block messages %}
72
    {% if messages %}
73
    <div id="messages">
74
      <ul class="messages">
75
        {% for message in messages %}
76
      <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
77
      {% endfor %}
78
      </ul>
79
    </div>
80
    {% endif %}
81 72
    {% endblock %}
82 73
    <div id="content" class="gru-content">
83 74
      {% block content %}
templates/variants/hautes-alpes-2018/theme.html
51 51
{% endblock %}
52 52

  
53 53
{% block messages %}
54
{% if messages %}
55
<div id="messages">
56
  <ul class="messages">
57
      {% for message in messages %}
58
      <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
59
      {% endfor %}
60
  </ul>
61
</div>
62
{% endif %}
63 54
{% endblock %}
64 55

  
65 56
{% block local-content-wrapper %}
templates/variants/minint/theme.html
136 136
      <div id="main-content" role="main">
137 137

  
138 138
{% block messages %}
139
{% if messages %}
140
  <div id="messages" class="messages-login">
141
    <ul class="messages">
142
        {% for message in messages %}
143
        <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
144
        {% endfor %}
145
    </ul>
146
  </div>
147
{% endif %}
148 139
{% endblock %}
149 140

  
150 141
            {% block content %}
templates/variants/montpellier/base.html
19 19
          </span>
20 20
          {% endif %}
21 21
{% endblock %}
22

  
23
{% block messages %}
24
{% if messages %}
25
  <div id="messages" class="messages-login">
26
    <ul class="messages">
27
      {% for message in messages %}
28
      <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
29
      {% endfor %}
30
    </ul>
31
  </div>
32
{% endif %}
33
{% endblock %}
templates/variants/montpellier/theme.html
50 50
      <div id="main-content-wrapper">
51 51

  
52 52
        {% block messages %}
53
          {% if messages %}
54
            <div id="messages">
55
              <ul class="messages">
56
                  {% for message in messages %}
57
                  <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
58
                  {% endfor %}
59
              </ul>
60
            </div>
61
          {% endif %}
62 53
        {% endblock %}
63 54

  
64 55
        <div id="nav" class="gru-nav togglable">
templates/variants/strasbourg-2018/theme.html
125 125
            </a>
126 126

  
127 127
    {% block messages %}
128
    {% if messages %}
129
      <div id="messages">
130
        <ul class="messages">
131
            {% for message in messages %}
132
            <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
133
            {% endfor %}
134
        </ul>
135
      </div>
136
    {% endif %}
137 128
    {% endblock %}
138 129

  
139 130
    <div class="large">
templates/variants/villeurbanne-2018/theme.html
47 47
<div id="main-content-wrapper">
48 48
  <div id="main-content">
49 49
    {% block messages %}
50
    {% if messages %}
51
    <div id="messages">
52
      <ul class="messages">
53
        {% for message in messages %}
54
        <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
55
        {% endfor %}
56
      </ul>
57
    </div>
58
    {% endif %}
59 50
    {% endblock %}
60 51
    <div id="content" class="gru-content">
61 52
      {% block content %}
62
-