summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-10 20:49:13 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-10 20:49:13 +0200
commit3dae10a792d49d685debfe52eb7d61b9a6dc93f9 (patch)
tree45f1d910b67a30e44015735581ec9cdc6db51cdf /archaeological_context_records/models.py
parent58178a04b3e716a063b1c457018aafe28e5107dd (diff)
downloadIshtar-3dae10a792d49d685debfe52eb7d61b9a6dc93f9.tar.bz2
Ishtar-3dae10a792d49d685debfe52eb7d61b9a6dc93f9.zip
QA: lock/unlock (sites, operations, context records, finds, containers, warehouses)
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r--archaeological_context_records/models.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index 875a48019..dc8409b39 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -33,14 +33,13 @@ from django.utils.text import slugify
from ishtar_common.utils import cached_label_changed, \
m2m_historization_changed, post_save_geo
-from ishtar_common.model_managers import ExternalIdManager
from ishtar_common.models import Document, GeneralType, \
BaseHistorizedItem, HistoricalRecords, OwnPerms, ShortMenuItem, \
GeneralRelationType, GeneralRecordRelations, post_delete_record_relation,\
post_save_cache, ValueGetter, BulkUpdatedItem, \
RelationItem, Town, get_current_profile, document_attached_changed, \
HistoryModel, SearchAltName, GeoItem, QRCodeItem, SearchVectorConfig, \
- DocumentItem
+ DocumentItem, MainItem, QuickAction
from archaeological_operations.models import Operation, Period, Parcel, \
ArchaeologicalSite
from ishtar_common.model_managers import UUIDModelManager
@@ -292,7 +291,7 @@ class CRBulkView(object):
class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem,
- QRCodeItem, GeoItem, OwnPerms, ValueGetter, ShortMenuItem,
+ QRCodeItem, GeoItem, OwnPerms, ValueGetter, MainItem,
RelationItem):
SLUG = 'contextrecord'
APP = "archaeological-context-records"
@@ -452,6 +451,15 @@ class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem,
"cached_related_context_records"]
DOWN_MODEL_UPDATE = ["base_finds"]
+ QA_LOCK = QuickAction(
+ url="contextrecord-qa-lock", icon_class="fa fa-lock",
+ text=_(u"Lock/Unlock"), target="many",
+ rights=['change_contextrecord', 'change_own_contextrecord']
+ )
+ QUICK_ACTIONS = [
+ QA_LOCK
+ ]
+
history = HistoricalRecords(bases=[HistoryModel])
objects = UUIDModelManager()