Projet

Général

Profil

0001-misc-apply-djhtml-69422.patch

Valentin Deniaud, 29 septembre 2022 14:17

Télécharger (327 ko)

Voir les différences:

Subject: [PATCH 1/2] misc: apply djhtml (#69422)

 .../combo/manager_asset_confirm_delete.html   |  18 +-
 .../combo/manager_asset_overwrite.html        |  24 +-
 .../templates/combo/manager_asset_upload.html |  18 +-
 .../templates/combo/manager_assets.html       |  64 +--
 .../combo/manager_assets_browse.html          |  80 +--
 .../combo/manager_assets_fragment.html        |  60 +-
 .../combo/manager_assets_import.html          |  24 +-
 .../templates/combo/manager_slot_assets.html  |  12 +-
 .../calendar/booking_calendar_cell.html       |  34 +-
 .../calendar/booking_calendar_content.html    |  80 +--
 .../templates/combo/dashboard_cell_icons.html |  30 +-
 .../templates/combo/dashboardcell.html        |  22 +-
 .../templates/combo/chart-filters.html        |  94 ++--
 .../dataviz/templates/combo/chartngcell.html  |  70 +--
 .../templates/combo/chartngcell_form.html     |  56 +-
 .../dataviz/templates/combo/gauge-cell.html   |  28 +-
 .../manager/weekly_agenda_cell_form.html      |  26 +-
 .../templates/combo/family/weekly_agenda.html | 100 ++--
 .../combo/fargo/recent-documents-cell.html    |  24 +-
 .../templates/combo/gallery_image_form.html   |  34 +-
 .../templates/combo/gallery_manager.html      |  38 +-
 .../gallery/templates/combo/gallerycell.html  |  64 +--
 .../combo/latest-page-updates-cell.html       |  38 +-
 .../lingo/basketitem_error_list.html          |  88 +--
 .../lingo/templates/lingo/combo/basket.html   |  70 +--
 .../templates/lingo/combo/basket_link.html    |  20 +-
 .../templates/lingo/combo/cancel-item.html    |  26 +-
 .../invoice_email_notification_body.html      |  14 +-
 .../lingo/combo/invoice_fullpage.html         |  28 +-
 .../lingo/templates/lingo/combo/item.html     | 134 ++---
 .../lingo/templates/lingo/combo/items.html    | 136 ++---
 .../templates/lingo/combo/payment-status.html |  80 +--
 .../lingo/combo/recent_transactions.html      |  32 +-
 .../combo/self-declared-invoice-payment.html  |  54 +-
 .../lingo/templates/lingo/manager_base.html   |   6 +-
 .../lingo/templates/lingo/payment_form.html   |  26 +-
 .../lingo/paymentbackend_confirm_delete.html  |  18 +-
 .../templates/lingo/paymentbackend_form.html  |  26 +-
 .../templates/lingo/paymentbackend_list.html  |  50 +-
 .../templates/lingo/regie_confirm_delete.html |  18 +-
 .../lingo/templates/lingo/regie_form.html     |  34 +-
 .../lingo/templates/lingo/regie_list.html     |  52 +-
 .../apps/lingo/templates/lingo/tipi_form.html |  26 +-
 .../templates/lingo/transaction_export.html   |  18 +-
 .../templates/lingo/transaction_list.html     | 112 ++--
 .../templates/maps/colour_or_text_input.html  |  46 +-
 .../templates/maps/layer_options_form.html    |  26 +-
 .../maps/templates/maps/manager_base.html     |   6 +-
 .../maps/templates/maps/manager_home.html     |  88 +--
 combo/apps/maps/templates/maps/map_cell.html  |  56 +-
 .../maps/templates/maps/map_cell_form.html    |  54 +-
 .../maps/map_layer_confirm_delete.html        |  18 +-
 .../maps/templates/maps/map_layer_form.html   |  48 +-
 .../map_layer_request_parameters_form.html    |   6 +-
 .../templates/combo/notificationscell.html    | 102 ++--
 .../pwa/templates/combo/pwa/manager_base.html |  10 +-
 .../pwa/templates/combo/pwa/manager_form.html |  18 +-
 .../pwa/templates/combo/pwa/manager_home.html | 174 +++---
 .../pwa/templates/combo/pwa/navigation.html   |  68 +--
 .../apps/pwa/templates/combo/pwa/offline.html | 100 ++--
 .../templates/combo/manager/engine-form.html  |  18 +-
 .../combo/manager/search-cell-form.html       | 112 ++--
 .../templates/combo/search-cell-results.html  |  32 +-
 .../search/templates/combo/search-cell.html   | 144 ++---
 .../combo/wcs/backoffice_submission.html      |  36 +-
 .../templates/combo/wcs/card-field-value.html |  50 +-
 combo/apps/wcs/templates/combo/wcs/card.html  | 178 +++---
 .../wcs/templates/combo/wcs/cards-field.html  |  60 +-
 combo/apps/wcs/templates/combo/wcs/cards.html | 126 ++---
 .../wcs/templates/combo/wcs/care_forms.html   |  68 +--
 .../wcs/templates/combo/wcs/category.html     |   8 +-
 .../templates/combo/wcs/current_drafts.html   |  40 +-
 .../templates/combo/wcs/current_forms.html    |  22 +-
 combo/apps/wcs/templates/combo/wcs/form.html  |   6 +-
 .../templates/combo/wcs/form_categories.html  |  22 +-
 .../combo/wcs/form_link_fragment.html         |   4 +-
 .../combo/wcs/forms_of_category.html          |  66 +--
 .../templates/combo/wcs/list_of_forms.html    |  34 +-
 .../wcs/manager/card-cell-form-display.html   | 528 +++++++++---------
 .../combo/wcs/tracking_code_input.html        |  84 +--
 .../templates/combo/wcs/user_all_forms.html   |  22 +-
 .../templates/combo/wcs/user_done_forms.html  |  22 +-
 .../combo/manager/link-list-cell-form.html    | 114 ++--
 .../widgets/select_with_other_option.html     |   6 +-
 .../templates/combo/cell_appearance.html      |  10 +-
 .../templates/combo/cell_duplicate.html       |  18 +-
 combo/manager/templates/combo/cell_form.html  |   2 +-
 .../manager/templates/combo/cell_options.html |  26 +-
 .../templates/combo/cell_visibility.html      |  24 +-
 .../manager/templates/combo/delete_page.html  |  38 +-
 .../combo/generic_confirm_delete.html         |  18 +-
 .../templates/combo/invalid_cell_report.html  |  30 +-
 .../templates/combo/link_cell_form.html       |  26 +-
 .../manager/templates/combo/manager_base.html |  22 +-
 .../combo/manager_edit_cell_block.html        |  72 +--
 .../manager/templates/combo/manager_home.html | 116 ++--
 combo/manager/templates/combo/page_add.html   |  38 +-
 .../templates/combo/page_duplicate.html       |  18 +-
 .../manager/templates/combo/page_export.html  |  18 +-
 .../templates/combo/page_extra_variables.html |  52 +-
 .../manager/templates/combo/page_history.html |  68 +--
 combo/manager/templates/combo/page_view.html  | 382 ++++++-------
 .../templates/combo/placeholder_options.html  |  18 +-
 .../manager/templates/combo/site_export.html  |  28 +-
 .../manager/templates/combo/site_import.html  |  18 +-
 .../templates/combo/site_settings.html        |  66 +--
 .../templates/combo/snapshot_restore.html     |  24 +-
 .../templates/combo/snapshot_save.html        |  18 +-
 .../templates/combo/widgets/flexsize.html     |  14 +-
 .../manager/templates/registration/login.html |  10 +-
 combo/profile/templates/combo/profile.html    |  22 +-
 combo/public/templates/combo/404.html         |  18 +-
 .../combo/asset_picture_fragment.html         |   2 +-
 .../public/templates/combo/deferred-cell.html |   8 +-
 combo/public/templates/combo/empty_site.html  | 114 ++--
 combo/public/templates/combo/feed-cell.html   |  28 +-
 combo/public/templates/combo/json-cell.html   |   8 +-
 .../templates/combo/json-error-cell.html      |   4 +-
 .../templates/combo/json-list-cell.html       |  20 +-
 combo/public/templates/combo/link-cell.html   |   4 +-
 .../templates/combo/link-list-cell.html       |  60 +-
 .../templates/combo/mellon_base_template.html |   4 +-
 combo/public/templates/combo/menu-cell.html   |   2 +-
 combo/public/templates/combo/menu.html        |  34 +-
 .../public/templates/combo/page_template.html |  86 +--
 .../combo/page_template_sidebar.html          |  16 +-
 combo/public/templates/combo/placeholder.html |  44 +-
 combo/public/templates/combo/text-cell.html   |   4 +-
 .../page_template_outer_tag_placeholder.html  |  16 +-
 ...page_template_synchronous_placeholder.html |  16 +-
 tests/wcs/test_card.py                        |   6 +-
 131 files changed, 3209 insertions(+), 3209 deletions(-)
combo/apps/assets/templates/combo/manager_asset_confirm_delete.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans 'Delete Asset' %}</h2>
5
  <h2>{% trans 'Delete Asset' %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9
<form method="post">
10
  {% csrf_token %}
11
  {% blocktrans %}Are you sure you want to delete this?{% endblocktrans %}
12
  <div class="buttons">
13
    <button class="delete-button">{% trans 'Delete' %}</button>
14
    <a class="cancel" href="{% url 'combo-manager-assets' %}">{% trans 'Cancel' %}</a>
15
  </div>
16
</form>
9
  <form method="post">
10
    {% csrf_token %}
11
    {% blocktrans %}Are you sure you want to delete this?{% endblocktrans %}
12
    <div class="buttons">
13
      <button class="delete-button">{% trans 'Delete' %}</button>
14
      <a class="cancel" href="{% url 'combo-manager-assets' %}">{% trans 'Cancel' %}</a>
15
    </div>
16
  </form>
17 17
{% endblock %}
combo/apps/assets/templates/combo/manager_asset_overwrite.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans "Overwrite Asset" %}</h2>
5
  <h2>{% trans "Overwrite Asset" %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9 9

  
10
<form method="post" enctype="multipart/form-data">
11
  {% csrf_token %}
12
  <p>
13
   {% trans "This will erase the existing file and replace it with a new one." %}
14
  </p>
15
  {{ form.as_p }}
16
  <div class="buttons">
17
    <button class="submit-button">{% trans "Upload" %}</button>
18
    <a class="cancel" href="{% url 'combo-manager-assets' %}">{% trans 'Cancel' %}</a>
19
  </div>
20
</form>
10
  <form method="post" enctype="multipart/form-data">
11
    {% csrf_token %}
12
    <p>
13
      {% trans "This will erase the existing file and replace it with a new one." %}
14
    </p>
15
    {{ form.as_p }}
16
    <div class="buttons">
17
      <button class="submit-button">{% trans "Upload" %}</button>
18
      <a class="cancel" href="{% url 'combo-manager-assets' %}">{% trans 'Cancel' %}</a>
19
    </div>
20
  </form>
21 21
{% endblock %}
combo/apps/assets/templates/combo/manager_asset_upload.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans "Asset Upload" %}</h2>
5
  <h2>{% trans "Asset Upload" %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9 9

  
10
<form method="post" enctype="multipart/form-data">
11
  {% csrf_token %}
12
  {{ form.as_p }}
13
  <div class="buttons">
14
    <button class="submit-button">{% trans "Upload" %}</button>
15
    <a class="cancel" href="{% url 'combo-manager-assets' %}">{% trans 'Cancel' %}</a>
16
  </div>
17
</form>
10
  <form method="post" enctype="multipart/form-data">
11
    {% csrf_token %}
12
    {{ form.as_p }}
13
    <div class="buttons">
14
      <button class="submit-button">{% trans "Upload" %}</button>
15
      <a class="cancel" href="{% url 'combo-manager-assets' %}">{% trans 'Cancel' %}</a>
16
    </div>
17
  </form>
18 18
{% endblock %}
combo/apps/assets/templates/combo/manager_assets.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans 'Assets' %}</h2>
6
<span class="actions">
7
<a class="extra-actions-menu-opener"></a>
8
<a href="{% url 'combo-manager-asset-upload' %}" rel="popup">{% trans 'Upload' %}</a>
9
<ul class="extra-actions-menu">
10
  <li><a href="{% url 'combo-manager-assets-export' %}">{% trans 'Export Assets' %}</a></li>
11
  <li><a rel="popup" href="{% url 'combo-manager-assets-import' %}">{% trans 'Import Assets' %}</a></li>
12
</ul>
13
</span>
5
  <h2>{% trans 'Assets' %}</h2>
6
  <span class="actions">
7
    <a class="extra-actions-menu-opener"></a>
8
    <a href="{% url 'combo-manager-asset-upload' %}" rel="popup">{% trans 'Upload' %}</a>
9
    <ul class="extra-actions-menu">
10
      <li><a href="{% url 'combo-manager-assets-export' %}">{% trans 'Export Assets' %}</a></li>
11
      <li><a rel="popup" href="{% url 'combo-manager-assets-import' %}">{% trans 'Import Assets' %}</a></li>
12
    </ul>
13
  </span>
14 14
{% endblock %}
15 15

  
16 16
{% block breadcrumb %}
17
{{ block.super }}
18
<a href="{% url 'combo-manager-assets' %}">{% trans 'Assets' %}</a>
17
  {{ block.super }}
18
  <a href="{% url 'combo-manager-assets' %}">{% trans 'Assets' %}</a>
19 19
{% endblock %}
20 20

  
21 21
{% block content %}
22 22

  
23
{% if not object_list and not query %}
24
<div class="big-msg-info">
25
  {% blocktrans %}
26
  This site doesn't have any asset yet. You can add some directly when editing
27
  pages, in the "Upload Image" dialog.
28
  {% endblocktrans %}
29
</div>
23
  {% if not object_list and not query %}
24
    <div class="big-msg-info">
25
      {% blocktrans %}
26
        This site doesn't have any asset yet. You can add some directly when editing
27
        pages, in the "Upload Image" dialog.
28
      {% endblocktrans %}
29
    </div>
30 30

  
31
{% else %}
31
  {% else %}
32 32

  
33
<form>
34
  <p><input name="q" type="search" value="{{query}}"> <button>{% trans 'Search' %}</button>
35
  <span class="help_text">{% trans "(case insensitive search over filenames)" %}</span>
36
  </p>
37
</form>
33
    <form>
34
      <p><input name="q" type="search" value="{{query}}"> <button>{% trans 'Search' %}</button>
35
        <span class="help_text">{% trans "(case insensitive search over filenames)" %}</span>
36
      </p>
37
    </form>
38 38

  
39
<div id="assets-browser">
40
  <div id="assets-listing">
41
    {% include "combo/manager_assets_fragment.html" %}
42
  </div>
43
  <div id="asset-preview"></div>
44
</div>
39
    <div id="assets-browser">
40
      <div id="assets-listing">
41
        {% include "combo/manager_assets_fragment.html" %}
42
      </div>
43
      <div id="asset-preview"></div>
44
    </div>
45 45

  
46
{% include "gadjo/pagination.html" %}
46
    {% include "gadjo/pagination.html" %}
47 47

  
48
{% endif %}
48
  {% endif %}
49 49

  
50 50
{% endblock %}
combo/apps/assets/templates/combo/manager_assets_browse.html
2 2
{% load static i18n %}
3 3

  
4 4
{% block css %}
5
<link rel="stylesheet" type="text/css" media="all" href="{% static "css/combo.manager.css" %}"/>
5
  <link rel="stylesheet" type="text/css" media="all" href="{% static "css/combo.manager.css" %}"/>
6 6
{% endblock %}
7 7

  
8 8
{% block extrascripts %}
9
<script src="{% static "js/combo.manager.js" %}"></script>
9
  <script src="{% static "js/combo.manager.js" %}"></script>
10 10
{% endblock %}
11 11

  
12 12
{% block user-links %}{% endblock %}
......
16 16
{% block footer %}{% endblock %}
17 17

  
18 18
{% block appbar %}
19
<h2>{% trans "Browse for the file you want, then click 'Embed File' to continue..." %}</h2>
19
  <h2>{% trans "Browse for the file you want, then click 'Embed File' to continue..." %}</h2>
20 20
{% endblock %}
21 21

  
22 22
{% block content %}
23 23

  
24
{% if not object_list and not query %}
25
<div class="big-msg-info">
26
  {% trans "No files found. Upload files using the 'Image Button' or 'Link Button' dialog's 'Upload' tab." %}
27
</div>
24
  {% if not object_list and not query %}
25
    <div class="big-msg-info">
26
      {% trans "No files found. Upload files using the 'Image Button' or 'Link Button' dialog's 'Upload' tab." %}
27
    </div>
28 28

  
29
{% else %}
29
  {% else %}
30 30

  
31
<form>
32
  {% for k, v in request.GET.items %}
33
    {% if k != 'q' %}<input type="hidden" name="{{ k }}" value="{{ v }}" />{% endif %}
34
  {% endfor %}
35
  <p><input name="q" type="search" value="{{query}}"> <button>{% trans 'Search' %}</button>
36
  <span class="help_text">{% trans "(case insensitive search over filenames)" %}</span>
37
  </p>
38
</form>
31
    <form>
32
      {% for k, v in request.GET.items %}
33
        {% if k != 'q' %}<input type="hidden" name="{{ k }}" value="{{ v }}" />{% endif %}
34
      {% endfor %}
35
      <p><input name="q" type="search" value="{{query}}"> <button>{% trans 'Search' %}</button>
36
        <span class="help_text">{% trans "(case insensitive search over filenames)" %}</span>
37
      </p>
38
    </form>
39 39

  
40
<div id="assets-browser" class="assets-ckeditor">
41
  <div id="assets-listing">
42
    {% with asset_for_ckeditor=True %}
43
    {% include "combo/manager_assets_fragment.html" %}
44
    {% endwith %}
45
  </div>
46
  <div id="asset-preview"></div>
47
</div>
40
    <div id="assets-browser" class="assets-ckeditor">
41
      <div id="assets-listing">
42
        {% with asset_for_ckeditor=True %}
43
          {% include "combo/manager_assets_fragment.html" %}
44
        {% endwith %}
45
      </div>
46
      <div id="asset-preview"></div>
47
    </div>
48 48

  
49
{% include "gadjo/pagination.html" %}
49
    {% include "gadjo/pagination.html" %}
50 50

  
51
<div class="buttons">
52
  <input href="" id="asset-ckeditor-embed" type="submit" name="_embed" value="{% trans "Embed File" %}" disabled />
53
</div>
51
    <div class="buttons">
52
      <input href="" id="asset-ckeditor-embed" type="submit" name="_embed" value="{% trans "Embed File" %}" disabled />
53
    </div>
54 54

  
55
{% endif %}
56
<script type="text/javascript">
55
  {% endif %}
56
  <script type="text/javascript">
57 57
    // helper functions
58 58
    function getUrlParam(paramName) {
59
        var reParam = new RegExp('(?:[\?&]|&amp;)' + paramName + '=([^&]+)', 'i') ;
60
        var match = window.location.search.match(reParam) ;
59
      var reParam = new RegExp('(?:[\?&]|&amp;)' + paramName + '=([^&]+)', 'i') ;
60
      var match = window.location.search.match(reParam) ;
61 61

  
62
        return (match && match.length > 1) ? match[1] : '' ;
62
      return (match && match.length > 1) ? match[1] : '' ;
63 63
    }
64 64

  
65 65
    // embedder
66 66
    $(document).on('click', '#asset-ckeditor-embed', function() {
67
        var funcNum = getUrlParam('CKEditorFuncNum');
68
        var fileUrl = $(this).attr('href');
69
        console.log(funcNum)
70
        console.log(fileUrl)
71
        window.opener.CKEDITOR.tools.callFunction(funcNum, fileUrl);
72
        window.close();
67
      var funcNum = getUrlParam('CKEditorFuncNum');
68
      var fileUrl = $(this).attr('href');
69
      console.log(funcNum)
70
      console.log(fileUrl)
71
      window.opener.CKEDITOR.tools.callFunction(funcNum, fileUrl);
72
      window.close();
73 73
    });
74 74
    console.log(window.opener.CKEDITOR)
75
</script>
75
  </script>
76 76
{% endblock %}
combo/apps/assets/templates/combo/manager_assets_fragment.html
6 6
      <th>{% trans "Size" %}</th>
7 7
      <th></th>
8 8
      {% if not asset_for_ckeditor %}
9
      <th></th>
9
        <th></th>
10 10
      {% endif %}
11 11
    </tr>
12 12
  </thead>
13 13
  <tbody>
14 14
    {% for asset in object_list %}
15
    <tr class="{{ asset.css_classes }}" data-href="{{ asset.src }}">
16
      <td>
17
        {% if asset_for_ckeditor %}
18
          {{ asset.name }}
19
        {% elif asset.src %}
20
          <a href="{{ asset.src }}">{{ asset.name }}</a>
21
        {% else %}
22
          {{ asset.name }} <span class="not-defined">({% trans "not defined" %})</span>
23
        {% endif %}
24
      <td>{% if asset.size %}{{ asset.size|filesizeformat }}{% else %}-{% endif %}</td>
25
      <td class="image">{% if asset.is_image %}<img data-href="{{ asset.src }}" src="{{ asset.thumb }}"/>{% endif %}</td>
26
      {% if not asset_for_ckeditor %}
27
      <td class="actions">
28
        {% if asset.key %}{# theme asset #}
29
        <a href="{% url 'combo-manager-slot-asset-upload' key=asset.key %}{% if cell_reference %}?cell_reference={{ cell_reference }}{% endif %}"
30
           class="overwrite" rel="popup">{% trans 'Overwrite' %}</a>
31
        {% if asset.asset %}
32
        <a href="{% url 'combo-manager-slot-asset-delete' key=asset.key %}{% if cell_reference %}?cell_reference={{ cell_reference }}{% endif %}"
33
           class="delete" rel="popup">{% trans 'Delete' %}</a>
34
        {% endif %}
35
        {% else %}
36
        <a href="{% url 'combo-manager-asset-overwrite' %}?img={{asset.filepath|iriencode}}"
37
           class="overwrite" rel="popup">{% trans 'Overwrite' %}</a>
38
        <a href="{% url 'combo-manager-asset-delete' %}?img={{asset.filepath|iriencode}}"
39
           class="delete" rel="popup">{% trans 'Delete' %}</a>
40
        {% endif %}
41
      </td>
42
      {% endif %}
43
    </tr>
15
      <tr class="{{ asset.css_classes }}" data-href="{{ asset.src }}">
16
        <td>
17
          {% if asset_for_ckeditor %}
18
            {{ asset.name }}
19
          {% elif asset.src %}
20
            <a href="{{ asset.src }}">{{ asset.name }}</a>
21
          {% else %}
22
            {{ asset.name }} <span class="not-defined">({% trans "not defined" %})</span>
23
          {% endif %}
24
          <td>{% if asset.size %}{{ asset.size|filesizeformat }}{% else %}-{% endif %}</td>
25
          <td class="image">{% if asset.is_image %}<img data-href="{{ asset.src }}" src="{{ asset.thumb }}"/>{% endif %}</td>
26
          {% if not asset_for_ckeditor %}
27
            <td class="actions">
28
              {% if asset.key %}{# theme asset #}
29
                <a href="{% url 'combo-manager-slot-asset-upload' key=asset.key %}{% if cell_reference %}?cell_reference={{ cell_reference }}{% endif %}"
30
                  class="overwrite" rel="popup">{% trans 'Overwrite' %}</a>
31
                {% if asset.asset %}
32
                  <a href="{% url 'combo-manager-slot-asset-delete' key=asset.key %}{% if cell_reference %}?cell_reference={{ cell_reference }}{% endif %}"
33
                    class="delete" rel="popup">{% trans 'Delete' %}</a>
34
                {% endif %}
35
              {% else %}
36
                <a href="{% url 'combo-manager-asset-overwrite' %}?img={{asset.filepath|iriencode}}"
37
                  class="overwrite" rel="popup">{% trans 'Overwrite' %}</a>
38
                <a href="{% url 'combo-manager-asset-delete' %}?img={{asset.filepath|iriencode}}"
39
                  class="delete" rel="popup">{% trans 'Delete' %}</a>
40
              {% endif %}
41
            </td>
42
          {% endif %}
43
        </tr>
44 44
    {% endfor %}
45 45
  </tbody>
46 46
</table>
combo/apps/assets/templates/combo/manager_assets_import.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans "Assets Import" %}</h2>
5
  <h2>{% trans "Assets Import" %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9 9

  
10
<form method="post" enctype="multipart/form-data">
11
  {% csrf_token %}
12
  <p>
13
    {% trans "Assets import allows you to integrate assets exported from another site." %}
14
  </p>
15
  {{ form.as_p }}
16
  <div class="buttons">
17
    <button class="submit-button">{% trans "Import" %}</button>
18
    <a class="cancel" href="{% url 'combo-manager-assets' %}">{% trans 'Cancel' %}</a>
19
  </div>
20
</form>
10
  <form method="post" enctype="multipart/form-data">
11
    {% csrf_token %}
12
    <p>
13
      {% trans "Assets import allows you to integrate assets exported from another site." %}
14
    </p>
15
    {{ form.as_p }}
16
    <div class="buttons">
17
      <button class="submit-button">{% trans "Import" %}</button>
18
      <a class="cancel" href="{% url 'combo-manager-assets' %}">{% trans 'Cancel' %}</a>
19
    </div>
20
  </form>
21 21
{% endblock %}
combo/apps/assets/templates/combo/manager_slot_assets.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans 'Assets' %}</h2>
5
  <h2>{% trans 'Assets' %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block breadcrumb %}
9
{{ block.super }}
10
<a href="{% url 'combo-manager-assets' %}">{% trans 'Assets' %}</a>
9
  {{ block.super }}
10
  <a href="{% url 'combo-manager-assets' %}">{% trans 'Assets' %}</a>
11 11
{% endblock %}
12 12

  
13 13
{% block content %}
14 14

  
15
<div id="assets-listing">
16
{% include "combo/manager_assets_fragment.html" %}
17
</div>
15
  <div id="assets-listing">
16
    {% include "combo/manager_assets_fragment.html" %}
17
  </div>
18 18

  
19 19
{% endblock %}
combo/apps/calendar/templates/calendar/booking_calendar_cell.html
1 1
{% load i18n calendar %}
2 2
{% block cell-content %}
3 3

  
4
{% if cell.title %}
5
<h2>
6
    <span>{{cell.title}}</span>
7
    {% if calendar %}
8
    <span class="calinfo">
9
        {% with calendar.get_first_available_slot as slot %}
10
        ({% if slot %}{% trans "Next available slot:" %} {{ slot.date_time|date:"DATETIME_FORMAT"}}{% else %}{% trans "No available slots." %}{% endif %})
11
        {% endwith %}
12
    </span>
13
    {% endif %}
14
</h2>
15
{% endif %}
4
  {% if cell.title %}
5
    <h2>
6
      <span>{{cell.title}}</span>
7
      {% if calendar %}
8
        <span class="calinfo">
9
          {% with calendar.get_first_available_slot as slot %}
10
            ({% if slot %}{% trans "Next available slot:" %} {{ slot.date_time|date:"DATETIME_FORMAT"}}{% else %}{% trans "No available slots." %}{% endif %})
11
          {% endwith %}
12
        </span>
13
      {% endif %}
14
    </h2>
15
  {% endif %}
16 16

  
17
{% if error %}
17
  {% if error %}
18 18
    <div><p>{{ error }}</p></div>
19
{% else %}
19
  {% else %}
20 20
    <div class="calcontent">
21
    {% include 'calendar/booking_calendar_content.html' %}
21
      {% include 'calendar/booking_calendar_content.html' %}
22 22
    </div>
23
{% endif %}
23
  {% endif %}
24 24

  
25 25

  
26
<style>.calinfo { font-style: italic; font-size: 80%; }</style>
26
  <style>.calinfo { font-style: italic; font-size: 80%; }</style>
27 27
{% endblock %}
combo/apps/calendar/templates/calendar/booking_calendar_content.html
1 1
{% load i18n calendar %}
2 2

  
3 3
{% if calendar_days.has_other_pages %}
4
<p class="paginator">
4
  <p class="paginator">
5 5

  
6
{% if calendar_days.has_previous %}
7
<a class="previous calchunk" href="?chunk_{{ cell.pk }}={{ calendar_days.previous_page_number }}" data-content-url="{% url 'ajax-calendar-content' pk=cell.pk %}?chunk_{{cell.pk}}={{ calendar_days.previous_page_number }}">{% trans "previous" %}</a>
8
{% else %}
9
<span class="previous">{% trans "previous" %}</span>
10
{% endif %}
11
<span class="current">
12
    {{ calendar_days.number }} / {{ calendar_days.paginator.num_pages }}
13
</span>
14
{% if calendar_days.has_next %}
15
<a class="next calchunk" href="?chunk_{{ cell.pk }}={{ calendar_days.next_page_number }}" data-content-url="{% url 'ajax-calendar-content' pk=cell.pk %}?chunk_{{cell.pk}}={{ calendar_days.next_page_number }}">{% trans "next" %}</a>
16
{% else %}
17
<span class="next">{% trans "next" %}</span>
18
{% endif %}
19
</p>
6
    {% if calendar_days.has_previous %}
7
      <a class="previous calchunk" href="?chunk_{{ cell.pk }}={{ calendar_days.previous_page_number }}" data-content-url="{% url 'ajax-calendar-content' pk=cell.pk %}?chunk_{{cell.pk}}={{ calendar_days.previous_page_number }}">{% trans "previous" %}</a>
8
    {% else %}
9
      <span class="previous">{% trans "previous" %}</span>
10
    {% endif %}
11
    <span class="current">
12
      {{ calendar_days.number }} / {{ calendar_days.paginator.num_pages }}
13
    </span>
14
    {% if calendar_days.has_next %}
15
      <a class="next calchunk" href="?chunk_{{ cell.pk }}={{ calendar_days.next_page_number }}" data-content-url="{% url 'ajax-calendar-content' pk=cell.pk %}?chunk_{{cell.pk}}={{ calendar_days.next_page_number }}">{% trans "next" %}</a>
16
    {% else %}
17
      <span class="next">{% trans "next" %}</span>
18
    {% endif %}
19
  </p>
20 20
{% endif %}
21 21

  
22 22
{% if calendar_days %}
23
<form method="POST" action="{% url 'calendar-booking' pk=cell.pk %}?chunk_{{cell.pk}}={{calendar_days.number}}">
23
  <form method="POST" action="{% url 'calendar-booking' pk=cell.pk %}?chunk_{{cell.pk}}={{calendar_days.number}}">
24 24
    {% csrf_token %}
25 25
    <table id="cal-table-{{cell.pk}}">
26
        <thead>
27
            <tr>
28
                <th></th>
29
                {% for day in calendar_days %}
30
                <th>{{day|date:"SHORT_DATE_FORMAT"}}</th>
31
                {% endfor %}
32
            </tr>
33
        </thead>
34
        <tbody>
35
            {% for slot in calendar_slots %}
36
            <tr>
37
                <th>{{slot|date:"TIME_FORMAT"}}</th>
38
                {% for day in calendar_days %}
39
                {% get_day_slot calendar day=day slot=slot as value %}
40
                {% if not value.exist %}
26
      <thead>
27
        <tr>
28
          <th></th>
29
          {% for day in calendar_days %}
30
            <th>{{day|date:"SHORT_DATE_FORMAT"}}</th>
31
          {% endfor %}
32
        </tr>
33
      </thead>
34
      <tbody>
35
        {% for slot in calendar_slots %}
36
          <tr>
37
            <th>{{slot|date:"TIME_FORMAT"}}</th>
38
            {% for day in calendar_days %}
39
              {% get_day_slot calendar day=day slot=slot as value %}
40
              {% if not value.exist %}
41 41
                <td class="absent"></td>
42
                {% elif value.available %}
42
              {% elif value.available %}
43 43
                <td class="available">
44
                    <input type="checkbox" name="slots" value="{{value.label}}" id="slot-{{cell.pk}}-{{value.label}}"/>
45
                    <label for="slot-{{cell.pk}}-{{value.label}}"></label>
44
                  <input type="checkbox" name="slots" value="{{value.label}}" id="slot-{{cell.pk}}-{{value.label}}"/>
45
                  <label for="slot-{{cell.pk}}-{{value.label}}"></label>
46 46
                </td>
47
                {% else %}
47
              {% else %}
48 48
                <td class="unavailable"></td>
49
                {% endif %}
50
                {% endfor %}
51
            </tr>
49
              {% endif %}
52 50
            {% endfor %}
53
        </tbody>
51
          </tr>
52
        {% endfor %}
53
      </tbody>
54 54
    </table>
55 55
    <button class="submit-button">{% trans "Book" context "booking" %}</button>
56
</form>
56
  </form>
57 57
{% endif %}
combo/apps/dashboard/templates/combo/dashboard_cell_icons.html
1 1
{% load i18n dashboard %}
2 2
{% block content %}
3
{% if user.is_authenticated %}
4
<span class="dashboard-cell-icons">
5
{% if not in_dashboard %}
6
  {% with tile=cell|as_dashboard_cell:request.user %}
7
    {% if tile %}
8
    <a class="remove-from-dashboard" href="{% url 'combo-dashboard-remove-tile' cell_reference=tile.cell.get_reference %}"></a>
9
    {% else %}
10
    <a class="add-to-dashboard" href="{% url 'combo-dashboard-add-tile' cell_reference=cell.get_reference %}"></a>
11
    {% endif %}
12
  {% endwith %}
13
{% else %}
14
  <a class="remove-from-dashboard" href="{% url 'combo-dashboard-remove-tile' cell_reference=cell.get_reference %}"></a>
15
{% endif %}
16
</span>
17
{% endif %}
3
  {% if user.is_authenticated %}
4
    <span class="dashboard-cell-icons">
5
      {% if not in_dashboard %}
6
        {% with tile=cell|as_dashboard_cell:request.user %}
7
          {% if tile %}
8
            <a class="remove-from-dashboard" href="{% url 'combo-dashboard-remove-tile' cell_reference=tile.cell.get_reference %}"></a>
9
          {% else %}
10
            <a class="add-to-dashboard" href="{% url 'combo-dashboard-add-tile' cell_reference=cell.get_reference %}"></a>
11
          {% endif %}
12
        {% endwith %}
13
      {% else %}
14
        <a class="remove-from-dashboard" href="{% url 'combo-dashboard-remove-tile' cell_reference=cell.get_reference %}"></a>
15
      {% endif %}
16
    </span>
17
  {% endif %}
18 18
{% endblock %}
combo/apps/dashboard/templates/combo/dashboardcell.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
{% for tile in tiles %}
4
{% with cell=tile.cell %}
5
<div class="cell {{ cell.css_class_names }} {% if cell.slug %}{{cell.slug}}{% endif %}"
6
     data-ajax-cell-url="{{ site_base }}{{ cell.get_ajax_url }}"
7
     data-ajax-cell-loading-message="{{ cell.loading_message }}"
8
     data-ajax-cell-error-message="{% trans "Loading error" %}"
9
     {% if cell.ajax_refresh %}
10
     data-ajax-cell-refresh="{{ cell.ajax_refresh }}"
11
     {% endif %}><div>{% render_cell cell %}</div></div>
12
{% endwith %}
13
{% endfor %}
3
  {% for tile in tiles %}
4
    {% with cell=tile.cell %}
5
      <div class="cell {{ cell.css_class_names }} {% if cell.slug %}{{cell.slug}}{% endif %}"
6
        data-ajax-cell-url="{{ site_base }}{{ cell.get_ajax_url }}"
7
        data-ajax-cell-loading-message="{{ cell.loading_message }}"
8
        data-ajax-cell-error-message="{% trans "Loading error" %}"
9
        {% if cell.ajax_refresh %}
10
          data-ajax-cell-refresh="{{ cell.ajax_refresh }}"
11
        {% endif %}><div>{% render_cell cell %}</div></div>
12
    {% endwith %}
13
  {% endfor %}
14 14
{% endblock %}
combo/apps/dataviz/templates/combo/chart-filters.html
1 1
{% load i18n %}
2 2

  
3 3
{% block cell-content %}
4
<h2>{{ cell.title }}</h2>
4
  <h2>{{ cell.title }}</h2>
5 5

  
6
<div>
7
  {% if form.fields %}
8
  <form method='get' enctype='multipart/form-data' id='chart-filters'>
9
    {{ form.as_p }}
10
    <div class='buttons'>
11
      <button class='submit-button'>{% trans 'Refresh' %}</button>
12
    </div>
13
  </form>
14
  {% else %}
15
  <p>
16
  {% blocktrans trimmed %}
17
  No filters are available. Note that only filters that are shared between all chart cells will appear. Furthermore, in case they have a value, it must be the same accross all cells.
18
  {% endblocktrans %}
19
  </p>
20
  {% endif %}
21
</div>
6
  <div>
7
    {% if form.fields %}
8
      <form method='get' enctype='multipart/form-data' id='chart-filters'>
9
        {{ form.as_p }}
10
        <div class='buttons'>
11
          <button class='submit-button'>{% trans 'Refresh' %}</button>
12
        </div>
13
      </form>
14
    {% else %}
15
      <p>
16
        {% blocktrans trimmed %}
17
          No filters are available. Note that only filters that are shared between all chart cells will appear. Furthermore, in case they have a value, it must be the same accross all cells.
18
        {% endblocktrans %}
19
      </p>
20
    {% endif %}
21
  </div>
22 22

  
23 23

  
24
<script>
25
  $(function () {
26
    if (!$('body').data('filters-cell-id')) {
27
      $('body').data('filters-cell-id', Math.random().toString(36).slice(2, 7));
24
  <script>
25
    $(function () {
26
      if (!$('body').data('filters-cell-id')) {
27
        $('body').data('filters-cell-id', Math.random().toString(36).slice(2, 7));
28 28

  
29
      var loaded_cell_count = 0;
30
      document.querySelectorAll('div.chartngcell embed').forEach(graph => {
31
        graph.addEventListener('load', function() {
29
        var loaded_cell_count = 0;
30
        document.querySelectorAll('div.chartngcell embed').forEach(graph => {
31
          graph.addEventListener('load', function() {
32 32
            if (++loaded_cell_count == $('div.chartngcell embed').length) {
33 33
              combo_load_cell($('.chart-filters-cell'));
34 34
              loaded_cell_count = 0;
35
          }
35
            }
36
          });
36 37
        });
37
      });
38
    }
39

  
40
    start_field = $('#id_time_range_start');
41
    end_field = $('#id_time_range_end');
42
    $('#id_time_range').change(function() {
43
      if(this.value == 'range') {
44
        start_field.parent().show();
45
        end_field.parent().show();
46
      } else {
47
        start_field.parent().hide();
48
        end_field.parent().hide();
49 38
      }
50
    }).change();
51
    $('#chart-filters').submit(function(e) {
52
      e.preventDefault();
53
      $(window).trigger('combo:refresh-graphs');
54
      chart_cell = $(this).parents('.cell');
55
      ajax_cell_url = "{{ site_base }}{{ cell.get_ajax_url }}";
56
      new_url = ajax_cell_url + '?filters_cell_id=' + $('body').data('filters-cell-id') + '&' + $(this).serialize();
57
      chart_cell.data('ajax-cell-url', new_url);
39

  
40
      start_field = $('#id_time_range_start');
41
      end_field = $('#id_time_range_end');
42
      $('#id_time_range').change(function() {
43
        if(this.value == 'range') {
44
          start_field.parent().show();
45
          end_field.parent().show();
46
        } else {
47
          start_field.parent().hide();
48
          end_field.parent().hide();
49
        }
50
      }).change();
51
      $('#chart-filters').submit(function(e) {
52
        e.preventDefault();
53
        $(window).trigger('combo:refresh-graphs');
54
        chart_cell = $(this).parents('.cell');
55
        ajax_cell_url = "{{ site_base }}{{ cell.get_ajax_url }}";
56
        new_url = ajax_cell_url + '?filters_cell_id=' + $('body').data('filters-cell-id') + '&' + $(this).serialize();
57
        chart_cell.data('ajax-cell-url', new_url);
58
      });
58 59
    });
59
  });
60
</script>
60
  </script>
61 61
{% endblock %}
combo/apps/dataviz/templates/combo/chartngcell.html
1 1
{% load i18n %}
2 2
{% if cell.title %}<h2>{{cell.title}}</h2>{% endif %}
3 3
{% if cell.chart_type == "table" or cell.chart_type == "table-inverted" %}
4
<div id="chart-{{cell.id}}"></div>
5
<script>
6
$(function() {
7
  var extra_context = $('#chart-{{cell.id}}').parents('.cell').data('extra-context');
8
  $(window).on('combo:refresh-graphs', function() {
9
    $.ajax({
10
      url : "{% url 'combo-dataviz-graph' cell=cell.id %}" + get_graph_querystring(extra_context),
11
      type: 'GET',
12
      success: function(data) {
13
          $('#chart-{{cell.id}}').html(data);
14
      }
4
  <div id="chart-{{cell.id}}"></div>
5
  <script>
6
    $(function() {
7
      var extra_context = $('#chart-{{cell.id}}').parents('.cell').data('extra-context');
8
      $(window).on('combo:refresh-graphs', function() {
9
        $.ajax({
10
          url : "{% url 'combo-dataviz-graph' cell=cell.id %}" + get_graph_querystring(extra_context),
11
          type: 'GET',
12
          success: function(data) {
13
            $('#chart-{{cell.id}}').html(data);
14
          }
15
        });
16
      }).trigger('combo:refresh-graphs');
15 17
    });
16
  }).trigger('combo:refresh-graphs');
17
});
18
</script>
18
  </script>
19 19
{% else %}
20
<div style="min-height: {{cell.height}}px">
21
<embed id="chart-{{cell.id}}" type="image/svg+xml" style="width: 100%"/>
22
</div>
23
<script>
24
$(function() {
25
  var last_width = 1;
26
  var extra_context = $('#chart-{{cell.id}}').parents('.cell').data('extra-context');
27
  $(window).on('load resize gadjo:sidepage-toggled combo:resize-graphs', function() {
28
    var chart_cell = $('#chart-{{cell.id}}').parent();
29
    var new_width = Math.floor($(chart_cell).width());
30
    var ratio = new_width / last_width;
31
    if (ratio > 1.2 || ratio < 0.8) {
32
      $('#chart-{{cell.id}}').attr('src', "{% url 'combo-dataviz-graph' cell=cell.id %}" +  get_graph_querystring(extra_context, new_width));
33
      last_width = new_width;
34
    }
35
  }).trigger('combo:resize-graphs');
36
  $(window).on('combo:refresh-graphs', function() {
37
    $('#chart-{{cell.id}}').attr('src', "{% url 'combo-dataviz-graph' cell=cell.id %}" + get_graph_querystring(extra_context, last_width));
38
  });
39
});
40
</script>
20
  <div style="min-height: {{cell.height}}px">
21
    <embed id="chart-{{cell.id}}" type="image/svg+xml" style="width: 100%"/>
22
  </div>
23
  <script>
24
    $(function() {
25
      var last_width = 1;
26
      var extra_context = $('#chart-{{cell.id}}').parents('.cell').data('extra-context');
27
      $(window).on('load resize gadjo:sidepage-toggled combo:resize-graphs', function() {
28
        var chart_cell = $('#chart-{{cell.id}}').parent();
29
        var new_width = Math.floor($(chart_cell).width());
30
        var ratio = new_width / last_width;
31
        if (ratio > 1.2 || ratio < 0.8) {
32
          $('#chart-{{cell.id}}').attr('src', "{% url 'combo-dataviz-graph' cell=cell.id %}" +  get_graph_querystring(extra_context, new_width));
33
          last_width = new_width;
34
        }
35
      }).trigger('combo:resize-graphs');
36
      $(window).on('combo:refresh-graphs', function() {
37
        $('#chart-{{cell.id}}').attr('src', "{% url 'combo-dataviz-graph' cell=cell.id %}" + get_graph_querystring(extra_context, last_width));
38
      });
39
    });
40
  </script>
41 41
{% endif %}
combo/apps/dataviz/templates/combo/chartngcell_form.html
1 1
<div style="position: relative">
2
{{ form.as_p }}
3
{% if cell.statistic and cell.chart_type != "table" and cell.chart_type != "table-inverted" %}
4
<div style="position: absolute; right: 0; top: 0; width: 300px; height: 150px">
5
  <embed type="image/svg+xml" src="{% url 'combo-dataviz-graph' cell=cell.id %}?width=300&height=150"/>
6
</div>
7
{% endif %}
2
  {{ form.as_p }}
3
  {% if cell.statistic and cell.chart_type != "table" and cell.chart_type != "table-inverted" %}
4
    <div style="position: absolute; right: 0; top: 0; width: 300px; height: 150px">
5
      <embed type="image/svg+xml" src="{% url 'combo-dataviz-graph' cell=cell.id %}?width=300&height=150"/>
6
    </div>
7
  {% endif %}
8 8
</div>
9 9

  
10 10
<script>
11
	$(function () {
12
		start_field = $('#id_cdataviz_chartngcell-{{ cell.pk }}-time_range_start');
13
		end_field = $('#id_cdataviz_chartngcell-{{ cell.pk }}-time_range_end');
14
		start_field_template = $('#id_cdataviz_chartngcell-{{ cell.pk }}-time_range_start_template');
15
		end_field_template = $('#id_cdataviz_chartngcell-{{ cell.pk }}-time_range_end_template');
16
		$('#id_cdataviz_chartngcell-{{ cell.pk }}-time_range').change(function() {
17
			if(this.value == 'range') {
18
				start_field.parent().show();
19
				end_field.parent().show();
20
			} else {
21
				start_field.parent().hide();
22
				end_field.parent().hide();
23
			}
24
			if(this.value == 'range-template') {
25
				start_field_template.parent().show();
26
				end_field_template.parent().show();
27
			} else {
28
				start_field_template.parent().hide();
29
				end_field_template.parent().hide();
30
			}
31
		}).change();
32
	});
11
  $(function () {
12
    start_field = $('#id_cdataviz_chartngcell-{{ cell.pk }}-time_range_start');
13
    end_field = $('#id_cdataviz_chartngcell-{{ cell.pk }}-time_range_end');
14
    start_field_template = $('#id_cdataviz_chartngcell-{{ cell.pk }}-time_range_start_template');
15
    end_field_template = $('#id_cdataviz_chartngcell-{{ cell.pk }}-time_range_end_template');
16
    $('#id_cdataviz_chartngcell-{{ cell.pk }}-time_range').change(function() {
17
      if(this.value == 'range') {
18
        start_field.parent().show();
19
        end_field.parent().show();
20
      } else {
21
        start_field.parent().hide();
22
        end_field.parent().hide();
23
      }
24
      if(this.value == 'range-template') {
25
        start_field_template.parent().show();
26
        end_field_template.parent().show();
27
      } else {
28
        start_field_template.parent().hide();
29
        end_field_template.parent().hide();
30
      }
31
    }).change();
32
  });
33 33
</script>
combo/apps/dataviz/templates/combo/gauge-cell.html
1 1
{% block cell-content %}
2
<div
3
     data-combo-gauge="true"
4
     {% if jsonp %}
5
        data-gauge-count-jsonp-url="{{data_source_url}}"
6
     {% else %}
7
        data-gauge-count-url="{% url 'combo-ajax-gauge-count' cell=cell.id %}"
8
     {% endif %}
9
     data-gauge-max-value="{{max_value|default_if_none:100}}" class="bo-block">
10
  <canvas style="width: 100%;">
11
  </canvas>
12
  {% if title %}
13
    {% if url %}<a href="{{url}}">{% endif %}{{title}}{% if url %}</a>{% endif %}
14
  {% endif %}
15
</div>
2
  <div
3
    data-combo-gauge="true"
4
    {% if jsonp %}
5
      data-gauge-count-jsonp-url="{{data_source_url}}"
6
    {% else %}
7
      data-gauge-count-url="{% url 'combo-ajax-gauge-count' cell=cell.id %}"
8
    {% endif %}
9
    data-gauge-max-value="{{max_value|default_if_none:100}}" class="bo-block">
10
    <canvas style="width: 100%;">
11
    </canvas>
12
    {% if title %}
13
      {% if url %}<a href="{{url}}">{% endif %}{{title}}{% if url %}</a>{% endif %}
14
    {% endif %}
15
  </div>
16 16
{% endblock %}
combo/apps/family/templates/combo/family/manager/weekly_agenda_cell_form.html
1 1
{% extends "combo/cell_form.html" %}
2 2

  
3 3
{% block cell-form %}
4
{{ block.super }}
5
<script>
6
  $('#id_cfamily_weeklyagendacell-{{ cell.pk }}-agenda_type').on('change', function() {
7
    if ($(this).val() == 'manual') {
8
      $('#id_cfamily_weeklyagendacell-{{ cell.pk }}-agenda_references_template').parent().show();
9
      $('#id_cfamily_weeklyagendacell-{{ cell.pk }}-agenda_categories').parent().hide();
10
    } else {
11
      $('#id_cfamily_weeklyagendacell-{{ cell.pk }}-agenda_references_template').parent().hide();
12
      $('#id_cfamily_weeklyagendacell-{{ cell.pk }}-agenda_categories').parent().show();
13
    }
14
  });
15
  $('#id_cfamily_weeklyagendacell-{{ cell.pk }}-agenda_type').change();
16
</script>
4
  {{ block.super }}
5
  <script>
6
    $('#id_cfamily_weeklyagendacell-{{ cell.pk }}-agenda_type').on('change', function() {
7
      if ($(this).val() == 'manual') {
8
        $('#id_cfamily_weeklyagendacell-{{ cell.pk }}-agenda_references_template').parent().show();
9
        $('#id_cfamily_weeklyagendacell-{{ cell.pk }}-agenda_categories').parent().hide();
10
      } else {
11
        $('#id_cfamily_weeklyagendacell-{{ cell.pk }}-agenda_references_template').parent().hide();
12
        $('#id_cfamily_weeklyagendacell-{{ cell.pk }}-agenda_categories').parent().show();
13
      }
14
    });
15
    $('#id_cfamily_weeklyagendacell-{{ cell.pk }}-agenda_type').change();
16
  </script>
17 17
{% endblock %}
combo/apps/family/templates/combo/family/weekly_agenda.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
{% if json.data %}
3
  {% if json.data %}
4 4

  
5
{% if cell.title %}
6
<h2>
7
    {{ cell.title }}
8
</h2>
9
{% endif %}
5
    {% if cell.title %}
6
      <h2>
7
        {{ cell.title }}
8
      </h2>
9
    {% endif %}
10 10

  
11
<div class="weekly-agenda-cell weekly-agenda-cell-{{ cell.pk }}" data-cell-id="{{ cell.pk }}">
12
{% with first_monday=json.data.0.date|date|adjust_to_week_monday last_item=json.data|last %}
13
  {% with last_day=last_item.date|date|adjust_to_week_monday|add_days:6 %}
14
    {% now 'Y-m-W' as current_week %}
15
    {% spaceless %}
16
      <button class="weekly-agenda-cell--previous-week">←</button>
17
      <div class="weekly-agenda-cell--week-list">
18
        <div class="weekly-agenda-cell--slider">
19
          {% for day in first_monday|iterate_days_until:last_day %}
20
            {% if day.weekday == 0 %}
21
              {% with sunday=day|add_days:6 %}
22
                <div class="weekly-agenda-cell--week-title {% if current_week == day|date:'Y-m-W' %}current{% endif %}"
23
                     {% if booking_form_url %}data-edit-url="{{ booking_form_url }}{% if '?' in booking_form_url %}&{% else %}?{% endif %}current={{ day|adjust_to_week_monday|date:'Y-m-d' }}"{% endif %}>
24
                  {% blocktrans with day_date=day|date:'d/m' sunday_date=sunday|date:'d/m' %}Week<br class="weekbreak"> of {{ day_date }} to {{ sunday_date }}{% endblocktrans %}
25
                </div>
26
              {% endwith %}
27
            {% endif %}
28
            <div class="weekly-agenda-cell--day-item" data-weekday="{{ day.weekday }}">
29
              <div class="weekly-agenda-cell--day-title" >
30
                {{ day|date:"l d/m" }}
31
              </div>
32
              {% with day_str=day|date:"Y-m-d" %}
33
                {% for item in json.data %}
34
                  {% if item.date == day_str %}
35
                    <div class="weekly-agenda-cell--activity-item {% if item.disabled %}disabled{% endif %}">
36
                      <div class="weekly-agenda-cell--activity-status {{ item.status }}"/></div>
37
                      <div class="weekly-agenda-cell--activity-label"/>{{ item.label }}</div>
38
                    </div>
11
    <div class="weekly-agenda-cell weekly-agenda-cell-{{ cell.pk }}" data-cell-id="{{ cell.pk }}">
12
      {% with first_monday=json.data.0.date|date|adjust_to_week_monday last_item=json.data|last %}
13
        {% with last_day=last_item.date|date|adjust_to_week_monday|add_days:6 %}
14
          {% now 'Y-m-W' as current_week %}
15
          {% spaceless %}
16
            <button class="weekly-agenda-cell--previous-week">←</button>
17
            <div class="weekly-agenda-cell--week-list">
18
              <div class="weekly-agenda-cell--slider">
19
                {% for day in first_monday|iterate_days_until:last_day %}
20
                  {% if day.weekday == 0 %}
21
                    {% with sunday=day|add_days:6 %}
22
                      <div class="weekly-agenda-cell--week-title {% if current_week == day|date:'Y-m-W' %}current{% endif %}"
23
                        {% if booking_form_url %}data-edit-url="{{ booking_form_url }}{% if '?' in booking_form_url %}&{% else %}?{% endif %}current={{ day|adjust_to_week_monday|date:'Y-m-d' }}"{% endif %}>
24
                        {% blocktrans with day_date=day|date:'d/m' sunday_date=sunday|date:'d/m' %}Week<br class="weekbreak"> of {{ day_date }} to {{ sunday_date }}{% endblocktrans %}
25
                      </div>
26
                    {% endwith %}
39 27
                  {% endif %}
28
                  <div class="weekly-agenda-cell--day-item" data-weekday="{{ day.weekday }}">
29
                    <div class="weekly-agenda-cell--day-title" >
30
                      {{ day|date:"l d/m" }}
31
                    </div>
32
                    {% with day_str=day|date:"Y-m-d" %}
33
                      {% for item in json.data %}
34
                        {% if item.date == day_str %}
35
                          <div class="weekly-agenda-cell--activity-item {% if item.disabled %}disabled{% endif %}">
36
                            <div class="weekly-agenda-cell--activity-status {{ item.status }}"/></div>
37
                          <div class="weekly-agenda-cell--activity-label"/>{{ item.label }}</div>
38
                          </div>
39
                        {% endif %}
40
                      {% endfor %}
41
                    {% endwith %}
42
                    <div class="weekly-agenda-cell--day-no-activity">{% trans "No activity this week" %}</div>
43
                  </div>
40 44
                {% endfor %}
41
              {% endwith %}
42
              <div class="weekly-agenda-cell--day-no-activity">{% trans "No activity this week" %}</div>
45
              </div>
43 46
            </div>
44
          {% endfor %}
45
        </div>
46
      </div>
47
      <button class="weekly-agenda-cell--next-week">→</button>
48
      {% if booking_form_url %}
49
      <a class="pk-button weekly-agenda-cell--edit-btn">
50
        {% trans "Update bookings" %}
51
      </a>
52
      {% endif %}
53
    {% endspaceless %}
54
  {% endwith %}
55
{% endwith %}
56
</div>
57
{% endif %}
47
            <button class="weekly-agenda-cell--next-week">→</button>
48
            {% if booking_form_url %}
49
              <a class="pk-button weekly-agenda-cell--edit-btn">
50
                {% trans "Update bookings" %}
51
              </a>
52
            {% endif %}
53
          {% endspaceless %}
54
        {% endwith %}
55
      {% endwith %}
56
    </div>
57
  {% endif %}
58 58
{% endblock %}
combo/apps/fargo/templates/combo/fargo/recent-documents-cell.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
<div class="recent-documents links-list">
4
<h2>{% trans 'Recent Documents' %}</h2>
5
{% if results %}
6
  <ul>
7
    {% for object in results %}
8
    <li><a href="{{object.url}}">{{object.label}}</a></li>
9
    {% endfor %}
10
  </ul>
11
{% else %}
12
<p>{% trans "You don't have any recent document." %}</p>
13
{% endif %}
14
</div>
3
  <div class="recent-documents links-list">
4
    <h2>{% trans 'Recent Documents' %}</h2>
5
    {% if results %}
6
      <ul>
7
        {% for object in results %}
8
          <li><a href="{{object.url}}">{{object.label}}</a></li>
9
        {% endfor %}
10
      </ul>
11
    {% else %}
12
      <p>{% trans "You don't have any recent document." %}</p>
13
    {% endif %}
14
  </div>
15 15
{% endblock %}
combo/apps/gallery/templates/combo/gallery_image_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
{% if object.id %}
6
<h2>{% trans "Edit Image" %}</h2>
7
{% else %}
8
<h2>{% trans "New Image" %}</h2>
9
{% endif %}
5
  {% if object.id %}
6
    <h2>{% trans "Edit Image" %}</h2>
7
  {% else %}
8
    <h2>{% trans "New Image" %}</h2>
9
  {% endif %}
10 10
{% endblock %}
11 11

  
12 12
{% block content %}
13 13

  
14
<form method="post" enctype="multipart/form-data">
15
  {% csrf_token %}
16
  {{ form.as_p }}
17
  <div class="buttons">
18
    <button>{% trans "Save" %}</button>
19
    {% if object.id %}
20
    <a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
21
    {% else %}
22
    <a class="cancel" href="{% url 'combo-manager-homepage' %}">{% trans 'Cancel' %}</a>
23
    {% endif %}
24
  </div>
25
</form>
14
  <form method="post" enctype="multipart/form-data">
15
    {% csrf_token %}
16
    {{ form.as_p }}
17
    <div class="buttons">
18
      <button>{% trans "Save" %}</button>
19
      {% if object.id %}
20
        <a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
21
      {% else %}
22
        <a class="cancel" href="{% url 'combo-manager-homepage' %}">{% trans 'Cancel' %}</a>
23
      {% endif %}
24
    </div>
25
  </form>
26 26
{% endblock %}
combo/apps/gallery/templates/combo/gallery_manager.html
2 2
{% load static thumbnail i18n %}
3 3

  
4 4
{% block cell-form %}
5
<ul class="gallery" id="gallery-{{cell.id}}" data-order-url="{% url 'combo-gallery-image-order' gallery_pk=cell.id %}">
6
{% for image in cell.image_set.all %}
7
<li data-object-id="{{image.id}}">
8
{% thumbnail image.image "120x120" crop="50% 25%" as im %}
9
  <img height="120" src="{{ im.url }}"/>
10
{% endthumbnail %}
11
  <span class="image-actions">
12
  <a rel="popup" class="image-edit icon-edit" href="{% url 'combo-gallery-image-edit' gallery_pk=cell.id pk=image.id %}"></a>
13
  <a class="image-delete icon-remove-sign" href="{% url 'combo-gallery-image-delete' gallery_pk=cell.id pk=image.id %}"></a>
14
  </span>
15
</li>
16
{% endfor %}
17
<li><a class="button" rel="popup" href="{% url 'combo-gallery-image-add' gallery_pk=cell.id %}">{% trans 'Add an Image' %}</a></li>
18
</ul>
5
  <ul class="gallery" id="gallery-{{cell.id}}" data-order-url="{% url 'combo-gallery-image-order' gallery_pk=cell.id %}">
6
    {% for image in cell.image_set.all %}
7
      <li data-object-id="{{image.id}}">
8
        {% thumbnail image.image "120x120" crop="50% 25%" as im %}
9
          <img height="120" src="{{ im.url }}"/>
10
        {% endthumbnail %}
11
        <span class="image-actions">
12
          <a rel="popup" class="image-edit icon-edit" href="{% url 'combo-gallery-image-edit' gallery_pk=cell.id pk=image.id %}"></a>
13
          <a class="image-delete icon-remove-sign" href="{% url 'combo-gallery-image-delete' gallery_pk=cell.id pk=image.id %}"></a>
14
        </span>
15
      </li>
16
    {% endfor %}
17
    <li><a class="button" rel="popup" href="{% url 'combo-gallery-image-add' gallery_pk=cell.id %}">{% trans 'Add an Image' %}</a></li>
18
  </ul>
19 19

  
20
<script src="{% static "js/combo.gallery.js" %}"></script>
21
<script>gallery($('#gallery-{{cell.id}}'));</script>
20
  <script src="{% static "js/combo.gallery.js" %}"></script>
21
  <script>gallery($('#gallery-{{cell.id}}'));</script>
22 22

  
23
<div class="edit-form">
24
{{form.as_p}}
25
</div>
23
  <div class="edit-form">
24
    {{form.as_p}}
25
  </div>
26 26

  
27 27
{% endblock %}
combo/apps/gallery/templates/combo/gallerycell.html
1 1
{% load thumbnail %}
2 2

  
3 3
{% block cell-content %}
4
{% if cell.title %}
5
<h2>{{ cell.title }}</h2>
6
{% endif %}
7
<div class="gallery" id="gallery-{{cell.id}}">
8
{% for image in cell.image_set.all %}
9
  {% if forloop.first %}
10
{% thumbnail image.image "640x480" crop="50% 25%" as im %}
11
<div class="main-image">
12
<img src="{{ im.url }}" title="{{ image.title }}"/>
13
</div>
14
<div>
15
{% endthumbnail %}
4
  {% if cell.title %}
5
    <h2>{{ cell.title }}</h2>
16 6
  {% endif %}
17
{% thumbnail image.image "60x60" crop="50% 25%" as im %}
18
{% thumbnail image.image "640x480" crop="50% 25%" as im_large %}
19
<a data-image-large="{{ im_large.url }}" class="image-switch" href=""><img src="{{ im.url }}"
20
        {% if image.title %} title="{{image.title}}" {% endif %}/></a>
21
{% endthumbnail %}
22
{% endthumbnail %}
23
{% endfor %}
24
</div>
25
</div>
26
<script type="text/javascript">
27
$(function() {
28
  var $gallery = $('#gallery-{{cell.id}}');
29
  $gallery.find('.image-switch').on('click', function() {
30
    $gallery.find('div.main-image img').attr('src', $(this).data('image-large'));
31
    var $title = $(this).find('img').attr('title') || '';
32
    $gallery.find('div.main-image img').attr('title', $title);
33
    return false;
34
  });
35
});
36
</script>
7
  <div class="gallery" id="gallery-{{cell.id}}">
8
    {% for image in cell.image_set.all %}
9
      {% if forloop.first %}
10
        {% thumbnail image.image "640x480" crop="50% 25%" as im %}
11
          <div class="main-image">
12
            <img src="{{ im.url }}" title="{{ image.title }}"/>
13
          </div>
14
          <div>
15
        {% endthumbnail %}
16
      {% endif %}
17
      {% thumbnail image.image "60x60" crop="50% 25%" as im %}
18
        {% thumbnail image.image "640x480" crop="50% 25%" as im_large %}
19
          <a data-image-large="{{ im_large.url }}" class="image-switch" href=""><img src="{{ im.url }}"
20
            {% if image.title %} title="{{image.title}}" {% endif %}/></a>
21
        {% endthumbnail %}
22
      {% endthumbnail %}
23
    {% endfor %}
24
  </div>
25
  </div>
26
  <script type="text/javascript">
27
    $(function() {
28
      var $gallery = $('#gallery-{{cell.id}}');
29
      $gallery.find('.image-switch').on('click', function() {
30
        $gallery.find('div.main-image img').attr('src', $(this).data('image-large'));
31
        var $title = $(this).find('img').attr('title') || '';
32
        $gallery.find('div.main-image img').attr('title', $title);
33
        return false;
34
      });
35
    });
36
  </script>
37 37
{% endblock %}
combo/apps/kb/templates/combo/latest-page-updates-cell.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
<h2>{% trans "Latest Page Updates" %}</h2>
4
<div class="links-list">
5
  <ul class="latest-page-updates-cell--list">
6
    {% for page in pages %}
7
    <li class="latest-page-updates-cell--item">
8
      <a href="{{ page.get_online_url }}">
9
        <span class="latest-page-updates-cell--item-title">{{ page.title }}</span>
10
        <time
11
          class="latest-page-updates-cell--item-date"
12
          datetime="{{ page.last_update_timestamp|datetime|date:"c" }}"
13
          >{% trans "on" %} {{ page.last_update_timestamp }}</time>
14
        {% if page.is_new %}
15
        <span class="latest-page-updates-cell--item-isnew">{% trans "(new page)" %}</span>
16
        {% endif %}
17
      </a>
18
    </li>
19
    {% endfor %}
20
  </ul>
21
</div>
3
  <h2>{% trans "Latest Page Updates" %}</h2>
4
  <div class="links-list">
5
    <ul class="latest-page-updates-cell--list">
6
      {% for page in pages %}
7
        <li class="latest-page-updates-cell--item">
8
          <a href="{{ page.get_online_url }}">
9
            <span class="latest-page-updates-cell--item-title">{{ page.title }}</span>
10
            <time
11
              class="latest-page-updates-cell--item-date"
12
              datetime="{{ page.last_update_timestamp|datetime|date:"c" }}"
13
            >{% trans "on" %} {{ page.last_update_timestamp }}</time>
14
            {% if page.is_new %}
15
              <span class="latest-page-updates-cell--item-isnew">{% trans "(new page)" %}</span>
16
            {% endif %}
17
          </a>
18
        </li>
19
      {% endfor %}
20
    </ul>
21
  </div>
22 22
{% endblock %}
combo/apps/lingo/templates/lingo/basketitem_error_list.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans 'Payments in error' %}</h2>
5
  <h2>{% trans 'Payments in error' %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block breadcrumb %}
9
{{ block.super }}
10
<a href="{% url 'lingo-manager-payment-error-list' %}">{% trans 'Payments in error' %}</a>
9
  {{ block.super }}
10
  <a href="{% url 'lingo-manager-payment-error-list' %}">{% trans 'Payments in error' %}</a>
11 11
{% endblock %}
12 12

  
13 13
{% block content %}
14
<div>
15
<form>
16
  <p><input name="q" type="search" value="{{ query }}"> <button>{% trans 'Search' %}</button></p>
17
</form>
14
  <div>
15
    <form>
16
      <p><input name="q" type="search" value="{{ query }}"> <button>{% trans 'Search' %}</button></p>
17
    </form>
18 18

  
19
{% if object_list %}
20
<table class="main">
21
<thead>
22
  <tr>
23
   <th>{% trans 'Item' %}</th>
24
   <th>{% trans 'Amount' %}</th>
25
   <th colspan="2">{% trans 'Date' %}</th>
26
  </tr>
27
</thead>
28
<tbody>
29
{% for object in object_list %}
30
<tr>
31
  <td>{% if object.source_url %}<a href="{{ object.source_url }}">{{ object.subject }}</a>{% else %}{{ object.subject }}{% endif %}</td>
32
  <td class="price">{{ object.amount }} €</td>
33
  <td>{{ object.payment_date }}</td>
34
  <td>
35
    {% if object.transaction_status != 99 %}
36
      <a href="{% url 'lingo-manager-homepage' %}?q={{ object.bank_transaction_id }}">{% trans "See transaction" %}</a>
37
      {% if object.source_url %}
38
        <br />
39
        <a href="{% url 'lingo-manager-basket-item-mark-as-notified' object.pk %}">{% trans "Mark as notified" %}</a>
40
      {% endif %}
41
    {% endif %}
42
  </td>
43
</tr>
44
{% endfor %}
45
</tbody>
46
</table>
19
    {% if object_list %}
20
      <table class="main">
21
        <thead>
22
          <tr>
23
            <th>{% trans 'Item' %}</th>
24
            <th>{% trans 'Amount' %}</th>
25
            <th colspan="2">{% trans 'Date' %}</th>
26
          </tr>
27
        </thead>
28
        <tbody>
29
          {% for object in object_list %}
30
            <tr>
31
              <td>{% if object.source_url %}<a href="{{ object.source_url }}">{{ object.subject }}</a>{% else %}{{ object.subject }}{% endif %}</td>
32
              <td class="price">{{ object.amount }} €</td>
33
              <td>{{ object.payment_date }}</td>
34
              <td>
35
                {% if object.transaction_status != 99 %}
36
                  <a href="{% url 'lingo-manager-homepage' %}?q={{ object.bank_transaction_id }}">{% trans "See transaction" %}</a>
37
                  {% if object.source_url %}
38
                    <br />
39
                    <a href="{% url 'lingo-manager-basket-item-mark-as-notified' object.pk %}">{% trans "Mark as notified" %}</a>
40
                  {% endif %}
41
                {% endif %}
42
              </td>
43
            </tr>
44
          {% endfor %}
45
        </tbody>
46
      </table>
47 47

  
48
{% include "gadjo/pagination.html" %}
48
      {% include "gadjo/pagination.html" %}
49 49

  
50
{% else %}
51
<div class="big-msg-info">
52
  {% blocktrans %}
53
  This site doesn't have any payment in error.
54
  {% endblocktrans %}
55
</div>
56
{% endif %}
57
</div>
50
    {% else %}
51
      <div class="big-msg-info">
52
        {% blocktrans %}
53
          This site doesn't have any payment in error.
54
        {% endblocktrans %}
55
      </div>
56
    {% endif %}
57
  </div>
58 58
{% endblock %}
combo/apps/lingo/templates/lingo/combo/basket.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
{% if regies %}
4
<h2>{% trans "Basket" %}</h2>
5
<div class="lingo-basket-cell--content">
6
{% for regie_info in regies %}
7
<div class="lingo-basket-cell--regie">
8
{% if regies|length != 1 %}<h3 class="lingo-basket-cell--regie-name">{{regie_info.regie.label}}</h3>{% endif %}
9
<ul class="lingo-basket-cell--list">
10
  {% for item in regie_info.items %}
11
  <li class="lingo-basket-cell--item">
12
    <a class="lingo-basket-cell--item-label" {% if item.source_url %}href="{{ item.source_url }}{% endif %}">{{ item.subject }}</a>
13
    <span class="lingo-basket-cell--item-price">{{ item.amount }} €</span>
14
    <span class="lingo-basket-cell--item-actions">
15
      {% if regie_info.regie.can_pay_only_one_basket_item %}
16
      <a id="{{ item.pk }}" class="lingo-basket-cell--item-pay" href="{{ item.payment_url }}?next_url={{ cell.page.get_online_url }}">{% trans "Pay" %}</a>
17
      {% endif %}
18
      {% if item.user_cancellable %}
19
      <a class="lingo-basket-cell--item-remove" role="button" rel="popup" href="{% url 'lingo-cancel-item' pk=item.id %}">{% trans 'remove' %}</a>
20
      {% endif %}
21
    </span>
22
  </li>
23
  {% endfor %}
24
</ul>
25
</div>
3
  {% if regies %}
4
    <h2>{% trans "Basket" %}</h2>
5
    <div class="lingo-basket-cell--content">
6
      {% for regie_info in regies %}
7
        <div class="lingo-basket-cell--regie">
8
          {% if regies|length != 1 %}<h3 class="lingo-basket-cell--regie-name">{{regie_info.regie.label}}</h3>{% endif %}
9
          <ul class="lingo-basket-cell--list">
10
            {% for item in regie_info.items %}
11
              <li class="lingo-basket-cell--item">
12
                <a class="lingo-basket-cell--item-label" {% if item.source_url %}href="{{ item.source_url }}{% endif %}">{{ item.subject }}</a>
13
              <span class="lingo-basket-cell--item-price">{{ item.amount }} €</span>
14
              <span class="lingo-basket-cell--item-actions">
15
                {% if regie_info.regie.can_pay_only_one_basket_item %}
16
                  <a id="{{ item.pk }}" class="lingo-basket-cell--item-pay" href="{{ item.payment_url }}?next_url={{ cell.page.get_online_url }}">{% trans "Pay" %}</a>
17
                {% endif %}
18
                {% if item.user_cancellable %}
19
                  <a class="lingo-basket-cell--item-remove" role="button" rel="popup" href="{% url 'lingo-cancel-item' pk=item.id %}">{% trans 'remove' %}</a>
20
                {% endif %}
21
              </span>
22
              </li>
23
            {% endfor %}
24
          </ul>
25
        </div>
26 26

  
27
{% if not regie_info.regie.can_pay_only_one_basket_item %}
28
<form action="{% url 'lingo-pay' %}" method="POST">
29
{% csrf_token %}
30
<p class="lingo-basket-cell--total"><strong>{% trans "Total:" %}</strong> {{ regie_info.total }} €</p>
31
<input type="hidden" name="next_url" value="{{ cell.page.get_online_url }}" />
32
<input type="hidden" name="regie" value="{{regie_info.regie.id}}" />
33
<button class="lingo-basket-cell--pay">{% trans "Pay" %}</button>
34
</form>
35
{% endif %}
27
        {% if not regie_info.regie.can_pay_only_one_basket_item %}
28
          <form action="{% url 'lingo-pay' %}" method="POST">
29
            {% csrf_token %}
30
            <p class="lingo-basket-cell--total"><strong>{% trans "Total:" %}</strong> {{ regie_info.total }} €</p>
31
            <input type="hidden" name="next_url" value="{{ cell.page.get_online_url }}" />
32
            <input type="hidden" name="regie" value="{{regie_info.regie.id}}" />
33
            <button class="lingo-basket-cell--pay">{% trans "Pay" %}</button>
34
          </form>
35
        {% endif %}
36 36

  
37
{% endfor %}
38
{% endif %}
39
</div>
37
      {% endfor %}
38
  {% endif %}
39
  </div>
40 40
{% endblock %}
combo/apps/lingo/templates/lingo/combo/basket_link.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
{% if total %}
4
<p><a href="{{site_base}}{{basket_url}}">{% trans 'Basket:' %}
5
  {% blocktrans count counter=items|length %}
6
  {{counter}} item
7
  {% plural %}
8
  {{counter}} items
9
  {% endblocktrans %}
10
  ({{ total }} €)</a></p>
11
</form>
12
{% endif %}
3
  {% if total %}
4
    <p><a href="{{site_base}}{{basket_url}}">{% trans 'Basket:' %}
5
      {% blocktrans count counter=items|length %}
6
        {{counter}} item
7
      {% plural %}
8
        {{counter}} items
9
      {% endblocktrans %}
10
      ({{ total }} €)</a></p>
11
    </form>
12
  {% endif %}
13 13
{% endblock %}
combo/apps/lingo/templates/lingo/combo/cancel-item.html
3 3
  <head>
4 4
    <meta charset="utf-8"/>
5 5
  </head>
6
<body>
7
  <div>
8
    <form method="POST" action="{% url 'lingo-cancel-item' pk=object.id %}">
9
    {% csrf_token %}
10
{% blocktrans with subject=object.subject %}
11
Are you really sure you want to remove "{{subject}}"?
12
{% endblocktrans %}
13
<div class="buttons">
14
  <button>{% trans 'Remove' %}</button>
15
  <a class="cancel" href="{{ basket_url }}">{% trans 'Cancel' %}</a>
16
</div>
17
        </form>
6
  <body>
7
    <div>
8
      <form method="POST" action="{% url 'lingo-cancel-item' pk=object.id %}">
9
        {% csrf_token %}
10
        {% blocktrans with subject=object.subject %}
11
          Are you really sure you want to remove "{{subject}}"?
12
        {% endblocktrans %}
13
        <div class="buttons">
14
          <button>{% trans 'Remove' %}</button>
15
          <a class="cancel" href="{{ basket_url }}">{% trans 'Cancel' %}</a>
18 16
        </div>
19
</body>
17
      </form>
18
    </div>
19
  </body>
20 20
</html>
combo/apps/lingo/templates/lingo/combo/invoice_email_notification_body.html
4 4
  <body style="max-width: 60em">
5 5
    <p>{% blocktrans with id=invoice.id creation_date=invoice.creation_date|date:"DATE_FORMAT" amount=invoice.amount %}
6 6
      We inform you that your invoice nr. {{ id }} issued on {{ creation_date }} of amount of {{ amount }}€ is available.
7
      {% endblocktrans %}</p>
7
    {% endblocktrans %}</p>
8 8
    {% if invoice.online_payment %}
9
    <p>{% blocktrans %}You can <a href="{{ payment_url }}">view and pay it online</a>.{% endblocktrans %}</p>
9
      <p>{% blocktrans %}You can <a href="{{ payment_url }}">view and pay it online</a>.{% endblocktrans %}</p>
10 10
    {% else %}
11
    <p>{% blocktrans %}You can view it on the <a href="{{ portal_url }}">portal</a>.{% endblocktrans %}</p>
12
    {% if invoice.no_online_payment_reason == 'autobilling' %}
13
    <p>{% blocktrans with debit_date=invoice.payment_limit_date|date:"DATE_FORMAT" %}The amount of this invoice will be debited from your account at {{ debit_date }}.{% endblocktrans %}
14
    </p>
15
    {% endif %}
11
      <p>{% blocktrans %}You can view it on the <a href="{{ portal_url }}">portal</a>.{% endblocktrans %}</p>
12
      {% if invoice.no_online_payment_reason == 'autobilling' %}
13
        <p>{% blocktrans with debit_date=invoice.payment_limit_date|date:"DATE_FORMAT" %}The amount of this invoice will be debited from your account at {{ debit_date }}.{% endblocktrans %}
14
        </p>
15
      {% endif %}
16 16
    {% endif %}
17 17
  </body>
18 18
</html>
combo/apps/lingo/templates/lingo/combo/invoice_fullpage.html
1 1
{% load i18n %}<!DOCTYPE html>
2 2
<html>
3
<head>
3
  <head>
4 4
    <meta charset="UTF-8">
5 5
    <title>{% blocktrans %}Invoice number {{ number }}{% endblocktrans %}</title>
6
</head>
7
<body class="invoice_fullpage">
6
  </head>
7
  <body class="invoice_fullpage">
8 8

  
9
{% if messages %}
10
<ul class="messages">
11
    {% for message in messages %}
12
    <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
13
    {% endfor %}
14
</ul>
15
{% endif %}
9
    {% if messages %}
10
      <ul class="messages">
11
        {% for message in messages %}
12
          <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
13
        {% endfor %}
14
      </ul>
15
    {% endif %}
16 16

  
17
  <div class="invoice">
18
    {% include 'lingo/combo/item.html' %}
19
  </div>
20
</body>
17
    <div class="invoice">
18
      {% include 'lingo/combo/item.html' %}
19
    </div>
20
  </body>
21 21
</html>
combo/apps/lingo/templates/lingo/combo/item.html
2 2
<div id="content">
3 3
  <div id="appbar">
4 4
    {% if item %}
5
    <h2>
6
      {% blocktrans with number=item.display_id %}
7
      Item nr. {{ number }}
8
      {% endblocktrans %}
9
    </h2>
10
    <form action="{% url 'lingo-pay' %}" method="POST">
11
      <div id="item">
12
        {% if item.subject %}
13
        <h4 class="label">
14
          {% blocktrans with label=item.subject %}
15
          Label: {{ label }}
16
          {% endblocktrans %}
17
        </h4>
18
        {% endif %}
19
        <div class="total_amount">
20
          {% blocktrans with amount=item.total_amount|floatformat:"2" %}
21
          Total amount: <span class="amount">{{ amount }}€</span>
22
          {% endblocktrans %}
23
        </div>
24
        {% if item.amount %}
25
        <div class="amount">
26
          {% blocktrans with amount=item.amount|floatformat:"2" %}
27
          Amount to pay: <span class="amount">{{ amount }}€</span>
28
          {% endblocktrans %}
29
        </div>
30
        {% endif %}
31
        {% if item.amount_paid %}
32
        <div class="amount_paid">
33
          {% blocktrans with amount=item.amount_paid|floatformat:"2" %}
34
          Amount already paid: <span class="amount">{{ amount }}€</span>
35
          {% endblocktrans %}
36
        </div>
37
        {% endif %}
38
        <div class="issued">{% trans "Issue date:" %} <span class="timestamp">{{ item.creation_date|date:"SHORT_DATE_FORMAT" }}</span></div>
39
        {% if item.payment_limit_date %}
40
        <div class="invoice-payment-limit-date">{% trans "Payment due date:" %}
41
            <span class="timestamp">{{ item.payment_limit_date|date:"SHORT_DATE_FORMAT" }} {% trans "(up to and including)" %}</span></div>
42
        {% endif %}
43
        {% if item.payment_date %}
44
        <div class="paid paid-info">{% trans "Invoice paid on" %} <span class="timestamp">{{ item.payment_date|date:"SHORT_DATE_FORMAT" }}</span></div>
45
        {% elif item.paid %}
46
        <div class="paid paid-info">{% trans "Invoice has been paid." %}</div>
47
        {% endif %}
48
        {% if item.no_online_payment_reason_details %}
49
        <div class="no-online-payment-reason"><span>{{ item.no_online_payment_reason_details }}</span></div>
50
        {% endif %}
51
        {% if item.waiting_date and not item.paid %}
52
        <div class="paid paid-info">{% trans "Waiting for payment." %}</div>
53
        {% endif %}
54
        {% if not item.paid and item.online_payment and item.amount >= regie.payment_min_amount and not item.waiting_date %}
55
        {% csrf_token %}
56
        {% if not user.is_authenticated %}
57
          <div class="email">
58
            <label for="email">{% trans 'Email:' %}</label>
59
            <input type="email" id="email" name="email" required/>
5
      <h2>
6
        {% blocktrans with number=item.display_id %}
7
          Item nr. {{ number }}
8
        {% endblocktrans %}
9
      </h2>
10
      <form action="{% url 'lingo-pay' %}" method="POST">
11
        <div id="item">
12
          {% if item.subject %}
13
            <h4 class="label">
14
              {% blocktrans with label=item.subject %}
15
                Label: {{ label }}
16
              {% endblocktrans %}
17
            </h4>
18
          {% endif %}
19
          <div class="total_amount">
20
            {% blocktrans with amount=item.total_amount|floatformat:"2" %}
21
              Total amount: <span class="amount">{{ amount }}€</span>
22
            {% endblocktrans %}
60 23
          </div>
61
        {% endif %}
24
          {% if item.amount %}
25
            <div class="amount">
26
              {% blocktrans with amount=item.amount|floatformat:"2" %}
27
                Amount to pay: <span class="amount">{{ amount }}€</span>
28
              {% endblocktrans %}
29
            </div>
30
          {% endif %}
31
          {% if item.amount_paid %}
32
            <div class="amount_paid">
33
              {% blocktrans with amount=item.amount_paid|floatformat:"2" %}
34
                Amount already paid: <span class="amount">{{ amount }}€</span>
35
              {% endblocktrans %}
36
            </div>
37
          {% endif %}
38
          <div class="issued">{% trans "Issue date:" %} <span class="timestamp">{{ item.creation_date|date:"SHORT_DATE_FORMAT" }}</span></div>
39
          {% if item.payment_limit_date %}
40
            <div class="invoice-payment-limit-date">{% trans "Payment due date:" %}
41
              <span class="timestamp">{{ item.payment_limit_date|date:"SHORT_DATE_FORMAT" }} {% trans "(up to and including)" %}</span></div>
42
          {% endif %}
43
          {% if item.payment_date %}
44
            <div class="paid paid-info">{% trans "Invoice paid on" %} <span class="timestamp">{{ item.payment_date|date:"SHORT_DATE_FORMAT" }}</span></div>
45
          {% elif item.paid %}
46
            <div class="paid paid-info">{% trans "Invoice has been paid." %}</div>
47
          {% endif %}
48
          {% if item.no_online_payment_reason_details %}
49
            <div class="no-online-payment-reason"><span>{{ item.no_online_payment_reason_details }}</span></div>
50
          {% endif %}
51
          {% if item.waiting_date and not item.paid %}
52
            <div class="paid paid-info">{% trans "Waiting for payment." %}</div>
53
          {% endif %}
54
          {% if not item.paid and item.online_payment and item.amount >= regie.payment_min_amount and not item.waiting_date %}
55
            {% csrf_token %}
56
            {% if not user.is_authenticated %}
57
              <div class="email">
58
                <label for="email">{% trans 'Email:' %}</label>
59
                <input type="email" id="email" name="email" required/>
60
              </div>
61
            {% endif %}
62 62

  
63
        <input type="hidden" name="regie" value="{{ regie.pk }}"/>
64
        <input type="hidden" name="item" value="{{ item.id  }}"/>
65
        <input type="hidden" name="next_url" value="{{ page.get_online_url }}" />
66
        {% if item_url %}
67
          <input type="hidden" name="item_url" value="{{ item_url }}"/>
68
        {% endif %}
69
        <div class="buttons">
70
          <button>{% trans "Pay" %}</button>
63
            <input type="hidden" name="regie" value="{{ regie.pk }}"/>
64
            <input type="hidden" name="item" value="{{ item.id  }}"/>
65
            <input type="hidden" name="next_url" value="{{ page.get_online_url }}" />
66
            {% if item_url %}
67
              <input type="hidden" name="item_url" value="{{ item_url }}"/>
68
            {% endif %}
69
            <div class="buttons">
70
              <button>{% trans "Pay" %}</button>
71
            </div>
72
          {% endif %}
71 73
        </div>
72
        {% endif %}
73
      </div>
74
    </form>
74
      </form>
75 75
    {% else %}
76 76
      <h2>{{ err_desc }}</h2>
77 77
      <form></form>
combo/apps/lingo/templates/lingo/combo/items.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
{% if errors or items or not cell.hide_if_empty %}
4
{% if title %}<h2>{{ title|safe }}</h2>{% endif %}
5
<div>
6
{% if text %}{{ text|safe }}{% endif %}
7
{% if errors %}
8
  <ul class="errorlist">
9
    {% for error in errors %}
10
      <li>{{ error }}</li>
11
    {% endfor %}
12
  </ul>
13
{% endif %}
14
{% if items %}
15
<div class="pk-table-wrapper">
16
<table class="invoices">
17
  <thead>
18
    <tr>
19
      <th class="invoice-id">{% trans "Number" %}</th>
20
      <th class="invoice-subject">{% trans "Label" %}</th>
21
      <th class="invoice-creation-date">{% trans "Issue date" %}</th>
22
      {% if with_payment_limit_date %}<th class="invoice-payment-limit-date">{% trans "Payment limit date" %}</th>{% endif %}
23
      <th class="invoice-amount">{% trans "Amount" %}</th>
24
      {% if with_amount_paid %}
25
      <th class="invoice-amount-paid">{% trans "Amount already paid" %}</th>
3
  {% if errors or items or not cell.hide_if_empty %}
4
    {% if title %}<h2>{{ title|safe }}</h2>{% endif %}
5
    <div>
6
      {% if text %}{{ text|safe }}{% endif %}
7
      {% if errors %}
8
        <ul class="errorlist">
9
          {% for error in errors %}
10
            <li>{{ error }}</li>
11
          {% endfor %}
12
        </ul>
26 13
      {% endif %}
27
      <td></td>
28
    </tr>
29
  </thead>
30
  <tbody>
31
  {% for item in items %}
32
  <tr{% if item.no_online_payment_reason %} class='{{ item.no_online_payment_reason }}-invoice'{% endif %}>
33
    <td class="invoice-id">{{ item.display_id }}</td>
34
    <td class="invoice-subject">{{ item.subject }}</td>
35
    <td class="invoice-creation-date">{{ item.creation_date|date:"SHORT_DATE_FORMAT" }}</td>
36
    {% if with_payment_limit_date %}<td class="invoice-payment-limit-date">{{ item.payment_limit_date|date:"SHORT_DATE_FORMAT" }}</td>{% endif %}
37
    {% if with_amount_paid %}
38
    <td class="invoice-amount amount">{% if item.amount %}{% blocktrans with amount=item.amount|floatformat:"2" %}
39
      {{ amount }}€
40
      {% endblocktrans %}{% endif %}
41
    </td>
42
    <td class="invoice-amount-paid amount">{% if item.amount_paid %}{% blocktrans with amount=item.amount_paid|floatformat:"2" %}
43
      {{ amount }}€
44
      {% endblocktrans %}{% endif %}
45
    </td>
46
    {% else %}
47
    <td class="invoice-amount amount">{% blocktrans with amount=item.total_amount|floatformat:"2" %}
48
      {{ amount }}€
49
      {% endblocktrans %}
50
    </td>
51
    {% endif %}
52
    {% if item.regie.is_remote %}
53
    <td>
54
      <a href="{% url 'view-item' regie_id=item.regie.pk item_crypto_id=item.crypto_id %}?page={{ cell.page.pk }}" rel="popup" class="icon-view">{% trans "View" %}
55
          {% if item.online_payment and item.amount >= item.regie.payment_min_amount and not item.waiting_date %}{% trans "and pay" %}{% endif %}
56
      </a>
57
      {% if item.has_pdf %}
58
      <br/><a href="{% url 'download-item-pdf' regie_id=item.regie.pk item_crypto_id=item.crypto_id %}" class="icon-pdf"
59
          >{% trans "Download" %}</a>
14
      {% if items %}
15
        <div class="pk-table-wrapper">
16
          <table class="invoices">
17
            <thead>
18
              <tr>
19
                <th class="invoice-id">{% trans "Number" %}</th>
20
                <th class="invoice-subject">{% trans "Label" %}</th>
21
                <th class="invoice-creation-date">{% trans "Issue date" %}</th>
22
                {% if with_payment_limit_date %}<th class="invoice-payment-limit-date">{% trans "Payment limit date" %}</th>{% endif %}
23
                <th class="invoice-amount">{% trans "Amount" %}</th>
24
                {% if with_amount_paid %}
25
                  <th class="invoice-amount-paid">{% trans "Amount already paid" %}</th>
26
                {% endif %}
27
                <td></td>
28
              </tr>
29
            </thead>
30
            <tbody>
31
              {% for item in items %}
32
                <tr{% if item.no_online_payment_reason %} class='{{ item.no_online_payment_reason }}-invoice'{% endif %}>
33
                  <td class="invoice-id">{{ item.display_id }}</td>
34
                  <td class="invoice-subject">{{ item.subject }}</td>
35
                  <td class="invoice-creation-date">{{ item.creation_date|date:"SHORT_DATE_FORMAT" }}</td>
36
                  {% if with_payment_limit_date %}<td class="invoice-payment-limit-date">{{ item.payment_limit_date|date:"SHORT_DATE_FORMAT" }}</td>{% endif %}
37
                  {% if with_amount_paid %}
38
                    <td class="invoice-amount amount">{% if item.amount %}{% blocktrans with amount=item.amount|floatformat:"2" %}
39
                      {{ amount }}€
40
                    {% endblocktrans %}{% endif %}
41
                    </td>
42
                    <td class="invoice-amount-paid amount">{% if item.amount_paid %}{% blocktrans with amount=item.amount_paid|floatformat:"2" %}
43
                      {{ amount }}€
44
                    {% endblocktrans %}{% endif %}
45
                    </td>
46
                  {% else %}
47
                    <td class="invoice-amount amount">{% blocktrans with amount=item.total_amount|floatformat:"2" %}
48
                      {{ amount }}€
49
                    {% endblocktrans %}
50
                    </td>
51
                  {% endif %}
52
                  {% if item.regie.is_remote %}
53
                    <td>
54
                      <a href="{% url 'view-item' regie_id=item.regie.pk item_crypto_id=item.crypto_id %}?page={{ cell.page.pk }}" rel="popup" class="icon-view">{% trans "View" %}
55
                        {% if item.online_payment and item.amount >= item.regie.payment_min_amount and not item.waiting_date %}{% trans "and pay" %}{% endif %}
56
                      </a>
57
                      {% if item.has_pdf %}
58
                        <br/><a href="{% url 'download-item-pdf' regie_id=item.regie.pk item_crypto_id=item.crypto_id %}" class="icon-pdf"
59
                        >{% trans "Download" %}</a>
60
                      {% endif %}
61
                    </td>
62
                  {% endif %}
63
                </tr>
64
              {% endfor %}
65
            </tbody>
66
          </table>
67
        </div>
68
      {% else %}
69
        {% trans "No items yet" %}
60 70
      {% endif %}
61
    </td>
62
    {% endif %}
63
  </tr>
64
  {% endfor %}
65
</tbody>
66
</table>
67
</div>
68
{% else %}
69
{% trans "No items yet" %}
70
{% endif %}
71
</div>
72
{% endif %}
71
    </div>
72
  {% endif %}
73 73
{% endblock %}
combo/apps/lingo/templates/lingo/combo/payment-status.html
2 2
{% load static i18n %}
3 3

  
4 4
{% block combo-content %}
5
{% block wait-js %}
6
<script>
7
function display_error(message) {
8
    $('#transaction-error').text(message);
9
    $('#transaction-error').show();
10
    $("#wait-msg").hide();
11
}
5
  {% block wait-js %}
6
    <script>
7
      function display_error(message) {
8
        $('#transaction-error').text(message);
9
        $('#transaction-error').show();
10
        $("#wait-msg").hide();
11
      }
12 12

  
13
$(function() {
14
    var next_url = '{{next_url}}';
15
    var transaction_id = '{{transaction_id}}';
16
    if (transaction_id === "") {
17
        display_error($('#transaction-error').data('error'));
18
    }
19
    else {
20
        $.ajax({
13
      $(function() {
14
        var next_url = '{{next_url}}';
15
        var transaction_id = '{{transaction_id}}';
16
        if (transaction_id === "") {
17
          display_error($('#transaction-error').data('error'));
18
        }
19
        else {
20
          $.ajax({
21 21
            url: `/api/lingo/transaction-status/${transaction_id}/`,
22 22
            success: function(data, status) {
23
                if (!data.wait) {
24
                    $('#wait-msg').text($('#wait-msg').data('continue'))
25
                    // wait a little to show messages
26
                    setTimeout(function(){location.href=next_url}, 3000);
27
                } else if (data.error) {
28
                    display_error(data.error_msg)
29
                } else {
30
                    setTimeout(wait_payment, 3000, next_url, transaction_id);
31
                }
23
              if (!data.wait) {
24
                $('#wait-msg').text($('#wait-msg').data('continue'))
25
                // wait a little to show messages
26
                setTimeout(function(){location.href=next_url}, 3000);
27
              } else if (data.error) {
28
                display_error(data.error_msg)
29
              } else {
30
                setTimeout(wait_payment, 3000, next_url, transaction_id);
31
              }
32 32
            },
33 33
            error: function(error) {
34
                display_error($('#transaction-status').data('error'));
35
                window.console && console.log(':(', error);
34
              display_error($('#transaction-status').data('error'));
35
              window.console && console.log(':(', error);
36 36
            }
37
        });
38
    }
39
});
40
</script>
41
{% endblock %}
37
          });
38
        }
39
      });
40
    </script>
41
  {% endblock %}
42 42

  
43
{% block wait-content%}
44
<div>
45
  {% block wait-message %}
46
  <h2 id="wait-msg" data-continue="{% trans "Wait a moment or click on 'Continue'." %}">{% trans "Please wait while your request is being processed..." %}</h2>
43
  {% block wait-content%}
44
    <div>
45
      {% block wait-message %}
46
        <h2 id="wait-msg" data-continue="{% trans "Wait a moment or click on 'Continue'." %}">{% trans "Please wait while your request is being processed..." %}</h2>
47
      {% endblock %}
48
      <div id="transaction-error" class="errornotice" data-error="{% trans 'An error occured' %}" style="display: none;"></div>
49
      <p><a id="next-url" href="{{next_url}}">{% trans "Continue" %}</a></p>
50
    </p>
51
    </div>
47 52
  {% endblock %}
48
   <div id="transaction-error" class="errornotice" data-error="{% trans 'An error occured' %}" style="display: none;"></div>
49
   <p><a id="next-url" href="{{next_url}}">{% trans "Continue" %}</a></p>
50
   </p>
51
</div>
52
{% endblock %}
53 53
{% endblock %}
combo/apps/lingo/templates/lingo/combo/recent_transactions.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
<h2>{% trans "Recent Transactions" %}</h2>
4
<ul>
5
  {% for transaction in transactions %}
6
  <li>{{ transaction.start_date|date:"d E o H:i"|lower }}
7
    {% if transaction.is_paid %}
8
    <ul>
9
    {% for item in transaction.items.all %}
10
      <li>{{ item.subject }}: {{ item.amount }} €
11
       {% if item.source_url and item.user == request.user %}(<a href="{{ item.source_url}}">{% trans 'open' %}</a>){% endif %}</li>
3
  <h2>{% trans "Recent Transactions" %}</h2>
4
  <ul>
5
    {% for transaction in transactions %}
6
      <li>{{ transaction.start_date|date:"d E o H:i"|lower }}
7
        {% if transaction.is_paid %}
8
          <ul>
9
            {% for item in transaction.items.all %}
10
              <li>{{ item.subject }}: {{ item.amount }} €
11
                {% if item.source_url and item.user == request.user %}(<a href="{{ item.source_url}}">{% trans 'open' %}</a>){% endif %}</li>
12
            {% endfor %}
13
          </ul>
14
        {% else %}
15
          {{ transaction.get_status_label }}
16
        {% endif %}
17
      </li>
12 18
    {% endfor %}
13
    </ul>
14
    {% else %}
15
    {{ transaction.get_status_label }}
16
    {% endif %}
17
  </li>
18
  {% endfor %}
19
</ul>
19
  </ul>
20 20
{% endblock %}
combo/apps/lingo/templates/lingo/combo/self-declared-invoice-payment.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
{% if title %}<h2>{{ title }}</h2>{% endif %}
4
<div>
5
{% if text %}<p>{{ text|safe }}</p>{% endif %}
6
<form class="quixote" action="{% url 'lingo-self-invoice' cell_id=cell.id %}">
7
  <div class="widget">
8
    <div class="title">
9
      {% trans 'Invoice Number' %}
10
      <span class="required">*</span>
11
    </div>
12
    <div class="content">
13
      <input type="text" name="invoice-number" required="required">
14
    </div>
3
  {% if title %}<h2>{{ title }}</h2>{% endif %}
4
  <div>
5
    {% if text %}<p>{{ text|safe }}</p>{% endif %}
6
    <form class="quixote" action="{% url 'lingo-self-invoice' cell_id=cell.id %}">
7
      <div class="widget">
8
        <div class="title">
9
          {% trans 'Invoice Number' %}
10
          <span class="required">*</span>
11
        </div>
12
        <div class="content">
13
          <input type="text" name="invoice-number" required="required">
14
        </div>
15
      </div>
16
      <div class="widget">
17
        <div class="title">
18
          {% trans 'Invoice Amount' %}
19
          <span class="required">*</span>
20
        </div>
21
        <div class="content">
22
          <input type="text" name="invoice-amount" required="required" pattern="[1-9][0-9]*([,\.]?[0-9]+)?">
23
        </div>
24
      </div>
25
      <input type="hidden" name="page_path" value="{{page_path}}">
26
      <div class="buttons">
27
        <button>{% trans "Pay" %}</button>
28
      </div>
29
    </form>
15 30
  </div>
16
  <div class="widget">
17
    <div class="title">
18
      {% trans 'Invoice Amount' %}
19
      <span class="required">*</span>
20
    </div>
21
    <div class="content">
22
      <input type="text" name="invoice-amount" required="required" pattern="[1-9][0-9]*([,\.]?[0-9]+)?">
23
    </div>
24
  </div>
25
  <input type="hidden" name="page_path" value="{{page_path}}">
26
  <div class="buttons">
27
    <button>{% trans "Pay" %}</button>
28
  </div>
29
</form>
30
</div>
31 31
{% endblock %}
combo/apps/lingo/templates/lingo/manager_base.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans 'Online Payment' %}</h2>
5
  <h2>{% trans 'Online Payment' %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block breadcrumb %}
9
{{ block.super }}
10
<a href="{% url 'lingo-manager-homepage' %}">{% trans 'Online Payment' %}</a>
9
  {{ block.super }}
10
  <a href="{% url 'lingo-manager-homepage' %}">{% trans 'Online Payment' %}</a>
11 11
{% endblock %}
combo/apps/lingo/templates/lingo/payment_form.html
1 1
{% load i18n %}
2 2
<html>
3
<head>
4
</head>
5
<body onload="document.forms[0].submit()">
6
<p>
7
{% trans "Please wait while your browser is being redirected to the payment website..." %}
8
</p>
9
<form action="{{ form.url }}" method="{{ form.method }}" style="display: none">
10
  {% for field in form.fields %}
11
  <input type="{{ field.type }}" name="{{ field.name }}" value="{{ field.value }}"/>
12
  {% endfor %}
13
  <input type="submit">
14
</form>
15
</body>
3
  <head>
4
  </head>
5
  <body onload="document.forms[0].submit()">
6
    <p>
7
      {% trans "Please wait while your browser is being redirected to the payment website..." %}
8
    </p>
9
    <form action="{{ form.url }}" method="{{ form.method }}" style="display: none">
10
      {% for field in form.fields %}
11
        <input type="{{ field.type }}" name="{{ field.name }}" value="{{ field.value }}"/>
12
      {% endfor %}
13
      <input type="submit">
14
    </form>
15
  </body>
16 16
</html>
combo/apps/lingo/templates/lingo/paymentbackend_confirm_delete.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{{ view.model.get_verbose_name }}</h2>
5
  <h2>{{ view.model.get_verbose_name }}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9
<form method="post">
10
  {% csrf_token %}
11
  {% blocktrans %}Are you sure you want to delete this?{% endblocktrans %}
12
  <div class="buttons">
13
    <button class="delete-button">{% trans 'Delete' %}</button>
14
    <a class="cancel" href="{% url 'lingo-manager-paymentbackend-list' %}">{% trans 'Cancel' %}</a>
15
  </div>
16
</form>
9
  <form method="post">
10
    {% csrf_token %}
11
    {% blocktrans %}Are you sure you want to delete this?{% endblocktrans %}
12
    <div class="buttons">
13
      <button class="delete-button">{% trans 'Delete' %}</button>
14
      <a class="cancel" href="{% url 'lingo-manager-paymentbackend-list' %}">{% trans 'Cancel' %}</a>
15
    </div>
16
  </form>
17 17
{% endblock %}
combo/apps/lingo/templates/lingo/paymentbackend_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
{% if object.id %}
6
<h2>{% trans "Edit Payment backend" %}</h2>
7
{% else %}
8
<h2>{% trans "New Payment backend" %}</h2>
9
{% endif %}
5
  {% if object.id %}
6
    <h2>{% trans "Edit Payment backend" %}</h2>
7
  {% else %}
8
    <h2>{% trans "New Payment backend" %}</h2>
9
  {% endif %}
10 10
{% endblock %}
11 11

  
12 12
{% block content %}
13
<form method="post" enctype="multipart/form-data">
14
  {% csrf_token %}
15
  {{ form.as_p }}
16
  <div class="buttons">
17
    <button class="submit-button">{% trans "Save" %}</button>
18
    <a class="cancel" href="{% url 'lingo-manager-paymentbackend-list' %}">{% trans 'Cancel' %}</a>
19
  </div>
20
</form>
13
  <form method="post" enctype="multipart/form-data">
14
    {% csrf_token %}
15
    {{ form.as_p }}
16
    <div class="buttons">
17
      <button class="submit-button">{% trans "Save" %}</button>
18
      <a class="cancel" href="{% url 'lingo-manager-paymentbackend-list' %}">{% trans 'Cancel' %}</a>
19
    </div>
20
  </form>
21 21
{% endblock %}
combo/apps/lingo/templates/lingo/paymentbackend_list.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans 'Payment backends' %}</h2>
6
<span class="actions">
7
<a rel="popup" href="{% url 'lingo-manager-paymentbackend-add' %}">{% trans 'New' %}</a>
8
</span>
5
  <h2>{% trans 'Payment backends' %}</h2>
6
  <span class="actions">
7
    <a rel="popup" href="{% url 'lingo-manager-paymentbackend-add' %}">{% trans 'New' %}</a>
8
  </span>
9 9
{% endblock %}
10 10

  
11 11
{% block breadcrumb %}
12
{{ block.super }}
13
<a href="{% url 'lingo-manager-paymentbackend-list' %}">{% trans 'Payment backends' %}</a>
12
  {{ block.super }}
13
  <a href="{% url 'lingo-manager-paymentbackend-list' %}">{% trans 'Payment backends' %}</a>
14 14
{% endblock %}
15 15

  
16 16
{% block content %}
17 17

  
18
{% if object_list %}
19
<ul class="objects-list single-links">
20
 {% for payment_backend in object_list %}
21
 <li>
22
 <a href="{% url 'lingo-manager-paymentbackend-edit' pk=payment_backend.id %}">{{ payment_backend.label }}
23
   <span>({{payment_backend.service}})</span>
24
 </a>
25
  <a rel="popup" class="delete" href="{% url 'lingo-manager-paymentbackend-delete' pk=payment_backend.id %}">{% trans "remove" %}</a>
26
 </li>
27
 {% endfor %}
28
</ul>
29
{% else %}
30
<div class="big-msg-info">
31
  {% blocktrans %}
32
  This site doesn't have any payment backend yet. Click on the "New" button in the top
33
  right of the page to add a first one.
34
  {% endblocktrans %}
35
</div>
36
{% endif %}
18
  {% if object_list %}
19
    <ul class="objects-list single-links">
20
      {% for payment_backend in object_list %}
21
        <li>
22
          <a href="{% url 'lingo-manager-paymentbackend-edit' pk=payment_backend.id %}">{{ payment_backend.label }}
23
            <span>({{payment_backend.service}})</span>
24
          </a>
25
          <a rel="popup" class="delete" href="{% url 'lingo-manager-paymentbackend-delete' pk=payment_backend.id %}">{% trans "remove" %}</a>
26
        </li>
27
      {% endfor %}
28
    </ul>
29
  {% else %}
30
    <div class="big-msg-info">
31
      {% blocktrans %}
32
        This site doesn't have any payment backend yet. Click on the "New" button in the top
33
        right of the page to add a first one.
34
      {% endblocktrans %}
35
    </div>
36
  {% endif %}
37 37

  
38 38
{% endblock %}
combo/apps/lingo/templates/lingo/regie_confirm_delete.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{{ view.model.get_verbose_name }}</h2>
5
  <h2>{{ view.model.get_verbose_name }}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9
<form method="post">
10
  {% csrf_token %}
11
  {% blocktrans %}Are you sure you want to delete this?{% endblocktrans %}
12
  <div class="buttons">
13
    <button class="delete-button">{% trans 'Delete' %}</button>
14
    <a class="cancel" href="{% url 'lingo-manager-homepage' %}">{% trans 'Cancel' %}</a>
15
  </div>
16
</form>
9
  <form method="post">
10
    {% csrf_token %}
11
    {% blocktrans %}Are you sure you want to delete this?{% endblocktrans %}
12
    <div class="buttons">
13
      <button class="delete-button">{% trans 'Delete' %}</button>
14
      <a class="cancel" href="{% url 'lingo-manager-homepage' %}">{% trans 'Cancel' %}</a>
15
    </div>
16
  </form>
17 17
{% endblock %}
combo/apps/lingo/templates/lingo/regie_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
{% if object.id %}
6
<h2>{% trans "Edit Regie" %}</h2>
7
{% else %}
8
<h2>{% trans "New Regie" %}</h2>
9
{% endif %}
5
  {% if object.id %}
6
    <h2>{% trans "Edit Regie" %}</h2>
7
  {% else %}
8
    <h2>{% trans "New Regie" %}</h2>
9
  {% endif %}
10 10
{% endblock %}
11 11

  
12 12
{% block content %}
13
<form method="post" enctype="multipart/form-data">
14
  {% if object.pk %}
15
  {% if callback_url %}<p><label>{% trans "Callback URL:" %}</label> {{ callback_url }}</p>{% endif %}
16
  {% if return_url %}<p><label>{% trans "Return URL:" %}</label> {{ return_url }}</p>{% endif %}
17
  {% endif %}
18
  {% csrf_token %}
19
  {{ form.as_p }}
20
  <div class="buttons">
21
    <button class="submit-button">{% trans "Save" %}</button>
22
    <a class="cancel" href="{% url 'lingo-manager-regie-list' %}">{% trans 'Cancel' %}</a>
23
  </div>
24
</form>
13
  <form method="post" enctype="multipart/form-data">
14
    {% if object.pk %}
15
      {% if callback_url %}<p><label>{% trans "Callback URL:" %}</label> {{ callback_url }}</p>{% endif %}
16
      {% if return_url %}<p><label>{% trans "Return URL:" %}</label> {{ return_url }}</p>{% endif %}
17
    {% endif %}
18
    {% csrf_token %}
19
    {{ form.as_p }}
20
    <div class="buttons">
21
      <button class="submit-button">{% trans "Save" %}</button>
22
      <a class="cancel" href="{% url 'lingo-manager-regie-list' %}">{% trans 'Cancel' %}</a>
23
    </div>
24
  </form>
25 25
{% endblock %}
combo/apps/lingo/templates/lingo/regie_list.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans 'Regies' %}</h2>
6
<span class="actions">
7
<a rel="popup" href="{% url 'lingo-manager-regie-add' %}">{% trans 'New' %}</a>
8
</span>
5
  <h2>{% trans 'Regies' %}</h2>
6
  <span class="actions">
7
    <a rel="popup" href="{% url 'lingo-manager-regie-add' %}">{% trans 'New' %}</a>
8
  </span>
9 9
{% endblock %}
10 10

  
11 11
{% block breadcrumb %}
12
{{ block.super }}
13
<a href="{% url 'lingo-manager-regie-list' %}">{% trans 'Regies' %}</a>
12
  {{ block.super }}
13
  <a href="{% url 'lingo-manager-regie-list' %}">{% trans 'Regies' %}</a>
14 14
{% endblock %}
15 15

  
16 16
{% block content %}
17 17

  
18
{% if object_list %}
19
<ul class="objects-list single-links">
20
 {% for regie in object_list %}
21
 <li>
22
 <a href="{% url 'lingo-manager-regie-edit' pk=regie.id %}">{{ regie.label }}
23
   <span>({{regie.payment_backend.label}})</span>
24
   {% if regie.is_default %}<span class="extra-info">{% trans "(default regie)" %}</span>{% endif %}
25
 </a>
26
  <a rel="popup" class="delete" href="{% url 'lingo-manager-regie-delete' pk=regie.id %}">{% trans "remove" %}</a>
27
 </li>
28
 {% endfor %}
29
</ul>
30
{% else %}
31
<div class="big-msg-info">
32
  {% blocktrans %}
33
  This site doesn't have any regie yet. Click on the "New" button in the top
34
  right of the page to add a first one.
35
  {% endblocktrans %}
36
</div>
37
{% endif %}
18
  {% if object_list %}
19
    <ul class="objects-list single-links">
20
      {% for regie in object_list %}
21
        <li>
22
          <a href="{% url 'lingo-manager-regie-edit' pk=regie.id %}">{{ regie.label }}
23
            <span>({{regie.payment_backend.label}})</span>
24
            {% if regie.is_default %}<span class="extra-info">{% trans "(default regie)" %}</span>{% endif %}
25
          </a>
26
          <a rel="popup" class="delete" href="{% url 'lingo-manager-regie-delete' pk=regie.id %}">{% trans "remove" %}</a>
27
        </li>
28
      {% endfor %}
29
    </ul>
30
  {% else %}
31
    <div class="big-msg-info">
32
      {% blocktrans %}
33
        This site doesn't have any regie yet. Click on the "New" button in the top
34
        right of the page to add a first one.
35
      {% endblocktrans %}
36
    </div>
37
  {% endif %}
38 38

  
39 39
{% endblock %}
combo/apps/lingo/templates/lingo/tipi_form.html
9 9
      <li>{% trans "Your browser is blocking popups but they are required to start the payment, make sure they are allowed for this site." %}</li>
10 10
    </ul>
11 11
    {% if regies|length > 1 %}
12
    <p><label>{% trans "Community identifier" %}</label>
13
      <select id="numcli">
14
        {% for regie in regies %}
15
        <option value="{{ regie.0 }}">{{ regie.1 }}</option>
16
        {% endfor %}
17
      </select>
18
    </p>
12
      <p><label>{% trans "Community identifier" %}</label>
13
        <select id="numcli">
14
          {% for regie in regies %}
15
            <option value="{{ regie.0 }}">{{ regie.1 }}</option>
16
          {% endfor %}
17
        </select>
18
      </p>
19 19
    {% else %}
20
    <input type="hidden" id="numcli" value="{{ regies.0.0 }}" />
20
      <input type="hidden" id="numcli" value="{{ regies.0.0 }}" />
21 21
    {% endif %}
22 22
    <ul class="errorlist" id="refdet_error" style="display: none">
23 23
      <li>{% trans "invalid reference" %}</li>
......
26 26
      <label>{% trans "Reference" %}</label>
27 27
      {% regroup reference_fields by protocol as fields %}
28 28
      {% for field in fields %}
29
      {% for f in field.list %}
30
      {% if field.grouper == control_protocol or field.grouper == 'any' %}
31
      <input type="text" id="{{ f.name }}" required pattern="{{ f.pattern }}" maxlength="{{ f.length }}" size="{{ f.length }}" placeholder="{{ f.placeholder }}" {% if f.default %}value="{{ f.default }}" readonly {% endif %}/>{% if field.grouper == 'any' or not forloop.last %} - {% endif %}
32
      {% endif %}
33
      {% endfor %}
29
        {% for f in field.list %}
30
          {% if field.grouper == control_protocol or field.grouper == 'any' %}
31
            <input type="text" id="{{ f.name }}" required pattern="{{ f.pattern }}" maxlength="{{ f.length }}" size="{{ f.length }}" placeholder="{{ f.placeholder }}" {% if f.default %}value="{{ f.default }}" readonly {% endif %}/>{% if field.grouper == 'any' or not forloop.last %} - {% endif %}
32
          {% endif %}
33
        {% endfor %}
34 34
      {% endfor %}
35 35
    </p>
36 36
    <ul class="errorlist" id="montant_error" style="display: none">
combo/apps/lingo/templates/lingo/transaction_export.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans "download CSV" %}</h2>
5
  <h2>{% trans "download CSV" %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9
<form method="post">
10
  {% csrf_token %}
11
  {{ form.as_p }}
12
  <div class="buttons">
13
    <button class="submit-button">{% trans 'Download' %}</button>
14
    <a class="cancel" href="{% url 'lingo-manager-homepage' %}">{% trans 'Cancel' %}</a>
15
  </div>
16
</form>
9
  <form method="post">
10
    {% csrf_token %}
11
    {{ form.as_p }}
12
    <div class="buttons">
13
      <button class="submit-button">{% trans 'Download' %}</button>
14
      <a class="cancel" href="{% url 'lingo-manager-homepage' %}">{% trans 'Cancel' %}</a>
15
    </div>
16
  </form>
17 17
{% endblock %}
combo/apps/lingo/templates/lingo/transaction_list.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans 'Transactions' %}</h2>
6
<span class="actions">
7
<a href="{% url 'lingo-manager-payment-error-list' %}">{% trans 'Payments in error' %}</a>
8
<a href="{% url 'lingo-manager-paymentbackend-list' %}">{% trans 'Payment backends' %}</a>
9
<a href="{% url 'lingo-manager-regie-list' %}">{% trans 'Regies' %}</a>
10
<a rel="popup" href="{% url 'lingo-manager-transactions-download' %}" data-autoclose-dialog="true">{% trans 'download CSV' %}</a>
11
</span>
5
  <h2>{% trans 'Transactions' %}</h2>
6
  <span class="actions">
7
    <a href="{% url 'lingo-manager-payment-error-list' %}">{% trans 'Payments in error' %}</a>
8
    <a href="{% url 'lingo-manager-paymentbackend-list' %}">{% trans 'Payment backends' %}</a>
9
    <a href="{% url 'lingo-manager-regie-list' %}">{% trans 'Regies' %}</a>
10
    <a rel="popup" href="{% url 'lingo-manager-transactions-download' %}" data-autoclose-dialog="true">{% trans 'download CSV' %}</a>
11
  </span>
12 12
{% endblock %}
13 13

  
14 14
{% block content %}
15
<div>
16
<form>
17
  <p>
18
  {{ form.regie }} <input name="q" type="search" value="{{ form.cleaned_data.q }}"> <button>{% trans 'Search' %}</button>
19
  <span class="help_text">{% trans "(supports order identifiers, transaction identifiers, and dates)" %}</span>
20
  </p>
21
</form>
15
  <div>
16
    <form>
17
      <p>
18
        {{ form.regie }} <input name="q" type="search" value="{{ form.cleaned_data.q }}"> <button>{% trans 'Search' %}</button>
19
        <span class="help_text">{% trans "(supports order identifiers, transaction identifiers, and dates)" %}</span>
20
      </p>
21
    </form>
22 22

  
23
{% if object_list %}
24
<table class="main">
25
<thead>
26
  <tr>
27
   <th>{% trans 'Order Identifier' %}</th>
28
   <th>{% trans 'Transaction Identifier' %}</th>
29
   <th>{% trans 'Date' %}</th>
30
   <th>{% trans 'User' %}</th>
31
   <th>{% trans 'Amount' %}</th>
32
   <th colspan="2">{% trans 'Items' %}</th>
33
  </tr>
34
</thead>
35
<tbody>
36
{% for object in object_list %}
37
{% with object.prefetched_items|length|default:1 as nb_items %}
38
<tr>
39
 <td rowspan="{{ nb_items }}">{{object.order_id}}</td>
40
 <td rowspan="{{ nb_items }}">{{object.bank_transaction_id}}</td>
41
 <td rowspan="{{ nb_items }}">{{object.start_date}}</td>
42
 <td rowspan="{{ nb_items }}">{{object.get_user_name}}</td>
43
 <td rowspan="{{ nb_items }}">{{object.amount}} €</td>
44
 {% for item in object.prefetched_items %}
45
 {% if not forloop.first %}<tr>{% endif %}
46
  <td style="font-size: smaller">{{item.subject}}</td> <td style="font-size: smaller" class="price">{{item.amount}} €</td></tr>
47
 {% empty %}
48
</tr>
49
 {% endfor %}
50
{% endwith %}
51
{% endfor %}
52
</tbody>
53
</table>
23
    {% if object_list %}
24
      <table class="main">
25
        <thead>
26
          <tr>
27
            <th>{% trans 'Order Identifier' %}</th>
28
            <th>{% trans 'Transaction Identifier' %}</th>
29
            <th>{% trans 'Date' %}</th>
30
            <th>{% trans 'User' %}</th>
31
            <th>{% trans 'Amount' %}</th>
32
            <th colspan="2">{% trans 'Items' %}</th>
33
          </tr>
34
        </thead>
35
        <tbody>
36
          {% for object in object_list %}
37
            {% with object.prefetched_items|length|default:1 as nb_items %}
38
              <tr>
39
                <td rowspan="{{ nb_items }}">{{object.order_id}}</td>
40
                <td rowspan="{{ nb_items }}">{{object.bank_transaction_id}}</td>
41
                <td rowspan="{{ nb_items }}">{{object.start_date}}</td>
42
                <td rowspan="{{ nb_items }}">{{object.get_user_name}}</td>
43
                <td rowspan="{{ nb_items }}">{{object.amount}} €</td>
44
                {% for item in object.prefetched_items %}
45
                  {% if not forloop.first %}<tr>{% endif %}
46
                  <td style="font-size: smaller">{{item.subject}}</td> <td style="font-size: smaller" class="price">{{item.amount}} €</td></tr>
47
                {% empty %}
48
                  </tr>
49
                {% endfor %}
50
            {% endwith %}
51
          {% endfor %}
52
        </tbody>
53
      </table>
54 54

  
55
{% include "gadjo/pagination.html" %}
55
      {% include "gadjo/pagination.html" %}
56 56

  
57
{% else %}
58
<div class="big-msg-info">
59
  {% if form.cleaned_data.q or form.cleaned_data.regie %}
60
  {% trans "No transactions found matching the current search." %}
61
  {% else %}
62
  {% trans "This site doesn't have any transaction yet." %}
63
  {% endif %}
64
</div>
65
{% endif %}
66
</div>
57
    {% else %}
58
      <div class="big-msg-info">
59
        {% if form.cleaned_data.q or form.cleaned_data.regie %}
60
          {% trans "No transactions found matching the current search." %}
61
        {% else %}
62
          {% trans "This site doesn't have any transaction yet." %}
63
        {% endif %}
64
      </div>
65
    {% endif %}
66
  </div>
67 67
{% endblock %}
combo/apps/maps/templates/maps/colour_or_text_input.html
1 1
{% load i18n %}
2 2
{% with widget_value=widget.value|stringformat:'s' %}
3
{% spaceless %}
4
<span id="{{ widget.name }}-joined-buttons" class="gadjo-joined-buttons">
5
<button data-mode="color" aria-pressed="{% if widget.value is None or widget_value|slice:":1" == '#' %}true{% else %}false{% endif %}" role="button">{% trans "Fixed" %}</button>
6
<button data-mode="text" aria-pressed="{% if widget.value != None and widget_value|slice:":1" != '#' %}true{% else %}false{% endif %}" role="button">{% trans "Variable" %}</button>
7
</span>
8
{% endspaceless %}
9
<input id="{{ widget.name }}-input" {% if widget.value is None or widget_value|slice:":1" == '#' %}type="color"{% else %}type="text"{% endif %} name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget_value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %}>
3
  {% spaceless %}
4
    <span id="{{ widget.name }}-joined-buttons" class="gadjo-joined-buttons">
5
      <button data-mode="color" aria-pressed="{% if widget.value is None or widget_value|slice:":1" == '#' %}true{% else %}false{% endif %}" role="button">{% trans "Fixed" %}</button>
6
      <button data-mode="text" aria-pressed="{% if widget.value != None and widget_value|slice:":1" != '#' %}true{% else %}false{% endif %}" role="button">{% trans "Variable" %}</button>
7
    </span>
8
  {% endspaceless %}
9
  <input id="{{ widget.name }}-input" {% if widget.value is None or widget_value|slice:":1" == '#' %}type="color"{% else %}type="text"{% endif %} name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget_value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %}>
10 10
{% endwith %}
11 11
<script>
12
$(function() {
13
  $('#{{ widget.name }}-joined-buttons button').on('click', function() {
14
    var $current_mode = $('#{{ widget.name }}-joined-buttons button[aria-pressed=true]');
15
    $current_mode.data('previous-value', $('#{{ widget.name }}-input').val());
16
    if ($(this).is('[aria-pressed=true]')) {
17
      $('#{{ widget.name }}-joined-buttons button').attr('aria-pressed', 'true');
18
      $(this).attr('aria-pressed', 'false');
19
    } else {
20
      $('#{{ widget.name }}-joined-buttons button').attr('aria-pressed', 'false');
21
      $(this).attr('aria-pressed', 'true');
22
    }
23
    var $new_mode = $('#{{ widget.name }}-joined-buttons button[aria-pressed=true]');
24
    var mode = $new_mode.data('mode');
25
    $('#{{ widget.name }}-input').prop('type', mode).val($new_mode.data('previous-value'));
26
    return false;
12
  $(function() {
13
    $('#{{ widget.name }}-joined-buttons button').on('click', function() {
14
      var $current_mode = $('#{{ widget.name }}-joined-buttons button[aria-pressed=true]');
15
      $current_mode.data('previous-value', $('#{{ widget.name }}-input').val());
16
      if ($(this).is('[aria-pressed=true]')) {
17
        $('#{{ widget.name }}-joined-buttons button').attr('aria-pressed', 'true');
18
        $(this).attr('aria-pressed', 'false');
19
      } else {
20
        $('#{{ widget.name }}-joined-buttons button').attr('aria-pressed', 'false');
21
        $(this).attr('aria-pressed', 'true');
22
      }
23
      var $new_mode = $('#{{ widget.name }}-joined-buttons button[aria-pressed=true]');
24
      var mode = $new_mode.data('mode');
25
      $('#{{ widget.name }}-input').prop('type', mode).val($new_mode.data('previous-value'));
26
      return false;
27
    });
27 28
  });
28
});
29 29
</script>
combo/apps/maps/templates/maps/layer_options_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
{% if form.instance.pk %}
6
<h2>{% if form.kind == 'geojson' %}{% trans "Edit GeoJSON layer" %}{% else %}{% trans "Edit tiles layer" %}{% endif %}</h2>
7
{% else %}
8
<h2>{% if form.kind == 'geojson' %}{% trans "New GeoJSON layer" %}{% else %}{% trans "New tiles layer" %}{% endif %}</h2>
9
{% endif %}
5
  {% if form.instance.pk %}
6
    <h2>{% if form.kind == 'geojson' %}{% trans "Edit GeoJSON layer" %}{% else %}{% trans "Edit tiles layer" %}{% endif %}</h2>
7
  {% else %}
8
    <h2>{% if form.kind == 'geojson' %}{% trans "New GeoJSON layer" %}{% else %}{% trans "New tiles layer" %}{% endif %}</h2>
9
  {% endif %}
10 10
{% endblock %}
11 11

  
12 12
{% block content %}
13 13

  
14
<form method="post" enctype="multipart/form-data">
15
  {% csrf_token %}
16
  {{ form.as_p }}
17
  <div class="buttons">
18
    <button class="submit-button">{% trans "Save" %}</button>
19
    <a class="cancel" href="{% url 'combo-manager-page-view' pk=form.instance.map_cell.page_id %}">{% trans 'Cancel' %}</a>
20
  </div>
21
</form>
14
  <form method="post" enctype="multipart/form-data">
15
    {% csrf_token %}
16
    {{ form.as_p }}
17
    <div class="buttons">
18
      <button class="submit-button">{% trans "Save" %}</button>
19
      <a class="cancel" href="{% url 'combo-manager-page-view' pk=form.instance.map_cell.page_id %}">{% trans 'Cancel' %}</a>
20
    </div>
21
  </form>
22 22
{% endblock %}
combo/apps/maps/templates/maps/manager_base.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans 'Maps' %}</h2>
5
  <h2>{% trans 'Maps' %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block breadcrumb %}
9
{{ block.super }}
10
<a href="{% url 'maps-manager-homepage' %}">{% trans 'Maps' %}</a>
9
  {{ block.super }}
10
  <a href="{% url 'maps-manager-homepage' %}">{% trans 'Maps' %}</a>
11 11
{% endblock %}
combo/apps/maps/templates/maps/manager_home.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans 'Maps' %}</h2>
6
<span class="actions">
7
<a rel="popup" href="{% url 'maps-manager-layer-add' kind='geojson' %}">{% trans 'New GeoJSON layer' %}</a>
8
<a rel="popup" href="{% url 'maps-manager-layer-add' kind='tiles' %}">{% trans 'New tiles layer' %}</a>
9
</span>
5
  <h2>{% trans 'Maps' %}</h2>
6
  <span class="actions">
7
    <a rel="popup" href="{% url 'maps-manager-layer-add' kind='geojson' %}">{% trans 'New GeoJSON layer' %}</a>
8
    <a rel="popup" href="{% url 'maps-manager-layer-add' kind='tiles' %}">{% trans 'New tiles layer' %}</a>
9
  </span>
10 10
{% endblock %}
11 11

  
12 12
{% block content %}
13
{% if object_list %}
14
<ul class="objects-list single-links layers">
15
 {% for layer in object_list %}
16
 <li>
17
     <a class="layer-icon-{{ layer.icon }}" href="{% url 'maps-manager-layer-edit' slug=layer.slug %}">{{ layer.label }} {% if layer.kind == 'tiles' %}({{ layer.get_kind_display }}{% if layer.tiles_default %}, {% trans "default layer" %}{% endif %}){% endif %}</a>
18
   <a rel="popup" class="delete" href="{% url 'maps-manager-layer-delete' slug=layer.slug %}">{% trans "remove" %}</a>
19
 </li>
20
 {% endfor %}
21
</ul>
22
{% else %}
23
<div class="big-msg-info">
24
  {% blocktrans %}
25
  This site doesn't have any layer yet. Click on the "New" button in the top
26
  right of the page to add a first one.
27
  {% endblocktrans %}
28
</div>
29
{% endif %}
13
  {% if object_list %}
14
    <ul class="objects-list single-links layers">
15
      {% for layer in object_list %}
16
        <li>
17
          <a class="layer-icon-{{ layer.icon }}" href="{% url 'maps-manager-layer-edit' slug=layer.slug %}">{{ layer.label }} {% if layer.kind == 'tiles' %}({{ layer.get_kind_display }}{% if layer.tiles_default %}, {% trans "default layer" %}{% endif %}){% endif %}</a>
18
          <a rel="popup" class="delete" href="{% url 'maps-manager-layer-delete' slug=layer.slug %}">{% trans "remove" %}</a>
19
        </li>
20
      {% endfor %}
21
    </ul>
22
  {% else %}
23
    <div class="big-msg-info">
24
      {% blocktrans %}
25
        This site doesn't have any layer yet. Click on the "New" button in the top
26
        right of the page to add a first one.
27
      {% endblocktrans %}
28
    </div>
29
  {% endif %}
30 30

  
31
<h2>{% trans 'Maps on site' %}</h2>
31
  <h2>{% trans 'Maps on site' %}</h2>
32 32

  
33
{% if map_list %}
34
<ul class="objects-list single-links maps">
35
 {% for map in map_list %}
36
 <li>
37
   <a href="{% url 'combo-manager-page-view' pk=map.page_id %}#cell-{{ map.get_reference }}">
38
    {% if map.title %}
39
      {% blocktrans with map_title=map.title page_title=map.page.title %}Map "{{ map_title }}" on page "{{ page_title }}"{% endblocktrans %}
40
    {% else %}
41
      {% blocktrans with page_title=map.page.title %}Unnamed map on page "{{ page_title }}"{% endblocktrans %}
42
    {% endif %}
43
   </a>
44
 </li>
45
 {% endfor %}
46
</ul>
47
{% else %}
48
<div class="big-msg-info">
49
  {% blocktrans %}
50
  This site doesn't have any map yet.
51
  {% endblocktrans %}
52
</div>
53
{% endif %}
33
  {% if map_list %}
34
    <ul class="objects-list single-links maps">
35
      {% for map in map_list %}
36
        <li>
37
          <a href="{% url 'combo-manager-page-view' pk=map.page_id %}#cell-{{ map.get_reference }}">
38
            {% if map.title %}
39
              {% blocktrans with map_title=map.title page_title=map.page.title %}Map "{{ map_title }}" on page "{{ page_title }}"{% endblocktrans %}
40
            {% else %}
41
              {% blocktrans with page_title=map.page.title %}Unnamed map on page "{{ page_title }}"{% endblocktrans %}
42
            {% endif %}
43
          </a>
44
        </li>
45
      {% endfor %}
46
    </ul>
47
  {% else %}
48
    <div class="big-msg-info">
49
      {% blocktrans %}
50
        This site doesn't have any map yet.
51
      {% endblocktrans %}
52
    </div>
53
  {% endif %}
54 54
{% endblock %}
combo/apps/maps/templates/maps/map_cell.html
1 1
{% load l10n %}
2 2
{% block cell-content %}
3
{% if title %}<h2>{{ title }}</h2>{% endif %}
4
{% localize off %}
5
<div class="combo-cell-map"
6
        {% block map-attributes %}
3
  {% if title %}<h2>{{ title }}</h2>{% endif %}
4
  {% localize off %}
5
    <div class="combo-cell-map"
6
      {% block map-attributes %}
7 7
        data-init-state="{{ initial_state }}"
8 8
        data-init-zoom="{{ initial_zoom }}" data-min-zoom="{{ min_zoom }}"
9 9
        data-max-zoom="{{ max_zoom }}" data-init-lat="{{ init_lat }}"
10 10
        data-init-lng="{{ init_lng }}"
11 11
        {% block map-include-geoloc-button %}
12
        data-include-geoloc-button="true"
12
          data-include-geoloc-button="true"
13 13
        {% endblock %}
14 14
        {% if group_markers %}data-group-markers="1"{% endif %}
15 15
        data-marker-behaviour-onclick="{{ cell.marker_behaviour_onclick }}"
16 16
        {% if max_bounds.corner1.lat %}
17
        data-max-bounds-lat1="{{ max_bounds.corner1.lat }}"
18
        data-max-bounds-lng1="{{ max_bounds.corner1.lng }}"
19
        data-max-bounds-lat2="{{ max_bounds.corner2.lat }}"
20
        data-max-bounds-lng2="{{ max_bounds.corner2.lng }}"
17
          data-max-bounds-lat1="{{ max_bounds.corner1.lat }}"
18
          data-max-bounds-lng1="{{ max_bounds.corner1.lng }}"
19
          data-max-bounds-lat2="{{ max_bounds.corner2.lat }}"
20
          data-max-bounds-lng2="{{ max_bounds.corner2.lng }}"
21 21
        {% endif %}
22
        {% endblock %}
23
        data-cell-id="{{ cell.pk }}"
24
      >
25
{% endlocalize %}
26
<script>
27
  var tiles_{{ cell.pk }} = [];
28
  {% for layer in tiles_layers %}
29
    tiles_{{ cell.pk }}.push({
30
      tile_urltemplate: {{ layer.tile_urltemplate|as_json|safe }},
31
      map_attribution: {{ layer.map_attribution|as_json|safe }},
32
      opacity: {{ layer.opacity|as_json|safe }}
33
    });
34
  {% endfor %}
35
  var geojson_{{ cell.pk }} = Object();
36
  {% for layer in geojson_layers %}
37
    geojson_{{ cell.pk }}[{{ layer.slug|as_json|safe }}] = {{layer|as_json|safe}};
38
  {% endfor %}
39
</script>
40
</div>
22
      {% endblock %}
23
      data-cell-id="{{ cell.pk }}"
24
    >
25
  {% endlocalize %}
26
  <script>
27
    var tiles_{{ cell.pk }} = [];
28
    {% for layer in tiles_layers %}
29
      tiles_{{ cell.pk }}.push({
30
        tile_urltemplate: {{ layer.tile_urltemplate|as_json|safe }},
31
        map_attribution: {{ layer.map_attribution|as_json|safe }},
32
        opacity: {{ layer.opacity|as_json|safe }}
33
      });
34
    {% endfor %}
35
    var geojson_{{ cell.pk }} = Object();
36
    {% for layer in geojson_layers %}
37
      geojson_{{ cell.pk }}[{{ layer.slug|as_json|safe }}] = {{layer|as_json|safe}};
38
    {% endfor %}
39
  </script>
40
  </div>
41 41
{% endblock %}
combo/apps/maps/templates/maps/map_cell_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block cell-form %}
5
{{ form.as_p }}
6
{% with cell.get_maplayer_options as options %}
7
{% if options %}
8
<p><label>{% trans "Layers:" %}</label></p>
9
<div>
10
  <ul class="objects-list list-of-layers">
11
    {% for option in options %}
12
    <li>
13
      <span>{{ option.map_layer.label }} {% if option.map_layer.kind == 'tiles' %}({{ option.map_layer.get_kind_display }}){% endif %}</span>
14
      <a rel="popup" title="{% trans "Edit" %}" class="link-action-icon edit" href="{% url 'maps-manager-cell-edit-layer' page_pk=page.pk cell_reference=cell.get_reference layeroptions_pk=option.pk %}">{% trans "Edit" %}</a>
15
      <a rel="popup" title="{% trans "Delete" %}" class="link-action-icon delete" href="{% url 'maps-manager-cell-delete-layer' page_pk=page.pk cell_reference=cell.get_reference layeroptions_pk=option.pk %}">{% trans "Delete" %}</a>
16
    </li>
17
    {% endfor %}
18
 </ul>
19
</div>
20
{% endif %}
21
{% endwith %}
22
{% with cell.get_free_geojson_layers.exists as free_geojson and cell.get_free_tiles_layers.exists as free_tiles %}
23
{% if free_geojson or free_tiles %}
24
<div class="buttons">
25
    {% if free_geojson %}
26
    <a rel="popup" href="{% url 'maps-manager-cell-add-layer' page_pk=page.pk cell_reference=cell.get_reference kind='geojson' %}">{% trans "Add a GeoJSON layer" %}</a>
5
  {{ form.as_p }}
6
  {% with cell.get_maplayer_options as options %}
7
    {% if options %}
8
      <p><label>{% trans "Layers:" %}</label></p>
9
      <div>
10
        <ul class="objects-list list-of-layers">
11
          {% for option in options %}
12
            <li>
13
              <span>{{ option.map_layer.label }} {% if option.map_layer.kind == 'tiles' %}({{ option.map_layer.get_kind_display }}){% endif %}</span>
14
              <a rel="popup" title="{% trans "Edit" %}" class="link-action-icon edit" href="{% url 'maps-manager-cell-edit-layer' page_pk=page.pk cell_reference=cell.get_reference layeroptions_pk=option.pk %}">{% trans "Edit" %}</a>
15
              <a rel="popup" title="{% trans "Delete" %}" class="link-action-icon delete" href="{% url 'maps-manager-cell-delete-layer' page_pk=page.pk cell_reference=cell.get_reference layeroptions_pk=option.pk %}">{% trans "Delete" %}</a>
16
            </li>
17
          {% endfor %}
18
        </ul>
19
      </div>
27 20
    {% endif %}
28
    {% if free_tiles %}
29
    {% if free_geojson %}|{% endif%} <a rel="popup" href="{% url 'maps-manager-cell-add-layer' page_pk=page.pk cell_reference=cell.get_reference kind='tiles' %}">{% trans "Add a tiles layer" %}</a>
21
  {% endwith %}
22
  {% with cell.get_free_geojson_layers.exists as free_geojson and cell.get_free_tiles_layers.exists as free_tiles %}
23
    {% if free_geojson or free_tiles %}
24
      <div class="buttons">
25
        {% if free_geojson %}
26
          <a rel="popup" href="{% url 'maps-manager-cell-add-layer' page_pk=page.pk cell_reference=cell.get_reference kind='geojson' %}">{% trans "Add a GeoJSON layer" %}</a>
27
        {% endif %}
28
        {% if free_tiles %}
29
          {% if free_geojson %}|{% endif%} <a rel="popup" href="{% url 'maps-manager-cell-add-layer' page_pk=page.pk cell_reference=cell.get_reference kind='tiles' %}">{% trans "Add a tiles layer" %}</a>
30
        {% endif %}
31
      </div>
30 32
    {% endif %}
31
</div>
32
{% endif %}
33
{% endwith %}
33
  {% endwith %}
34 34
{% endblock %}
combo/apps/maps/templates/maps/map_layer_confirm_delete.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{{ view.model.get_verbose_name }}</h2>
5
  <h2>{{ view.model.get_verbose_name }}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9
<form method="post">
10
  {% csrf_token %}
11
  {% blocktrans %}Are you sure you want to delete this?{% endblocktrans %}
12
  <div class="buttons">
13
    <button class="delete-button">{% trans 'Delete' %}</button>
14
    <a class="cancel" href="{% url 'maps-manager-homepage' %}">{% trans 'Cancel' %}</a>
15
  </div>
16
</form>
9
  <form method="post">
10
    {% csrf_token %}
11
    {% blocktrans %}Are you sure you want to delete this?{% endblocktrans %}
12
    <div class="buttons">
13
      <button class="delete-button">{% trans 'Delete' %}</button>
14
      <a class="cancel" href="{% url 'maps-manager-homepage' %}">{% trans 'Cancel' %}</a>
15
    </div>
16
  </form>
17 17
{% endblock %}
combo/apps/maps/templates/maps/map_layer_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
{% if object.id %}
6
<h2>{% trans "Edit Map Layer" %}</h2>
7
{% if object.kind == 'geojson' %}
8
<span class="actions">
9
<a rel="popup" href="{% url 'maps-manager-layer-edit-request-parameters' slug=object.slug %}">{% trans 'Request parameters' %}</a>
10
</span>
11
{% endif %}
12
{% else %}
13
<h2>{% trans "New Map Layer" %}</h2>
14
{% endif %}
5
  {% if object.id %}
6
    <h2>{% trans "Edit Map Layer" %}</h2>
7
    {% if object.kind == 'geojson' %}
8
      <span class="actions">
9
        <a rel="popup" href="{% url 'maps-manager-layer-edit-request-parameters' slug=object.slug %}">{% trans 'Request parameters' %}</a>
10
      </span>
11
    {% endif %}
12
  {% else %}
13
    <h2>{% trans "New Map Layer" %}</h2>
14
  {% endif %}
15 15
{% endblock %}
16 16

  
17 17
{% block breadcrumb %}
18
{{ block.super }}
19
{% if object.id %}
20
<a href="{% url 'maps-manager-layer-edit' slug=object.slug %}">{% trans 'Edit Map Layer' %}</a>
21
{% else %}
22
<a href="#">{% trans "New Map Layer" %}</a>
23
{% endif %}
18
  {{ block.super }}
19
  {% if object.id %}
20
    <a href="{% url 'maps-manager-layer-edit' slug=object.slug %}">{% trans 'Edit Map Layer' %}</a>
21
  {% else %}
22
    <a href="#">{% trans "New Map Layer" %}</a>
23
  {% endif %}
24 24
{% endblock %}
25 25

  
26 26
{% block content %}
27 27

  
28
<form method="post" enctype="multipart/form-data">
29
  {% csrf_token %}
30
  {{ form.as_p }}
31
  <div class="buttons">
32
    <button class="submit-button">{% trans "Save" %}</button>
33
    <a class="cancel" href="{% url 'maps-manager-homepage' %}">{% trans 'Cancel' %}</a>
34
  </div>
35
</form>
28
  <form method="post" enctype="multipart/form-data">
29
    {% csrf_token %}
30
    {{ form.as_p }}
31
    <div class="buttons">
32
      <button class="submit-button">{% trans "Save" %}</button>
33
      <a class="cancel" href="{% url 'maps-manager-homepage' %}">{% trans 'Cancel' %}</a>
34
    </div>
35
  </form>
36 36
{% endblock %}
combo/apps/maps/templates/maps/map_layer_request_parameters_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans "Edit request parameters" %}</h2>
5
  <h2>{% trans "Edit request parameters" %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block breadcrumb %}
9
{{ block.super }}
10
<a rel="popup" href="{% url 'maps-manager-layer-edit-request-parameters' slug=object.slug %}">{% trans "Edit request parameters" %}</a>
9
  {{ block.super }}
10
  <a rel="popup" href="{% url 'maps-manager-layer-edit-request-parameters' slug=object.slug %}">{% trans "Edit request parameters" %}</a>
11 11
{% endblock %}
combo/apps/notifications/templates/combo/notificationscell.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
<h2>{% trans "Notifications" %}</h2>
4
{% if notifications %}
5
<div class="links-list">
6
<ul>
7
  {% for notification in notifications %}
8
  <li class="combo-notification {% if notification.acked %}combo-notification-acked{% endif %}"
9
      data-combo-notification-id="{{ notification.public_id }}">
10
    <a href="{{ notification.url|default:"#" }}">{{ notification.summary }}</a>
11
    {% if notification.body %}
12
    <div class="description">
13
    {{ notification.body|linebreaks }}
3
  <h2>{% trans "Notifications" %}</h2>
4
  {% if notifications %}
5
    <div class="links-list">
6
      <ul>
7
        {% for notification in notifications %}
8
          <li class="combo-notification {% if notification.acked %}combo-notification-acked{% endif %}"
9
            data-combo-notification-id="{{ notification.public_id }}">
10
            <a href="{{ notification.url|default:"#" }}">{{ notification.summary }}</a>
11
            {% if notification.body %}
12
              <div class="description">
13
                {{ notification.body|linebreaks }}
14
              </div>
15
            {% endif %}
16
          </li>
17
        {% endfor %}
18
      </ul>
14 19
    </div>
15
    {% endif %}
16
  </li>
17
  {% endfor %}
18
</ul>
19
</div>
20
{% else %}
21
<div class="cell--body">
22
<p>{% trans 'No notifications.' %}</p>
23
</div>
24
{% endif %}
20
  {% else %}
21
    <div class="cell--body">
22
      <p>{% trans 'No notifications.' %}</p>
23
    </div>
24
  {% endif %}
25 25

  
26
{% if push_notifications_enabled %}
27
<div class="cell--body notification-buttons">
28
<div class="notification-push-on" style="display: none"><a href="#" class="pk-button">Activer les notifications</a></div>
29
<div class="notification-push-off" style="display: none"><a href="#" class="pk-button">Désactiver les notifications</a></div>
30
</div>
26
  {% if push_notifications_enabled %}
27
    <div class="cell--body notification-buttons">
28
      <div class="notification-push-on" style="display: none"><a href="#" class="pk-button">Activer les notifications</a></div>
29
      <div class="notification-push-off" style="display: none"><a href="#" class="pk-button">Désactiver les notifications</a></div>
30
    </div>
31 31

  
32
<script>
33
$(function() {
34
  $('.notification-push-on a').on('click', function() {
35
    $('.notification-push-on').hide();
36
    $('.notification-push-off').hide();
37
    combo_pwa_subscribe_user();
38
    return false;
39
  });
40
  $('.notification-push-off a').on('click', function() {
41
    $('.notification-push-on').hide();
42
    $('.notification-push-off').hide();
43
    combo_pwa_unsubscribe_user();
44
    return false;
45
  });
46
  $(document).on('combo:pwa-user-info', function() {
47
    if (COMBO_PWA_USER_SUBSCRIPTION) {
48
      $('.notification-push-off').show();
49
    } else {
50
      $('.notification-push-on').show();
51
    }
52
  });
53
}
54
);
55
</script>
56
{% endif %}
32
    <script>
33
      $(function() {
34
        $('.notification-push-on a').on('click', function() {
35
          $('.notification-push-on').hide();
36
          $('.notification-push-off').hide();
37
          combo_pwa_subscribe_user();
38
          return false;
39
        });
40
        $('.notification-push-off a').on('click', function() {
41
          $('.notification-push-on').hide();
42
          $('.notification-push-off').hide();
43
          combo_pwa_unsubscribe_user();
44
          return false;
45
        });
46
        $(document).on('combo:pwa-user-info', function() {
47
          if (COMBO_PWA_USER_SUBSCRIPTION) {
48
            $('.notification-push-off').show();
49
          } else {
50
            $('.notification-push-on').show();
51
          }
52
        });
53
      }
54
      );
55
    </script>
56
  {% endif %}
57 57

  
58 58
{% endblock %}
combo/apps/pwa/templates/combo/pwa/manager_base.html
2 2
{% load static i18n %}
3 3

  
4 4
{% block css %}
5
{{ block.super }}
6
<link rel="stylesheet" type="text/css" media="all" href="{% static "css/combo.manager.pwa.css" %}"/>
5
  {{ block.super }}
6
  <link rel="stylesheet" type="text/css" media="all" href="{% static "css/combo.manager.pwa.css" %}"/>
7 7
{% endblock %}
8 8

  
9 9
{% block appbar %}
10
<h2>{% trans 'Mobile Application' %}</h2>
10
  <h2>{% trans 'Mobile Application' %}</h2>
11 11
{% endblock %}
12 12

  
13 13
{% block breadcrumb %}
14
{{ block.super }}
15
<a href="{% url 'pwa-manager-homepage' %}">{% trans 'Mobile Application' %}</a>
14
  {{ block.super }}
15
  <a href="{% url 'pwa-manager-homepage' %}">{% trans 'Mobile Application' %}</a>
16 16
{% endblock %}
combo/apps/pwa/templates/combo/pwa/manager_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2></h2>
5
  <h2></h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9
<form method="post" enctype="multipart/form-data">
10
  {% csrf_token %}
11
  {{ form.as_p }}
12
  <div class="buttons">
13
    <button class="submit-button">{% trans "Save" %}</button>
14
    <a class="cancel" href="{% url 'pwa-manager-homepage' %}">{% trans 'Cancel' %}</a>
15
  </div>
16
</form>
9
  <form method="post" enctype="multipart/form-data">
10
    {% csrf_token %}
11
    {{ form.as_p }}
12
    <div class="buttons">
13
      <button class="submit-button">{% trans "Save" %}</button>
14
      <a class="cancel" href="{% url 'pwa-manager-homepage' %}">{% trans 'Cancel' %}</a>
15
    </div>
16
  </form>
17 17
{% endblock %}
combo/apps/pwa/templates/combo/pwa/manager_home.html
2 2
{% load i18n thumbnail %}
3 3

  
4 4
{% block content %}
5
<div class="manager-mobile-home-layout">
6
<div id="mobile-case">
7
  <div class="screen" style="background: {{ theme_color }};">
8
    <div class="mobile-top-bar"><span class="clock">--:--</span></div>
9
    <div class="mobile-app-content">
10
      <div class="splash">
11
      <div class="appicon">
12
        {% if pwa_settings.application_icon %}
13
          {% thumbnail pwa_settings.application_icon '512x512' crop='center' format='PNG' as im %}
14
          <img src="{{ im.url }}" alt="">
15
          {% endthumbnail %}
16
        {% endif %}
5
  <div class="manager-mobile-home-layout">
6
    <div id="mobile-case">
7
      <div class="screen" style="background: {{ theme_color }};">
8
        <div class="mobile-top-bar"><span class="clock">--:--</span></div>
9
        <div class="mobile-app-content">
10
          <div class="splash">
11
            <div class="appicon">
12
              {% if pwa_settings.application_icon %}
13
                {% thumbnail pwa_settings.application_icon '512x512' crop='center' format='PNG' as im %}
14
                  <img src="{{ im.url }}" alt="">
15
                {% endthumbnail %}
16
              {% endif %}
17
            </div>
18
            <div class="applabel">{{ pwa_settings.get_application_name }}</div>
19
          </div>
20
          <iframe scrolling="no"></iframe>
21
        </div>
17 22
      </div>
18
      <div class="applabel">{{ pwa_settings.get_application_name }}</div>
19
      </div>
20
      <iframe scrolling="no"></iframe>
21 23
    </div>
22
  </div>
23
</div>
24 24

  
25
<div class="sections">
25
    <div class="sections">
26 26

  
27
<div class="section pwa-navigation">
28
<h3>{% trans "Navigation" %}</h3>
29
<div>
27
      <div class="section pwa-navigation">
28
        <h3>{% trans "Navigation" %}</h3>
29
        <div>
30 30

  
31
{% if navigation_entries|length %}
32
<p class="hint">
33
{% blocktrans %}
34
Use drag and drop with the ⣿ handles to reorder navigation entries.
35
{% endblocktrans %}
36
</p>
37
{% endif %}
31
          {% if navigation_entries|length %}
32
            <p class="hint">
33
              {% blocktrans %}
34
                Use drag and drop with the ⣿ handles to reorder navigation entries.
35
              {% endblocktrans %}
36
            </p>
37
          {% endif %}
38 38

  
39
<ul class="objects-list single-links navigation-entries"
40
    data-order-url="{% url 'pwa-manager-navigation-order' %}">
41
{% for entry in navigation_entries %}
42
<li data-pk="{{entry.pk}}"><span class="handle">⣿</span>
43
    <a rel="popup" href="{% url 'pwa-manager-navigation-edit' pk=entry.pk %}">{{ entry.get_label }}</a>
44
    <a rel="popup" class="delete" href="{% url 'pwa-manager-navigation-delete' pk=entry.pk %}">{% trans "remove" %}</a>
45
</li>
46
{% endfor %}
47
</ul>
48
{% if navigation_entries|length < 5 %}
49
<ul class="objects-list single-links">
50
<li><a class="add" rel="popup" href="{% url 'pwa-manager-navigation-add' %}">{% trans 'Add a navigation entry' %}</a></li>
51
</ul>
52
{% endif %}
39
          <ul class="objects-list single-links navigation-entries"
40
            data-order-url="{% url 'pwa-manager-navigation-order' %}">
41
            {% for entry in navigation_entries %}
42
              <li data-pk="{{entry.pk}}"><span class="handle">⣿</span>
43
                <a rel="popup" href="{% url 'pwa-manager-navigation-edit' pk=entry.pk %}">{{ entry.get_label }}</a>
44
                <a rel="popup" class="delete" href="{% url 'pwa-manager-navigation-delete' pk=entry.pk %}">{% trans "remove" %}</a>
45
              </li>
46
            {% endfor %}
47
          </ul>
48
          {% if navigation_entries|length < 5 %}
49
            <ul class="objects-list single-links">
50
              <li><a class="add" rel="popup" href="{% url 'pwa-manager-navigation-add' %}">{% trans 'Add a navigation entry' %}</a></li>
51
            </ul>
52
          {% endif %}
53 53

  
54
</div>
55
</div>
54
        </div>
55
      </div>
56 56

  
57
<div class="section settings">
58
<h3>{% trans "Settings" %}</h3>
59
<div>
60
  <form method="post" enctype="multipart/form-data">
61
    {% csrf_token %}
62
    {{ form.as_p }}
63
    <div class="buttons">
64
      <button class="submit-button">{% trans "Save" %}</button>
65
    </div>
66
  </form>
67
</div>
68
</div>
57
      <div class="section settings">
58
        <h3>{% trans "Settings" %}</h3>
59
        <div>
60
          <form method="post" enctype="multipart/form-data">
61
            {% csrf_token %}
62
            {{ form.as_p }}
63
            <div class="buttons">
64
              <button class="submit-button">{% trans "Save" %}</button>
65
            </div>
66
          </form>
67
        </div>
68
      </div>
69 69

  
70
</div> {# .sections #}
71
</div> {# .manager-mobile-home-layout #}
70
    </div> {# .sections #}
71
  </div> {# .manager-mobile-home-layout #}
72 72

  
73
<script>
74
setInterval(function() {
75
  var $clock = $('#mobile-case .clock');
76
  var date = new Date();
77
  $clock.text(('0' + date.getHours()).slice(-2) + ':' + ('0' + date.getMinutes()).slice(-2));
78
}, 500);
73
  <script>
74
    setInterval(function() {
75
      var $clock = $('#mobile-case .clock');
76
      var date = new Date();
77
      $clock.text(('0' + date.getHours()).slice(-2) + ':' + ('0' + date.getMinutes()).slice(-2));
78
    }, 500);
79 79

  
80
$(function() {
81
  $('.mobile-app-content .splash').on('click', function() {
82
    $('.mobile-app-content iframe').attr('src', '/');
83
    $('.mobile-app-content').addClass('splash-off');
84
  });
85
  if ($('#id_maskable_icon').is(':checked')) {
86
    $('.appicon').addClass('with-maskable-area');
87
  }
88
  $('#id_maskable_icon').on('change', function() {
89
    $('.appicon').toggleClass('with-maskable-area');
90
  });
80
    $(function() {
81
      $('.mobile-app-content .splash').on('click', function() {
82
        $('.mobile-app-content iframe').attr('src', '/');
83
        $('.mobile-app-content').addClass('splash-off');
84
      });
85
      if ($('#id_maskable_icon').is(':checked')) {
86
        $('.appicon').addClass('with-maskable-area');
87
      }
88
      $('#id_maskable_icon').on('change', function() {
89
        $('.appicon').toggleClass('with-maskable-area');
90
      });
91 91

  
92
  $('.navigation-entries').sortable({
93
    handle: '.handle',
94
    update: function(event, ui) {
95
      var new_order = $('.navigation-entries li').map(function() { return $(this).data('pk'); }).get().join();
96
      $.ajax({
97
         url: $('.navigation-entries').data('order-url'),
98
           data: {'new-order': new_order}
99
       });
100
    }
101
  });
102
});
103
</script>
92
      $('.navigation-entries').sortable({
93
        handle: '.handle',
94
        update: function(event, ui) {
95
          var new_order = $('.navigation-entries li').map(function() { return $(this).data('pk'); }).get().join();
96
          $.ajax({
97
            url: $('.navigation-entries').data('order-url'),
98
            data: {'new-order': new_order}
99
          });
100
        }
101
      });
102
    });
103
  </script>
104 104

  
105 105
{% endblock %}
combo/apps/pwa/templates/combo/pwa/navigation.html
1 1
{% if entries|length %}
2
<div class="pwa-navigation" id="pwa-navigation"
3
  {% if include_user_name %}data-pwa-user-name="{% skeleton_extra_placeholder user-name %}{{user.get_full_name}}{% end_skeleton_extra_placeholder %}"{% endif %}>
4
<div>
5
<ul>
6
  {% for entry in entries %}
7
  <li class="{{ entry.css_class_names }}{% if entry.link_page in page.get_parents_and_self  %} selected{% endif %}" data-entry-pk="{{ entry.pk }}"
8
      {% if entry.notification_count %}data-notification-count-url="{{site_base}}/api/notification/count/"{% endif %}
9
      {% if entry.use_user_name_as_label %}data-include-user-name{% endif %}>
10
      <a href="{{ entry.get_url }}"
11
         {% if entry.icon %}style="background-image: url({{site_base}}{{entry.icon.url}});"{% endif %}
12
         ><span>{{ entry.get_label }}</span></a></li>
13
  {% endfor %}
14
</ul>
15
</div>
2
  <div class="pwa-navigation" id="pwa-navigation"
3
{% if include_user_name %}data-pwa-user-name="{% skeleton_extra_placeholder user-name %}{{user.get_full_name}}{% end_skeleton_extra_placeholder %}"{% endif %}>
4
  <div>
5
    <ul>
6
      {% for entry in entries %}
7
        <li class="{{ entry.css_class_names }}{% if entry.link_page in page.get_parents_and_self  %} selected{% endif %}" data-entry-pk="{{ entry.pk }}"
8
          {% if entry.notification_count %}data-notification-count-url="{{site_base}}/api/notification/count/"{% endif %}
9
          {% if entry.use_user_name_as_label %}data-include-user-name{% endif %}>
10
          <a href="{{ entry.get_url }}"
11
            {% if entry.icon %}style="background-image: url({{site_base}}{{entry.icon.url}});"{% endif %}
12
          ><span>{{ entry.get_label }}</span></a></li>
13
      {% endfor %}
14
    </ul>
15
  </div>
16 16
</div>
17 17
<script>
18
$('li[data-include-user-name]').each(function(idx, elem) {
19
  var user_name = $(this).parents('#pwa-navigation').data('pwa-user-name');
20
  if (user_name) {
21
    $(this).find('span').text(user_name);
22
  }
23
});
24
$('body.authenticated-user li[data-notification-count-url]').each(function(idx, elem) {
25
  var $entry = $(this);
26
  $.ajax({
27
    url: $entry.data('notification-count-url'),
28
    xhrFields: { withCredentials: true },
29
    async: true,
30
    dataType: 'json',
31
    crossDomain: true,
32
    success: function(data) {
33
      if (data.new) {
34
        $entry.find('span').append(' <span class="badge">' + data.new + '</span>');
35
      }
36
  }});
37
});
18
  $('li[data-include-user-name]').each(function(idx, elem) {
19
    var user_name = $(this).parents('#pwa-navigation').data('pwa-user-name');
20
    if (user_name) {
21
      $(this).find('span').text(user_name);
22
    }
23
  });
24
  $('body.authenticated-user li[data-notification-count-url]').each(function(idx, elem) {
25
    var $entry = $(this);
26
    $.ajax({
27
      url: $entry.data('notification-count-url'),
28
      xhrFields: { withCredentials: true },
29
      async: true,
30
      dataType: 'json',
31
      crossDomain: true,
32
      success: function(data) {
33
        if (data.new) {
34
          $entry.find('span').append(' <span class="badge">' + data.new + '</span>');
35
        }
36
      }});
37
  });
38 38
</script>
39 39
{% endif %}
combo/apps/pwa/templates/combo/pwa/offline.html
1 1
{% load i18n thumbnail %}<!DOCTYPE html>
2 2
<html>
3
<head>
4
  <meta charset="utf-8"/>
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <style>
7
html, body {
8
  margin: 0; padding: 1rem;
9
  font-family: sans-serif;
10
  background: {{theme_color}};
11
}
3
  <head>
4
    <meta charset="utf-8"/>
5
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
    <style>
7
      html, body {
8
        margin: 0; padding: 1rem;
9
        font-family: sans-serif;
10
        background: {{theme_color}};
11
      }
12 12

  
13
div.info-text {
14
  background: white;
15
  padding: 1rem;
16
  border-radius: 3px;
17
  max-width: 25rem;
18
  text-align: center;
19
  margin: auto;
20
}
13
      div.info-text {
14
        background: white;
15
        padding: 1rem;
16
        border-radius: 3px;
17
        max-width: 25rem;
18
        text-align: center;
19
        margin: auto;
20
      }
21 21

  
22
img {
23
  max-width: 100%;
24
  margin: 0 auto;
25
  display: block;
26
}
22
      img {
23
        max-width: 100%;
24
        margin: 0 auto;
25
        display: block;
26
      }
27 27

  
28
p.retry {
29
  margin-top: 2rem;
30
}
28
      p.retry {
29
        margin-top: 2rem;
30
      }
31 31

  
32
p.retry a {
33
  border: 1px solid {{theme_color}};
34
  text-decoration: none;
35
  background: white;
36
  padding: 0.5rem 1rem;
37
  border-radius: 3px;
38
  color: inherit;
39
}
32
      p.retry a {
33
        border: 1px solid {{theme_color}};
34
        text-decoration: none;
35
        background: white;
36
        padding: 0.5rem 1rem;
37
        border-radius: 3px;
38
        color: inherit;
39
      }
40 40

  
41
  </style>
42
</head>
43
<body>
44
<div class="info-text">
45
  {% if pwa_settings.application_icon %}
46
    {% thumbnail pwa_settings.application_icon '512x512' crop='center' format='PNG' as im %}
47
    <img src="{{ im.url }}" alt="">
48
    {% endthumbnail %}
49
  {% endif %}
41
    </style>
42
  </head>
43
  <body>
44
    <div class="info-text">
45
      {% if pwa_settings.application_icon %}
46
        {% thumbnail pwa_settings.application_icon '512x512' crop='center' format='PNG' as im %}
47
          <img src="{{ im.url }}" alt="">
48
        {% endthumbnail %}
49
      {% endif %}
50 50

  
51
  {{ pwa_settings.offline_text|safe }}
51
      {{ pwa_settings.offline_text|safe }}
52 52

  
53
  {% if pwa_settings.offline_retry_button %}
54
  <p class="retry">
55
  <a href=".">{% trans "Retry" %}</a>
56
  </p>
57
  {% endif %}
58
</div>
59
</body>
53
      {% if pwa_settings.offline_retry_button %}
54
        <p class="retry">
55
          <a href=".">{% trans "Retry" %}</a>
56
        </p>
57
      {% endif %}
58
    </div>
59
  </body>
60 60
</html>
combo/apps/search/templates/combo/manager/engine-form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{{ form.get_title }}</h2>
5
  <h2>{{ form.get_title }}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9 9

  
10
<form method="post" enctype="multipart/form-data">
11
  {% csrf_token %}
12
  {{ form.as_p }}
13
  <div class="buttons">
14
    <button class="submit-button">{% trans "Save" %}</button>
15
    <a class="cancel" href="{% url 'combo-manager-page-view' pk=cell.page_id %}">{% trans 'Cancel' %}</a>
16
  </div>
17
</form>
10
  <form method="post" enctype="multipart/form-data">
11
    {% csrf_token %}
12
    {{ form.as_p }}
13
    <div class="buttons">
14
      <button class="submit-button">{% trans "Save" %}</button>
15
      <a class="cancel" href="{% url 'combo-manager-page-view' pk=cell.page_id %}">{% trans 'Cancel' %}</a>
16
    </div>
17
  </form>
18 18
{% endblock %}
combo/apps/search/templates/combo/manager/search-cell-form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block cell-form %}
5
{% if cell.has_text_search_service and cell.missing_index %}
6
<div class="infonotice">
7
  <p>
8
  {% blocktrans %}
9
  Content indexing has been scheduled and should happen within an hour; search
10
  results will then be available.
11
  {% endblocktrans %}
12
  </p>
13
</div>
14
{% endif %}
15
{{ form.as_p }}
16
{% with cell.get_search_services_for_display as engines %}
17
{% if engines %}
18
<p><label>{% trans "Engines:" %}</label></p>
19
<div>
20
  <ul class="objects-list list-of-links" id="list-of-links-{{ cell.pk }}"
21
     data-link-list-order-url="{% url 'combo-manager-search-engines-order' page_pk=page.pk cell_reference=cell.get_reference %}">
22
    {% for engine in engines %}
23
    <li data-link-item-id="{{ engine.0 }}"><span class="handle">⣿</span>
24
      <span>{{ engine.1 }}{% if engine.2.title %} ({% trans "Custom title:"%}{{ engine.2.title }}){% endif %}</span>
25
      {% if engine.0 == '_text' or engine.0 == 'users' or engine.0|startswith:'cards:' %}
26
      <a rel="popup" title="{% trans "Edit" %}" class="link-action-icon edit" href="{% url 'combo-manager-page-search-cell-update-engine' page_pk=page.pk cell_reference=cell.get_reference engine_slug=engine.0 %}">{% trans "Edit" %}</a>
27
      {% endif %}
28
      <a title="{% trans "Delete" %}" class="link-action-icon delete" href="{% url 'combo-manager-page-search-cell-delete-engine' page_pk=page.pk cell_reference=cell.get_reference engine_slug=engine.0 %}">{% trans "Delete" %}</a>
29
    </li>
30
    {% endfor %}
31
  </ul>
32
</div>
33
<script>
34
$(function () {
35
  $('#list-of-links-{{ cell.pk }}').sortable({
36
    handle: '.handle',
37
    update: function(event, ui) {
38
       var new_order = Object();
39
       $(this).find('li').each(function(i, x) {
40
           var suffix = $(x).data('link-item-id');
41
           new_order['pos_' + suffix] = i;
42
       });
43
       $.ajax({
44
           url: $(this).data('link-list-order-url'),
45
           data: new_order
46
       });
47
    }
48
  });
49
});
50
</script>
51
{% endif %}
52
{% endwith %}
53
{% if cell.available_engines %}
54
<div class="search-engine-add">
55
  {% trans "Add an engine:" %}
56
  {% for key, engine in cell.available_engines.items %}
57
  <a {% if key == '_text' or key == 'users' or key|startswith:'cards:' %}rel="popup"{% endif %} href="{% url 'combo-manager-page-search-cell-add-engine' page_pk=page.pk cell_reference=cell.get_reference engine_slug=key %}">{{ engine.label }}</a> {% if not forloop.last %}|{% endif %}
58
  {% endfor %}
59
</div>
60
{% endif %}
5
  {% if cell.has_text_search_service and cell.missing_index %}
6
    <div class="infonotice">
7
      <p>
8
        {% blocktrans %}
9
          Content indexing has been scheduled and should happen within an hour; search
10
          results will then be available.
11
        {% endblocktrans %}
12
      </p>
13
    </div>
14
  {% endif %}
15
  {{ form.as_p }}
16
  {% with cell.get_search_services_for_display as engines %}
17
    {% if engines %}
18
      <p><label>{% trans "Engines:" %}</label></p>
19
      <div>
20
        <ul class="objects-list list-of-links" id="list-of-links-{{ cell.pk }}"
21
          data-link-list-order-url="{% url 'combo-manager-search-engines-order' page_pk=page.pk cell_reference=cell.get_reference %}">
22
          {% for engine in engines %}
23
            <li data-link-item-id="{{ engine.0 }}"><span class="handle">⣿</span>
24
              <span>{{ engine.1 }}{% if engine.2.title %} ({% trans "Custom title:"%}{{ engine.2.title }}){% endif %}</span>
25
              {% if engine.0 == '_text' or engine.0 == 'users' or engine.0|startswith:'cards:' %}
26
                <a rel="popup" title="{% trans "Edit" %}" class="link-action-icon edit" href="{% url 'combo-manager-page-search-cell-update-engine' page_pk=page.pk cell_reference=cell.get_reference engine_slug=engine.0 %}">{% trans "Edit" %}</a>
27
              {% endif %}
28
              <a title="{% trans "Delete" %}" class="link-action-icon delete" href="{% url 'combo-manager-page-search-cell-delete-engine' page_pk=page.pk cell_reference=cell.get_reference engine_slug=engine.0 %}">{% trans "Delete" %}</a>
29
            </li>
30
          {% endfor %}
31
        </ul>
32
      </div>
33
      <script>
34
        $(function () {
35
          $('#list-of-links-{{ cell.pk }}').sortable({
36
            handle: '.handle',
37
            update: function(event, ui) {
38
              var new_order = Object();
39
              $(this).find('li').each(function(i, x) {
40
                var suffix = $(x).data('link-item-id');
41
                new_order['pos_' + suffix] = i;
42
              });
43
              $.ajax({
44
                url: $(this).data('link-list-order-url'),
45
                data: new_order
46
              });
47
            }
48
          });
49
        });
50
      </script>
51
    {% endif %}
52
  {% endwith %}
53
  {% if cell.available_engines %}
54
    <div class="search-engine-add">
55
      {% trans "Add an engine:" %}
56
      {% for key, engine in cell.available_engines.items %}
57
        <a {% if key == '_text' or key == 'users' or key|startswith:'cards:' %}rel="popup"{% endif %} href="{% url 'combo-manager-page-search-cell-add-engine' page_pk=page.pk cell_reference=cell.get_reference engine_slug=key %}">{{ engine.label }}</a> {% if not forloop.last %}|{% endif %}
58
      {% endfor %}
59
    </div>
60
  {% endif %}
61 61
{% endblock %}
combo/apps/search/templates/combo/search-cell-results.html
1 1
{% load i18n %}
2 2
{% if query %}
3
{% if cell.has_multiple_search_services %}<p class="search-service-label">{{ search_service_label }}</p>{% endif %}
4
{% if results.data %}
5
<div class="links-list">
6
<ul>
7
  {% for item in results.data %}
8
  <li><a href="{{ item.url }}">{{ item.text }}</a>
9
          {% if item.description %}<div>{{ item.description|safe }}</div>{% endif %}
10
  </li>
11
  {% endfor %}
12
</ul>
13
</div>
14
{% else %}
15
<div class="infonotice">
16
  {% trans "…no result found." %}
17
</div>
18
{% endif %}
3
  {% if cell.has_multiple_search_services %}<p class="search-service-label">{{ search_service_label }}</p>{% endif %}
4
  {% if results.data %}
5
    <div class="links-list">
6
      <ul>
7
        {% for item in results.data %}
8
          <li><a href="{{ item.url }}">{{ item.text }}</a>
9
            {% if item.description %}<div>{{ item.description|safe }}</div>{% endif %}
10
          </li>
11
        {% endfor %}
12
      </ul>
13
    </div>
14
  {% else %}
15
    <div class="infonotice">
16
      {% trans "…no result found." %}
17
    </div>
18
  {% endif %}
19 19
{% endif %}
combo/apps/search/templates/combo/search-cell.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
{% if cell.title %}
4
<h2>{{ cell.title }}</h2>
5
{% endif %}
6

  
7
{% block search-form-pre %}
8
{% endblock %}
9

  
10
{% block search-form %}
11
<form id="combo-search-form-{{ cell.pk }}" class="combo-search-form">
12
  <input type="search" name="q" autocomplete="off" id="combo-search-input-{{ cell.pk }}" class="combo-search-input" {% if cell.autofocus %}autofocus {% endif %}{% if cell.input_placeholder %}placeholder="{{ cell.input_placeholder }}" {% endif %}/>
13
  <button class="submit-button combo-search--button" aria-label="{% trans 'Search' %}">
14
    <span class="combo-search--button-label">{% block submit-content %}{% trans 'Search' %}{% endblock %}</span>
15
  </button>
16
</form>
17
{% endblock %}
3
  {% if cell.title %}
4
    <h2>{{ cell.title }}</h2>
5
  {% endif %}
18 6

  
19
{% block search-results %}
20
{% for search_service in cell.search_services %}
21
<div id="combo-search-results-{{ cell.pk }}-{{ forloop.counter }}" class="combo-search-results combo-search-results-{{ search_service.slug }}"></div>
22
{% endfor %}
23
{% endblock %}
7
  {% block search-form-pre %}
8
  {% endblock %}
24 9

  
25
{% block search-js %}
26
<script>
27
$(function() {
28
  var timeout;
29
  var last_search = null;
30
  var $form = $('#combo-search-form-{{ cell.pk }}');
31
  var $input = $('#combo-search-input-{{ cell.pk }}');
32
  {% for search_service in cell.search_services %}
33
  var $results_{{ forloop.counter }} = $('#combo-search-results-{{ cell.pk }}-{{ forloop.counter }}');
34
  var xhr_{{ forloop.counter }} = null;
35
  var url_{{ forloop.counter }} = '{% url 'combo-search-ajax-results' cell_pk=cell.pk service_slug=search_service.slug %}{% if initial_query_string %}?{{ initial_query_string }}{% endif %}';
36
  {% endfor %}
10
  {% block search-form %}
11
    <form id="combo-search-form-{{ cell.pk }}" class="combo-search-form">
12
      <input type="search" name="q" autocomplete="off" id="combo-search-input-{{ cell.pk }}" class="combo-search-input" {% if cell.autofocus %}autofocus {% endif %}{% if cell.input_placeholder %}placeholder="{{ cell.input_placeholder }}" {% endif %}/>
13
      <button class="submit-button combo-search--button" aria-label="{% trans 'Search' %}">
14
        <span class="combo-search--button-label">{% block submit-content %}{% trans 'Search' %}{% endblock %}</span>
15
      </button>
16
    </form>
17
  {% endblock %}
37 18

  
38
  function update() {
39
    var new_search = $input.val();
40
    if (new_search == last_search) return;
41
    last_search = new_search;
42
    $form.addClass('searching');
43
    var count = {{ cell.search_services|length }};
19
  {% block search-results %}
44 20
    {% for search_service in cell.search_services %}
45
    if (xhr_{{ forloop.counter }}) xhr_{{ forloop.counter }}.abort();
46
    xhr_{{ forloop.counter }} = $.get(url_{{ forloop.counter }},
47
      {'q': new_search},
48
      function (response) {
49
        xhr_{{ forloop.counter }} = null;
50
        $results_{{ forloop.counter }}.html(response);
51
        count--;
52
        if (count == 0) {
53
          $form.removeClass('searching');
54
        }
55
      }
56
    );
21
      <div id="combo-search-results-{{ cell.pk }}-{{ forloop.counter }}" class="combo-search-results combo-search-results-{{ search_service.slug }}"></div>
57 22
    {% endfor %}
58
  };
23
  {% endblock %}
59 24

  
60
  $input.on('paste keyup', function() {
61
    clearTimeout(timeout);
62
    timeout = setTimeout(update, 300);
63
  });
64
  $input.on('change', function() {
65
    clearTimeout(timeout);
66
    update(this);
67
  });
68
  $form.on('submit', function() {
69
    last_search = null;  // make explicit submit search in all cases
70
    clearTimeout(timeout);
71
    update();
72
    return false;
73
  });
25
  {% block search-js %}
26
    <script>
27
      $(function() {
28
        var timeout;
29
        var last_search = null;
30
        var $form = $('#combo-search-form-{{ cell.pk }}');
31
        var $input = $('#combo-search-input-{{ cell.pk }}');
32
        {% for search_service in cell.search_services %}
33
          var $results_{{ forloop.counter }} = $('#combo-search-results-{{ cell.pk }}-{{ forloop.counter }}');
34
          var xhr_{{ forloop.counter }} = null;
35
          var url_{{ forloop.counter }} = '{% url 'combo-search-ajax-results' cell_pk=cell.pk service_slug=search_service.slug %}{% if initial_query_string %}?{{ initial_query_string }}{% endif %}';
36
        {% endfor %}
74 37

  
75
  {% if initial_q %}
76
  $input.val('{{ initial_q }}');
77
  update();
78
  {% endif %}
79
});
80
</script>
81
{% endblock %}
38
        function update() {
39
          var new_search = $input.val();
40
          if (new_search == last_search) return;
41
          last_search = new_search;
42
          $form.addClass('searching');
43
          var count = {{ cell.search_services|length }};
44
          {% for search_service in cell.search_services %}
45
            if (xhr_{{ forloop.counter }}) xhr_{{ forloop.counter }}.abort();
46
            xhr_{{ forloop.counter }} = $.get(url_{{ forloop.counter }},
47
              {'q': new_search},
48
              function (response) {
49
                xhr_{{ forloop.counter }} = null;
50
                $results_{{ forloop.counter }}.html(response);
51
                count--;
52
                if (count == 0) {
53
                  $form.removeClass('searching');
54
                }
55
              }
56
            );
57
          {% endfor %}
58
        };
59

  
60
        $input.on('paste keyup', function() {
61
          clearTimeout(timeout);
62
          timeout = setTimeout(update, 300);
63
        });
64
        $input.on('change', function() {
65
          clearTimeout(timeout);
66
          update(this);
67
        });
68
        $form.on('submit', function() {
69
          last_search = null;  // make explicit submit search in all cases
70
          clearTimeout(timeout);
71
          update();
72
          return false;
73
        });
74

  
75
        {% if initial_q %}
76
          $input.val('{{ initial_q }}');
77
          update();
78
        {% endif %}
79
      });
80
    </script>
81
  {% endblock %}
82 82

  
83 83
{% endblock %}
combo/apps/wcs/templates/combo/wcs/backoffice_submission.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
{% if all_formdefs %}
4
<h2>{% trans "New Form" %}</h2>
5
{% for site_formdefs in all_formdefs.values %}
6
<div class="links-list">
7
  {% if all_formdefs.keys|length > 1 %}<h3>{{ site_formdefs.title }}</h3>{% endif %}
8
  <ul>
9
  {% regroup site_formdefs.data|dictsort:"category" by category as categories_formdefs %}
10
  {% for category_formdefs in categories_formdefs %}
11
    <li><h4>{{ category_formdefs.grouper }}</h4></li>
12
    {% for formdef in category_formdefs.list|dictsort:"title" %}
13
       <li><a class="wcs-bo-submission-link" href="{{formdef.backoffice_submission_url}}?{% if name_id %}NameID={{name_id}}&{% endif %}ReturnURL={{ absolute_uri|iriencode }}">{{formdef.title}}</a></li>
3
  {% if all_formdefs %}
4
    <h2>{% trans "New Form" %}</h2>
5
    {% for site_formdefs in all_formdefs.values %}
6
      <div class="links-list">
7
        {% if all_formdefs.keys|length > 1 %}<h3>{{ site_formdefs.title }}</h3>{% endif %}
8
        <ul>
9
          {% regroup site_formdefs.data|dictsort:"category" by category as categories_formdefs %}
10
          {% for category_formdefs in categories_formdefs %}
11
            <li><h4>{{ category_formdefs.grouper }}</h4></li>
12
            {% for formdef in category_formdefs.list|dictsort:"title" %}
13
              <li><a class="wcs-bo-submission-link" href="{{formdef.backoffice_submission_url}}?{% if name_id %}NameID={{name_id}}&{% endif %}ReturnURL={{ absolute_uri|iriencode }}">{{formdef.title}}</a></li>
14
            {% endfor %}
15
          {% endfor %}
16
        </ul>
17
      </div>
14 18
    {% endfor %}
15
  {% endfor %}
16
  </ul>
17
</div>
18
{% endfor %}
19
{% elif not combo_hide_empty_message %}
20
<div class="cell--body"><p class="empty-message">{% trans "There are no possible backoffice submissions." %}</p></div>
21
{% endif %}
19
  {% elif not combo_hide_empty_message %}
20
    <div class="cell--body"><p class="empty-message">{% trans "There are no possible backoffice submissions." %}</p></div>
21
  {% endif %}
22 22
{% endblock %}
combo/apps/wcs/templates/combo/wcs/card-field-value.html
1 1
{% load combo %}{% spaceless %}
2
{% if field.type == "text" and field.display_mode == 'rich' and value %}
3
  {% if cell.display_mode == 'table' or cell.display_mode == 'card' and item.display_mode == 'text' %}
4
    <div class="value">{{ value|safe }}</div>
2
  {% if field.type == "text" and field.display_mode == 'rich' and value %}
3
    {% if cell.display_mode == 'table' or cell.display_mode == 'card' and item.display_mode == 'text' %}
4
      <div class="value">{{ value|safe }}</div>
5
    {% else %}
6
      {{ value|striptags }}
7
    {% endif %}
8
  {% elif field.type == "text" and mode != 'inline' and value %}
9
    <div class="value">{{ field|format_text:value }}</div>
5 10
  {% else %}
6
    {{ value|striptags }}
11
    {% if not mode == 'inline' %}<div class="value">{% endif %}
12
    {% if field.type == "date" %}
13
      {{ value|date }}
14
    {% elif field.type == "bool" and value is not None %}
15
      {{ value|yesno }}
16
    {% elif field.type == "email" and value is not None %}
17
      <a class="pk-card-field-email" href="mailto:{{ value }}">{{ value }}</a>
18
    {% elif field.type == 'file' and value %}
19
      {% if value.content_type|startswith:"image/" %}
20
        <img alt="" src="{% make_public_url url=value.url %}">
21
      {% else %}
22
        <a class="pk-card-field-filename" href="{% make_public_url url=value.url %}" download="{{ value.filename }}">{{ value.filename }}</a>
23
      {% endif %}
24
    {% else %}
25
      {{ value|default:""|urlize }}
26
    {% endif %}
27
    {% if not mode == 'inline' %}</div>{% endif %}
7 28
  {% endif %}
8
{% elif field.type == "text" and mode != 'inline' and value %}
9
  <div class="value">{{ field|format_text:value }}</div>
10
{% else %}
11
{% if not mode == 'inline' %}<div class="value">{% endif %}
12
{% if field.type == "date" %}
13
  {{ value|date }}
14
{% elif field.type == "bool" and value is not None %}
15
  {{ value|yesno }}
16
{% elif field.type == "email" and value is not None %}
17
  <a class="pk-card-field-email" href="mailto:{{ value }}">{{ value }}</a>
18
{% elif field.type == 'file' and value %}
19
  {% if value.content_type|startswith:"image/" %}
20
    <img alt="" src="{% make_public_url url=value.url %}">
21
  {% else %}
22
    <a class="pk-card-field-filename" href="{% make_public_url url=value.url %}" download="{{ value.filename }}">{{ value.filename }}</a>
23
  {% endif %}
24
{% else %}
25
  {{ value|default:""|urlize }}
26
{% endif %}
27
{% if not mode == 'inline' %}</div>{% endif %}
28
{% endif %}
29 29
{% endspaceless %}
combo/apps/wcs/templates/combo/wcs/card.html
1 1
{% load i18n %}
2 2

  
3 3
{% block cell-content %}
4
{% if not card_not_found %}
4
  {% if not card_not_found %}
5 5

  
6
{% block cell-header %}
7
{% if title %}<h2>{{ title|force_escape }}</h2>{% endif %}
8
{% include "combo/asset_picture_fragment.html" %}
9
{% endblock %}
6
    {% block cell-header %}
7
      {% if title %}<h2>{{ title|force_escape }}</h2>{% endif %}
8
      {% include "combo/asset_picture_fragment.html" %}
9
    {% endblock %}
10 10

  
11
{% if card.id %}
12
{% spaceless %}
13
{% if cell.custom_schema %}
14
{% if cell.custom_schema.cells %}
15
<div class="cell--body">
16
  {% with cell.get_custom_schema as custom_schema %}
17
  <div class="{{ custom_schema.grid_class }}">
18
    {% for item in custom_schema.cells %}
19
        {% if item.varname == "@custom@" %}
20
          {% if item.template %}
21
          <div class="{{ item.cell_size|default:"" }}">
22
            {% with card.custom_fields|get:item.template|force_escape as value %}
23
            {% if item.display_mode == "title" %}
24
              <h3>{{ value }}</h3>
25
            {% elif item.display_mode == "subtitle" %}
26
              <h4>{{ value }}</h4>
27
            {% elif item.display_mode == "label" %}
28
              <div class="label">{{ value }}</div>
29
            {% elif item.display_mode == "text" %}
30
              <div class="value">{{ value }}</div>
31
            {% endif %}
32
            {% endwith %}
33
          </div>
34
          {% endif %}
35
        {% elif item.varname == "@link@" %}
36
          {% if item.template and item.page|default:item.url_template %}
37
          <div class="{{ item.cell_size|default:"" }}">
38
            {% with item.page|default:item.url_template as url_key %}
39
            {% with card.custom_fields|get:item.template|force_escape as link_label and card.urls|get:url_key|force_escape as link_url %}
40
            {% if link_label and link_url %}
41
                <div class="value"><a href="{{ link_url }}"{% if item.display_mode == 'button' %} class="pk-button"{% endif %}>{{ link_label }}</a></div>
42
            {% endif %}
43
            {% endwith %}
44
            {% endwith %}
45
          </div>
11
    {% if card.id %}
12
      {% spaceless %}
13
        {% if cell.custom_schema %}
14
          {% if cell.custom_schema.cells %}
15
            <div class="cell--body">
16
              {% with cell.get_custom_schema as custom_schema %}
17
                <div class="{{ custom_schema.grid_class }}">
18
                  {% for item in custom_schema.cells %}
19
                    {% if item.varname == "@custom@" %}
20
                      {% if item.template %}
21
                        <div class="{{ item.cell_size|default:"" }}">
22
                          {% with card.custom_fields|get:item.template|force_escape as value %}
23
                            {% if item.display_mode == "title" %}
24
                              <h3>{{ value }}</h3>
25
                            {% elif item.display_mode == "subtitle" %}
26
                              <h4>{{ value }}</h4>
27
                            {% elif item.display_mode == "label" %}
28
                              <div class="label">{{ value }}</div>
29
                            {% elif item.display_mode == "text" %}
30
                              <div class="value">{{ value }}</div>
31
                            {% endif %}
32
                          {% endwith %}
33
                        </div>
34
                      {% endif %}
35
                    {% elif item.varname == "@link@" %}
36
                      {% if item.template and item.page|default:item.url_template %}
37
                        <div class="{{ item.cell_size|default:"" }}">
38
                          {% with item.page|default:item.url_template as url_key %}
39
                            {% with card.custom_fields|get:item.template|force_escape as link_label and card.urls|get:url_key|force_escape as link_url %}
40
                              {% if link_label and link_url %}
41
                                <div class="value"><a href="{{ link_url }}"{% if item.display_mode == 'button' %} class="pk-button"{% endif %}>{{ link_label }}</a></div>
42
                              {% endif %}
43
                            {% endwith %}
44
                          {% endwith %}
45
                        </div>
46
                      {% endif %}
47
                    {% else %}
48
                      {% if item.varname %}
49
                        {% with fields_by_varnames|get:item.varname as field %}
50
                          {% if field %}
51
                            {% with card.fields|get:item.varname as value %}
52
                              {% if value or item.empty_value != '@skip@' %}
53
                                <div class="{{ item.cell_size|default:"" }}">
54
                                  {% if item.display_mode == "title" %}
55
                                    {% include "combo/wcs/card-field-as-title.html" with title_tag="h3" %}
56
                                  {% elif item.display_mode == "subtitle" %}
57
                                    {% include "combo/wcs/card-field-as-title.html" with title_tag="h4" %}
58
                                  {% elif item.display_mode == "text" %}
59
                                    {% if value or item.empty_value == '@empty@' %}
60
                                      {% include "combo/wcs/card-field-as-text.html" %}
61
                                    {% else %}
62
                                      {% with item.empty_value as value %}
63
                                        {% include "combo/wcs/card-field-as-text.html" %}
64
                                      {% endwith %}
65
                                    {% endif %}
66
                                  {% endif %}
67
                                </div>
68
                              {% endif %}
69
                            {% endwith %}
70
                          {% endif %}
71
                        {% endwith %}
72
                      {% endif %}
73
                    {% endif %}
74
                  {% endfor%}
75
                </div>
76
              {% endwith %}
77
            </div>
46 78
          {% endif %}
79

  
47 80
        {% else %}
48
          {% if item.varname %}
49
          {% with fields_by_varnames|get:item.varname as field %}
50
          {% if field %}
51
          {% with card.fields|get:item.varname as value %}
52
          {% if value or item.empty_value != '@skip@' %}
53
          <div class="{{ item.cell_size|default:"" }}">
54
            {% if item.display_mode == "title" %}
55
              {% include "combo/wcs/card-field-as-title.html" with title_tag="h3" %}
56
            {% elif item.display_mode == "subtitle" %}
57
              {% include "combo/wcs/card-field-as-title.html" with title_tag="h4" %}
58
            {% elif item.display_mode == "text" %}
59
              {% if value or item.empty_value == '@empty@' %}
60
                {% include "combo/wcs/card-field-as-text.html" %}
61
              {% else %}
62
                {% with item.empty_value as value %}
63
                  {% include "combo/wcs/card-field-as-text.html" %}
81
          <div class="cell--body">
82
            {% for field in schema.fields %}
83
              {% if 'varname' in field and field.varname %}
84
                {% with card.fields|get:field.varname as value %}
85
                  <div class="card--auto-field">
86
                    <div class="label">{{ field.label }}</div>
87
                    {% include "combo/wcs/card-field-value.html" %}
88
                  </div>
64 89
                {% endwith %}
65 90
              {% endif %}
66
            {% endif %}
91
            {% endfor %}
67 92
          </div>
68
          {% endif %}
69
          {% endwith %}
70
          {% endif %}
71
          {% endwith %}
72
          {% endif %}
73 93
        {% endif %}
74
    {% endfor%}
75
  </div>
76
  {% endwith %}
77
</div>
78
{% endif %}
94
      {% endspaceless %}
79 95

  
80
{% else %}
81
<div class="cell--body">
82
{% for field in schema.fields %}
83
  {% if 'varname' in field and field.varname %}
84
  {% with card.fields|get:field.varname as value %}
85
  <div class="card--auto-field">
86
    <div class="label">{{ field.label }}</div>
87
    {% include "combo/wcs/card-field-value.html" %}
88
  </div>
89
  {% endwith %}
90
  {% endif %}
91
{% endfor %}
92
</div>
93
{% endif %}
94
{% endspaceless %}
96
    {% else %}
97
      <div class="cell--body">
98
        <p>{% trans 'Unknown Card' %}</p>
99
      </div>
100
    {% endif %}
95 101

  
96
{% else %}
97
<div class="cell--body">
98
  <p>{% trans 'Unknown Card' %}</p>
99
</div>
100
{% endif %}
101

  
102
{% endif %}
102
  {% endif %}
103 103
{% endblock %}
combo/apps/wcs/templates/combo/wcs/cards-field.html
1 1
{% spaceless %}
2
{% if item.varname == "@custom@" %}
3
  {% if item.template %}
4
    {% with card.custom_fields|get:item.template|force_escape as value %}
5
    {% if not ul_display %}<td>{% endif %}{{ value }}{% if not ul_display %}</td>{% endif %}
6
    {% endwith %}
7
  {% endif %}
8
{% elif item.varname == "@link@" %}
9
  {% if item.template and item.page|default:item.url_template %}
10
    {% with item.page|default:item.url_template as url_key %}
11
    {% with card.custom_fields|get:item.template|force_escape as link_label and card.urls|get:url_key|force_escape as link_url %}
12
    {% if not ul_display %}<td>{% endif %}
13
    {% if link_label and link_url %}
14
    <a href="{{ link_url }}"{% if item.display_mode == 'button' %} class="pk-button"{% endif %}>{{ link_label }}</a>
2
  {% if item.varname == "@custom@" %}
3
    {% if item.template %}
4
      {% with card.custom_fields|get:item.template|force_escape as value %}
5
        {% if not ul_display %}<td>{% endif %}{{ value }}{% if not ul_display %}</td>{% endif %}
6
      {% endwith %}
7
    {% endif %}
8
  {% elif item.varname == "@link@" %}
9
    {% if item.template and item.page|default:item.url_template %}
10
      {% with item.page|default:item.url_template as url_key %}
11
        {% with card.custom_fields|get:item.template|force_escape as link_label and card.urls|get:url_key|force_escape as link_url %}
12
          {% if not ul_display %}<td>{% endif %}
13
          {% if link_label and link_url %}
14
            <a href="{{ link_url }}"{% if item.display_mode == 'button' %} class="pk-button"{% endif %}>{{ link_label }}</a>
15
          {% endif %}
16
          {% if not ul_display %}</td>{% endif %}
17
        {% endwith %}
18
      {% endwith %}
15 19
    {% endif %}
16
    {% if not ul_display %}</td>{% endif %}
17
    {% endwith %}
18
    {% endwith %}
19
  {% endif %}
20
{% else %}
21
  {% if item.varname %}
22
  {% with fields_by_varnames|get:item.varname as field %}
23
  {% if field %}
24
  {% with card.fields|get:item.varname as value %}
25
  {% if value %}
26
  {% if not ul_display %}<td>{% endif %}{% include "combo/wcs/card-field-value.html" with mode='inline' %}{% if not ul_display %}</td>{% endif %}
27 20
  {% else %}
28
  {% if not ul_display %}<td>{% endif %}{% include "combo/wcs/card-field-value.html" with mode='inline' value=item.empty_value %}{% if not ul_display %}</td>{% endif %}
29
  {% endif %}
30
  {% endwith %}
31
  {% endif %}
32
  {% endwith %}
21
    {% if item.varname %}
22
      {% with fields_by_varnames|get:item.varname as field %}
23
        {% if field %}
24
          {% with card.fields|get:item.varname as value %}
25
            {% if value %}
26
              {% if not ul_display %}<td>{% endif %}{% include "combo/wcs/card-field-value.html" with mode='inline' %}{% if not ul_display %}</td>{% endif %}
27
            {% else %}
28
              {% if not ul_display %}<td>{% endif %}{% include "combo/wcs/card-field-value.html" with mode='inline' value=item.empty_value %}{% if not ul_display %}</td>{% endif %}
29
            {% endif %}
30
          {% endwith %}
31
        {% endif %}
32
      {% endwith %}
33
    {% endif %}
33 34
  {% endif %}
34
{% endif %}
35 35
{% endspaceless %}
combo/apps/wcs/templates/combo/wcs/cards.html
2 2

  
3 3
{% block cell-content %}
4 4

  
5
{% block cell-header %}
6
{% if title %}<h2>{{ title|force_escape }}</h2>{% endif %}
7
{% include "combo/asset_picture_fragment.html" %}
8
{% endblock %}
5
  {% block cell-header %}
6
    {% if title %}<h2>{{ title|force_escape }}</h2>{% endif %}
7
    {% include "combo/asset_picture_fragment.html" %}
8
  {% endblock %}
9 9

  
10
{% if card_objects %}
11
{% with cell.get_custom_schema as custom_schema %}
12
{% if cell.custom_schema and cell.custom_schema.cells|length > 1 %}
13
<div class="pk-table-wrapper">
14
<table class="pk-data-table pk-table-headers">
15
  {% if custom_schema.grid_headers %}
16
  <thead>
17
    {% for item in custom_schema.cells %}
18
    {% if item.varname == "@custom@" %}
19
      {% if item.template %}
20
      <th>{{ item.header|default:"" }}</th>
21
      {% endif %}
22
    {% elif item.varname == "@link@" %}
23
      {% if item.template and item.page|default:item.url_template %}
24
      <th>{{ item.header|default:"" }}</th>
25
      {% endif %}
26
    {% else %}
27
      {% if item.varname %}
28
      {% with fields_by_varnames|get:item.varname as field %}
29
      {% if field %}
30
      <th>{{ field.label }}</th>
31
      {% endif %}
32
      {% endwith %}
10
  {% if card_objects %}
11
    {% with cell.get_custom_schema as custom_schema %}
12
      {% if cell.custom_schema and cell.custom_schema.cells|length > 1 %}
13
        <div class="pk-table-wrapper">
14
          <table class="pk-data-table pk-table-headers">
15
            {% if custom_schema.grid_headers %}
16
              <thead>
17
                {% for item in custom_schema.cells %}
18
                  {% if item.varname == "@custom@" %}
19
                    {% if item.template %}
20
                      <th>{{ item.header|default:"" }}</th>
21
                    {% endif %}
22
                  {% elif item.varname == "@link@" %}
23
                    {% if item.template and item.page|default:item.url_template %}
24
                      <th>{{ item.header|default:"" }}</th>
25
                    {% endif %}
26
                  {% else %}
27
                    {% if item.varname %}
28
                      {% with fields_by_varnames|get:item.varname as field %}
29
                        {% if field %}
30
                          <th>{{ field.label }}</th>
31
                        {% endif %}
32
                      {% endwith %}
33
                    {% endif %}
34
                  {% endif %}
35
                {% endfor %}
36
              </thead>
37
            {% endif %}
38
            <tbody>
39
              {% for card in card_objects %}
40
                <tr>
41
                  {% for item in custom_schema.cells %}
42
                    {% include "combo/wcs/cards-field.html" %}
43
                  {% endfor %}
44
                </tr>
45
              {% endfor %}
46
            </tbody>
47
          </table>
48
        </div>
49
      {% else %}
50
        <div class="links-list cards-{{ cell.card_slug }} list-of-cards">
51
          <ul>
52
            {% for card in card_objects %}
53
              <li>
54
                {% spaceless %}
55
                  {% if custom_schema %}
56
                    {% include "combo/wcs/cards-field.html" with item=custom_schema.cells.0 ul_display=True %}
57
                  {% else %}
58
                    <a href="{% if card_page_base_url %}{{ card_page_base_url }}{{ card.id }}/{% else %}{{ card.url }}{% endif %}"><span class="card-title">{{ card.text }}</span></a>
59
                  {% endif %}
60
                {% endspaceless %}
61
              </li>
62
            {% endfor %}
63
          </ul>
64
        </div>
33 65
      {% endif %}
34
    {% endif %}
35
    {% endfor %}
36
  </thead>
66
      {% include "combo/pagination.html" %}
67
    {% endwith %}
68
  {% else %}
69
    <div class="cell--body"><p class="empty-message">{% trans "There are no cards." %}</p></div>
37 70
  {% endif %}
38
  <tbody>
39
    {% for card in card_objects %}
40
    <tr>
41
      {% for item in custom_schema.cells %}
42
      {% include "combo/wcs/cards-field.html" %}
43
      {% endfor %}
44
    </tr>
45
    {% endfor %}
46
  </tbody>
47
</table>
48
</div>
49
{% else %}
50
<div class="links-list cards-{{ cell.card_slug }} list-of-cards">
51
  <ul>
52
    {% for card in card_objects %}
53
    <li>
54
    {% spaceless %}
55
    {% if custom_schema %}
56
      {% include "combo/wcs/cards-field.html" with item=custom_schema.cells.0 ul_display=True %}
57
    {% else %}
58
      <a href="{% if card_page_base_url %}{{ card_page_base_url }}{{ card.id }}/{% else %}{{ card.url }}{% endif %}"><span class="card-title">{{ card.text }}</span></a>
59
    {% endif %}
60
    {% endspaceless %}
61
    </li>
62
    {% endfor %}
63
  </ul>
64
</div>
65
{% endif %}
66
{% include "combo/pagination.html" %}
67
{% endwith %}
68
{% else %}
69
<div class="cell--body"><p class="empty-message">{% trans "There are no cards." %}</p></div>
70
{% endif %}
71 71

  
72 72
{% endblock %}
combo/apps/wcs/templates/combo/wcs/care_forms.html
1 1
{% load i18n combo %}
2 2
{% block cell-content %}
3
{% for slug, forms in care_forms.items %}
4
  <h2>{% if cell.custom_title %}{{ cell.custom_title }}{% else %}{% trans "Forms to process" %} - {{ forms.title }}{% endif %}</h2>
5
  {% if forms.data %}
6
  <table id="listing" class="main clickable-rows">
7
    <thead>
8
      <tr>
9
          <th><span>{% trans "Form" %}</span></th>
10
          <th><span>{% trans "Reference" %}</span></th>
11
          <th><span>{% trans "Created" %}</span></th>
12
          <th><span>{% trans "Last Modified" %}</span></th>
13
          <th><span>{% trans "Status" %}</span></th>
14
      </tr>
15
    </thead>
16
    <tbody>
17
    {% for data in forms.data|dictsortreversed:"form_receipt_datetime" %}
18
    <tr>
19
      <td>{{ data.name }} {% if data.form_digest %}<br><small>{{ data.form_digest }}</small>{% endif %}</td>
20
      {% if is_portal_agent %}
21
      <td><a href="{{ data.form_url_backoffice }}">{{ data.form_number }}</a></td>
22
      {% else %}
23
      <td><a href="{{ data.form_url }}">{{ data.form_number }}</a></td>
24
      {% endif %}
25
      <td>{{ data.datetime|strptime:"%Y-%m-%d %H:%M:%S" }}</td>
26
      <td>{{ data.last_update_time|strptime:"%Y-%m-%d %H:%M:%S" }}</td>
27
      <td>{{ data.status }}</td>
28
    </tr>
29
    {% endfor %}
30
    </tbody>
31
  </table>
32
  {% endif %}
33
  {% if is_portal_agent %}
34
  <p><a class="pk-button" href="{{ forms.url }}backoffice/management/listing{% if forms.categories %}?category_slugs={{ forms.categories|join:"," }}{% endif %}">{% trans "See all forms" %}</a></p>
35
  {% endif %}
36
{% endfor %}
3
  {% for slug, forms in care_forms.items %}
4
    <h2>{% if cell.custom_title %}{{ cell.custom_title }}{% else %}{% trans "Forms to process" %} - {{ forms.title }}{% endif %}</h2>
5
    {% if forms.data %}
6
      <table id="listing" class="main clickable-rows">
7
        <thead>
8
          <tr>
9
            <th><span>{% trans "Form" %}</span></th>
10
            <th><span>{% trans "Reference" %}</span></th>
11
            <th><span>{% trans "Created" %}</span></th>
12
            <th><span>{% trans "Last Modified" %}</span></th>
13
            <th><span>{% trans "Status" %}</span></th>
14
          </tr>
15
        </thead>
16
        <tbody>
17
          {% for data in forms.data|dictsortreversed:"form_receipt_datetime" %}
18
            <tr>
19
              <td>{{ data.name }} {% if data.form_digest %}<br><small>{{ data.form_digest }}</small>{% endif %}</td>
20
              {% if is_portal_agent %}
21
                <td><a href="{{ data.form_url_backoffice }}">{{ data.form_number }}</a></td>
22
              {% else %}
23
                <td><a href="{{ data.form_url }}">{{ data.form_number }}</a></td>
24
              {% endif %}
25
              <td>{{ data.datetime|strptime:"%Y-%m-%d %H:%M:%S" }}</td>
26
              <td>{{ data.last_update_time|strptime:"%Y-%m-%d %H:%M:%S" }}</td>
27
              <td>{{ data.status }}</td>
28
            </tr>
29
          {% endfor %}
30
        </tbody>
31
      </table>
32
    {% endif %}
33
    {% if is_portal_agent %}
34
      <p><a class="pk-button" href="{{ forms.url }}backoffice/management/listing{% if forms.categories %}?category_slugs={{ forms.categories|join:"," }}{% endif %}">{% trans "See all forms" %}</a></p>
35
    {% endif %}
36
  {% endfor %}
37 37
{% endblock %}
combo/apps/wcs/templates/combo/wcs/category.html
1 1
{% block cell-content %}
2
<div class="wcs-category-{{slug}}">
3
<h2><a href="{{ url }}">{{ title }}</a></h2>
4
{{ description|safe }}
5
</div>
2
  <div class="wcs-category-{{slug}}">
3
    <h2><a href="{{ url }}">{{ title }}</a></h2>
4
    {{ description|safe }}
5
  </div>
6 6
{% endblock %}
combo/apps/wcs/templates/combo/wcs/current_drafts.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
<h2>{% trans 'Current Drafts' %}</h2>
4
{% if drafts %}
5
{% for slug, forms in current_drafts.items %}
6
<div class="links-list current-drafts-{{ slug }} current-drafts list-of-forms">
7
  {% if forms.data %}
8
  <ul>
9
    {% for data in forms.data %}
10
    {% if data.url and data.title and not data.form_status_is_endpoint %}
11
    <li class="{{data.status_css_class}} {% if data.form_status_is_endpoint %}done{% endif %}"><a
12
      href="{{ data.url }}"><span class="form-title">{{ data.name }}</span>
13
        <span class="form-number">{{data.datetime|strptime:"%Y-%m-%d %H:%M:%S"}}</span>
14
        <span class="form-status">{% trans 'draft' %}</span></a></li>
15
    {% endif %}
3
  <h2>{% trans 'Current Drafts' %}</h2>
4
  {% if drafts %}
5
    {% for slug, forms in current_drafts.items %}
6
      <div class="links-list current-drafts-{{ slug }} current-drafts list-of-forms">
7
        {% if forms.data %}
8
          <ul>
9
            {% for data in forms.data %}
10
              {% if data.url and data.title and not data.form_status_is_endpoint %}
11
                <li class="{{data.status_css_class}} {% if data.form_status_is_endpoint %}done{% endif %}"><a
12
                  href="{{ data.url }}"><span class="form-title">{{ data.name }}</span>
13
                  <span class="form-number">{{data.datetime|strptime:"%Y-%m-%d %H:%M:%S"}}</span>
14
                  <span class="form-status">{% trans 'draft' %}</span></a></li>
15
              {% endif %}
16
            {% endfor %}
17
          </ul>
18
        {% endif %}
19
      </div>
16 20
    {% endfor %}
17
  </ul>
18
  {% endif %}
19
</div>
20
{% endfor %}
21
{% include "combo/pagination.html" %}
22
{% else %}
23
  <div class="cell--body"><p class="empty-message">{% trans "There are no current drafts." %}</p></div>{% endif %}
21
    {% include "combo/pagination.html" %}
22
  {% else %}
23
    <div class="cell--body"><p class="empty-message">{% trans "There are no current drafts." %}</p></div>{% endif %}
24 24
{% endblock %}
combo/apps/wcs/templates/combo/wcs/current_forms.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
<h2>{{ cell.custom_title|default:_('Current Forms') }}</h2>
4
{% if forms %}
5
{% for slug, forms in current_forms.items %}
6
  <div class="links-list current-forms-{{ slug }} current-forms list-of-forms">
7
  {% include "combo/wcs/list_of_forms.html" %}
8
  </div>
9
{% endfor %}
10
{% include "combo/pagination.html" %}
11
{% else %}
12
  <div class="cell--body"><p class="empty-message">{% trans "There are no current forms." %}</p></div>
13
{% endif %}
3
  <h2>{{ cell.custom_title|default:_('Current Forms') }}</h2>
4
  {% if forms %}
5
    {% for slug, forms in current_forms.items %}
6
      <div class="links-list current-forms-{{ slug }} current-forms list-of-forms">
7
        {% include "combo/wcs/list_of_forms.html" %}
8
      </div>
9
    {% endfor %}
10
    {% include "combo/pagination.html" %}
11
  {% else %}
12
    <div class="cell--body"><p class="empty-message">{% trans "There are no current forms." %}</p></div>
13
  {% endif %}
14 14
{% endblock %}
combo/apps/wcs/templates/combo/wcs/form.html
1 1
{% block cell-content %}
2
<div class="wcs-form-{{slug}}">
3
{% include "combo/wcs/form_link_fragment.html" %}
4
</div>
2
  <div class="wcs-form-{{slug}}">
3
    {% include "combo/wcs/form_link_fragment.html" %}
4
  </div>
5 5
{% endblock %}
combo/apps/wcs/templates/combo/wcs/form_categories.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
<h2>{% trans 'Form Categories' %}</h2>
4
{% for slug, categories in form_categories.items %}
5
<div class="categories-{{ slug }}">
6
  <h3>{{  categories.title }}</h3>
7
  <ul>
8
    {% for data in categories.data %}
9
    <li><a href="{{ data.url }}">{{ data.title }}</a></li>
10
    {% endfor %}
11
  </ul>
12
</div>
13
{% endfor %}
3
  <h2>{% trans 'Form Categories' %}</h2>
4
  {% for slug, categories in form_categories.items %}
5
    <div class="categories-{{ slug }}">
6
      <h3>{{  categories.title }}</h3>
7
      <ul>
8
        {% for data in categories.data %}
9
          <li><a href="{{ data.url }}">{{ data.title }}</a></li>
10
        {% endfor %}
11
      </ul>
12
    </div>
13
  {% endfor %}
14 14
{% endblock %}
combo/apps/wcs/templates/combo/wcs/form_link_fragment.html
1 1
{% firstof form.url url as form_url %}
2 2
{% firstof form.title title as form_title %}
3 3
{% autoescape off %}
4
{% firstof form.description description as form_description %}
4
  {% firstof form.description description as form_description %}
5 5
{% endautoescape %}
6 6

  
7 7

  
8 8
{% block form-link-pre %}{% endblock %}
9 9
<a href="{{ form_url }}{% if not request_is_a_bot %}tryauth?cancelurl={{ absolute_uri|urlencode|iriencode }}{% endif %}">{% block form-link-title %}{{ form_title }}{% endblock %}</a>
10 10
{% if form_description %}
11
<div class="description">{% block form-link-description %}{{ form_description|safe }}{% endblock %}</div>
11
  <div class="description">{% block form-link-description %}{{ form_description|safe }}{% endblock %}</div>
12 12
{% endif %}
13 13
{% block form-link-post %}{% endblock %}
14 14

  
combo/apps/wcs/templates/combo/wcs/forms_of_category.html
1 1
{% load assets i18n %}
2 2
{% block cell-content %}
3
{% if forms or combo_display_even_empty_categories %}
4
{% block cell-header %}
5
<h2>{{ title }}</h2>
6
{% include "combo/asset_picture_fragment.html" %}
7
{% if description %}
8
<div class="intro">
9
{{ description|safe }}
10
</div>
11
{% endif %}
12
{% endblock %}
3
  {% if forms or combo_display_even_empty_categories %}
4
    {% block cell-header %}
5
      <h2>{{ title }}</h2>
6
      {% include "combo/asset_picture_fragment.html" %}
7
      {% if description %}
8
        <div class="intro">
9
          {{ description|safe }}
10
        </div>
11
      {% endif %}
12
    {% endblock %}
13 13

  
14
<div class="wcs-forms-of-category-{{slug}} links-list">
15
{% block cell-top-content %}{% endblock cell-top-content %}
16
<ul>
17
{% for form in forms %}
18
<li class="{{ form.css_classes|join:" " }}">{% include "combo/wcs/form_link_fragment.html" %}</li>
19
{% endfor %}
20
{% if more_forms %}
21
  <li class="add-more-items">
22
    <a role="button" tabindex="0" aria-expanded="false" aria-controls="more-items-{{ cell.get_reference }}" aria-label="{% trans 'More items' %}" id="btn-more-items-{{ cell.get_reference }}" class="add-more-items--button">{% block cell-more-items-btn-label %}+{% endblock %}</a>
23
  </li>
24
{% endif %}
25
</ul>
14
    <div class="wcs-forms-of-category-{{slug}} links-list">
15
      {% block cell-top-content %}{% endblock cell-top-content %}
16
      <ul>
17
        {% for form in forms %}
18
          <li class="{{ form.css_classes|join:" " }}">{% include "combo/wcs/form_link_fragment.html" %}</li>
19
        {% endfor %}
20
        {% if more_forms %}
21
          <li class="add-more-items">
22
            <a role="button" tabindex="0" aria-expanded="false" aria-controls="more-items-{{ cell.get_reference }}" aria-label="{% trans 'More items' %}" id="btn-more-items-{{ cell.get_reference }}" class="add-more-items--button">{% block cell-more-items-btn-label %}+{% endblock %}</a>
23
          </li>
24
        {% endif %}
25
      </ul>
26 26

  
27
{% if more_forms %}
28
<ul style="display: none" class="more-items" id="more-items-{{ cell.get_reference }}" aria-labelledby="btn-wcs-more-items-{{ cell.get_reference }}">
29
{% for form in more_forms %}
30
<li class="more-items--item {{ form.css_classes|join:" " }}">
31
  {% include "combo/wcs/form_link_fragment.html" %}
32
</li>
33
{% endfor %}
34
{% endif %}
35
</ul>
36
</div>
37
{% endif %}
27
      {% if more_forms %}
28
        <ul style="display: none" class="more-items" id="more-items-{{ cell.get_reference }}" aria-labelledby="btn-wcs-more-items-{{ cell.get_reference }}">
29
          {% for form in more_forms %}
30
            <li class="more-items--item {{ form.css_classes|join:" " }}">
31
              {% include "combo/wcs/form_link_fragment.html" %}
32
            </li>
33
          {% endfor %}
34
      {% endif %}
35
    </ul>
36
    </div>
37
  {% endif %}
38 38
{% endblock %}
combo/apps/wcs/templates/combo/wcs/list_of_forms.html
1 1
{% load combo %}
2 2
{% block cell-content %}
3
{% if forms %}
4
<ul>
5
  {% for data in forms.data|dictsortreversed:"form_receipt_datetime" %}
6
  {% if data.url and data.title %}
7
  <li class="{{data.status_css_class}} {% if data.form_status_is_endpoint %}done{% endif %}"><a
8
      {% if data.readable %}href="{{ data.url }}"{% endif %}><span class="form-title">{{data.name}}</span>
9
    {% if data.draft %}
10
    <span class="form-number">{{data.datetime|strptime:"%Y-%m-%d %H:%M:%S"}}</span>
11
    {% else %}
12
    <span class="form-number">{{data.form_number}}
13
    {% if data.form_digest %}<span class="form-digest">({{data.form_digest}})</span>{% endif %}
14
    </span>
15
    {% endif %}
16
    <span class="form-status">{{data.status}}</span></a></li>
3
  {% if forms %}
4
    <ul>
5
      {% for data in forms.data|dictsortreversed:"form_receipt_datetime" %}
6
        {% if data.url and data.title %}
7
          <li class="{{data.status_css_class}} {% if data.form_status_is_endpoint %}done{% endif %}"><a
8
            {% if data.readable %}href="{{ data.url }}"{% endif %}><span class="form-title">{{data.name}}</span>
9
            {% if data.draft %}
10
              <span class="form-number">{{data.datetime|strptime:"%Y-%m-%d %H:%M:%S"}}</span>
11
            {% else %}
12
              <span class="form-number">{{data.form_number}}
13
                {% if data.form_digest %}<span class="form-digest">({{data.form_digest}})</span>{% endif %}
14
              </span>
15
            {% endif %}
16
            <span class="form-status">{{data.status}}</span></a></li>
17
        {% endif %}
18
      {% endfor %}
19
    </ul>
17 20
  {% endif %}
18
  {% endfor %}
19
</ul>
20
{% endif %}
21 21
{% endblock %}
combo/apps/wcs/templates/combo/wcs/manager/card-cell-form-display.html
3 3
{{ display_form.as_p }}
4 4

  
5 5
{% if card_schema %}
6
{{ card_schema|json_script:card_schema_id }}
6
  {{ card_schema|json_script:card_schema_id }}
7 7

  
8
{# display mode as card #}
8
  {# display mode as card #}
9 9

  
10
{# UI to customize content layout #}
11
<div class="as-card wcs-cards-cell--grid">
12
  <div class="as-card wcs-cards-cell--grid-options">
13
    <span class="as-card wcs-cards-cell--grid-layout-label">{% trans "Grid Layout:" %}</span>
14
    <span class="as-card wcs-cards-cell--grid-layout-mode"></span>
15
    <a role="button" class="as-card wcs-cards-cell--grid-layout-btn">
16
      {% trans "Edit" %}
17
    </a>
18
  </div>
19
  <div class="as-card wcs-cards-cell--grid-cells">
20
  </div>
21
  <div class="as-card wcs-cards-cell--grid-buttons">
22
    <button type="button" class="as-card wcs-cards-cell--add-grid-cell-btn">{% trans "Add" %}</button>
23
  </div>
24
</div>
25

  
26
{# templates for JS #}
27
<script type="text/template" class="as-card wcs-cards-cell--grid-form-tpl">
28
  <form>
29
    <p>
30
      {% trans "Layout" %}
31
      <select name="grid-layout">
32
        <option value="fx-grid--auto">{% trans "Automatic" %}</option>
33
        <option value="fx-grid">{% trans "1 column" %}</option>
34
        <option value="fx-grid--t2">{% trans "2 columns" %}</option>
35
        <option value="fx-grid--t3">{% trans "3 columns" %}</option>
36
      </select>
37
    </p>
38
  </form>
39
</script>
40
<script type="text/template" class="as-card wcs-cards-cell--grid-cell-form-tpl">
41
  <form>
42
    <p>
43
      <label>
44
        {% trans "Content type" %}
45
        <select name="entry_type" data-dynamic-display-parent="true">
46
          <option value="@field@">{% trans "Card field" %}</option>
47
          <option value="@custom@">{% trans "Custom" %}</option>
48
          <option value="@link@">{% trans "Link" %}</option>
49
        </select>
50
      </label>
51
    </p>
52

  
53
    {# fields group for "content type == @field@ " #}
54
    <div data-dynamic-display-child-of="entry_type" data-dynamic-display-value="@field@">
55
      <p>
56
        <label>
57
          {% trans "Card Fields" %}
58
          <select name="field_varname"></select>
59
        </label>
60
      </p>
61
      <p>
62
        <label>
63
          {% trans "Field content" %}
64
          <select name="field_content" data-dynamic-display-parent="true">
65
            <option value="label-and-value">{% trans "Label & Value" %}</option>
66
            <option value="label">{% trans "Label only" %}</option>
67
            <option value="value">{% trans "Value only" %}</option>
68
          </select>
69
        </label>
70
      </p>
71
      <p data-dynamic-display-child-of="field_content" data-dynamic-display-value-in="label value">
72
        <label>
73
          {% trans "Display mode" %}
74
          <select name="field_display_mode">
75
            <option value="text">{% trans "Text" %}</option>
76
            <option value="title">{% trans "Title" %}</option>
77
            <option value="subtitle">{% trans "Subtitle" %}</option>
78
          </select>
79
        </label>
80
      </p>
81
      <p>
82
        <label>
83
          {% trans "Empty value display mode" %}
84
          <select name="field_empty_display_mode" data-dynamic-display-parent="true">
85
            <option value="@empty@">{% trans "Display as empty" %}</option>
86
            <option value="@skip@">{% trans "Hide" %}</option>
87
            <option value="@custom@">{% trans "Display a custom text" %}</option>
88
          </select>
89
        </label>
90
      </p>
91
      <p data-dynamic-display-child-of="field_empty_display_mode" data-dynamic-display-value="@custom@">
92
        <label>
93
          {% trans "Empty value custom text" %}
94
          <input name="field_empty_text" />
95
        </label>
96
      </p>
10
  {# UI to customize content layout #}
11
  <div class="as-card wcs-cards-cell--grid">
12
    <div class="as-card wcs-cards-cell--grid-options">
13
      <span class="as-card wcs-cards-cell--grid-layout-label">{% trans "Grid Layout:" %}</span>
14
      <span class="as-card wcs-cards-cell--grid-layout-mode"></span>
15
      <a role="button" class="as-card wcs-cards-cell--grid-layout-btn">
16
        {% trans "Edit" %}
17
      </a>
97 18
    </div>
98

  
99
    {# fields group for "content type == @custom@" #}
100
    <div data-dynamic-display-child-of="entry_type" data-dynamic-display-value="@custom@">
101
      <p>
102
        <label>
103
          {% trans "Value template" %}
104
          <textarea name="custom_template" style="resize: vertical;"></textarea>
105
        </label>
106
      </p>
107
      <p>
108
        <label>
109
          {% trans "Display mode" %}
110
          <select name="custom_display_mode">
111
            <option value="label">{% trans "Label" %}</option>
112
            <option value="text">{% trans "Text" %}</option>
113
            <option value="title">{% trans "Title" %}</option>
114
            <option value="subtitle">{% trans "Subtitle" %}</option>
115
          </select>
116
        </label>
117
      </p>
19
    <div class="as-card wcs-cards-cell--grid-cells">
20
    </div>
21
    <div class="as-card wcs-cards-cell--grid-buttons">
22
      <button type="button" class="as-card wcs-cards-cell--add-grid-cell-btn">{% trans "Add" %}</button>
118 23
    </div>
24
  </div>
119 25

  
120
    {# fields group for "content type == @link@" #}
121
    <div data-dynamic-display-child-of="entry_type" data-dynamic-display-value="@link@">
122
      <p>
123
        <label>
124
          {% trans "Label template" %}
125
          <textarea name="link_label_template" style="resize: vertical;"></textarea>
126
        </label>
127
      </p>
26
  {# templates for JS #}
27
  <script type="text/template" class="as-card wcs-cards-cell--grid-form-tpl">
28
    <form>
128 29
      <p>
129
        <label>
130
          {% trans "URL" %}
131
          <select name="link_page" data-dynamic-display-parent="true">
132
            {% for page in cell.get_matching_pages %}
133
              <option value="{{ page.pk }}">{{ page.get_full_path_titles }}</option>
134
            {% endfor %}
135
            <option value="">{% trans "URL template" %}</option>
136
          </select>
137
        </label>
138
      </p>
139
      <p data-dynamic-display-child-of="link_page" data-dynamic-display-value="">
140
        <label>
141
          <textarea name="link_url_template" style="resize: vertical;"></textarea>
142
        </label>
30
        {% trans "Layout" %}
31
        <select name="grid-layout">
32
          <option value="fx-grid--auto">{% trans "Automatic" %}</option>
33
          <option value="fx-grid">{% trans "1 column" %}</option>
34
          <option value="fx-grid--t2">{% trans "2 columns" %}</option>
35
          <option value="fx-grid--t3">{% trans "3 columns" %}</option>
36
        </select>
143 37
      </p>
38
    </form>
39
  </script>
40
  <script type="text/template" class="as-card wcs-cards-cell--grid-cell-form-tpl">
41
    <form>
144 42
      <p>
145 43
        <label>
146
          {% trans "Display mode" %}
147
          <select name="link_display_mode">
148
            <option value="link">{% trans "Link" %}</option>
149
            <option value="button">{% trans "Button" %}</option>
44
          {% trans "Content type" %}
45
          <select name="entry_type" data-dynamic-display-parent="true">
46
            <option value="@field@">{% trans "Card field" %}</option>
47
            <option value="@custom@">{% trans "Custom" %}</option>
48
            <option value="@link@">{% trans "Link" %}</option>
150 49
          </select>
151 50
        </label>
152 51
      </p>
153
    </div>
154

  
155
    <p>
156
      <label>
157
        {% trans "Size" %}
158
        <select name="cell_size">
159
          <option value="">{% trans "Automatic" %}</option>
160
          <option value="size--1-1">1/1</option>
161
          <option value="size--t1-2">1/2</option>
162
          <option value="size--t1-3">1/3</option>
163
          <option value="size--t2-3">2/3</option>
164
        </select>
165
      </label>
166
    </p>
167
  </form>
168
</script>
169
<script  type="text/template" class="as-card wcs-cards-cell--grid-cell-tpl">
170
  <div class="as-card wcs-cards-cell--grid-cell">
171
    <div class="as-card wcs-cards-cell--grid-cell-content"></div>
172
    <div class="as-card wcs-cards-cell--grid-cell-buttons">
173
      <a role="button" class="as-card wcs-cards-cell--grid-cell-edit">{% trans "Edit" %}</a>
174
      <a role="button" class="as-card wcs-cards-cell--grid-cell-delete">{% trans "Delete" %}</a>
175
    </div>
176
  </div>
177
</script>
178 52

  
179
{# display mode as table #}
53
      {# fields group for "content type == @field@ " #}
54
      <div data-dynamic-display-child-of="entry_type" data-dynamic-display-value="@field@">
55
        <p>
56
          <label>
57
            {% trans "Card Fields" %}
58
            <select name="field_varname"></select>
59
          </label>
60
        </p>
61
        <p>
62
          <label>
63
            {% trans "Field content" %}
64
            <select name="field_content" data-dynamic-display-parent="true">
65
              <option value="label-and-value">{% trans "Label & Value" %}</option>
66
              <option value="label">{% trans "Label only" %}</option>
67
              <option value="value">{% trans "Value only" %}</option>
68
            </select>
69
          </label>
70
        </p>
71
        <p data-dynamic-display-child-of="field_content" data-dynamic-display-value-in="label value">
72
          <label>
73
            {% trans "Display mode" %}
74
            <select name="field_display_mode">
75
              <option value="text">{% trans "Text" %}</option>
76
              <option value="title">{% trans "Title" %}</option>
77
              <option value="subtitle">{% trans "Subtitle" %}</option>
78
            </select>
79
          </label>
80
        </p>
81
        <p>
82
          <label>
83
            {% trans "Empty value display mode" %}
84
            <select name="field_empty_display_mode" data-dynamic-display-parent="true">
85
              <option value="@empty@">{% trans "Display as empty" %}</option>
86
              <option value="@skip@">{% trans "Hide" %}</option>
87
              <option value="@custom@">{% trans "Display a custom text" %}</option>
88
            </select>
89
          </label>
90
        </p>
91
        <p data-dynamic-display-child-of="field_empty_display_mode" data-dynamic-display-value="@custom@">
92
          <label>
93
            {% trans "Empty value custom text" %}
94
            <input name="field_empty_text" />
95
          </label>
96
        </p>
97
      </div>
180 98

  
181
{# UI to customize content layout #}
182
<div class="as-table wcs-cards-cell--grid">
183
  <div class="as-table wcs-cards-cell--grid-options">
184
    <span class="as-table wcs-cards-cell--grid-headers-label">{% trans "Display headers:" %}</span>
185
    <span class="as-table wcs-cards-cell--grid-headers-mode"></span>
186
    <a role="button" class="as-table wcs-cards-cell--grid-headers-btn">
187
      {% trans "Edit" %}
188
    </a>
189
  </div>
190
  <div class="as-table wcs-cards-cell--grid-cells">
191
  </div>
192
  <div class="as-table wcs-cards-cell--grid-buttons">
193
    <button type="button" class="as-table wcs-cards-cell--add-grid-cell-btn">{% trans "Add" %}</button>
194
  </div>
195
</div>
99
      {# fields group for "content type == @custom@" #}
100
      <div data-dynamic-display-child-of="entry_type" data-dynamic-display-value="@custom@">
101
        <p>
102
          <label>
103
            {% trans "Value template" %}
104
            <textarea name="custom_template" style="resize: vertical;"></textarea>
105
          </label>
106
        </p>
107
        <p>
108
          <label>
109
            {% trans "Display mode" %}
110
            <select name="custom_display_mode">
111
              <option value="label">{% trans "Label" %}</option>
112
              <option value="text">{% trans "Text" %}</option>
113
              <option value="title">{% trans "Title" %}</option>
114
              <option value="subtitle">{% trans "Subtitle" %}</option>
115
            </select>
116
          </label>
117
        </p>
118
      </div>
196 119

  
197
{# templates for JS #}
198
<script type="text/template" class="as-table wcs-cards-cell--grid-form-tpl">
199
  <form>
200
    <p>
201
      {% trans "Display headers" %}
202
      <input name="grid-headers" type="checkbox" />
203
    </p>
204
  </form>
205
</script>
206
<script type="text/template" class="as-table wcs-cards-cell--grid-cell-form-tpl">
207
  <form>
208
    <p>
209
      <label>
210
        {% trans "Content type" %}
211
        <select name="entry_type" data-dynamic-display-parent="true">
212
          <option value="@field@">{% trans "Card field" %}</option>
213
          <option value="@custom@">{% trans "Custom" %}</option>
214
          <option value="@link@">{% trans "Link" %}</option>
215
        </select>
216
      </label>
217
    </p>
120
      {# fields group for "content type == @link@" #}
121
      <div data-dynamic-display-child-of="entry_type" data-dynamic-display-value="@link@">
122
        <p>
123
          <label>
124
            {% trans "Label template" %}
125
            <textarea name="link_label_template" style="resize: vertical;"></textarea>
126
          </label>
127
        </p>
128
        <p>
129
          <label>
130
            {% trans "URL" %}
131
            <select name="link_page" data-dynamic-display-parent="true">
132
              {% for page in cell.get_matching_pages %}
133
                <option value="{{ page.pk }}">{{ page.get_full_path_titles }}</option>
134
              {% endfor %}
135
              <option value="">{% trans "URL template" %}</option>
136
            </select>
137
          </label>
138
        </p>
139
        <p data-dynamic-display-child-of="link_page" data-dynamic-display-value="">
140
          <label>
141
            <textarea name="link_url_template" style="resize: vertical;"></textarea>
142
          </label>
143
        </p>
144
        <p>
145
          <label>
146
            {% trans "Display mode" %}
147
            <select name="link_display_mode">
148
              <option value="link">{% trans "Link" %}</option>
149
              <option value="button">{% trans "Button" %}</option>
150
            </select>
151
          </label>
152
        </p>
153
      </div>
218 154

  
219
    {# fields group for "content type == @field@ " #}
220
    <div data-dynamic-display-child-of="entry_type" data-dynamic-display-value="@field@">
221
      <p>
222
        <label>
223
          {% trans "Card Fields" %}
224
          <select name="field_varname"></select>
225
        </label>
226
      </p>
227 155
      <p>
228 156
        <label>
229
          {% trans "Custom text to replace empty value" %}
230
          <input name="field_empty_text" />
157
          {% trans "Size" %}
158
          <select name="cell_size">
159
            <option value="">{% trans "Automatic" %}</option>
160
            <option value="size--1-1">1/1</option>
161
            <option value="size--t1-2">1/2</option>
162
            <option value="size--t1-3">1/3</option>
163
            <option value="size--t2-3">2/3</option>
164
          </select>
231 165
        </label>
232 166
      </p>
167
    </form>
168
  </script>
169
  <script  type="text/template" class="as-card wcs-cards-cell--grid-cell-tpl">
170
    <div class="as-card wcs-cards-cell--grid-cell">
171
      <div class="as-card wcs-cards-cell--grid-cell-content"></div>
172
      <div class="as-card wcs-cards-cell--grid-cell-buttons">
173
        <a role="button" class="as-card wcs-cards-cell--grid-cell-edit">{% trans "Edit" %}</a>
174
        <a role="button" class="as-card wcs-cards-cell--grid-cell-delete">{% trans "Delete" %}</a>
175
      </div>
233 176
    </div>
177
  </script>
234 178

  
235
    {# fields group for "content type == @custom@" #}
236
    <div data-dynamic-display-child-of="entry_type" data-dynamic-display-value="@custom@">
237
      <p>
238
        <label>
239
          {% trans "Header" %}
240
          <input name="custom_header" />
241
        </label>
242
      </p>
243
      <p>
244
        <label>
245
          {% trans "Value template" %}
246
          <textarea name="custom_template" style="resize: vertical;"></textarea>
247
        </label>
248
      </p>
179
  {# display mode as table #}
180

  
181
  {# UI to customize content layout #}
182
  <div class="as-table wcs-cards-cell--grid">
183
    <div class="as-table wcs-cards-cell--grid-options">
184
      <span class="as-table wcs-cards-cell--grid-headers-label">{% trans "Display headers:" %}</span>
185
      <span class="as-table wcs-cards-cell--grid-headers-mode"></span>
186
      <a role="button" class="as-table wcs-cards-cell--grid-headers-btn">
187
        {% trans "Edit" %}
188
      </a>
189
    </div>
190
    <div class="as-table wcs-cards-cell--grid-cells">
191
    </div>
192
    <div class="as-table wcs-cards-cell--grid-buttons">
193
      <button type="button" class="as-table wcs-cards-cell--add-grid-cell-btn">{% trans "Add" %}</button>
249 194
    </div>
195
  </div>
250 196

  
251
    {# fields group for "content type == @link@" #}
252
    <div data-dynamic-display-child-of="entry_type" data-dynamic-display-value="@link@">
253
      <p>
254
        <label>
255
          {% trans "Header" %}
256
          <input name="link_header" />
257
        </label>
258
      </p>
197
  {# templates for JS #}
198
  <script type="text/template" class="as-table wcs-cards-cell--grid-form-tpl">
199
    <form>
259 200
      <p>
260
        <label>
261
          {% trans "Label template" %}
262
          <textarea name="link_label_template" style="resize: vertical;"></textarea>
263
        </label>
201
        {% trans "Display headers" %}
202
        <input name="grid-headers" type="checkbox" />
264 203
      </p>
204
    </form>
205
  </script>
206
  <script type="text/template" class="as-table wcs-cards-cell--grid-cell-form-tpl">
207
    <form>
265 208
      <p>
266 209
        <label>
267
          {% trans "URL" %}
268
          <select name="link_page" data-dynamic-display-parent="true">
269
            {% for page in cell.get_matching_pages %}
270
              <option value="{{ page.pk }}">{{ page.get_full_path_titles }}</option>
271
            {% endfor %}
272
            <option value="">{% trans "URL template" %}</option>
210
          {% trans "Content type" %}
211
          <select name="entry_type" data-dynamic-display-parent="true">
212
            <option value="@field@">{% trans "Card field" %}</option>
213
            <option value="@custom@">{% trans "Custom" %}</option>
214
            <option value="@link@">{% trans "Link" %}</option>
273 215
          </select>
274 216
        </label>
275 217
      </p>
276
      <p data-dynamic-display-child-of="link_page" data-dynamic-display-value="">
277
        <label>
278
          <textarea name="link_url_template" style="resize: vertical;"></textarea>
279
        </label>
280
      </p>
281
      <p>
282
        <label>
283
          {% trans "Display mode" %}
284
          <select name="link_display_mode">
285
            <option value="link">{% trans "Link" %}</option>
286
            <option value="button">{% trans "Button" %}</option>
287
          </select>
288
        </label>
289
      </p>
290
    </div>
291
  </form>
292
</script>
293
<script  type="text/template" class="as-table wcs-cards-cell--grid-cell-tpl">
294
  <div class="as-table wcs-cards-cell--grid-cell">
295
    <div class="as-table wcs-cards-cell--grid-cell-content"></div>
296
    <div class="as-table wcs-cards-cell--grid-cell-buttons">
297
      <a role="button" class="as-table wcs-cards-cell--grid-cell-edit">{% trans "Edit" %}</a>
298
      <a role="button" class="as-table wcs-cards-cell--grid-cell-delete">{% trans "Delete" %}</a>
218

  
219
      {# fields group for "content type == @field@ " #}
220
      <div data-dynamic-display-child-of="entry_type" data-dynamic-display-value="@field@">
221
        <p>
222
          <label>
223
            {% trans "Card Fields" %}
224
            <select name="field_varname"></select>
225
          </label>
226
        </p>
227
        <p>
228
          <label>
229
            {% trans "Custom text to replace empty value" %}
230
            <input name="field_empty_text" />
231
          </label>
232
        </p>
233
      </div>
234

  
235
      {# fields group for "content type == @custom@" #}
236
      <div data-dynamic-display-child-of="entry_type" data-dynamic-display-value="@custom@">
237
        <p>
238
          <label>
239
            {% trans "Header" %}
240
            <input name="custom_header" />
241
          </label>
242
        </p>
243
        <p>
244
          <label>
245
            {% trans "Value template" %}
246
            <textarea name="custom_template" style="resize: vertical;"></textarea>
247
          </label>
248
        </p>
249
      </div>
250

  
251
      {# fields group for "content type == @link@" #}
252
      <div data-dynamic-display-child-of="entry_type" data-dynamic-display-value="@link@">
253
        <p>
254
          <label>
255
            {% trans "Header" %}
256
            <input name="link_header" />
257
          </label>
258
        </p>
259
        <p>
260
          <label>
261
            {% trans "Label template" %}
262
            <textarea name="link_label_template" style="resize: vertical;"></textarea>
263
          </label>
264
        </p>
265
        <p>
266
          <label>
267
            {% trans "URL" %}
268
            <select name="link_page" data-dynamic-display-parent="true">
269
              {% for page in cell.get_matching_pages %}
270
                <option value="{{ page.pk }}">{{ page.get_full_path_titles }}</option>
271
              {% endfor %}
272
              <option value="">{% trans "URL template" %}</option>
273
            </select>
274
          </label>
275
        </p>
276
        <p data-dynamic-display-child-of="link_page" data-dynamic-display-value="">
277
          <label>
278
            <textarea name="link_url_template" style="resize: vertical;"></textarea>
279
          </label>
280
        </p>
281
        <p>
282
          <label>
283
            {% trans "Display mode" %}
284
            <select name="link_display_mode">
285
              <option value="link">{% trans "Link" %}</option>
286
              <option value="button">{% trans "Button" %}</option>
287
            </select>
288
          </label>
289
        </p>
290
      </div>
291
    </form>
292
  </script>
293
  <script  type="text/template" class="as-table wcs-cards-cell--grid-cell-tpl">
294
    <div class="as-table wcs-cards-cell--grid-cell">
295
      <div class="as-table wcs-cards-cell--grid-cell-content"></div>
296
      <div class="as-table wcs-cards-cell--grid-cell-buttons">
297
        <a role="button" class="as-table wcs-cards-cell--grid-cell-edit">{% trans "Edit" %}</a>
298
        <a role="button" class="as-table wcs-cards-cell--grid-cell-delete">{% trans "Delete" %}</a>
299
      </div>
299 300
    </div>
300
  </div>
301
</script>
301
  </script>
302 302
{% endif %}
combo/apps/wcs/templates/combo/wcs/tracking_code_input.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
<div class="wcs-tracking-code-input">
4
 {% block title %}
5
 <h2>{% trans 'Tracking Code' %}</h2>
6
 {% endblock %}
7
 <div>
8
 {% block form-pre %}{% endblock %}
9
 <form data-wcs-url="{{ url }}" method="post" action="{{ site_base }}{% url 'wcs-tracking-code' %}">
10
  {% block form-top %}
11
  {% block intro-text %}
12
  <p>
13
    {% blocktrans trimmed %}
14
    A tracking code is attached to all your forms, it is there to help you in
15
    dealing with the administration.
16
    {% endblocktrans %}
17
  </p>
18
  <p>
19
    {% blocktrans trimmed %}
20
    To find the details of a form linked to a tracking code, you can enter the
21
    code in the entry below:
22
    {% endblocktrans %}
23
  </p>
24
  {% endblock %}
25
  {% endblock %}
26
  <input id="_cell_url_{{ cell.id }}" name="url" value="" type="hidden"/>
27
  <input name="cell" value="{{ cell.id }}" type="hidden"/>
28
  <div id="_cell_error_{{ cell.id }}" class="errornotice" style="display: none">
29
    {% trans "The tracking code could not been found." %}
3
  <div class="wcs-tracking-code-input">
4
    {% block title %}
5
      <h2>{% trans 'Tracking Code' %}</h2>
6
    {% endblock %}
7
    <div>
8
      {% block form-pre %}{% endblock %}
9
      <form data-wcs-url="{{ url }}" method="post" action="{{ site_base }}{% url 'wcs-tracking-code' %}">
10
        {% block form-top %}
11
          {% block intro-text %}
12
            <p>
13
              {% blocktrans trimmed %}
14
                A tracking code is attached to all your forms, it is there to help you in
15
                dealing with the administration.
16
              {% endblocktrans %}
17
            </p>
18
            <p>
19
              {% blocktrans trimmed %}
20
                To find the details of a form linked to a tracking code, you can enter the
21
                code in the entry below:
22
              {% endblocktrans %}
23
            </p>
24
          {% endblock %}
25
        {% endblock %}
26
        <input id="_cell_url_{{ cell.id }}" name="url" value="" type="hidden"/>
27
        <input name="cell" value="{{ cell.id }}" type="hidden"/>
28
        <div id="_cell_error_{{ cell.id }}" class="errornotice" style="display: none">
29
          {% trans "The tracking code could not been found." %}
30
        </div>
31
        <input aria-label="{% trans "Tracking Code" %}" required id="tracking-code" name="code" placeholder="{% block input-placeholder-content %}{% trans 'ex: CNPHNTFB' %}{% endblock %}"/>
32
        <button aria-label="{% trans 'Submit' %}">{% block submit-content %}{% trans 'Submit' %}{% endblock %}</button>
33
        <script>
34
          $(function() {
35
            $('#_cell_url_{{ cell.id }}').val(window.location);
36
            if (window.location.search.indexOf('unknown-tracking-code') != -1) {
37
              $('#_cell_error_{{ cell.id }}').show();
38
            }
39
          });
40
        </script>
41
        {% block form-bottom %}{% endblock %}
42
      </form>
43
      {% block form-post %}{% endblock %}
44
    </div>
30 45
  </div>
31
  <input aria-label="{% trans "Tracking Code" %}" required id="tracking-code" name="code" placeholder="{% block input-placeholder-content %}{% trans 'ex: CNPHNTFB' %}{% endblock %}"/>
32
  <button aria-label="{% trans 'Submit' %}">{% block submit-content %}{% trans 'Submit' %}{% endblock %}</button>
33
  <script>
34
  $(function() {
35
    $('#_cell_url_{{ cell.id }}').val(window.location);
36
    if (window.location.search.indexOf('unknown-tracking-code') != -1) {
37
      $('#_cell_error_{{ cell.id }}').show();
38
    }
39
  });
40
  </script>
41
  {% block form-bottom %}{% endblock %}
42
 </form>
43
 {% block form-post %}{% endblock %}
44
 </div>
45
</div>
46 46
{% endblock %}
combo/apps/wcs/templates/combo/wcs/user_all_forms.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
<h2>{{ cell.custom_title|default:_('All Forms') }}</h2>
4
{% if forms %}
5
{% for slug, forms in user_forms.items %}
6
  <div class="links-list user-forms-{{ slug }} user-all-forms list-of-forms">
7
  {% include "combo/wcs/list_of_forms.html" %}
8
  </div>
9
{% endfor %}
10
{% include "combo/pagination.html" %}
11
{% else %}
12
  <div class="cell--body"><p class="empty-message">{% trans "There are no forms." %}</p></div>
13
{% endif %}
3
  <h2>{{ cell.custom_title|default:_('All Forms') }}</h2>
4
  {% if forms %}
5
    {% for slug, forms in user_forms.items %}
6
      <div class="links-list user-forms-{{ slug }} user-all-forms list-of-forms">
7
        {% include "combo/wcs/list_of_forms.html" %}
8
      </div>
9
    {% endfor %}
10
    {% include "combo/pagination.html" %}
11
  {% else %}
12
    <div class="cell--body"><p class="empty-message">{% trans "There are no forms." %}</p></div>
13
  {% endif %}
14 14
{% endblock %}
combo/apps/wcs/templates/combo/wcs/user_done_forms.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
<h2>{{ cell.custom_title|default:_('Done Forms') }}</h2>
4
{% if forms %}
5
{% for slug, forms in user_forms.items %}
6
  <div class="links-list user-forms-{{ slug }} list-of-forms">
7
  {% include "combo/wcs/list_of_forms.html" %}
8
  </div>
9
{% endfor %}
10
{% include "combo/pagination.html" %}
11
{% else %}
12
  <div class="cell--body"><p class="empty-message">{% trans "There are no done forms or they have been removed." %}</p></div>
13
{% endif %}
3
  <h2>{{ cell.custom_title|default:_('Done Forms') }}</h2>
4
  {% if forms %}
5
    {% for slug, forms in user_forms.items %}
6
      <div class="links-list user-forms-{{ slug }} list-of-forms">
7
        {% include "combo/wcs/list_of_forms.html" %}
8
      </div>
9
    {% endfor %}
10
    {% include "combo/pagination.html" %}
11
  {% else %}
12
    <div class="cell--body"><p class="empty-message">{% trans "There are no done forms or they have been removed." %}</p></div>
13
  {% endif %}
14 14
{% endblock %}
combo/data/templates/combo/manager/link-list-cell-form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block cell-form %}
5
{{ form.as_p }}
6
{% with cell.get_items_with_prefetch as links %}
7
{% if links %}
8
<p><label>{% trans "Links:" %}</label></p>
9
<div>
10
 <ul class="objects-list list-of-links" id="list-of-links-{{ cell.pk }}"
11
     data-link-list-order-url="{% url 'combo-manager-link-list-order' page_pk=page.pk cell_reference=cell.get_reference %}">
12
   {% for link in links %}
13
   <li data-link-item-id="{{ link.pk }}"><span class="handle">⣿</span>
14
   <span title="{{ link }}">
15
     {{ link|truncatechars:100 }}
16
     {% with link.get_invalid_reason as invalid_reason %}
17
     {% if link.extra_css_class %}
18
     <span class="extra-css-class">[{{ link.extra_css_class }}]</span>
19
     {% endif %}
20
     {% if invalid_reason %}
21
     <span class="invalid">{{ invalid_reason }} -
22
       {% if cell.get_validity_info.invalid_datetime|datetime_in_past %}
23
         {% blocktrans with link.get_validity_info.invalid_datetime|date:"DATETIME_FORMAT" as invalidity_date %}This link is no longer displayed since {{ invalidity_date }}.{% endblocktrans %}
24
       {% else %}
25
         {% blocktrans with link.get_validity_info.invalid_datetime|timeuntil as invalidity_delay %}This link will no longer be displayed in {{ invalidity_delay }}.{% endblocktrans %}
26
       {% endif %}
27
     </span>
28
     {% endif %}
29
     {% endwith %}
30
   </span>
31
       <a rel="popup" title="{% trans "Edit" %}" class="link-action-icon edit" href="{% url 'combo-manager-page-list-cell-edit-link' page_pk=page.id cell_reference=cell.get_reference link_cell_reference=link.get_reference %}">{% trans "Edit" %}</a>
32
       <a rel="popup" title="{% trans "Delete" %}" class="link-action-icon delete" href="{% url 'combo-manager-page-list-cell-delete-link' page_pk=page.id cell_reference=cell.get_reference link_cell_reference=link.get_reference %}">{% trans "Delete" %}</a>
33
   </li>
34
   {% endfor %}
35
 </ul>
36
</div>
37
<script>
38
$(function () {
39
  $('#list-of-links-{{ cell.pk }}').sortable({
40
    handle: '.handle',
41
    update: function(event, ui) {
42
       var new_order = Object();
43
       $(this).find('li').each(function(i, x) {
44
           var suffix = $(x).data('link-item-id');
45
           new_order['pos_' + suffix] = i;
46
       });
47
       $.ajax({
48
           url: $(this).data('link-list-order-url'),
49
           data: new_order
50
       });
51
    }
52
  });
53
});
54
</script>
55
{% endif %}
56
{% endwith %}
57
<div class="buttons">
58
  {% for klass in cell.get_link_cell_classes %}
59
  <a rel="popup" href="{% url 'combo-manager-page-list-cell-add-link' page_pk=page.id cell_reference=cell.get_reference link_code=klass.add_as_link_code %}">{{ klass.add_as_link_label }}</a> {% if not forloop.last %}|{% endif %}
60
  {% endfor %}
61
</div>
5
  {{ form.as_p }}
6
  {% with cell.get_items_with_prefetch as links %}
7
    {% if links %}
8
      <p><label>{% trans "Links:" %}</label></p>
9
      <div>
10
        <ul class="objects-list list-of-links" id="list-of-links-{{ cell.pk }}"
11
          data-link-list-order-url="{% url 'combo-manager-link-list-order' page_pk=page.pk cell_reference=cell.get_reference %}">
12
          {% for link in links %}
13
            <li data-link-item-id="{{ link.pk }}"><span class="handle">⣿</span>
14
              <span title="{{ link }}">
15
                {{ link|truncatechars:100 }}
16
                {% with link.get_invalid_reason as invalid_reason %}
17
                  {% if link.extra_css_class %}
18
                    <span class="extra-css-class">[{{ link.extra_css_class }}]</span>
19
                  {% endif %}
20
                  {% if invalid_reason %}
21
                    <span class="invalid">{{ invalid_reason }} -
22
                      {% if cell.get_validity_info.invalid_datetime|datetime_in_past %}
23
                        {% blocktrans with link.get_validity_info.invalid_datetime|date:"DATETIME_FORMAT" as invalidity_date %}This link is no longer displayed since {{ invalidity_date }}.{% endblocktrans %}
24
                      {% else %}
25
                        {% blocktrans with link.get_validity_info.invalid_datetime|timeuntil as invalidity_delay %}This link will no longer be displayed in {{ invalidity_delay }}.{% endblocktrans %}
26
                      {% endif %}
27
                    </span>
28
                  {% endif %}
29
                {% endwith %}
30
              </span>
31
              <a rel="popup" title="{% trans "Edit" %}" class="link-action-icon edit" href="{% url 'combo-manager-page-list-cell-edit-link' page_pk=page.id cell_reference=cell.get_reference link_cell_reference=link.get_reference %}">{% trans "Edit" %}</a>
32
              <a rel="popup" title="{% trans "Delete" %}" class="link-action-icon delete" href="{% url 'combo-manager-page-list-cell-delete-link' page_pk=page.id cell_reference=cell.get_reference link_cell_reference=link.get_reference %}">{% trans "Delete" %}</a>
33
            </li>
34
          {% endfor %}
35
        </ul>
36
      </div>
37
      <script>
38
        $(function () {
39
          $('#list-of-links-{{ cell.pk }}').sortable({
40
            handle: '.handle',
41
            update: function(event, ui) {
42
              var new_order = Object();
43
              $(this).find('li').each(function(i, x) {
44
                var suffix = $(x).data('link-item-id');
45
                new_order['pos_' + suffix] = i;
46
              });
47
              $.ajax({
48
                url: $(this).data('link-list-order-url'),
49
                data: new_order
50
              });
51
            }
52
          });
53
        });
54
      </script>
55
    {% endif %}
56
  {% endwith %}
57
  <div class="buttons">
58
    {% for klass in cell.get_link_cell_classes %}
59
      <a rel="popup" href="{% url 'combo-manager-page-list-cell-add-link' page_pk=page.id cell_reference=cell.get_reference link_code=klass.add_as_link_code %}">{{ klass.add_as_link_label }}</a> {% if not forloop.last %}|{% endif %}
60
    {% endfor %}
61
  </div>
62 62
{% endblock %}
combo/data/templates/combo/widgets/select_with_other_option.html
2 2

  
3 3
<select name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>{% for group_name, group_choices, group_index in widget.optgroups %}{% if group_name %}
4 4
  <optgroup label="{{ group_name }}">{% endif %}{% for option in group_choices %}
5
  {% include option.template_name with widget=option %}{% endfor %}{% if group_name %}
6
  </optgroup>{% endif %}{% endfor %}
7
<!-- "other" option: -->  <option value="" data-other="true">{% trans "Other:" %}</option>
5
    {% include option.template_name with widget=option %}{% endfor %}{% if group_name %}
6
      </optgroup>{% endif %}{% endfor %}
7
  <!-- "other" option: -->  <option value="" data-other="true">{% trans "Other:" %}</option>
8 8
</select>
combo/manager/templates/combo/cell_appearance.html
1 1
{% load i18n %}
2 2
{% block cell-form-appearance %}
3
{{ appearance_form.as_p }}
4
{% if cell.can_have_assets %}
5
<p><a rel="popup" data-selector="div#assets-listing" href="{% url 'combo-manager-slot-assets' cell_reference=cell.get_reference %}"
6
     >{% trans 'Assets' %}</a></p>
7
{% endif %}
3
  {{ appearance_form.as_p }}
4
  {% if cell.can_have_assets %}
5
    <p><a rel="popup" data-selector="div#assets-listing" href="{% url 'combo-manager-slot-assets' cell_reference=cell.get_reference %}"
6
    >{% trans 'Assets' %}</a></p>
7
  {% endif %}
8 8
{% endblock %}
combo/manager/templates/combo/cell_duplicate.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans "Duplicate Cell" %}</h2>
5
  <h2>{% trans "Duplicate Cell" %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9 9

  
10
<form method="post" enctype="multipart/form-data">
11
  {% csrf_token %}
12
  {{ form.as_p }}
13
  <div class="buttons">
14
    <button class="submit-button">{% trans "Save" %}</button>
15
    <a class="cancel" href="{% url 'combo-manager-page-view' pk=current_page.pk %}">{% trans 'Cancel' %}</a>
16
  </div>
17
</form>
10
  <form method="post" enctype="multipart/form-data">
11
    {% csrf_token %}
12
    {{ form.as_p }}
13
    <div class="buttons">
14
      <button class="submit-button">{% trans "Save" %}</button>
15
      <a class="cancel" href="{% url 'combo-manager-page-view' pk=current_page.pk %}">{% trans 'Cancel' %}</a>
16
    </div>
17
  </form>
18 18
{% endblock %}
combo/manager/templates/combo/cell_form.html
1 1
{% block cell-form %}
2
{{form.as_p}}
2
  {{form.as_p}}
3 3
{% endblock %}
combo/manager/templates/combo/cell_options.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans 'Cell Options' %}</h2>
5
  <h2>{% trans 'Cell Options' %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9 9

  
10
<form method="post" enctype="multipart/form-data">
11
  {% csrf_token %}
12
  {{ form.as_p }}
13
  <div class="buttons">
14
    <button class="submit-button">{% trans "Save" %}</button>
15
    {% if object.id %}
16
    <a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
17
    {% else %}
18
    <a class="cancel" href="{% url 'combo-manager-homepage' %}">{% trans 'Cancel' %}</a>
19
    {% endif %}
20
  </div>
21
</form>
10
  <form method="post" enctype="multipart/form-data">
11
    {% csrf_token %}
12
    {{ form.as_p }}
13
    <div class="buttons">
14
      <button class="submit-button">{% trans "Save" %}</button>
15
      {% if object.id %}
16
        <a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
17
      {% else %}
18
        <a class="cancel" href="{% url 'combo-manager-homepage' %}">{% trans 'Cancel' %}</a>
19
      {% endif %}
20
    </div>
21
  </form>
22 22
{% endblock %}
combo/manager/templates/combo/cell_visibility.html
1 1
<div id="visibility-form-{{cell.get_reference}}">
2 2
  {{ visibility_form.as_p }}
3 3
  <script>
4
  $(function() {
5
    var $form = $('#visibility-form-{{cell.get_reference}}');
6
    $form.find('select').first().on('change', function() {
7
      var val = $(this).val();
8
      var $groups = $form.find('select').last().parent('p');
9
      if (val == 'groups-any' || val == 'groups-none') {
10
        $groups.show();
11
      } else {
12
        $groups.hide();
13
      }
4
    $(function() {
5
      var $form = $('#visibility-form-{{cell.get_reference}}');
6
      $form.find('select').first().on('change', function() {
7
        var val = $(this).val();
8
        var $groups = $form.find('select').last().parent('p');
9
        if (val == 'groups-any' || val == 'groups-none') {
10
          $groups.show();
11
        } else {
12
          $groups.hide();
13
        }
14
      });
15
      $form.find('select').first().trigger('change');
14 16
    });
15
    $form.find('select').first().trigger('change');
16
  });
17 17
  </script>
18 18
</div>
combo/manager/templates/combo/delete_page.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{{ view.model.get_verbose_name }}</h2>
5
  <h2>{{ view.model.get_verbose_name }}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9
<form method="post">
10
  {% csrf_token %}
11
  <p>
12
  {% if display_choice %}
13
  {% blocktrans %}This page has subpages, what do you want to do with them?{% endblocktrans %}
14
    <ul class="choices">
15
      <li><label><input type="radio" name="choice" checked="checked" value="delete-one">{%  trans 'Delete only this page' %}</label></li>
16
      <li><label><input type="radio" name="choice" value="delete-all">{% trans 'Delete this page and all subpages' %}</label></li>
17
    </ul>
18
  {% else %}
19
  {% blocktrans %}Are you sure you want to delete this page?{% endblocktrans %}
20
  {% endif %}
21
  </p>
22
  <div class="buttons">
23
    <button class="delete-button">{% trans 'Delete' %}</button>
24
    <a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
25
  </div>
26
</form>
9
  <form method="post">
10
    {% csrf_token %}
11
    <p>
12
      {% if display_choice %}
13
        {% blocktrans %}This page has subpages, what do you want to do with them?{% endblocktrans %}
14
        <ul class="choices">
15
          <li><label><input type="radio" name="choice" checked="checked" value="delete-one">{%  trans 'Delete only this page' %}</label></li>
16
          <li><label><input type="radio" name="choice" value="delete-all">{% trans 'Delete this page and all subpages' %}</label></li>
17
        </ul>
18
      {% else %}
19
        {% blocktrans %}Are you sure you want to delete this page?{% endblocktrans %}
20
      {% endif %}
21
    </p>
22
    <div class="buttons">
23
      <button class="delete-button">{% trans 'Delete' %}</button>
24
      <a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
25
    </div>
26
  </form>
27 27
{% endblock %}
combo/manager/templates/combo/generic_confirm_delete.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{{ view.model.get_verbose_name }}</h2>
5
  <h2>{{ view.model.get_verbose_name }}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9
<form method="post">
10
  {% csrf_token %}
11
  {% blocktrans %}Are you sure you want to delete this?{% endblocktrans %}
12
  <div class="buttons">
13
    <button class="delete-button">{% trans 'Delete' %}</button>
14
    <a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
15
  </div>
16
</form>
9
  <form method="post">
10
    {% csrf_token %}
11
    {% blocktrans %}Are you sure you want to delete this?{% endblocktrans %}
12
    <div class="buttons">
13
      <button class="delete-button">{% trans 'Delete' %}</button>
14
      <a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
15
    </div>
16
  </form>
17 17
{% endblock %}
combo/manager/templates/combo/invalid_cell_report.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans 'Invalid cells' %}</h2>
5
  <h2>{% trans 'Invalid cells' %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block breadcrumb %}
......
11 11
{% endblock %}
12 12

  
13 13
{% block content %}
14
{% if object_list %}
15
<ul class="objects-list">
16
  {% for cell in object_list %}
17
  <li>
18
      {% trans "Page:" %} <a href="{% url 'combo-manager-page-view' pk=cell.page_id %}">{{ cell.page.title }}</a> -
19
      {% trans "Cell:" %} <a href="{% url 'combo-manager-page-view' pk=cell.page_id %}#cell-{{ cell.get_reference }}">{{ cell.get_label }}</a>
20
  </li>
21
  {% endfor %}
22
</ul>
23
{% else %}
24
<div class="big-msg-info">
25
  {% trans "No invalid cell found." %}
26
</div>
27
{% endif %}
14
  {% if object_list %}
15
    <ul class="objects-list">
16
      {% for cell in object_list %}
17
        <li>
18
          {% trans "Page:" %} <a href="{% url 'combo-manager-page-view' pk=cell.page_id %}">{{ cell.page.title }}</a> -
19
          {% trans "Cell:" %} <a href="{% url 'combo-manager-page-view' pk=cell.page_id %}#cell-{{ cell.get_reference }}">{{ cell.get_label }}</a>
20
        </li>
21
      {% endfor %}
22
    </ul>
23
  {% else %}
24
    <div class="big-msg-info">
25
      {% trans "No invalid cell found." %}
26
    </div>
27
  {% endif %}
28 28
{% endblock %}
combo/manager/templates/combo/link_cell_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
{% if form.instance.pk %}
6
<h2>{{ form.instance.edit_link_label }}</h2>
7
{% else %}
8
<h2>{{ form.instance.add_link_label }}</h2>
9
{% endif %}
5
  {% if form.instance.pk %}
6
    <h2>{{ form.instance.edit_link_label }}</h2>
7
  {% else %}
8
    <h2>{{ form.instance.add_link_label }}</h2>
9
  {% endif %}
10 10
{% endblock %}
11 11

  
12 12
{% block content %}
13 13

  
14
<form method="post" enctype="multipart/form-data">
15
  {% csrf_token %}
16
  {{ form.as_p }}
17
  <div class="buttons">
18
    <button class="submit-button">{% trans "Save" %}</button>
19
    <a class="cancel" href="{% url 'combo-manager-page-view' pk=form.instance.page_id %}">{% trans 'Cancel' %}</a>
20
  </div>
21
</form>
14
  <form method="post" enctype="multipart/form-data">
15
    {% csrf_token %}
16
    {{ form.as_p }}
17
    <div class="buttons">
18
      <button class="submit-button">{% trans "Save" %}</button>
19
      <a class="cancel" href="{% url 'combo-manager-page-view' pk=form.instance.page_id %}">{% trans 'Cancel' %}</a>
20
    </div>
21
  </form>
22 22
{% endblock %}
combo/manager/templates/combo/manager_base.html
2 2
{% load static i18n %}
3 3

  
4 4
{% block css %}
5
<link rel="stylesheet" type="text/css" media="all" href="{% static "css/combo.manager.css" %}"/>
6
<link rel="stylesheet" type="text/css" media="all" href="{% static "xstatic/leaflet.css" %}"/>
7
<link rel="stylesheet" type="text/css" media="all" href="{% static "css/combo.map.css" %}"/>
5
  <link rel="stylesheet" type="text/css" media="all" href="{% static "css/combo.manager.css" %}"/>
6
  <link rel="stylesheet" type="text/css" media="all" href="{% static "xstatic/leaflet.css" %}"/>
7
  <link rel="stylesheet" type="text/css" media="all" href="{% static "css/combo.map.css" %}"/>
8 8
{% endblock %}
9 9
{% block page-title %}{% firstof site_title "Combo" %}{% endblock %}
10 10
{% block site-title %}{% firstof site_title "Combo" %}{% endblock %}
......
21 21
{% endblock %}
22 22

  
23 23
{% block breadcrumb %}
24
 {{ block.super }}
24
  {{ block.super }}
25 25
  <a href="{% url 'combo-manager-homepage' %}">{% trans 'Portal Management' %}</a>
26 26
{% endblock %}
27 27

  
28 28
{% block logout-url %}{% url 'auth_logout' %}{% endblock %}
29 29

  
30 30
{% block extrascripts %}
31
{{ block.super }}
32
<script src="{% static "ckeditor/ckeditor/ckeditor.js" %}"></script>
33
<script type="text/javascript" src="{% static "ckeditor/ckeditor-init.js" %}"></script>
34
<script src="{% static "js/combo.manager.js" %}"></script>
35
<script src="{% static "xstatic/leaflet.js" %}"></script>
36
<script src="{% static "js/combo.map.js" %}"></script>
37
<script src="{% url "javascript-catalog" %}"></script>
31
  {{ block.super }}
32
  <script src="{% static "ckeditor/ckeditor/ckeditor.js" %}"></script>
33
  <script type="text/javascript" src="{% static "ckeditor/ckeditor-init.js" %}"></script>
34
  <script src="{% static "js/combo.manager.js" %}"></script>
35
  <script src="{% static "xstatic/leaflet.js" %}"></script>
36
  <script src="{% static "js/combo.map.js" %}"></script>
37
  <script src="{% url "javascript-catalog" %}"></script>
38 38
{% endblock %}
combo/manager/templates/combo/manager_edit_cell_block.html
1 1
{% load i18n %}
2 2
{% block cell-form %}
3
<div class="cell-properties pk-tabs">
4
  <div class="pk-tabs--tab-list" role="tablist" aria-label="{% trans "Cell Properties" %}">
5
   {% for tab in manager_tabs %}
6
   <button role="tab"
7
      aria-selected="{{ forloop.first|yesno:"true,false" }}"
8
      aria-controls="panel-{{ cell.get_reference }}-{{ tab.slug }}"
9
      id="tab-{{ cell.get_reference }}-{{ tab.slug }}"
10
      tabindex="{{ forloop.first|yesno:"0,-1" }}"
11
      {% if tab.is_not_default %}class="pk-tabs--button-marker"{% endif %}>{{ tab.name }}</button>
12
   {% endfor %}
13
  </div>
3
  <div class="cell-properties pk-tabs">
4
    <div class="pk-tabs--tab-list" role="tablist" aria-label="{% trans "Cell Properties" %}">
5
      {% for tab in manager_tabs %}
6
        <button role="tab"
7
          aria-selected="{{ forloop.first|yesno:"true,false" }}"
8
          aria-controls="panel-{{ cell.get_reference }}-{{ tab.slug }}"
9
          id="tab-{{ cell.get_reference }}-{{ tab.slug }}"
10
          tabindex="{{ forloop.first|yesno:"0,-1" }}"
11
          {% if tab.is_not_default %}class="pk-tabs--button-marker"{% endif %}>{{ tab.name }}</button>
12
      {% endfor %}
13
    </div>
14 14

  
15
<form class="pk-tabs--container" action="{{ url }}" method="post">
16
{% csrf_token %}
17
   {% for tab in manager_tabs %}
18
   <div id="panel-{{ cell.get_reference }}-{{ tab.slug }}"
19
        role="tabpanel" tabindex="0" {% if not forloop.first %}hidden{% endif %}
20
        data-tab-slug="{{ tab.slug }}"
21
        aria-labelledby="tab-{{ cell.get_reference }}-{{ tab.slug }}">
22
     {% if tab.template %}{% include tab.template %}{% else %}{{ tab.form_instance.as_p }}{% endif %}
23
   </div>
24
   {% endfor %}
25
<div class="cell-properties--buttons">
26
{% block cell-buttons %}
27
<button class="submit-button save">{% trans 'Save' %}</button>
28
<span>
29
<a class="pk-button duplicate-button" rel="popup" title="{% trans 'Duplicate' %}"
30
   href="{% url 'combo-manager-page-duplicate-cell' page_pk=page.id cell_reference=cell.get_reference %}"
31
   ><span>{% trans 'Duplicate' %}</span></a>
32
<a class="pk-button delete-button" rel="popup" title="{% trans 'Delete' %}"
33
   href="{% url 'combo-manager-page-delete-cell' page_pk=page.id cell_reference=cell.get_reference %}"
34
   ><span>{% trans 'Delete' %}</span></a>
35
</span>
36
{% endblock %}
37
</div>
38
</form>
39
</div>
15
    <form class="pk-tabs--container" action="{{ url }}" method="post">
16
      {% csrf_token %}
17
      {% for tab in manager_tabs %}
18
        <div id="panel-{{ cell.get_reference }}-{{ tab.slug }}"
19
          role="tabpanel" tabindex="0" {% if not forloop.first %}hidden{% endif %}
20
          data-tab-slug="{{ tab.slug }}"
21
          aria-labelledby="tab-{{ cell.get_reference }}-{{ tab.slug }}">
22
          {% if tab.template %}{% include tab.template %}{% else %}{{ tab.form_instance.as_p }}{% endif %}
23
        </div>
24
      {% endfor %}
25
      <div class="cell-properties--buttons">
26
        {% block cell-buttons %}
27
          <button class="submit-button save">{% trans 'Save' %}</button>
28
          <span>
29
            <a class="pk-button duplicate-button" rel="popup" title="{% trans 'Duplicate' %}"
30
              href="{% url 'combo-manager-page-duplicate-cell' page_pk=page.id cell_reference=cell.get_reference %}"
31
            ><span>{% trans 'Duplicate' %}</span></a>
32
            <a class="pk-button delete-button" rel="popup" title="{% trans 'Delete' %}"
33
              href="{% url 'combo-manager-page-delete-cell' page_pk=page.id cell_reference=cell.get_reference %}"
34
            ><span>{% trans 'Delete' %}</span></a>
35
          </span>
36
        {% endblock %}
37
      </div>
38
    </form>
39
  </div>
40 40
{% endblock %}
combo/manager/templates/combo/manager_home.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans 'Pages' %}</h2>
6
<span class="actions">
7
{% if user.is_superuser %}
8
<a class="extra-actions-menu-opener"></a>
9
{% endif %}
10
{% if can_add_page %}
11
<a rel="popup" href="{% url 'combo-manager-page-add' %}">{% trans 'New' %}</a>
12
{% endif %}
13
{% if user.is_superuser %}
14
<ul class="extra-actions-menu">
15
 <li><a href="{% url 'combo-manager-site-export' %}" rel="popup" data-autoclose-dialog="true">{% trans 'Export Site' %}</a></li>
16
 <li><a href="{% url 'combo-manager-site-import' %}">{% trans 'Import Site' %}</a></li>
17
 <li><a href="{% url 'combo-manager-invalid-cell-report' %}">{% trans 'Anomaly report' %}</a></li>
18
<li><a href="{% url 'combo-manager-site-settings' %}" rel="popup" data-autoclose-dialog="true">{% trans 'Site Settings' %}</a></li>
19
 {% for extra_action in extra_actions %}
20
 <li><a href="{{ extra_action.href }}">{{ extra_action.text }}</a></li>
21
 {% endfor %}
22
</ul>
23
{% endif %}
24
</span>
5
  <h2>{% trans 'Pages' %}</h2>
6
  <span class="actions">
7
    {% if user.is_superuser %}
8
      <a class="extra-actions-menu-opener"></a>
9
    {% endif %}
10
    {% if can_add_page %}
11
      <a rel="popup" href="{% url 'combo-manager-page-add' %}">{% trans 'New' %}</a>
12
    {% endif %}
13
    {% if user.is_superuser %}
14
      <ul class="extra-actions-menu">
15
        <li><a href="{% url 'combo-manager-site-export' %}" rel="popup" data-autoclose-dialog="true">{% trans 'Export Site' %}</a></li>
16
        <li><a href="{% url 'combo-manager-site-import' %}">{% trans 'Import Site' %}</a></li>
17
        <li><a href="{% url 'combo-manager-invalid-cell-report' %}">{% trans 'Anomaly report' %}</a></li>
18
        <li><a href="{% url 'combo-manager-site-settings' %}" rel="popup" data-autoclose-dialog="true">{% trans 'Site Settings' %}</a></li>
19
        {% for extra_action in extra_actions %}
20
          <li><a href="{{ extra_action.href }}">{{ extra_action.text }}</a></li>
21
        {% endfor %}
22
      </ul>
23
    {% endif %}
24
  </span>
25 25
{% endblock %}
26 26

  
27 27
{% block content %}
28 28

  
29
{% if object_list %}
29
  {% if object_list %}
30 30

  
31
<p class="hint">
32
{% blocktrans %}
33
Use drag and drop with the ⣿ handles to reorder and change hierarchy of pages.
34
{% endblocktrans %}
35
</p>
31
    <p class="hint">
32
      {% blocktrans %}
33
        Use drag and drop with the ⣿ handles to reorder and change hierarchy of pages.
34
      {% endblocktrans %}
35
    </p>
36 36

  
37
<div class="objects-list" id="pages-list" data-page-order-url="{% url 'combo-manager-page-order' %}">
38
 {% for page in object_list %}
39
 <div class="page level-{{page.level}}{% if collapse_pages %} untoggled{% endif %}" data-page-id="{{page.id}}" data-level="{{page.level}}">
40
    {% if user.is_superuser %}<span class="handle">⣿</span>{% endif %}
41
    <span class="group1">
42
      <a href="{% url 'combo-manager-page-view' pk=page.id %}">
43
        {{ page.title }}
44
        {% for label in page.extra_labels %}{% if forloop.first %}<small>({% endif %}{{ label }}{% if forloop.last %})</small>{% else %}, {% endif %}{% endfor %}
45
      </a>
46
    </span>
47
    {% if not page.public %}
48
    <span class="visibility-summary" title="{% trans 'Restricted visibility' %}">
49
    {% with page.groups.all as page_groups %}
50
    {% for group in page_groups %}{{ group.name }}{% if not forloop.last %}, {% endif %}
51
    {% empty %}
52
    {% trans "logged users" %}
53
    {% endfor %}
54
    {% endwith %}
55
    </span>
56
    {% endif %}
57
    {% if collapse_pages %}<span class="togglable"></span>{% endif %}
58
 </div>
59
 {% endfor %}
60
</div>
61
{% else %}
62
<div class="big-msg-info">
63
  {% blocktrans %}
64
  This site doesn't have any page yet. Click on the "New" button in the top
65
  right of the page to add a first one.
66
  {% endblocktrans %}
67
</div>
68
{% endif %}
37
    <div class="objects-list" id="pages-list" data-page-order-url="{% url 'combo-manager-page-order' %}">
38
      {% for page in object_list %}
39
        <div class="page level-{{page.level}}{% if collapse_pages %} untoggled{% endif %}" data-page-id="{{page.id}}" data-level="{{page.level}}">
40
          {% if user.is_superuser %}<span class="handle">⣿</span>{% endif %}
41
          <span class="group1">
42
            <a href="{% url 'combo-manager-page-view' pk=page.id %}">
43
              {{ page.title }}
44
              {% for label in page.extra_labels %}{% if forloop.first %}<small>({% endif %}{{ label }}{% if forloop.last %})</small>{% else %}, {% endif %}{% endfor %}
45
            </a>
46
          </span>
47
          {% if not page.public %}
48
            <span class="visibility-summary" title="{% trans 'Restricted visibility' %}">
49
              {% with page.groups.all as page_groups %}
50
                {% for group in page_groups %}{{ group.name }}{% if not forloop.last %}, {% endif %}
51
                {% empty %}
52
                  {% trans "logged users" %}
53
                {% endfor %}
54
              {% endwith %}
55
            </span>
56
          {% endif %}
57
          {% if collapse_pages %}<span class="togglable"></span>{% endif %}
58
        </div>
59
      {% endfor %}
60
    </div>
61
  {% else %}
62
    <div class="big-msg-info">
63
      {% blocktrans %}
64
        This site doesn't have any page yet. Click on the "New" button in the top
65
        right of the page to add a first one.
66
      {% endblocktrans %}
67
    </div>
68
  {% endif %}
69 69

  
70 70
{% endblock %}
combo/manager/templates/combo/page_add.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
{% if view.page_title %}
6
<h2>{{ view.page_title }}</h2>
7
{% elif object.id %}
8
<h2>{% trans "Edit Page" %}</h2>
9
{% else %}
10
<h2>{% trans "New Page" %}</h2>
11
{% endif %}
5
  {% if view.page_title %}
6
    <h2>{{ view.page_title }}</h2>
7
  {% elif object.id %}
8
    <h2>{% trans "Edit Page" %}</h2>
9
  {% else %}
10
    <h2>{% trans "New Page" %}</h2>
11
  {% endif %}
12 12
{% endblock %}
13 13

  
14 14
{% block content %}
15 15

  
16
<form method="post" enctype="multipart/form-data">
17
  {% csrf_token %}
18
  {{ form.as_p }}
19
  <div class="buttons">
20
    <button class="submit-button">{% trans "Save" %}</button>
21
    {% if object.id %}
22
    <a class="cancel" href="{% url 'combo-manager-page-view' pk=object.id %}">{% trans 'Cancel' %}</a>
23
    {% else %}
24
    <a class="cancel" href="{% url 'combo-manager-homepage' %}">{% trans 'Cancel' %}</a>
25
    {% endif %}
26
  </div>
27
</form>
16
  <form method="post" enctype="multipart/form-data">
17
    {% csrf_token %}
18
    {{ form.as_p }}
19
    <div class="buttons">
20
      <button class="submit-button">{% trans "Save" %}</button>
21
      {% if object.id %}
22
        <a class="cancel" href="{% url 'combo-manager-page-view' pk=object.id %}">{% trans 'Cancel' %}</a>
23
      {% else %}
24
        <a class="cancel" href="{% url 'combo-manager-homepage' %}">{% trans 'Cancel' %}</a>
25
      {% endif %}
26
    </div>
27
  </form>
28 28
{% endblock %}
combo/manager/templates/combo/page_duplicate.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans "Duplicate Page" %}</h2>
5
  <h2>{% trans "Duplicate Page" %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9 9

  
10
<form method="post" enctype="multipart/form-data">
11
  {% csrf_token %}
12
  {{ form.as_p }}
13
  <div class="buttons">
14
    <button class="submit-button">{% trans "Save" %}</button>
15
    <a class="cancel" href="{% url 'combo-manager-page-view' pk=page.id %}">{% trans 'Cancel' %}</a>
16
  </div>
17
</form>
10
  <form method="post" enctype="multipart/form-data">
11
    {% csrf_token %}
12
    {{ form.as_p }}
13
    <div class="buttons">
14
      <button class="submit-button">{% trans "Save" %}</button>
15
      <a class="cancel" href="{% url 'combo-manager-page-view' pk=page.id %}">{% trans 'Cancel' %}</a>
16
    </div>
17
  </form>
18 18
{% endblock %}
combo/manager/templates/combo/page_export.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans "Export Page" %}</h2>
5
  <h2>{% trans "Export Page" %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9 9

  
10
<form method="post">
11
  {% csrf_token %}
12
  {{ form.as_p }}
13
  <div class="buttons">
14
    <button class="submit-button">{% trans "Export" %}</button>
15
    <a class="cancel" href="{% url 'combo-manager-page-view' pk=page.pk %}">{% trans 'Cancel' %}</a>
16
  </div>
17
</form>
10
  <form method="post">
11
    {% csrf_token %}
12
    {{ form.as_p }}
13
    <div class="buttons">
14
      <button class="submit-button">{% trans "Export" %}</button>
15
      <a class="cancel" href="{% url 'combo-manager-page-view' pk=page.pk %}">{% trans 'Cancel' %}</a>
16
    </div>
17
  </form>
18 18
{% endblock %}
combo/manager/templates/combo/page_extra_variables.html
2 2
{% load i18n %}
3 3

  
4 4
{% block content %}
5
<form method="post" enctype="multipart/form-data">
6
  {% csrf_token %}
7
  {{ form.management_form }}
8
  <table id="page-property-forms">
5
  <form method="post" enctype="multipart/form-data">
6
    {% csrf_token %}
7
    {{ form.management_form }}
8
    <table id="page-property-forms">
9 9
      <thead>
10
          <tr>
11
              {% for field in form.0 %}
12
              <th class="column-{{ field.name }}{% if field.required %} required{% endif %}">{{ field.label }}</th>
13
              {% endfor %}
14
          </tr>
10
        <tr>
11
          {% for field in form.0 %}
12
            <th class="column-{{ field.name }}{% if field.required %} required{% endif %}">{{ field.label }}</th>
13
          {% endfor %}
14
        </tr>
15 15
      </thead>
16 16
      <tbody>
17
      {% for sub_form in form %}
18
      <tr class='page-property-form'>
19
          {% for field in sub_form %}
20
          <td class="field-{{ field.name }}">
21
              {{ field.errors.as_ul }}
22
              {{ field }}
23
          </td>
24
          {% endfor %}
25
      </tr>
26
      {% endfor %}
17
        {% for sub_form in form %}
18
          <tr class='page-property-form'>
19
            {% for field in sub_form %}
20
              <td class="field-{{ field.name }}">
21
                {{ field.errors.as_ul }}
22
                {{ field }}
23
              </td>
24
            {% endfor %}
25
          </tr>
26
        {% endfor %}
27 27
      </tbody>
28
  </table>
29
  <button id="add-page-property-form" type="button">{% trans "Add another" %}</button>
30
  <div class="buttons">
31
    <button class="submit-button">{% trans "Save" %}</button>
32
    <a class="cancel" href="{% url 'combo-manager-page-view' pk=object.pk %}">{% trans 'Cancel' %}</a>
33
  </div>
34
</form>
28
    </table>
29
    <button id="add-page-property-form" type="button">{% trans "Add another" %}</button>
30
    <div class="buttons">
31
      <button class="submit-button">{% trans "Save" %}</button>
32
      <a class="cancel" href="{% url 'combo-manager-page-view' pk=object.pk %}">{% trans 'Cancel' %}</a>
33
    </div>
34
  </form>
35 35
{% endblock %}
combo/manager/templates/combo/page_history.html
4 4
{% load thumbnail %}
5 5

  
6 6
{% block appbar %}
7
<h2>{% trans 'Page History' %} - {{ view.page.title }}</h2>
7
  <h2>{% trans 'Page History' %} - {{ view.page.title }}</h2>
8 8
{% endblock %}
9 9

  
10 10
{% block breadcrumb %}
......
15 15

  
16 16
{% block content %}
17 17

  
18
<div>
19
<table class="main">
20
  <thead>
21
    <th>{% trans 'Date' %}</th>
22
    <th>{% trans 'Description' %}</th>
23
    <th>{% trans 'User' %}</th>
24
    <th>{% trans 'Actions' %}</th>
25
  </thead>
26
  <tbody>
27
   {% for snapshot in object_list %}
28
    <tr>
29
      <td>
30
        {{ snapshot.timestamp }}
31
      </td>
32
      <td>
33
        {% if snapshot.label %}
34
          <strong>{{ snapshot.label }}</strong>
35
        {% elif snapshot.comment %}
36
          {{ snapshot.comment }}
37
        {% endif %}
38
      </td>
39
      <td>{% if snapshot.user %} {{ snapshot.user.get_full_name }}{% endif %}</td>
40
      <td>
41
        <a href="{% url 'combo-snapshot-view' pk=snapshot.id %}">{% trans "view" %}</a>
42
        — <a href="{% url 'combo-manager-snapshot-export' page_pk=view.page.id pk=snapshot.id %}">{% trans "export" %}</a>
43
        — <a href="{% url 'combo-manager-snapshot-restore' page_pk=view.page.id pk=snapshot.id %}" rel="popup">{% trans "restore" %}</a>
44
      </td>
45
    </tr>
46
    {% endfor %}
47
  </tbody>
48
</table>
18
  <div>
19
    <table class="main">
20
      <thead>
21
        <th>{% trans 'Date' %}</th>
22
        <th>{% trans 'Description' %}</th>
23
        <th>{% trans 'User' %}</th>
24
        <th>{% trans 'Actions' %}</th>
25
      </thead>
26
      <tbody>
27
        {% for snapshot in object_list %}
28
          <tr>
29
            <td>
30
              {{ snapshot.timestamp }}
31
            </td>
32
            <td>
33
              {% if snapshot.label %}
34
                <strong>{{ snapshot.label }}</strong>
35
              {% elif snapshot.comment %}
36
                {{ snapshot.comment }}
37
              {% endif %}
38
            </td>
39
            <td>{% if snapshot.user %} {{ snapshot.user.get_full_name }}{% endif %}</td>
40
            <td>
41
              <a href="{% url 'combo-snapshot-view' pk=snapshot.id %}">{% trans "view" %}</a>
42
              — <a href="{% url 'combo-manager-snapshot-export' page_pk=view.page.id pk=snapshot.id %}">{% trans "export" %}</a>
43
              — <a href="{% url 'combo-manager-snapshot-restore' page_pk=view.page.id pk=snapshot.id %}" rel="popup">{% trans "restore" %}</a>
44
            </td>
45
          </tr>
46
        {% endfor %}
47
      </tbody>
48
    </table>
49 49

  
50
{% include "gadjo/pagination.html" %}
50
    {% include "gadjo/pagination.html" %}
51 51

  
52
</div>
52
  </div>
53 53

  
54 54
{% endblock %}
combo/manager/templates/combo/page_view.html
4 4
{% load thumbnail %}
5 5

  
6 6
{% block appbar %}
7
<h2>{% trans 'Page' %} - {{ object.title }}</h2>
8
<span class="actions">
9
<a class="extra-actions-menu-opener"></a>
10
<a class="action-see-online" href="{{ object.get_online_url }}">{% trans 'See online' %}</a>
11
<ul class="extra-actions-menu">
12
  <li><a class="action-history" href="{% url 'combo-manager-page-history' pk=object.id %}">{% trans 'History' %}</a></li>
13
  <li><a {% if page_has_subpages %}rel="popup" data-autoclose-dialog="true" {% endif %}class="action-export" href="{% url 'combo-manager-page-export' pk=object.id %}">{% trans 'Export' %}</a></li>
14
  <li><a class="action-edit-page-variables" rel="popup" href="{% url 'combo-manager-page-edit-extra-variables' pk=object.id %}">{% trans "Edit extra page variables" %}</a></li>
15
{% if perms.data.add_page %}
16
  <li><a class="action-add-child" rel="popup" href="{% url 'combo-manager-page-add-child' pk=object.id %}">{% trans 'Add a child page' %}</a></li>
17
  <li><a class="action-edit-roles" rel="popup" href="{% url 'combo-manager-page-edit-roles' pk=object.id %}">{% trans 'Manage edit roles' %}</a></li>
18
  <li><a rel="popup" class="action-duplicate" href="{% url 'combo-manager-page-duplicate' pk=object.id %}">{% trans 'Duplicate' %}</a></li>
19
  <li><a rel="popup" class="action-save" href="{% url 'combo-manager-page-save' pk=object.id %}">{% trans 'Save snapshot' %}</a></li>
20
  <li><a class="action-delete" rel="popup" href="{% url 'combo-manager-page-delete' pk=object.id %}">{% trans 'Delete' %}</a></li>
21
{% endif %}
22
</ul>
23
</span>
7
  <h2>{% trans 'Page' %} - {{ object.title }}</h2>
8
  <span class="actions">
9
    <a class="extra-actions-menu-opener"></a>
10
    <a class="action-see-online" href="{{ object.get_online_url }}">{% trans 'See online' %}</a>
11
    <ul class="extra-actions-menu">
12
      <li><a class="action-history" href="{% url 'combo-manager-page-history' pk=object.id %}">{% trans 'History' %}</a></li>
13
      <li><a {% if page_has_subpages %}rel="popup" data-autoclose-dialog="true" {% endif %}class="action-export" href="{% url 'combo-manager-page-export' pk=object.id %}">{% trans 'Export' %}</a></li>
14
      <li><a class="action-edit-page-variables" rel="popup" href="{% url 'combo-manager-page-edit-extra-variables' pk=object.id %}">{% trans "Edit extra page variables" %}</a></li>
15
      {% if perms.data.add_page %}
16
        <li><a class="action-add-child" rel="popup" href="{% url 'combo-manager-page-add-child' pk=object.id %}">{% trans 'Add a child page' %}</a></li>
17
        <li><a class="action-edit-roles" rel="popup" href="{% url 'combo-manager-page-edit-roles' pk=object.id %}">{% trans 'Manage edit roles' %}</a></li>
18
        <li><a rel="popup" class="action-duplicate" href="{% url 'combo-manager-page-duplicate' pk=object.id %}">{% trans 'Duplicate' %}</a></li>
19
        <li><a rel="popup" class="action-save" href="{% url 'combo-manager-page-save' pk=object.id %}">{% trans 'Save snapshot' %}</a></li>
20
        <li><a class="action-delete" rel="popup" href="{% url 'combo-manager-page-delete' pk=object.id %}">{% trans 'Delete' %}</a></li>
21
      {% endif %}
22
    </ul>
23
  </span>
24 24
{% endblock %}
25 25

  
26 26
{% block breadcrumb %}
......
29 29
{% endblock %}
30 30

  
31 31
{% block sidebar %}
32
<aside id="sidebar">
33

  
34
<div class="page-options">
35
<h3>{% trans 'Parameters' %}</h3>
36

  
37
<p>
38
<label>{% trans 'Title:' %}</label>
39
{{object.title}}
40
(<a rel="popup" href="{% url 'combo-manager-page-edit-title' pk=object.id %}">{% trans 'change' %}</a>)
41
</p>
42

  
43
<p>
44
<label>{% trans 'Slug:' %}</label>
45
<tt>{{ object.slug }}{% if object.sub_slug %}/<span class="subslug">{{ object.sub_slug }}</span>{% endif %}</tt>
46
(<a rel="popup" href="{% url 'combo-manager-page-edit-slug' pk=object.id %}">{% trans 'change' %}</a>)
47
</p>
48

  
49
<p>
50
<label>{% trans 'Description:' %}</label>
51
{% if object.description %}{{ object.description|truncatewords:32 }}{% else %}<i>{% trans 'none' %}</i>{% endif %}
52
(<a rel="popup" href="{% url 'combo-manager-page-edit-description' pk=object.id %}">{% trans 'change' %}</a>)
53
</p>
54

  
55
<p>
56
<label>{% trans 'Template:' %}</label>
57
{{ object.get_template_display_name }}
58
{% if object.missing_template %}<span class="error">({% trans "missing" %})</span>{% endif %}
59
(<a rel="popup" href="{% url 'combo-manager-page-select-template' pk=object.id %}">{% trans 'change' %}</a>)
60
</p>
61

  
62
<p>
63
<label>{% trans 'Visibility:' %}</label>
64
{{ object.visibility }}
65
(<a rel="popup" href="{% url 'combo-manager-page-visibility' pk=object.id %}">{% trans 'change' %}</a>)
66
</p>
67

  
68
<p>
69
<label>{% trans 'Include in navigation menus:' %}</label>
70
{% if object.exclude_from_navigation %}{% trans 'no' %}{% else %}{% trans 'yes' %}{% endif %}
71
(<a rel="popup" href="{% url 'combo-manager-page-edit-include-in-navigation' pk=object.id %}">{% trans 'change' %}</a>)
72
</p>
73

  
74
<p>
75
<label>{% trans 'Redirection:' %}</label>
76
{% if object.redirect_url %}{{ object.redirect_url }}{% else %}<i>{% trans 'none' %}</i>{% endif %}
77
(<a rel="popup" href="{% url 'combo-manager-page-edit-redirection' pk=object.id %}">{% trans 'change' %}</a>)
78
</p>
79

  
80
<p>
81
<label>{% trans 'Picture:' %}</label>
82
{% if object.picture %}
83
  {% if object.picture_extension != '.svg' %}
84
    {% thumbnail object.picture "320x240" crop="50% 25%" upscale=False as im %}
85
    <img class="page-picture" src="{{im.url}}"/>
86
    {% endthumbnail %}
87
  {% else %}
88
    <img class="page-picture" src="{{page.picture.url}}"/>
89
  {% endif %}
90
(<a href="{% url 'combo-manager-page-remove-picture' pk=object.id %}">{% trans 'remove' %}</a>)
91
{% else %}<i>{% trans 'none' %}</i>{% endif %}
92
(<a rel="popup" href="{% url 'combo-manager-page-edit-picture' pk=object.id %}">{% trans 'change' %}</a>)
93
</p>
94

  
95
{% if object.extra_variables %}
96
<p>
97
<label>{% trans 'Extra variables:' %}</label>
98
{% for key in object.get_extra_variables_keys %}<i>{{ key }}</i>{% if not forloop.last %}, {% endif %}{% endfor %}
99
(<a rel="popup" href="{% url 'combo-manager-page-edit-extra-variables' pk=object.id %}">{% trans 'change' %}</a>)
100
</p>
101
{% endif %}
102

  
103
</div>
104

  
105
{% if object.parent_id or previous_page or next_page %}
106
<div class="page-options navigation">
107
<h3>{% trans 'Navigation' %}</h3>
108
<ul>
109
{% if object.parent_id and request.user.is_superuser %}
110
<li class="nav-up"><a href="{% url 'combo-manager-page-view' pk=object.parent_id %}">{{ object.parent.title }}</a></li>
111
{% endif %}
112
{% if previous_page %}
113
<li class="nav-left"><a href="{% url 'combo-manager-page-view' pk=previous_page.pk %}">{{ previous_page.title }}</a></li>
114
{% endif %}
115
{% if next_page %}
116
<li class="nav-right"><a href="{% url 'combo-manager-page-view' pk=next_page.pk %}">{{ next_page.title }}</a></li>
117
{% endif %}
118
</ul>
119
</div>
120
{% endif %}
121

  
122
{% if optional_placeholders %}
123
<div class="page-options">
124
<h3>{% trans 'Optional sections' %}</h3>
125
<ul>
126
{% for placeholder in optional_placeholders %}
127
  <li>
128
    {{ placeholder.name }} ({% if placeholder.is_empty %}{% trans "empty" %}{% else %}{% trans "like parent" %}{% endif %})
129
    (<a href="{% url 'combo-manager-page-view' pk=object.id %}?include-section={{ placeholder.key }}">{% trans 'change' %}</a>)
130
  </li>
131
{% endfor %}
132
</ul>
133
</div>
134
{% endif %}
135

  
136
</aside>
32
  <aside id="sidebar">
33

  
34
    <div class="page-options">
35
      <h3>{% trans 'Parameters' %}</h3>
36

  
37
      <p>
38
        <label>{% trans 'Title:' %}</label>
39
        {{object.title}}
40
        (<a rel="popup" href="{% url 'combo-manager-page-edit-title' pk=object.id %}">{% trans 'change' %}</a>)
41
      </p>
42

  
43
      <p>
44
        <label>{% trans 'Slug:' %}</label>
45
        <tt>{{ object.slug }}{% if object.sub_slug %}/<span class="subslug">{{ object.sub_slug }}</span>{% endif %}</tt>
46
        (<a rel="popup" href="{% url 'combo-manager-page-edit-slug' pk=object.id %}">{% trans 'change' %}</a>)
47
      </p>
48

  
49
      <p>
50
        <label>{% trans 'Description:' %}</label>
51
        {% if object.description %}{{ object.description|truncatewords:32 }}{% else %}<i>{% trans 'none' %}</i>{% endif %}
52
        (<a rel="popup" href="{% url 'combo-manager-page-edit-description' pk=object.id %}">{% trans 'change' %}</a>)
53
      </p>
54

  
55
      <p>
56
        <label>{% trans 'Template:' %}</label>
57
        {{ object.get_template_display_name }}
58
        {% if object.missing_template %}<span class="error">({% trans "missing" %})</span>{% endif %}
59
        (<a rel="popup" href="{% url 'combo-manager-page-select-template' pk=object.id %}">{% trans 'change' %}</a>)
60
      </p>
61

  
62
      <p>
63
        <label>{% trans 'Visibility:' %}</label>
64
        {{ object.visibility }}
65
        (<a rel="popup" href="{% url 'combo-manager-page-visibility' pk=object.id %}">{% trans 'change' %}</a>)
66
      </p>
67

  
68
      <p>
69
        <label>{% trans 'Include in navigation menus:' %}</label>
70
        {% if object.exclude_from_navigation %}{% trans 'no' %}{% else %}{% trans 'yes' %}{% endif %}
71
        (<a rel="popup" href="{% url 'combo-manager-page-edit-include-in-navigation' pk=object.id %}">{% trans 'change' %}</a>)
72
      </p>
73

  
74
      <p>
75
        <label>{% trans 'Redirection:' %}</label>
76
        {% if object.redirect_url %}{{ object.redirect_url }}{% else %}<i>{% trans 'none' %}</i>{% endif %}
77
        (<a rel="popup" href="{% url 'combo-manager-page-edit-redirection' pk=object.id %}">{% trans 'change' %}</a>)
78
      </p>
79

  
80
      <p>
81
        <label>{% trans 'Picture:' %}</label>
82
        {% if object.picture %}
83
          {% if object.picture_extension != '.svg' %}
84
            {% thumbnail object.picture "320x240" crop="50% 25%" upscale=False as im %}
85
              <img class="page-picture" src="{{im.url}}"/>
86
            {% endthumbnail %}
87
          {% else %}
88
            <img class="page-picture" src="{{page.picture.url}}"/>
89
          {% endif %}
90
          (<a href="{% url 'combo-manager-page-remove-picture' pk=object.id %}">{% trans 'remove' %}</a>)
91
        {% else %}<i>{% trans 'none' %}</i>{% endif %}
92
        (<a rel="popup" href="{% url 'combo-manager-page-edit-picture' pk=object.id %}">{% trans 'change' %}</a>)
93
      </p>
94

  
95
      {% if object.extra_variables %}
96
        <p>
97
          <label>{% trans 'Extra variables:' %}</label>
98
          {% for key in object.get_extra_variables_keys %}<i>{{ key }}</i>{% if not forloop.last %}, {% endif %}{% endfor %}
99
          (<a rel="popup" href="{% url 'combo-manager-page-edit-extra-variables' pk=object.id %}">{% trans 'change' %}</a>)
100
        </p>
101
      {% endif %}
102

  
103
    </div>
104

  
105
    {% if object.parent_id or previous_page or next_page %}
106
      <div class="page-options navigation">
107
        <h3>{% trans 'Navigation' %}</h3>
108
        <ul>
109
          {% if object.parent_id and request.user.is_superuser %}
110
            <li class="nav-up"><a href="{% url 'combo-manager-page-view' pk=object.parent_id %}">{{ object.parent.title }}</a></li>
111
          {% endif %}
112
          {% if previous_page %}
113
            <li class="nav-left"><a href="{% url 'combo-manager-page-view' pk=previous_page.pk %}">{{ previous_page.title }}</a></li>
114
          {% endif %}
115
          {% if next_page %}
116
            <li class="nav-right"><a href="{% url 'combo-manager-page-view' pk=next_page.pk %}">{{ next_page.title }}</a></li>
117
          {% endif %}
118
        </ul>
119
      </div>
120
    {% endif %}
121

  
122
    {% if optional_placeholders %}
123
      <div class="page-options">
124
        <h3>{% trans 'Optional sections' %}</h3>
125
        <ul>
126
          {% for placeholder in optional_placeholders %}
127
            <li>
128
              {{ placeholder.name }} ({% if placeholder.is_empty %}{% trans "empty" %}{% else %}{% trans "like parent" %}{% endif %})
129
              (<a href="{% url 'combo-manager-page-view' pk=object.id %}?include-section={{ placeholder.key }}">{% trans 'change' %}</a>)
130
            </li>
131
          {% endfor %}
132
        </ul>
133
      </div>
134
    {% endif %}
135

  
136
  </aside>
137 137
{% endblock %} {# sidebar #}
138 138

  
139 139
{% block content %}
140 140

  
141
<div id="page-content">
141
  <div id="page-content">
142 142

  
143
{% if object.redirect_url %}
144
<div class="infonotice">
145
  <p>
146
    {% blocktrans with redirect_url=object.redirect_url %}This page is configured as a redirection to the URL "{{ redirect_url }}".{% endblocktrans %}
147
    {% if redirect_url_is_absolute %}
148
    {% trans "It will also be used as a template for the pages behind this URL." %}
149
    {% endif %}
150
  </p>
151
</div>
152
{% endif %}
153

  
154
<div id="placeholders"
155
     data-cell-order-url="{% url 'combo-manager-cell-order' page_pk=object.id %}"
156
     >
157
{% for placeholder in placeholders %}
158
  <div class="placeholder" data-placeholder-key="{{ placeholder.key }}">
159
    <h2>{{ placeholder.name }}</h2>
160
    <a class="placeholder-options-link" data-popup href="{% url 'combo-manage-placeholder-options' page_pk=object.id placeholder=placeholder.key %}">{% trans "Options" %}</a>
161
    <div class="cell-list">
162
      {% for cell in placeholder.cells %}
163
      <div id="cell-{{cell.get_reference}}" class="cell {{cell.class_name}}" data-cell-reference="{{ cell.get_reference }}">
164
        <h3><span class="handle">⣿</span>
165
                <span class="group1">
166
                   {{ cell.get_label }}
167
                   <span class="cell-template-label"
168
                     >{% if cell.template_name %}({{cell.get_template_label}}){% endif %}</span>
169
                   <span class="cell-slug">{% if cell.slug %}[{{cell.slug}}]{% endif %}</span>
170
                   <span class="extra-css-class">{% if cell.cleaned_extra_css_class %}[{{ cell.cleaned_extra_css_class }}]{% endif %}</span>
171
                  <span class="additional-label"><i>{{cell.get_additional_label|default_if_none:""}}</i></span>
172
                  {% if cell.get_invalid_reason %}
173
                  <span class="invalid">{{ cell.get_invalid_reason }}{% if cell.class_name != 'link-list-cell' %} -
174
                      {% if cell.get_validity_info.invalid_datetime|datetime_in_past %}
175
                        {% blocktrans with cell.get_validity_info.invalid_datetime|date:"DATETIME_FORMAT" as invalidity_date %}This cell is no longer displayed since {{ invalidity_date }}.{% endblocktrans %}
176
                      {% else %}
177
                        {% blocktrans with cell.get_validity_info.invalid_datetime|timeuntil as invalidity_delay %}This cell will no longer be displayed in {{ invalidity_delay }}.{% endblocktrans %}
178
                      {% endif %}
179
                    {% endif %}</span>
180
                  {% endif %}
181
                </span>
182
                <span class="visibility-summary {{ cell.get_manager_visibility_css_class }}"
183
                      title="{% trans 'Restricted visibility' %}"
184
                        >{{ cell.get_manager_visibility_content }}</span>
185
        </h3>
186
        <div>{% cell_form cell %}</div>
143
    {% if object.redirect_url %}
144
      <div class="infonotice">
145
        <p>
146
          {% blocktrans with redirect_url=object.redirect_url %}This page is configured as a redirection to the URL "{{ redirect_url }}".{% endblocktrans %}
147
          {% if redirect_url_is_absolute %}
148
            {% trans "It will also be used as a template for the pages behind this URL." %}
149
          {% endif %}
150
        </p>
187 151
      </div>
188
      {% endfor %}
189
    </div>
152
    {% endif %}
190 153

  
191
    <div class="manager-add-new-cell">
192
     <a href="#">{% trans 'Add a new cell' %}</a>
193
     <div style="display: none">
194
     <select>
195
        {% for label, celltypes in cell_type_groups %}
196
        {% if label %}
197
        <optgroup label="{{label}}">
198
        {% endif %}
199
                {% for cell_type in celltypes %}
200
                <option data-add-url="{% url 'combo-manager-page-add-cell' page_pk=object.id cell_type=cell_type.cell_type_str variant=cell_type.variant ph_key=placeholder.key %}"
201
                >{{cell_type.name}}</option>
154
    <div id="placeholders"
155
      data-cell-order-url="{% url 'combo-manager-cell-order' page_pk=object.id %}"
156
    >
157
      {% for placeholder in placeholders %}
158
        <div class="placeholder" data-placeholder-key="{{ placeholder.key }}">
159
          <h2>{{ placeholder.name }}</h2>
160
          <a class="placeholder-options-link" data-popup href="{% url 'combo-manage-placeholder-options' page_pk=object.id placeholder=placeholder.key %}">{% trans "Options" %}</a>
161
          <div class="cell-list">
162
            {% for cell in placeholder.cells %}
163
              <div id="cell-{{cell.get_reference}}" class="cell {{cell.class_name}}" data-cell-reference="{{ cell.get_reference }}">
164
                <h3><span class="handle">⣿</span>
165
                  <span class="group1">
166
                    {{ cell.get_label }}
167
                    <span class="cell-template-label"
168
                    >{% if cell.template_name %}({{cell.get_template_label}}){% endif %}</span>
169
                    <span class="cell-slug">{% if cell.slug %}[{{cell.slug}}]{% endif %}</span>
170
                    <span class="extra-css-class">{% if cell.cleaned_extra_css_class %}[{{ cell.cleaned_extra_css_class }}]{% endif %}</span>
171
                    <span class="additional-label"><i>{{cell.get_additional_label|default_if_none:""}}</i></span>
172
                    {% if cell.get_invalid_reason %}
173
                      <span class="invalid">{{ cell.get_invalid_reason }}{% if cell.class_name != 'link-list-cell' %} -
174
                        {% if cell.get_validity_info.invalid_datetime|datetime_in_past %}
175
                          {% blocktrans with cell.get_validity_info.invalid_datetime|date:"DATETIME_FORMAT" as invalidity_date %}This cell is no longer displayed since {{ invalidity_date }}.{% endblocktrans %}
176
                        {% else %}
177
                          {% blocktrans with cell.get_validity_info.invalid_datetime|timeuntil as invalidity_delay %}This cell will no longer be displayed in {{ invalidity_delay }}.{% endblocktrans %}
178
                        {% endif %}
179
                      {% endif %}</span>
180
                    {% endif %}
181
                  </span>
182
                  <span class="visibility-summary {{ cell.get_manager_visibility_css_class }}"
183
                    title="{% trans 'Restricted visibility' %}"
184
                  >{{ cell.get_manager_visibility_content }}</span>
185
                </h3>
186
                <div>{% cell_form cell %}</div>
187
              </div>
188
            {% endfor %}
189
          </div>
190

  
191
          <div class="manager-add-new-cell">
192
            <a href="#">{% trans 'Add a new cell' %}</a>
193
            <div style="display: none">
194
              <select>
195
                {% for label, celltypes in cell_type_groups %}
196
                  {% if label %}
197
                    <optgroup label="{{label}}">
198
                  {% endif %}
199
                  {% for cell_type in celltypes %}
200
                    <option data-add-url="{% url 'combo-manager-page-add-cell' page_pk=object.id cell_type=cell_type.cell_type_str variant=cell_type.variant ph_key=placeholder.key %}"
201
                    >{{cell_type.name}}</option>
202
                  {% endfor %}
203
                  {% if label %}
204
                    </optgroup>
205
                  {% endif %}
202 206
                {% endfor %}
203
        {% if label %}
204
        </optgroup>
205
        {% endif %}
206
        {% endfor %}
207
     </select>
208
     <button>ok</button>
209
    </div>
207
              </select>
208
              <button>ok</button>
209
            </div>
210
          </div>
211

  
212
        </div>
213
      {% endfor %}
210 214
    </div>
211 215

  
212 216
  </div>
213
{% endfor %}
214
</div>
215

  
216
</div>
217 217

  
218 218
{% endblock %}
combo/manager/templates/combo/placeholder_options.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans "Options" %}</h2>
5
  <h2>{% trans "Options" %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9 9

  
10
<form method="post">
11
  {% csrf_token %}
12
  {{ form.as_p }}
13
  <div class="buttons">
14
    <button class="submit-button">{% trans "Submit" %}</button>
15
    <a class="cancel" href="{% url 'combo-manager-page-view' pk=page.pk %}">{% trans 'Cancel' %}</a>
16
  </div>
17
</form>
10
  <form method="post">
11
    {% csrf_token %}
12
    {{ form.as_p }}
13
    <div class="buttons">
14
      <button class="submit-button">{% trans "Submit" %}</button>
15
      <a class="cancel" href="{% url 'combo-manager-page-view' pk=page.pk %}">{% trans 'Cancel' %}</a>
16
    </div>
17
  </form>
18 18
{% endblock %}
combo/manager/templates/combo/site_export.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans "Site Export" %}</h2>
5
  <h2>{% trans "Site Export" %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9
<form method="post">
10
  {% csrf_token %}
11
  {{ form.as_p }}
12
  <div class="buttons">
13
    <button>{% trans 'Export' %}</button>
14
    <a class="cancel" href="{% url 'combo-manager-homepage' %}">{% trans 'Cancel' %}</a>
15
  </div>
16
  <script>
17
    $.get("{% url 'combo-manager-assets-export-size' %}", function( data ) {
18
      $('<span></span>', {'text': data, 'class': 'asset-export-size'}).appendTo($('label[for=id_asset_files]'));
19
    }, 'text' );
20
  </script>
21
</form>
9
  <form method="post">
10
    {% csrf_token %}
11
    {{ form.as_p }}
12
    <div class="buttons">
13
      <button>{% trans 'Export' %}</button>
14
      <a class="cancel" href="{% url 'combo-manager-homepage' %}">{% trans 'Cancel' %}</a>
15
    </div>
16
    <script>
17
      $.get("{% url 'combo-manager-assets-export-size' %}", function( data ) {
18
        $('<span></span>', {'text': data, 'class': 'asset-export-size'}).appendTo($('label[for=id_asset_files]'));
19
      }, 'text' );
20
    </script>
21
  </form>
22 22
{% endblock %}
combo/manager/templates/combo/site_import.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans "Site Import" %}</h2>
5
  <h2>{% trans "Site Import" %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9 9

  
10
<form method="post" enctype="multipart/form-data">
11
  {% csrf_token %}
12
  {{ form.as_p }}
13
  <div class="buttons">
14
    <button>{% trans "Import" %}</button>
15
    <a class="cancel" href="{% url 'combo-manager-homepage' %}">{% trans 'Cancel' %}</a>
16
  </div>
17
</form>
10
  <form method="post" enctype="multipart/form-data">
11
    {% csrf_token %}
12
    {{ form.as_p }}
13
    <div class="buttons">
14
      <button>{% trans "Import" %}</button>
15
      <a class="cancel" href="{% url 'combo-manager-homepage' %}">{% trans 'Cancel' %}</a>
16
    </div>
17
  </form>
18 18
{% endblock %}
combo/manager/templates/combo/site_settings.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{% trans "Site Settings" %}</h2>
5
  <h2>{% trans "Site Settings" %}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
9 9

  
10
<form method="post" id="site-settings-form">
11
  {% csrf_token %}
12
  {{ form.as_p }}
13
  <div class="buttons">
14
    <button class="submit-button">{% trans "Save" %}</button>
15
    <a class="cancel" href="{% url 'combo-manager-homepage' %}">{% trans 'Cancel' %}</a>
16
  </div>
10
  <form method="post" id="site-settings-form">
11
    {% csrf_token %}
12
    {{ form.as_p }}
13
    <div class="buttons">
14
      <button class="submit-button">{% trans "Save" %}</button>
15
      <a class="cancel" href="{% url 'combo-manager-homepage' %}">{% trans 'Cancel' %}</a>
16
    </div>
17 17

  
18
  <script>
19
  $('select.page-selector').each(function() {
20
    field_id = $(this).attr('id')
21
    custom_url_field_id = '#' + field_id + '_path'
22
    if($(custom_url_field_id).val())
23
      $(this).children('option[data-other=true]').prop('selected', true);
24
  });
18
    <script>
19
      $('select.page-selector').each(function() {
20
        field_id = $(this).attr('id')
21
        custom_url_field_id = '#' + field_id + '_path'
22
        if($(custom_url_field_id).val())
23
        $(this).children('option[data-other=true]').prop('selected', true);
24
      });
25 25

  
26
  $('select').change(function(){
27
    field_id = $(this).attr('id')
28
    custom_url_field_id = '#' + field_id + '_path'
29
    if ($('option:selected', this).data('other'))
30
      $(custom_url_field_id).parent('p').show();
31
    else
32
      $(custom_url_field_id).parent('p').hide();
33
  }).trigger('change');
26
      $('select').change(function(){
27
        field_id = $(this).attr('id')
28
        custom_url_field_id = '#' + field_id + '_path'
29
        if ($('option:selected', this).data('other'))
30
        $(custom_url_field_id).parent('p').show();
31
        else
32
        $(custom_url_field_id).parent('p').hide();
33
      }).trigger('change');
34 34

  
35
  $('form#site-settings-form').submit(function() {
36
    $('select.page-selector').each(function() {
37
      field_id = $(this).attr('id')
38
      custom_url_field_id = '#' + field_id + '_path'
39
      if(!$('option:selected', this).data('other'))
40
        $(custom_url_field_id).val('');
41
    });
42
  });
43
  </script>
44
</form>
35
      $('form#site-settings-form').submit(function() {
36
        $('select.page-selector').each(function() {
37
          field_id = $(this).attr('id')
38
          custom_url_field_id = '#' + field_id + '_path'
39
          if(!$('option:selected', this).data('other'))
40
          $(custom_url_field_id).val('');
41
        });
42
      });
43
    </script>
44
  </form>
45 45
{% endblock %}
combo/manager/templates/combo/snapshot_restore.html
4 4
{% load thumbnail %}
5 5

  
6 6
{% block appbar %}
7
<h2>{% trans 'Snapshot Restore' %} - {{ page.title }}</h2>
7
  <h2>{% trans 'Snapshot Restore' %} - {{ page.title }}</h2>
8 8
{% endblock %}
9 9

  
10 10
{% block breadcrumb %}
......
15 15
{% endblock %}
16 16

  
17 17
{% block content %}
18
<form method="post">
19
  {% csrf_token %}
20
  <p>
21
  {% blocktrans with date=object.timestamp|date:"DATETIME_FORMAT" snapshot_id=object.id%}
22
  Are you sure you want to restore snapshot #{{snapshot_id}} of the page (dated {{date}})?
23
  {% endblocktrans %}
24
  </p>
25
  <div class="buttons">
26
    <button class="submit-button">{% trans 'Restore' %}</button>
27
    <a class="cancel" href="{% url 'combo-manager-page-history' pk=page.id %}">{% trans 'Cancel' %}</a>
28
  </div>
18
  <form method="post">
19
    {% csrf_token %}
20
    <p>
21
      {% blocktrans with date=object.timestamp|date:"DATETIME_FORMAT" snapshot_id=object.id%}
22
        Are you sure you want to restore snapshot #{{snapshot_id}} of the page (dated {{date}})?
23
      {% endblocktrans %}
24
    </p>
25
    <div class="buttons">
26
      <button class="submit-button">{% trans 'Restore' %}</button>
27
      <a class="cancel" href="{% url 'combo-manager-page-history' pk=page.id %}">{% trans 'Cancel' %}</a>
28
    </div>
29 29

  
30 30
{% endblock %}
combo/manager/templates/combo/snapshot_save.html
4 4
{% load thumbnail %}
5 5

  
6 6
{% block appbar %}
7
<h2>{% trans 'Save Page' %} - {{ page.title }}</h2>
7
  <h2>{% trans 'Save Page' %} - {{ page.title }}</h2>
8 8
{% endblock %}
9 9

  
10 10
{% block breadcrumb %}
......
13 13
{% endblock %}
14 14

  
15 15
{% block content %}
16
<form method="post">
17
  {% csrf_token %}
18
  {{ form.as_p }}
19
  <div class="buttons">
20
    <button class="submit-button">{% trans 'Save' %}</button>
21
    <a class="cancel" href="{% url 'combo-manager-page-view' pk=page.id %}">{% trans 'Cancel' %}</a>
22
  </div>
23
</form>
16
  <form method="post">
17
    {% csrf_token %}
18
    {{ form.as_p }}
19
    <div class="buttons">
20
      <button class="submit-button">{% trans 'Save' %}</button>
21
      <a class="cancel" href="{% url 'combo-manager-page-view' pk=page.id %}">{% trans 'Cancel' %}</a>
22
    </div>
23
  </form>
24 24
{% endblock %}
combo/manager/templates/combo/widgets/flexsize.html
1 1
{% load i18n %}
2 2
{% with id=widget.attrs.id %}
3
<ul{% if id %} id="{{ id }}"{% endif %} class="flex-size-select {{ widget.attrs.class|default:"" }}">{% for group, options, index in widget.optgroups %}
4
  {% for option in options %}
5
  <li class="{{ option.value|default:"size-auto" }}"><label class="{{ option.value }}"
6
          ><input type="radio" name="{{ widget.name }}" value="{{ option.value }}"
7
                {% if option.selected %}checked{% endif %}>{{ option.label|default:_("Auto") }}</label></li>
3
  <ul{% if id %} id="{{ id }}"{% endif %} class="flex-size-select {{ widget.attrs.class|default:"" }}">{% for group, options, index in widget.optgroups %}
4
    {% for option in options %}
5
      <li class="{{ option.value|default:"size-auto" }}"><label class="{{ option.value }}"
6
      ><input type="radio" name="{{ widget.name }}" value="{{ option.value }}"
7
        {% if option.selected %}checked{% endif %}>{{ option.label|default:_("Auto") }}</label></li>
8
    {% endfor %}
8 9
  {% endfor %}
9
{% endfor %}
10
</ul>{% endwith %}
10
  </ul>{% endwith %}
combo/manager/templates/registration/login.html
2 2
{% load i18n %}
3 3

  
4 4
{% block content %}
5
<form method="post">
6
{% csrf_token %}
7
{{ form.as_p }}
8
<button>{% trans 'Log in' %}</button>
9
</form>
5
  <form method="post">
6
    {% csrf_token %}
7
    {{ form.as_p }}
8
    <button>{% trans 'Log in' %}</button>
9
  </form>
10 10
{% endblock %}
combo/profile/templates/combo/profile.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
<h2>{% trans "Profile" %}</h2>
4
<div class="profile">
5
{% for key, details in profile_fields.items %}
6
  {% if details.value and details.user_visible %}
7
    <p><span class="label">{{ details.label }}</span> <span class="value">{{ details.value }}</span></p>
8
  {% endif %}
9
{% endfor %}
10
{% if error == 'unknown user' %}
11
<p>{% trans 'Unknown User' %}</p>
12
{% endif %}
13
</div>
3
  <h2>{% trans "Profile" %}</h2>
4
  <div class="profile">
5
    {% for key, details in profile_fields.items %}
6
      {% if details.value and details.user_visible %}
7
        <p><span class="label">{{ details.label }}</span> <span class="value">{{ details.value }}</span></p>
8
      {% endif %}
9
    {% endfor %}
10
    {% if error == 'unknown user' %}
11
      <p>{% trans 'Unknown User' %}</p>
12
    {% endif %}
13
  </div>
14 14
{% endblock %}
combo/public/templates/combo/404.html
2 2
{% load i18n %}
3 3

  
4 4
{% block combo-content %}
5
 <div>
6
  <h2>{% trans "This page doesn't exist" %}</h2>
7
  {% blocktrans %}
8
  <p>
9
   Maybe it got removed, maybe a link is wrong, luckily there's still
10
   the <a href="/">home page</a> to get back to a safe place.
11
  </p>
12
  {% endblocktrans %}
13
 </div>
5
  <div>
6
    <h2>{% trans "This page doesn't exist" %}</h2>
7
    {% blocktrans %}
8
      <p>
9
        Maybe it got removed, maybe a link is wrong, luckily there's still
10
        the <a href="/">home page</a> to get back to a safe place.
11
      </p>
12
    {% endblocktrans %}
13
  </div>
14 14
{% endblock %}
combo/public/templates/combo/asset_picture_fragment.html
2 2
{% get_asset cell=cell type='picture' as asset %}
3 3
{% if asset %}
4 4
  <picture>
5
  <img src="{% asset_url asset size=cell_picture_size|default:"660x360" crop=cell_picture_crop|default:"center" upscale=cell_picture_upscale|default:False %}" alt="">
5
    <img src="{% asset_url asset size=cell_picture_size|default:"660x360" crop=cell_picture_crop|default:"center" upscale=cell_picture_upscale|default:False %}" alt="">
6 6
  </picture>
7 7
{% endif %}
combo/public/templates/combo/deferred-cell.html
1 1
{% block cell-content %}
2
{% load i18n %}
3
<div class="loading" data-ajax-cell-must-load="true">
4
<span class="loading-message">{{ cell.loading_message }}</span>
5
</div>
2
  {% load i18n %}
3
  <div class="loading" data-ajax-cell-must-load="true">
4
    <span class="loading-message">{{ cell.loading_message }}</span>
5
  </div>
6 6
{% endblock %}
combo/public/templates/combo/empty_site.html
1 1
{% load i18n %}<!DOCTYPE html>
2 2
<html>
3
<head>
4
  <meta charset="utf-8"/>
5
  <style>
6
body {
7
  margin: auto;
8
  text-align: center;
9
}
3
  <head>
4
    <meta charset="utf-8"/>
5
    <style>
6
      body {
7
        margin: auto;
8
        text-align: center;
9
      }
10 10

  
11
#content:after {
12
  position: absolute;
13
  text-align: center;
14
  margin: auto;
15
  content: "↑↑ ↓↓  ←→ ←→  B A";
16
  font-family: sans-serif;
17
  font-weight: bold;
18
  font-size: 20vh;
19
  display: block;
20
  width: 4em;
21
  padding-left: 0.3em;
22
  color: rgba(0, 0, 0, 0.03);
23
  top: 0;
24
}
11
      #content:after {
12
        position: absolute;
13
        text-align: center;
14
        margin: auto;
15
        content: "↑↑ ↓↓  ←→ ←→  B A";
16
        font-family: sans-serif;
17
        font-weight: bold;
18
        font-size: 20vh;
19
        display: block;
20
        width: 4em;
21
        padding-left: 0.3em;
22
        color: rgba(0, 0, 0, 0.03);
23
        top: 0;
24
      }
25 25

  
26
#content {
27
  position: relative;
28
  z-index: 10;
29
  width: 50%;
30
  max-width: 30em;
31
  margin: 6em auto;
32
  padding: 1em;
33
  text-align: left;
34
  height: 100%;
35
  font-size: 200%;
36
}
26
      #content {
27
        position: relative;
28
        z-index: 10;
29
        width: 50%;
30
        max-width: 30em;
31
        margin: 6em auto;
32
        padding: 1em;
33
        text-align: left;
34
        height: 100%;
35
        font-size: 200%;
36
      }
37 37

  
38
#content #goto {
39
  padding-left: 1em;
40
}
38
      #content #goto {
39
        padding-left: 1em;
40
      }
41 41

  
42
#content a {
43
  color: inherit;
44
  position: relative;
45
  z-index: 50;
46
}
47
  </style>
48
</head>
49
<body>
42
      #content a {
43
        color: inherit;
44
        position: relative;
45
        z-index: 50;
46
      }
47
    </style>
48
  </head>
49
  <body>
50 50

  
51
 <div id="content">
52
   <h1>{% trans 'Welcome!' %}</h1>
53
   {% blocktrans %}
54
<p>
55
Your installation of Combo was successful and you can now play with it
56
to your heart's content.  It is currently empty, your first move should
57
probably be to head to the management interface to add some pages.
58
</p>
59
   {% endblocktrans %}
60
<p id="goto">
61
→ <a href="{% url 'combo-manager-homepage' %}">{% url 'combo-manager-homepage' %}</a>
62
</p>
63
 </div>
51
    <div id="content">
52
      <h1>{% trans 'Welcome!' %}</h1>
53
      {% blocktrans %}
54
        <p>
55
          Your installation of Combo was successful and you can now play with it
56
          to your heart's content.  It is currently empty, your first move should
57
          probably be to head to the management interface to add some pages.
58
        </p>
59
      {% endblocktrans %}
60
      <p id="goto">
61
        → <a href="{% url 'combo-manager-homepage' %}">{% url 'combo-manager-homepage' %}</a>
62
      </p>
63
    </div>
64 64

  
65
</body>
65
  </body>
66 66
</html>
combo/public/templates/combo/feed-cell.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
{% if cell.title %}
4
<h2>{{ cell.title }}</h2>
5
{% endif %}
6
{% include "combo/asset_picture_fragment.html" %}
7
<div class="feed-content">
8
{% for entry in feed.entries %}
9
{% if entry.link %}
10
  <h3><a href="{{entry.link}}">{{entry.title}}</a></h3>
11
  {% else %}
12
  <h3>{{entry.title}}</h3>
13
{% endif %}
14
{% if entry.summary %}<div>{{entry.summary|safe}}</div>{% endif %}
15
{% endfor %}
16
</div>
3
  {% if cell.title %}
4
    <h2>{{ cell.title }}</h2>
5
  {% endif %}
6
  {% include "combo/asset_picture_fragment.html" %}
7
  <div class="feed-content">
8
    {% for entry in feed.entries %}
9
      {% if entry.link %}
10
        <h3><a href="{{entry.link}}">{{entry.title}}</a></h3>
11
      {% else %}
12
        <h3>{{entry.title}}</h3>
13
      {% endif %}
14
      {% if entry.summary %}<div>{{entry.summary|safe}}</div>{% endif %}
15
    {% endfor %}
16
  </div>
17 17
{% endblock %}
combo/public/templates/combo/json-cell.html
1 1
{% block cell-content %}
2
{% if title %}<h2>{{title}}</h2>{% endif %}
3
{% include "combo/asset_picture_fragment.html" %}
4
<!--
2
  {% if title %}<h2>{{title}}</h2>{% endif %}
3
  {% include "combo/asset_picture_fragment.html" %}
4
  <!--
5 5
{{json}}
6
-->
6
  -->
7 7
{% endblock %}
combo/public/templates/combo/json-error-cell.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
{% if title %}<h2>{{title}}</h2>{% endif %}
4
<p>{% trans "Technical error getting data." %}</p>
3
  {% if title %}<h2>{{title}}</h2>{% endif %}
4
  <p>{% trans "Technical error getting data." %}</p>
5 5
{% endblock %}
combo/public/templates/combo/json-list-cell.html
1 1
{% block cell-content %}
2
{% if title %}<h2>{{title}}</h2>{% endif %}
3
{% include "combo/asset_picture_fragment.html" %}
4
<div class="links-list">
5
{% for row in json.data %}
6
<ul>
7
<li><a href="{{row.url}}">{{row.text}}</a></li>
8
</ul>
9
{% endfor %}
10
</div>
11
</div>
2
  {% if title %}<h2>{{title}}</h2>{% endif %}
3
  {% include "combo/asset_picture_fragment.html" %}
4
  <div class="links-list">
5
    {% for row in json.data %}
6
      <ul>
7
        <li><a href="{{row.url}}">{{row.text}}</a></li>
8
      </ul>
9
    {% endfor %}
10
  </div>
11
  </div>
12 12
{% endblock %}
combo/public/templates/combo/link-cell.html
1 1
{% block cell-content %}
2
{% include "combo/asset_picture_fragment.html" %}
3
<a href="{{url}}">{{title}}</a>
2
  {% include "combo/asset_picture_fragment.html" %}
3
  <a href="{{url}}">{{title}}</a>
4 4
{% endblock %}
combo/public/templates/combo/link-list-cell.html
1 1
{% load i18n %}
2 2
{% block cell-content %}
3
{% spaceless %}
4
{% block cell-header %}
5
{% if title %}<h2>{{ title }}</h2>{% endif %}
6
{% include "combo/asset_picture_fragment.html" %}
7
{% endblock cell-header %}
8
<div class="links-list">
9
  {% block cell-top-content %}{% endblock cell-top-content %}
10
  <ul>
11
  {% for link in links %}
12
  <li class="{{ link.css_classes|default:""|join:" " }}{% if link.cell.extra_css_class %} {{ link.cell.extra_css_class }}{% endif %}">{% if link.is_form %}
13
    {% include "combo/wcs/form_link_fragment.html" with form=link %}
14
    {% else %}
15
    <a href="{{ link.url }}">{{ link.title }}</a>
16
    {% endif %}</li>
17
  {% endfor %}
18
  {% if more_links %}
19
  <li class="add-more-items">
20
    <a role="button" tabindex="0" aria-expanded="false" aria-controls="more-items-{{ cell.get_reference }}" aria-label="{% trans 'More items' %}" id="btn-more-items-{{ cell.get_reference }}" class="add-more-items--button">{% block cell-more-items-btn-label %}+{% endblock %}</a>
21
  </li>
22
  {% endif %}
23
  </ul>
3
  {% spaceless %}
4
    {% block cell-header %}
5
      {% if title %}<h2>{{ title }}</h2>{% endif %}
6
      {% include "combo/asset_picture_fragment.html" %}
7
    {% endblock cell-header %}
8
    <div class="links-list">
9
      {% block cell-top-content %}{% endblock cell-top-content %}
10
      <ul>
11
        {% for link in links %}
12
          <li class="{{ link.css_classes|default:""|join:" " }}{% if link.cell.extra_css_class %} {{ link.cell.extra_css_class }}{% endif %}">{% if link.is_form %}
13
            {% include "combo/wcs/form_link_fragment.html" with form=link %}
14
          {% else %}
15
            <a href="{{ link.url }}">{{ link.title }}</a>
16
          {% endif %}</li>
17
        {% endfor %}
18
        {% if more_links %}
19
          <li class="add-more-items">
20
            <a role="button" tabindex="0" aria-expanded="false" aria-controls="more-items-{{ cell.get_reference }}" aria-label="{% trans 'More items' %}" id="btn-more-items-{{ cell.get_reference }}" class="add-more-items--button">{% block cell-more-items-btn-label %}+{% endblock %}</a>
21
          </li>
22
        {% endif %}
23
      </ul>
24 24

  
25
  {% if more_links %}
26
  <ul style="display: none" class="more-items" id="more-items-{{ cell.get_reference }}" aria-labelledby="btn-more-items-{{ cell.get_reference }}">
27
  {% for link in more_links %}
28
    <li class="more-items--item {{ link.css_classes|default:""|join:" " }}"><a href="{{ link.url }}">{{ link.title }}</a></li>
29
  {% endfor %}
30
  {% endif %}
31
  </ul>
32
</div>
33
{% endspaceless %}
25
      {% if more_links %}
26
        <ul style="display: none" class="more-items" id="more-items-{{ cell.get_reference }}" aria-labelledby="btn-more-items-{{ cell.get_reference }}">
27
          {% for link in more_links %}
28
            <li class="more-items--item {{ link.css_classes|default:""|join:" " }}"><a href="{{ link.url }}">{{ link.title }}</a></li>
29
          {% endfor %}
30
      {% endif %}
31
    </ul>
32
    </div>
33
  {% endspaceless %}
34 34
{% endblock %}
combo/public/templates/combo/mellon_base_template.html
1 1
{% extends "combo/page_template.html" %}
2 2

  
3 3
{% block combo-content %}
4
{% block mellon_content %}
5
{% endblock %}
4
  {% block mellon_content %}
5
  {% endblock %}
6 6
{% endblock %}
7 7

  
combo/public/templates/combo/menu-cell.html
1 1
{% block cell-content %}
2
{{menu}}
2
  {{menu}}
3 3
{% endblock %}
combo/public/templates/combo/menu.html
1 1
{% load i18n %}
2 2
{% if menuitems %}
3
<ul class="{{ is_submenu|yesno:"submenu,menu" }} {% if is_submenu %}hide-on-escape{% endif %}">
4
{% spaceless %}
5
{% for menuitem in menuitems %}
6
<li data-menu-page-id="{{ menuitem.page.id }}" class="{% if depth > 1 %}contains-hidden-elements{% endif %} {{ is_submenu|yesno:"submenu,menu" }}--item menu-{{ menuitem.page.slug }} {% if menuitem.selected %}selected{% endif %}">
7
  <a
8
    {% if menuitem.selected %}title="{{ menuitem.page.title }} - {% trans "active page" %}"{% endif %}
9
    href="{% page_absolute_url menuitem.page %}"
10
    class="{{ is_submenu|yesno:"submenu,menu" }}--link">
11
      <span class="{{ is_submenu|yesno:"submenu,menu" }}--label">{{ menuitem.page.title }}</span>
12
  </a>
13
  {% if depth > 1 %}
14
    {% show_menu current_page=menuitem.page level=-1 depth=depth reduce_depth=True ignore_visibility=ignore_visibility is_submenu=True %}
15
  {% endif %}
16
</li>
17
{% endfor %}
18
{% endspaceless %}
19
</ul>
3
  <ul class="{{ is_submenu|yesno:"submenu,menu" }} {% if is_submenu %}hide-on-escape{% endif %}">
4
    {% spaceless %}
5
      {% for menuitem in menuitems %}
6
        <li data-menu-page-id="{{ menuitem.page.id }}" class="{% if depth > 1 %}contains-hidden-elements{% endif %} {{ is_submenu|yesno:"submenu,menu" }}--item menu-{{ menuitem.page.slug }} {% if menuitem.selected %}selected{% endif %}">
7
          <a
8
            {% if menuitem.selected %}title="{{ menuitem.page.title }} - {% trans "active page" %}"{% endif %}
9
            href="{% page_absolute_url menuitem.page %}"
10
            class="{{ is_submenu|yesno:"submenu,menu" }}--link">
11
            <span class="{{ is_submenu|yesno:"submenu,menu" }}--label">{{ menuitem.page.title }}</span>
12
          </a>
13
          {% if depth > 1 %}
14
            {% show_menu current_page=menuitem.page level=-1 depth=depth reduce_depth=True ignore_visibility=ignore_visibility is_submenu=True %}
15
          {% endif %}
16
        </li>
17
      {% endfor %}
18
    {% endspaceless %}
19
  </ul>
20 20
{% endif %}
combo/public/templates/combo/page_template.html
1 1
{% load static gadjo i18n %}<!DOCTYPE html>
2 2
<html>
3
 <head>
4
  <meta charset="utf-8"/>
5
 {% if page.description %}
6
  <meta name="description" content="{{ page.description}}" />
7
 {% endif %}
8
  <title>Combo - {{ page.title }}</title>
9
  <link rel="stylesheet" type="text/css" media="all" href="{% static "css/combo-style.css" %}"/>
10
  <script src="{% xstatic 'jquery' 'jquery.min.js' %}"></script>
11
  <script src="{% static "js/combo.public.js" %}"></script>
12
  {{ media }}
13
 </head>
14
 <body class="page-{{ page.slug }}"
15
       {% if check_badges %}data-check-badges="true"{% endif %}
16
       data-api-root="{{ site_base }}/api/">
17
 <div id="title"><h1>{{ page.title }}</h1></div>
18
 <div id="menu">{% block menu %}{% show_menu ignore_visibility=True %}{% endblock %}</div>
19
 <div id="content">
20

  
21
  {% block messages %}
22
    {% if messages %}
23
    <div id="messages">
24
      <ul class="messages">
25
        {% for message in messages %}
26
        <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
27
        {% endfor %}
28
      </ul>
29
    </div>
3
  <head>
4
    <meta charset="utf-8"/>
5
    {% if page.description %}
6
      <meta name="description" content="{{ page.description}}" />
30 7
    {% endif %}
31
  {% endblock %}
8
    <title>Combo - {{ page.title }}</title>
9
    <link rel="stylesheet" type="text/css" media="all" href="{% static "css/combo-style.css" %}"/>
10
    <script src="{% xstatic 'jquery' 'jquery.min.js' %}"></script>
11
    <script src="{% static "js/combo.public.js" %}"></script>
12
    {{ media }}
13
  </head>
14
  <body class="page-{{ page.slug }}"
15
    {% if check_badges %}data-check-badges="true"{% endif %}
16
    data-api-root="{{ site_base }}/api/">
17
    <div id="title"><h1>{{ page.title }}</h1></div>
18
    <div id="menu">{% block menu %}{% show_menu ignore_visibility=True %}{% endblock %}</div>
19
    <div id="content">
32 20

  
33
  {% block combo-content %}
34
  {% trans "Content" as name %}
35
  {% placeholder "content" name=name %}
36
  {% endblock %}
37
 </div>
38
 <div id="footer">
39
  {% block footer %}
40
    {% trans "Footer" as name %}
41
    {% placeholder "footer" name=name acquired=True optional=True %}
42
    {% skeleton_extra_placeholder footer %}
43
    <span style="display: none">{% now "Y-m-d H:i:s" %}</span> {# generation time #}
44
    {% end_skeleton_extra_placeholder %}
45
  {% endblock %}
46
 </div>
47
 </body>
21
      {% block messages %}
22
        {% if messages %}
23
          <div id="messages">
24
            <ul class="messages">
25
              {% for message in messages %}
26
                <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
27
              {% endfor %}
28
            </ul>
29
          </div>
30
        {% endif %}
31
      {% endblock %}
32

  
33
      {% block combo-content %}
34
        {% trans "Content" as name %}
35
        {% placeholder "content" name=name %}
36
      {% endblock %}
37
    </div>
38
    <div id="footer">
39
      {% block footer %}
40
        {% trans "Footer" as name %}
41
        {% placeholder "footer" name=name acquired=True optional=True %}
42
        {% skeleton_extra_placeholder footer %}
43
        <span style="display: none">{% now "Y-m-d H:i:s" %}</span> {# generation time #}
44
      {% end_skeleton_extra_placeholder %}
45
{% endblock %}
46
</div>
47
</body>
48 48
</html>
combo/public/templates/combo/page_template_sidebar.html
2 2
{% load i18n %}
3 3

  
4 4
{% block combo-content %}
5
<div id="main-content">
6
{% trans "Content" as name %}
7
{% placeholder "content" name=name %}
8
</div>
9
<div id="sidebar">
10
{% trans "Sidebar" as name %}
11
{% placeholder "sidebar" name=name %}
12
</div>
5
  <div id="main-content">
6
    {% trans "Content" as name %}
7
    {% placeholder "content" name=name %}
8
  </div>
9
  <div id="sidebar">
10
    {% trans "Sidebar" as name %}
11
    {% placeholder "sidebar" name=name %}
12
  </div>
13 13
{% endblock %}
combo/public/templates/combo/placeholder.html
1 1
{% load i18n %}
2 2
{% if render %}
3
{% if outer_tag %}<{{outer_tag|default:"div"}} class="combo-placeholder combo-placeholder--{{ placeholder.key }}">{% endif %}
4
{% if placeholder_options.fx_grid_layout %}<div class="combo-placeholder--fx-grid {{ placeholder_options.fx_grid_layout }}">{% endif %}
5
{% if render_skeleton %}
6
{{ skeleton }}
7
{% endif %}
8
{% for cell in cells %}
9
<div class="cell {{ cell.css_class_names }} {{ cell.asset_css_classes }}{% if cell.slug %} {{cell.slug}}{% endif %}{% if cell|shown_because_admin:request %} shown-because-admin{% endif %}"
10
     {% if cell.slug and cell.use_slug_as_id %}id="{{ cell.slug }}"{% endif %}
11
     data-ajax-cell-url="{{ site_base }}{{ cell.get_ajax_url }}"
12
     data-ajax-cell-loading-message="{{ cell.loading_message }}"
13
     data-ajax-cell-error-message="{% trans "Loading error" %}"
14
     {% if cell.ajax_refresh %}data-ajax-cell-refresh="{{ cell.ajax_refresh }}"{% endif %}
15
     {% with cell|extra_context:request as extra_context %}
16
     {% if extra_context %}data-extra-context="{{ extra_context|signed|urlencode }}"{% endif %}
17
     {% endwith %}
18
     ><div>{% render_cell cell %}</div></div>
19
{% if cell.include_pagination %}
20
{% include "combo/pagination.html" with paginate_by=cell.limit data_cell_reference=cell.get_reference %}
21
{% endif %}
22
{% endfor %}
23
{% if placeholder_options.fx_grid_layout %}</div>{% endif %}
24
{% if outer_tag %}</{{outer_tag|default:"div"}}>{% endif %}
3
  {% if outer_tag %}<{{outer_tag|default:"div"}} class="combo-placeholder combo-placeholder--{{ placeholder.key }}">{% endif %}
4
  {% if placeholder_options.fx_grid_layout %}<div class="combo-placeholder--fx-grid {{ placeholder_options.fx_grid_layout }}">{% endif %}
5
  {% if render_skeleton %}
6
    {{ skeleton }}
7
  {% endif %}
8
  {% for cell in cells %}
9
    <div class="cell {{ cell.css_class_names }} {{ cell.asset_css_classes }}{% if cell.slug %} {{cell.slug}}{% endif %}{% if cell|shown_because_admin:request %} shown-because-admin{% endif %}"
10
      {% if cell.slug and cell.use_slug_as_id %}id="{{ cell.slug }}"{% endif %}
11
      data-ajax-cell-url="{{ site_base }}{{ cell.get_ajax_url }}"
12
      data-ajax-cell-loading-message="{{ cell.loading_message }}"
13
      data-ajax-cell-error-message="{% trans "Loading error" %}"
14
      {% if cell.ajax_refresh %}data-ajax-cell-refresh="{{ cell.ajax_refresh }}"{% endif %}
15
      {% with cell|extra_context:request as extra_context %}
16
        {% if extra_context %}data-extra-context="{{ extra_context|signed|urlencode }}"{% endif %}
17
      {% endwith %}
18
    ><div>{% render_cell cell %}</div></div>
19
    {% if cell.include_pagination %}
20
      {% include "combo/pagination.html" with paginate_by=cell.limit data_cell_reference=cell.get_reference %}
21
    {% endif %}
22
  {% endfor %}
23
  {% if placeholder_options.fx_grid_layout %}</div>{% endif %}
24
  {% if outer_tag %}</{{outer_tag|default:"div"}}>{% endif %}
25 25
{% endif %}
combo/public/templates/combo/text-cell.html
1 1
{% block cell-content %}
2
{% include "combo/asset_picture_fragment.html" %}
3
{{text}}
2
  {% include "combo/asset_picture_fragment.html" %}
3
  {{text}}
4 4
{% endblock %}
tests/templates-1/combo/page_template_outer_tag_placeholder.html
2 2
{% load i18n %}
3 3

  
4 4
{% block combo-content %}
5
<div id="main-content">
6
{% trans "Content" as name %}
7
{% placeholder "content" name=name outer_tag=True %}
8
</div>
9
<div id="sidebar">
10
{% trans "Sidebar" as name %}
11
{% placeholder "sidebar" name=name outer_tag="aside" %}
12
</div>
5
  <div id="main-content">
6
    {% trans "Content" as name %}
7
    {% placeholder "content" name=name outer_tag=True %}
8
  </div>
9
  <div id="sidebar">
10
    {% trans "Sidebar" as name %}
11
    {% placeholder "sidebar" name=name outer_tag="aside" %}
12
  </div>
13 13
{% endblock %}
tests/templates-1/combo/page_template_synchronous_placeholder.html
2 2
{% load i18n %}
3 3

  
4 4
{% block combo-content %}
5
<div id="main-content">
6
{% trans "Content" as name %}
7
{% placeholder "content" name=name force_synchronous=True %}
8
</div>
9
<div id="sidebar">
10
{% trans "Sidebar" as name %}
11
{% placeholder "sidebar" name=name %}
12
</div>
5
  <div id="main-content">
6
    {% trans "Content" as name %}
7
    {% placeholder "content" name=name force_synchronous=True %}
8
  </div>
9
  <div id="sidebar">
10
    {% trans "Sidebar" as name %}
11
    {% placeholder "sidebar" name=name %}
12
  </div>
13 13
{% endblock %}
tests/wcs/test_card.py
2284 2284
    assert len(resp.context['cells']) == 1
2285 2285
    extra_ctx = re.findall(r'data-extra-context="(.*)"', resp.text)
2286 2286
    cell_resp = app.get(cell_url + '?ctx=' + extra_ctx[0])
2287
    assert cell_resp.text.replace('\n', '') == ''  # empty-cell
2287
    assert cell_resp.text.replace('\n', '').strip() == ''  # empty-cell
2288 2288

  
2289 2289
    cell.card_ids = '{{ cards|objects:"card_model_1"|last|get:"id" }}'
2290 2290
    cell.save()
......
2347 2347
    assert len(resp.context['cells']) == 1
2348 2348
    extra_ctx = re.findall(r'data-extra-context="(.*)"', resp.text)
2349 2349
    cell_resp = app.get(cell_url + '?ctx=' + extra_ctx[0])
2350
    assert cell_resp.text.replace('\n', '') == ''  # empty-cell
2350
    assert cell_resp.text.replace('\n', '').strip() == ''  # empty-cell
2351 2351

  
2352 2352

  
2353 2353
@mock.patch('requests.Session.send', side_effect=mocked_requests_send)
......
2381 2381
        extra_ctx = re.findall(r'data-extra-context="(.*)"', resp.text)
2382 2382
        mock_send.reset_mock()
2383 2383
        cell_resp = app.get(cell2_url + '?ctx=' + extra_ctx[-1])
2384
        assert cell_resp.text.replace('\n', '') == ''  # empty-cell
2384
        assert cell_resp.text.replace('\n', '').strip() == ''  # empty-cell
2385 2385
        assert len(mock_send.call_args_list) == len(urls)
2386 2386
        for j, url in enumerate(urls):
2387 2387
            assert url in mock_send.call_args_list[j][0][0].url
2388
-