aboutsummaryrefslogtreecommitdiff
path: root/templates/dir_template.html
blob: b418d408d23d95c5893b456236b02bff45a97570 (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
{% extends "header.html" %}

{% block content %}
{{ header_content|safe }}
<table>
  <tr>
    <th></th><th>Name</th><th>Last modified</th><th>Size</th><th>License</th>
    <tr><th colspan="5"><hr></th>
  </tr>
  {% if up_dir != None %}
    <tr>
      <td>
        <img src="{{ STATIC_URL }}/static/go-up.png" alt="Parent Directory"/>
      </td>
      <td><a href="{{ up_dir }}">Parent Directory</a></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
  {% endif %}

{% for value in dirlist %}
  <tr><td valign="top"><img src="{{ STATIC_URL }}/static/{{ value.type }}.png" alt="{{ value.type }}"/></td><td><a href="{{ value.url }}">{{ value.name }}</a></td><td align="right">{{ value.mtime }}  </td><td align="right"> {% if value.type != 'folder' %}{{ value.size }}{% endif %}</td>
    <td>
      {% if value.license_digest_list == "OPEN" %}
        <i>open</i>
      {% else %}
      {% for license in value.license_list %}
      {{ license.theme }}
      {% endfor %}
      {% endif %}
    </td>
  </tr>
{% endfor %}
</table>



{% if rendered_files != None %}
<div id="tabs">
  <ul id="tabs-titles">
    {% for title, html_text in rendered_files.items %}
    <li><a href="#tabs-{{ forloop.counter }}">{{ title }}</a></li>
    {% endfor %}
  </ul>

  {% for title, html_text in rendered_files.items %}
  <div id="tabs-{{ forloop.counter }}">
    {% autoescape off %}
      {{ html_text }}
    {% endautoescape %}
  </div>
  {% endfor %}

</div>

<script>
  $(function() {
    $("#tabs").tabs();
  });
</script>
{% endif %}

{% endblock %}