Commit 60e5b52747342b7130d1c70afeeb1ed051cd8516

Authored by Marcel Kawski
1 parent d301f537

Change back redirections in /review and add table for subdocuments list in /review

collector/storage/templates/storage/review.html
... ... @@ -5,12 +5,23 @@
5 5  
6 6 {% block content %}
7 7  
8   - <div class="container">
9   - <a href="{% url 'document_list' %}">
10   - <span class="material-icons nav-button">arrow_back_ios</span>
11   - <span class="nav-text">Wróć do listy dokumentów</span>
12   - </a>
13   - </div>
  8 + {% if document.parent %}
  9 + <div class="container">
  10 + <a href="{% url 'review' document.parent.id %}">
  11 + <span class="material-icons nav-button">arrow_back_ios</span>
  12 + <span class="nav-text">Wróć do dokumentu głównego</span>
  13 + </a>
  14 + </div>
  15 +
  16 + {% else %}
  17 + <div class="container">
  18 + <a href="{% url 'document_list' %}">
  19 + <span class="material-icons nav-button">arrow_back_ios</span>
  20 + <span class="nav-text">Wróć do listy dokumentów</span>
  21 + </a>
  22 + </div>
  23 +
  24 + {% endif %}
14 25  
15 26 {% if document %}
16 27 <div id="doc-{{ document.id }}" class="title">
... ... @@ -44,10 +55,6 @@
44 55 Pobierz źródło
45 56 <i class="material-icons def-col-button">file_download</i>
46 57 </a>
47   - {% if document.parent %}
48   - <a href="{% url 'review' document.parent.id %}"><button class="btn btn-warning">
49   - Przejdź do dokumentu głównego</button></a>
50   - {% endif %}
51 58  
52 59 {% if document.processing_status.key == "correct" %}
53 60 {% if request.user|belongs_to_group:"Editors" %}
... ... @@ -75,18 +82,34 @@
75 82 {% endif %}
76 83  
77 84 {% if subdocuments %}
78   - <div class="info">
79   - <p>Poddokumenty:</p>
80   - </div>
81   -
82   - <div class="subdocuments">
83   - <ul>
84   - {% for subdocument in subdocuments %}
85   - <li><a href="{% url 'review' subdocument.id %}">{{ subdocument.name }}</a></li>
86   - {% endfor %}
87   - </ul>
88   - </div>
89   - {% endif %}
  85 + <div class="info">
  86 + <p>Poddokumenty:</p>
  87 + </div>
  88 +
  89 + <table class="data-table doc-table" id="subdoc-list-table">
  90 + <thead>
  91 + <tr>
  92 + <th class="col-doc-name">Nazwa-ID</th>
  93 + <th class="col-seq">Kolejność</th>
  94 + <th class="actions col-actions"></th>
  95 + </tr>
  96 + </thead>
  97 +
  98 + <tbody>
  99 + {% for subdocument in subdocuments %}
  100 + <tr>
  101 + <td><a href="{% url 'review' subdocument.id %}">{{ subdocument.name }}-{{ subdocument.id }}</a></td>
  102 + <td>{{ subdocument.sequence }}</td>
  103 + </tr>
  104 + <tr>
  105 + <td colspan="3"></td>
  106 + </tr>
  107 + {% endfor %}
  108 + </tbody>
  109 +
  110 + </table>
  111 +
  112 + {% endif %}
90 113  
91 114 <div class="info">
92 115 <p>Szczegóły:</p>
... ...