general: mark cells as a block so they can be extended (#24773)

This commit is contained in:
Frédéric Péters 2018-06-26 08:46:40 +02:00
parent 891f39be87
commit c9b7df83bb
32 changed files with 64 additions and 1 deletions

View File

@ -1,4 +1,5 @@
{% load i18n calendar %}
{% block cell-content %}
{% if cell.title %}
<h2>
@ -23,3 +24,4 @@
<style>.calinfo { font-style: italic; font-size: 80%; }</style>
{% endblock %}

View File

@ -1,4 +1,5 @@
{% load combo i18n %}
{% block cell-content %}
{% for tile in tiles %}
{% with cell=tile.cell %}
<div class="cell {{ cell.css_class_names }} {% if cell.slug %}{{cell.slug}}{% endif %}"
@ -9,3 +10,4 @@
{% endif %}><div>{% render_cell cell %}</div></div>
{% endwith %}
{% endfor %}
{% endblock %}

View File

@ -1,3 +1,4 @@
{% block cell-content %}
<div
data-combo-gauge="true"
{% if jsonp %}
@ -12,3 +13,4 @@
{% if url %}<a href="{{url}}">{% endif %}{{title}}{% if url %}</a>{% endif %}
{% endif %}
</div>
{% endblock %}

View File

@ -1,4 +1,5 @@
{% load i18n combo %}
{% block cell-content %}
<h2>{% trans "Informations related to your family" %}</h2>
{% trans "Top content for unlinked users" as top_content %}
@ -62,3 +63,4 @@
{% endwith %}
{% endif %}
</div>
{% endblock %}

View File

@ -1,4 +1,5 @@
{% load i18n %}
{% block cell-content %}
<div class="recent-documents links-list">
<h2>{% trans 'Recent Documents' %}</h2>
{% if results %}
@ -11,3 +12,4 @@
<p>{% trans "You don't have any recent document." %}</p>
{% endif %}
</div>
{% endblock %}

View File

@ -1,4 +1,5 @@
{% load i18n %}
{% block cell-content %}
{% if regies %}
<h2>{% trans "Basket" %}</h2>
{% for regie_info in regies %}
@ -21,3 +22,4 @@
</form>
{% endfor %}
{% endif %}
{% endblock %}

View File

@ -1,4 +1,5 @@
{% load i18n %}
{% block cell-content %}
{% if total %}
<p><a href="{{site_base}}{{basket_url}}">{% trans 'Basket:' %}
{% blocktrans count counter=items|length %}
@ -9,3 +10,4 @@
({{ total }} €)</a></p>
</form>
{% endif %}
{% endblock %}

View File

@ -1,4 +1,5 @@
{% load i18n %}
{% block cell-content %}
{% if title %}<h2>{{ title|safe }}</h2>{% endif %}
<div>
{% if text %}{{ text|safe }}{% endif %}
@ -44,3 +45,4 @@
{% trans "No items yet" %}
{% endif %}
</div>
{% endblock %}

View File

@ -1,4 +1,5 @@
{% load i18n %}
{% block cell-content %}
<h2>{% trans "Recent Transactions" %}</h2>
{% csrf_token %}
<ul>
@ -17,3 +18,4 @@
</li>
{% endfor %}
</ul>
{% endblock %}

View File

@ -1,4 +1,5 @@
{% load i18n %}
{% block cell-content %}
{% if title %}<h2>{{ title }}</h2>{% endif %}
<div>
{% if text %}<p>{{ text|safe }}</p>{% endif %}
@ -27,3 +28,4 @@
</div>
</form>
</div>
{% endblock %}

View File

@ -1,4 +1,5 @@
{% load l10n %}
{% block cell-content %}
{% if title %}<h2>{{ title }}</h2>{% endif %}
{% localize off %}
<div class="combo-cell-map" data-init-state="{{ initial_state }}"
@ -17,3 +18,4 @@
>
{% endlocalize %}
</div>
{% endblock %}

View File

@ -1,4 +1,5 @@
{% load i18n %}
{% block cell-content %}
<h2>{% trans "Notifications" %}</h2>
{% if notifications %}
<ul>
@ -17,3 +18,4 @@
{% else %}
<p>{% trans 'No notifications.' %}</p>
{% endif %}
{% endblock %}

View File

@ -1,4 +1,5 @@
{% load i18n %}
{% block cell-content %}
<form id="combo-search-form-{{ cell.pk }}" class="combo-search-form">
<input type="text" name="q" autocomplete="off" id="combo-search-input-{{ cell.pk }}" class="combo-search-input"
@ -47,3 +48,4 @@ $(function() {
{% endif %}
});
</script>
{% endblock %}

View File

@ -1,4 +1,6 @@
{% block cell-content %}
<div class="wcs-category-{{slug}}">
<h2><a href="{{ url }}">{{ title }}</a></h2>
{{ description|safe }}
</div>
{% endblock %}

View File

@ -1,4 +1,5 @@
{% load i18n combo %}
{% block cell-content %}
<h2>{% trans 'Current Drafts' %}</h2>
{% for slug, forms in current_drafts.iteritems %}
<div class="current-drafts-{{ slug }} current-drafts list-of-forms">
@ -16,3 +17,4 @@
{% endif %}
</div>
{% endfor %}
{% endblock %}

View File

@ -1,7 +1,9 @@
{% load i18n %}
{% block cell-content %}
<h2>{% trans 'Current Forms' %}</h2>
{% for slug, forms in current_forms.iteritems %}
<div class="current-forms-{{ slug }} current-forms list-of-forms">
{% include "combo/wcs/list_of_forms.html" with forms=forms %}
</div>
{% endfor %}
{% endblock %}

View File

@ -1 +1,3 @@
{% block cell-content %}
<div class="wcs-form-{{slug}}"><a href="{{ url }}tryauth">{{ title }}</a></div>
{% endblock %}

View File

@ -1,4 +1,5 @@
{% load i18n %}
{% block cell-content %}
<h2>{% trans 'Form Categories' %}</h2>
{% for slug, categories in form_categories.iteritems %}
<div class="categories-{{ slug }}">
@ -10,3 +11,4 @@
</ul>
</div>
{% endfor %}
{% endblock %}

View File

@ -1,4 +1,5 @@
{% load i18n %}
{% block cell-content %}
<div class="wcs-forms-of-category-{{slug}}">
<h2>{{ title }}</h2>
{% if description %}
@ -32,3 +33,4 @@
</ul>
</div>
{% endblock %}

View File

@ -1,3 +1,4 @@
{% block cell-content %}
{% if forms %}
<ul>
{% for data in forms.data|dictsortreversed:"form_receipt_datetime" %}
@ -10,4 +11,4 @@
{% endfor %}
</ul>
{% endif %}
{% endblock %}

View File

@ -1,4 +1,5 @@
{% load i18n %}
{% block cell-content %}
<div class="wcs-tracking-code-input">
<h2>{% trans 'Tracking Code' %}</h2>
<form data-wcs-url="{{ url }}" method="post" action="{{ site_base }}{% url 'wcs-tracking-code' %}">
@ -26,3 +27,4 @@
</script>
</form>
</div>
{% endblock %}

View File

@ -1,7 +1,9 @@
{% load combo i18n %}
{% block cell-content %}
<h2>{% trans 'All Forms' %}</h2>
{% for slug, forms in user_forms.iteritems %}
<div class="user-forms-{{ slug }} user-all-forms list-of-forms">
{% include "combo/wcs/list_of_forms.html" with forms=forms %}
</div>
{% endfor %}
{% endblock %}

View File

@ -1,7 +1,9 @@
{% load combo i18n %}
{% block cell-content %}
<h2>{% trans 'Done Forms' %}</h2>
{% for slug, forms in user_forms.iteritems %}
<div class="user-forms-{{ slug }} list-of-forms">
{% include "combo/wcs/list_of_forms.html" with forms=forms %}
</div>
{% endfor %}
{% endblock %}

View File

@ -1,4 +1,6 @@
{% block cell-content %}
{% load i18n %}
<div class="loading" data-ajax-cell-must-load="true">
<span class="loading-message">{{ cell.loading_message }}</span>
</div>
{% endblock %}

View File

@ -1,4 +1,5 @@
{% load i18n %}
{% block cell-content %}
{% if cell.title %}
<h2>{{ cell.title }}</h2>
{% endif %}
@ -12,3 +13,4 @@
{% if entry.summary %}<div>{{entry.summary|safe}}</div>{% endif %}
{% endfor %}
</div>
{% endblock %}

View File

@ -1,4 +1,6 @@
{% block cell-content %}
{% if title %}<h2>{{title}}</h2>{% endif %}
<!--
{{json}}
-->
{% endblock %}

View File

@ -1,3 +1,5 @@
{% load i18n %}
{% block cell-content %}
{% if title %}<h2>{{title}}</h2>{% endif %}
<p>{% trans "Technical error getting data." %}</p>
{% endblock %}

View File

@ -1,3 +1,4 @@
{% block cell-content %}
<div class="links-list">
{% if title %}<h2>{{title}}</h2>{% endif %}
{% for row in json.data %}
@ -7,3 +8,4 @@
{% endfor %}
</div>
</div>
{% endblock %}

View File

@ -1 +1,3 @@
{% block cell-content %}
<a href="{{url}}">{{title}}</a>
{% endblock %}

View File

@ -1 +1,3 @@
{% block cell-content %}
{{menu}}
{% endblock %}

View File

@ -1,3 +1,4 @@
{% block cell-content %}
{% if form %}
{% if title %}
<h2>{% if url %}<a href="{{url}}">{% endif %}{{title}}{% if url %}</a>{% endif %}</h2>
@ -10,3 +11,4 @@
Choice: {{ form.cleaned_data.choice|pprint }}
-->
{% endif %}
{% endblock %}

View File

@ -1 +1,3 @@
{% block cell-content %}
{{cell.text|safe}}
{% endblock %}