diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-10-18 14:58:09 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-10-24 12:06:09 +0200 |
commit | dd7103d25ac7d6c78c8bd77d9238f0ec8dc31eb7 (patch) | |
tree | 45b12df95b748e7cf90496b6eccef77372051d23 /archaeological_finds | |
parent | a3afdb65a9a780bfccc5830710eebc6a290db38f (diff) | |
download | Ishtar-dd7103d25ac7d6c78c8bd77d9238f0ec8dc31eb7.tar.bz2 Ishtar-dd7103d25ac7d6c78c8bd77d9238f0ec8dc31eb7.zip |
Manage QA on sheet - QA basket on find sheet
Diffstat (limited to 'archaeological_finds')
-rw-r--r-- | archaeological_finds/models_finds.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 3a1d44f36..9a1412917 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -1134,6 +1134,26 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms, return "00" return bf.short_id() + def get_extra_actions(self, request): + """ + For sheet template: return "Add to basket" action + """ + # url, base_text, icon, extra_text, extra css class, is a quick action + + # no particular rights: if you can view an itm you can add it to your + # own basket + actions = [ + ( + reverse("find-qa-basket", args=[self.pk]), + _(u"Add to basket"), + "fa fa-shopping-basket", + "", + "", + True + ) + ] + return actions + def _get_base_image_path(self): bf = None if self.id: |