diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-11-15 11:51:49 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-02-19 14:45:55 +0100 |
commit | f3764eea1ac4a6cdb12095322a00fd93d377c2c5 (patch) | |
tree | 878cc3ba5ce98d1d7ed28e264d54f4ca4efbdf0d /archaeological_warehouse | |
parent | a2de2eb42009de3b8bf56f2af2a6071a4a98fd8f (diff) | |
download | Ishtar-f3764eea1ac4a6cdb12095322a00fd93d377c2c5.tar.bz2 Ishtar-f3764eea1ac4a6cdb12095322a00fd93d377c2c5.zip |
✨ adapt sheet to manage sheet filters
Diffstat (limited to 'archaeological_warehouse')
-rw-r--r-- | archaeological_warehouse/models.py | 6 | ||||
-rw-r--r-- | archaeological_warehouse/templates/ishtar/sheet_container.html | 4 | ||||
-rw-r--r-- | archaeological_warehouse/templates/ishtar/sheet_warehouse.html | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index d39e90e97..e9f012ff7 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -1583,9 +1583,9 @@ class Container( @property def associated_filename(self): filename = datetime.date.today().strftime("%Y-%m-%d") - filename += "-" + self.reference - filename += "-" + self.location.name - filename += "-" + str(self.index) + filename += "-" + (self.reference or "") + filename += "-" + (self.location.name or "") + filename += "-" + str((self.index or "")) if self.cached_division is None: self.skip_history_when_saving = True self.save() diff --git a/archaeological_warehouse/templates/ishtar/sheet_container.html b/archaeological_warehouse/templates/ishtar/sheet_container.html index a8e2ab13e..c34e5de7c 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_container.html +++ b/archaeological_warehouse/templates/ishtar/sheet_container.html @@ -2,7 +2,7 @@ {% load i18n l10n ishtar_helpers window_header window_field window_tables link_to_window %} {% block head_title %}<strong>{% trans "Container" %}</strong> - -{{ item.reference|default:"" }} ({{ item.container_type|default:"" }}) - {{item.location}} +{{ item.reference|default:"" }}{% if item.container_type %} ({{ item.container_type|default:"" }}){% endif %}{% if item.location %} - {{item.location}}{% endif %} {% endblock %} {% block toolbar %} @@ -173,11 +173,13 @@ {% endif %} {% if not is_external %} + {% if item.history_creator or item.last_edition_date or item.created %} <h3>{% trans "Sheet"%}</h3> <div class="row"> {% include "ishtar/blocks/sheet_creation_section.html" %} </div> {% endif %} + {% endif %} </div> <div class="tab-pane fade" id="{{window_id}}-content" diff --git a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html index 76a419e78..377f3a5d3 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html +++ b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html @@ -127,11 +127,13 @@ {% endif %} {% if not is_external %} + {% if item.history_creator or item.last_edition_date or item.created %} <h3>{% trans "Sheet"%}</h3> <div class="row"> {% include "ishtar/blocks/sheet_creation_section.html" %} </div> {% endif %} + {% endif %} </div> <div class="tab-pane fade" id="{{window_id}}-content" |