From d3c5562f5e077568fef7ce071b02504c8366b892 Mon Sep 17 00:00:00 2001 From: Kim Rutherford Date: Tue, 23 Apr 2024 15:33:08 +1200 Subject: [PATCH] Allow admin to edit phenotypes of interactions We now show a warning instead of disallowing editing of the double mutant phenotypes. Refs pombase/canto#2786 --- root/static/css/style.css | 2 ++ root/static/js/canto-modules.js | 2 +- root/static/ng_templates/annotation_edit.html | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/root/static/css/style.css b/root/static/css/style.css index 61a2fa57a..eb6376435 100644 --- a/root/static/css/style.css +++ b/root/static/css/style.css @@ -2032,6 +2032,8 @@ details > div { .warning-box { text-indent: -0.75em; padding-left: 2em; + padding-top: 0.2em; + padding-bottom: 0.2em; } .warning-box span.glyphicon { diff --git a/root/static/js/canto-modules.js b/root/static/js/canto-modules.js index 58fa4ae4a..b483b607a 100644 --- a/root/static/js/canto-modules.js +++ b/root/static/js/canto-modules.js @@ -8067,7 +8067,7 @@ var annotationEditDialogCtrl = }; $scope.termEditable = function() { - return !$scope.annotation.term_ontid || !$scope.hasInteractions(); + return !$scope.annotation.term_ontid || !$scope.hasInteractions() || CantoGlobals.is_admin_user; }; $scope.showStrainName = ( diff --git a/root/static/ng_templates/annotation_edit.html b/root/static/ng_templates/annotation_edit.html index 95c745aa9..ede3f40ae 100644 --- a/root/static/ng_templates/annotation_edit.html +++ b/root/static/ng_templates/annotation_edit.html @@ -87,6 +87,11 @@
found-callback="termFoundCallback(termId, termName, searchString, matchingSynonym)" annotation-type-name="{{termNameConstraint}}"> +
+ + Warning: this phenotype annotation is referenced by + one or more interactions +
Start typing to choose a term