summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/sheet.html
blob: 15737d1d7c29852536b183446d3f25e5d0be4d95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{% load i18n %}{% block main_head %}<html lang="en">
<head>
    <title>{% block title %}Ishtar{% if APP_NAME %} - {{APP_NAME}}{%endif%}{% endblock %}
    </title>
    {% block header %}
    <link rel="stylesheet" href="{{STATIC_URL}}/media/style.css?ver={{VERSION}}" />
    {% endblock %}
</head>
<body>
{% endblock %}

  <div class="card sheet" id="{{window_id}}">
    <div class="card-header" data-sheet-id="{{sheet_id}}" role="tab" id='head-{{window_id}}'>
      <div class="row">
          <div class="col-9">
              <h5 class="mb-0">
                <a class="card-label" data-toggle="collapse" href="#collapse-{{window_id}}" aria-expanded="true"
                   aria-controls="collapse-{{window_id}}">
                    {% block head_title %}{% endblock %}
                </a>
              </h5>
          </div>
          <div class='col-2 text-center'>
              <a href='#' class='previous_page'>
                <span class="fa-stack">
                  <i class="fa fa-circle fa-stack-2x"></i>
                  <i class="fa fa-arrow-left fa-stack-1x fa-inverse"></i>
                </span>
              </a>
              <a href='#' class='next_page'>
                <span class="fa-stack">
                  <i class="fa fa-circle fa-stack-2x"></i>
                  <i class="fa fa-arrow-right fa-stack-1x fa-inverse"></i>
                </span>
              </a>
          </div>
          <div class='col-1 text-right'>
            <a href='#' onclick='hide_window("{{window_id}}")'
               title="{% trans 'Close' %}">
              <span class="fa-stack">
                <i class="fa fa-circle fa-stack-2x"></i>
                <i class="fa fa-times fa-stack-1x fa-inverse"></i>
              </span>
            </a>
            {% comment %}
            <a href='#' onclick='closeAllWindows();' title="{% trans "Close all windows" %}">
              <span class="fa-stack">
                <i class="fa fa-files-o fa-stack-2x"></i>
                <i class="fa fa-circle fa-stack-15x"></i>
                <i class="fa fa-times fa-stack-1x fa-inverse"></i>
              </span>
            </a>
            {% endcomment %}
          </div>
      </div>
      {% block header_title %}{% endblock %}
    </div>

    <div id="collapse-{{window_id}}" class="collapse show" role="tabpanel"
         aria-labelledby="heading-{{window_id}}" data-parent="#window">
      {% block toolbar %}{% endblock %}
      <div class="card-body">
        {% block head_sheet %}
        <script type="text/javascript">
        var last_window='{{window_id}}';

        jQuery(document).ready(function(){
            if (! get_next_table_id({{item.pk}})){
                jQuery('.next_page').hide();
            }
            if (! get_previous_table_id({{item.pk}})){
                jQuery('.previous_page').hide();
            }
            jQuery(".next_page").click(function() {
                load_window("{{current_window_url}}" + get_next_table_id({{item.pk}}) + "/",
                            '', function(){$("#{{window_id}}").remove();},
                            true);
            });
            jQuery(".previous_page").click(function() {
                load_window("{{current_window_url}}" + get_previous_table_id({{item.pk}}) + "/",
                            '', function(){$("#{{window_id}}").remove();},
                            true);
            });
            {% if item.image %}
            lightGallery(document.getElementById('lightgallery-{{window_id}}'));
            {% endif%}
        });
        </script>
        {% endblock %}
        <div class="body">
        {% block content %}
        {% endblock %}
        </div>
      </div>
    </div>
  </div>
</div>
{%block main_foot%}
</body>
</html>
{%endblock%}