diff options
Diffstat (limited to 'archaeological_finds/models_finds.py')
-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: |