Skip to content

Allow termination of petition from index view (CO-2961) #381

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/resources/locales/en_US/operation.po
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ msgstr "Rerun"
msgid "Petitions.terminate.confirm"
msgstr "Are you sure you want to terminate Petition {0}? This action cannot be undone."

msgid "Petitions.terminate.confirm.this"
msgstr "Are you sure you want to terminate this Petition? This action cannot be undone."

msgid "pick"
msgstr "Pick"

Expand Down
12 changes: 11 additions & 1 deletion app/templates/Petitions/columns.inc
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,15 @@ $rowActions = [
'icon' => 'resume',
'label' => __d('operation', 'resume'),
'if' => 'isResumable'
]
],
[
'controller' => 'petitions',
'action' => 'terminate',
'icon' => 'cancel',
'label' => __d('operation', 'terminate'),
'confirm' => [
'dg_body_txt' => __d('operation', 'Petitions.terminate.confirm.this'),
'dg_confirm_btn' => __d('operation', 'terminate')
]
],
];
8 changes: 3 additions & 5 deletions app/templates/Standard/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,9 @@
</div>
<?php endif; ?>
</div>

<?php if(!$hasSubnav): ?>
<?php /* Flash Messages are placed below the main title when there's no subnavigation. */ ?>
<?= $this->element('flash', $flashArgs); ?>
<?php endif; ?>

<?php /* Alerts and Flash Messages are placed below the title and subtitle. */ ?>
<?= $this->element('flash', $flashArgs); ?>

<?php if(!empty($bulkActions)): ?>
<!-- Bulk actions block -->
Expand Down