Skip to content

Commit

Permalink
Allow admin to edit phenotypes of interactions
Browse files Browse the repository at this point in the history
We now show a warning instead of disallowing editing of the double
mutant phenotypes.

Refs #2786
  • Loading branch information
kimrutherford committed Apr 23, 2024
1 parent cc8a186 commit 73fbc3d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions root/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2046,6 +2046,8 @@ details > div {
.warning-box {
text-indent: -0.75em;
padding-left: 2em;
padding-top: 0.2em;
padding-bottom: 0.2em;
}

.warning-box span.glyphicon {
Expand Down
2 changes: 1 addition & 1 deletion root/static/js/canto-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -8125,7 +8125,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 = (
Expand Down
5 changes: 5 additions & 0 deletions root/static/ng_templates/annotation_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ <h5 ng-if="warningText" class="warning-box">
found-callback="termFoundCallback(termId, termName, searchString, matchingSynonym)"
annotation-type-name="{{termNameConstraint}}">
</term-name-complete>
<div ng-if="hasInteractions()" class="warning-box">
<span class="glyphicon glyphicon-alert"></span>
Warning: this phenotype annotation is referenced by
one or more interactions
</div>
<span ng-show="!isValidTerm()"
class="help-block">Start typing to choose a term</span>
<a href="#" ng-show="isValidTerm() && suggestionFieldsPossible() && !termSuggestionVisible"
Expand Down

0 comments on commit 73fbc3d

Please sign in to comment.