Skip to content

Commit

Permalink
#647 Move the "Delete Collection" button
Browse files Browse the repository at this point in the history
  • Loading branch information
schoicsiro committed Sep 15, 2023
1 parent 69b4660 commit 552564c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,10 @@ class OpusController extends OpusBaseController {
render template: "editAboutPage"
}

def editDeleteCollectionPanel = {
render template: "editDeleteCollectionPage"
}

def reportPanel = {
render template: "report"
}
Expand Down
18 changes: 18 additions & 0 deletions grails-app/views/opus/_editDeleteCollectionPage.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<div class="panel panel-default" ng-controller="OpusController as opusCtrl" ng-form="DeleteCollectionForm" ng-cloak>
<div class="panel-heading">
<a name="deleteCollection">
<h4 class="section-panel-heading">Delete Collection</h4>
<p:help help-id="opus.edit.deleteCollection"/>
</a>
</div>

<div class="panel-body">
<div class="row">
<div class="col-sm-12">
<button ng-click="opusCtrl.deleteOpus()" class="btn btn-danger" target="_self">
<i class="fa fa-trash-o"></i> Delete this collection
</button>
</div>
</div>
</div>
</div>
9 changes: 3 additions & 6 deletions grails-app/views/opus/edit.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@
<a href="${request.contextPath}/opus/{{opusCtrl.opus.shortName ? opusCtrl.opus.shortName : opusCtrl.opus.uuid}}"
class="btn btn-default" target="_self" ng-show="opusCtrl.opus.uuid"><i
class="fa fa-eye"></i> Public View</a>
<g:if test="${params.isALAAdmin}">
<button ng-click="opusCtrl.deleteOpus()" class="btn btn-danger" target="_self"
ng-show="opusCtrl.opus.uuid"><i
class="fa fa-trash-o"></i> Delete this collection
</button>
</g:if>
</div>
</div>
</div>
Expand Down Expand Up @@ -127,7 +121,10 @@
<g:include controller="opus" action="editAboutPanel" params="[opusId: params.opusId]"/>

<additional-statuses opus="opusCtrl.opus"></additional-statuses>

<g:include controller="opus" action="editDeleteCollectionPanel" params="[opusId: params.opusId]"/>
</g:if>

</div>
</div>

Expand Down

0 comments on commit 552564c

Please sign in to comment.