Преглед изворни кода

[enh] oscar template: using table instead of container-fluid to show cookies

Thomas Pointhuber пре 10 година
родитељ
комит
a8b75ca47b
2 измењених фајлова са 19 додато и 12 уклоњено
  1. 5
    0
      searx/templates/oscar/messages/no_cookies.html
  2. 14
    12
      searx/templates/oscar/preferences.html

+ 5
- 0
searx/templates/oscar/messages/no_cookies.html Прегледај датотеку

@@ -0,0 +1,5 @@
1
+{% from 'oscar/macros.html' import icon %}
2
+<div class="alert alert-info fade in" role="alert">
3
+    <strong class="lead">{{ icon('info-sign') }} {{ _('Information!') }}</strong>
4
+    {{ _('currently, there are no cookies defined.') }}
5
+</div>

+ 14
- 12
searx/templates/oscar/preferences.html Прегледај датотеку

@@ -213,21 +213,23 @@
213 213
                     {{ _('This is the list of cookies and their values searx is storing on your computer.') }}<br />
214 214
                     {{ _('With that list, you can assess searx transparency.') }}<br />
215 215
                 </p>
216
-                <div class="container-fluid">
217
-                    <fieldset>
218
-                        <div class="row">
219
-                            <div class="col-xs-6 col-sm-4 col-md-4 text-muted"><label>{{ _('Cookie name') }}</label></div>
220
-                            <div class="col-xs-6 col-sm-4 col-md-4 text-muted"><label>{{ _('Value') }}</label></div>
221
-                        </div>
216
+                {% if cookies %}
217
+                <table class="table table-striped">
218
+                    <tr>
219
+                        <th class="text-muted" style="padding-right:40px;">{{ _('Cookie name') }}</th>
220
+                        <th class="text-muted">{{ _('Value') }}</th>
221
+                    </tr>
222 222
 
223 223
                     {% for cookie in cookies %}
224
-                        <div class="row">
225
-                            <div class="col-xs-6 col-sm-4 col-md-4 text-muted">{{ cookie }}</div>
226
-                            <div class="col-xs-6 col-sm-4 col-md-4 text-muted">{{ cookies[cookie] }}</div>
227
-                        </div>
224
+                    <tr>
225
+                        <td class="text-muted" style="padding-right:40px;">{{ cookie }}</td>
226
+                        <td class="text-muted">{{ cookies[cookie] }}</td>
227
+                    </tr>
228 228
                     {% endfor %}
229
-                    </fieldset>
230
-                </div>
229
+                </table>
230
+                {% else %}
231
+                    {% include 'oscar/messages/no_cookies.html' %}
232
+                {% endif %}
231 233
             </div>
232 234
         </div>
233 235
         <p class="text-muted" style="margin:20px 0;">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}