File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
LearningHub.Nhs.WebUI/Scripts/vuesrc/content-structure-admin Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 4848 <a class =" dropdown-item" v-if =" !isExternalCatalogue" @click =" onInitiateReferenceNode" >Create reference to this folder</a >
4949 <a class =" dropdown-item" v-if =" canEditFolderReference" @click =" onEditFolderReference" >{{item.nodePathDisplayVersionId == 0 ? "Create" : "Edit"}} reference details</a >
5050 <a class =" dropdown-item" v-if =" !isExternalCatalogue" @click =" addReference" >Add a reference here</a >
51- <a class =" dropdown-item" v-if =" item.isReference && !item.parent.isReference" @click =" removeReference" >Remove this reference</a >
51+ <a class =" dropdown-item" v-if =" item.isReference && !item.parent.isReference && canRemove " @click =" removeReference" >Remove this reference</a >
5252 </div >
5353 </div >
5454 </div >
166166 <a class =" dropdown-item" v-if =" canMoveResource && !isExternalCatalogue" @click =" onInitiateMoveResource" >Move</a >
167167 <a class =" dropdown-item" v-if =" !isExternalCatalogue" @click =" onInitiateReferenceResource" >Create reference to this resource</a >
168168 <a class =" dropdown-item" v-if =" canEditResourceReference" @click =" onEditResourceReference" >{{item.resourceReferenceDisplayVersionId == 0 ? "Create" : "Edit"}} reference details</a >
169- <a class =" dropdown-item" v-if =" item.isReference && !item.parent.isReference" @click =" removeReference" >Remove this reference</a >
169+ <a class =" dropdown-item" v-if =" item.isReference && !item.parent.isReference && canRemove " @click =" removeReference" >Remove this reference</a >
170170 </div >
171171 </div >
172172 </div >
253253 canMoveResourceDown: false ,
254254 canMoveResourceUp: false ,
255255 canMoveResource: false ,
256+ canRemove: false ,
256257 };
257258 },
258259 computed: {
397398 this .canEditNode = true ;
398399 this .canMoveNode = this .item .parent != null ;
399400 this .canEditFolderReference = this .item .nodePathDisplayVersionId > 0 || (this .item .nodePaths && this .item .nodePaths .length > 1 );
401+ this .canRemove = this .item .primaryCatalogueNodeId != this .$store .state .contentStructureState .rootNode .nodeId ;
400402 },
401403 recomputeResourceOptions : function () {
402404 this .canMoveResourceUp = this .item .displayOrder > 1 ;
You can’t perform that action at this time.
0 commit comments