diff options
Diffstat (limited to 'archaeological_warehouse/templates/ishtar/sheet_warehouse.html')
-rw-r--r-- | archaeological_warehouse/templates/ishtar/sheet_warehouse.html | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html index 8e143aae9..e6717f230 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html +++ b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html @@ -61,7 +61,7 @@ <div class='row'> <dl class="col-6 col-md-3 flex-wrap"> - <dt>{% trans "Number of container" %}</dt> + <dt>{% trans "Number of containers" %}</dt> <dd>{{item.number_containers}}</dd> </dl> <dl class="col-6 col-md-3 flex-wrap"> @@ -70,11 +70,11 @@ </dl> <dl class="col-6 col-md-3 flex-wrap"> <dt>{% trans "Number of finds" %}</dt> - <dd>{{item.number_finds}}</dd> + <dd>{{item.number_of_finds_hosted}}</dd> </dl> <dl class="col-6 col-md-3 flex-wrap"> <dt>{% trans "Number of owned finds" %}</dt> - <dd>{{item.number_owned_finds}}</dd> + <dd>{{item.number_of_finds}}</dd> </dl> {% field_flex_detail "Person in charge" item.person_in_charge %} {% field_flex_detail "Organization" item.organization %} @@ -138,15 +138,15 @@ <h3>{% trans "Statistics" %}</h3> <small class="centered"><em>{% trans "These numbers are updated hourly" %}</em></small> - <h4>{% trans "Finds" %}</h4> - <div class='row'> - {% trans "Number of attached finds" as number_of_attached_finds_label %} - {% field_flex_2 number_of_attached_finds_label item.number_of_finds %} - {% trans "Number of hosted finds" as number_of_hosted_finds_label %} - {% field_flex_2 number_of_hosted_finds_label item.number_of_finds_hosted %} + {% if not item.number_containers and not item.number_divisions %} + <div class="alert alert-info"> + <i class="fa fa-exclamation-triangle"></i> + <em>{% trans "No container/division inside this container" %}</em> </div> - {% if item.number_of_finds_by_place %} + {% else %} + + <h4>{% trans "Finds" %}</h4> <h4>{% trans "Finds by location in the warehouse" %}</h4> {% for items in item.number_of_finds_by_place %} {% if items %} @@ -169,15 +169,9 @@ </table> {% endif %} {% endfor %} - {% endif %} <h4>{% trans "Containers" %}</h4> - <div class='row'> - {% trans "Number of containers" as number_of_containers_label %} - {% field_flex_2 number_of_containers_label item.number_of_containers %} - </div> - {% if item.number_of_containers_by_place %} <h4>{% trans "Containers by location in the warehouse" %}</h4> {% for items in item.number_of_containers_by_place %} {% if items %} @@ -193,13 +187,14 @@ {% for item in items %} <tr> {% for local in item.0 %}<td>{{local|safe}}</td>{% endfor %} - <td class="text-center">{{item.1}}</td> + <td class="text-right">{{item.1}}</td> </tr> {% endfor %} </tbody> </table> {% endif %} {% endfor %} + {% endif %} </div> </div> @@ -213,7 +208,10 @@ $(document).ready( function () { if (datatables_i18n) datatable_options['language'] = datatables_i18n; $('.datatables').each( function(){ - $("#" + $(this).attr('id')).DataTable(datatable_options); + var dt_id = "#" + $(this).attr('id'); + if (! $.fn.DataTable.isDataTable(dt_id) ) { + $(dt_id).DataTable(datatable_options); + } }); } ); </script> |