From 5230a8e0a06a5d67d6c13f2359bc51be07b4fb5a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 9 Sep 2016 00:41:57 +0200 Subject: Shortcut menu: menu is now dynamic - selected items filter dependant items (refs #2996) - can now pin items from sheet (refs #3078) --- archaeological_files/models.py | 3 ++- archaeological_files/templates/ishtar/sheet_file.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'archaeological_files') diff --git a/archaeological_files/models.py b/archaeological_files/models.py index eaa9d832e..740ae9a71 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -74,6 +74,7 @@ class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, TABLE_COLS = ['numeric_reference', 'year', 'internal_reference', 'file_type', 'saisine_type', 'towns', ] SHOW_URL = 'show-file' + SLUG = 'file' year = models.IntegerField(_(u"Year"), default=lambda: datetime.datetime.now().year) numeric_reference = models.IntegerField( @@ -333,7 +334,7 @@ class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, return cls @classmethod - def get_owns(cls, user): + def get_owns(cls, user, menu_filtr=None): owns = super(File, cls).get_owns(user) return sorted(owns, key=lambda x: x.cached_label) diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html index 5165a0425..211d2b181 100644 --- a/archaeological_files/templates/ishtar/sheet_file.html +++ b/archaeological_files/templates/ishtar/sheet_file.html @@ -8,7 +8,7 @@ {% if can_add_operation %} {% window_file_nav item window_id previous next %} {% else %} -{% window_nav item window_id 'show-file' 'file_modify' 'show-historized-file' 'revert-file' previous next %} +{% window_nav item window_id 'show-file' 'file_modify' 'show-historized-file' 'revert-file' previous next 1 %} {% endif %}

{% trans "General"%}

-- cgit v1.2.3