Skip to content

Commit

Permalink
develop merge commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Benn Oshrin committed Aug 15, 2023
2 parents d7ea787 + 1155261 commit 4750ebc
Show file tree
Hide file tree
Showing 21 changed files with 290 additions and 206 deletions.
4 changes: 0 additions & 4 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ files and utilities for further information:
MIT License
https://github.com/KnpLabs/php-github-api

Select 2
MIT License
https://select2.org/

Shibboleth Embedded Discovery Service (app/webroot/js/eds)
Apache 2.0
https://shibboleth.net/products/embedded-discovery-service.html
Expand Down
15 changes: 15 additions & 0 deletions app/resources/locales/en_US/operation.po
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ msgstr "Are you sure you wish to generate a new API Key?"
msgid "applySchema"
msgstr "Apply Database Schema"

msgid "assign"
msgstr "Assign"

msgid "cancel"
msgstr "Cancel"

Expand All @@ -57,6 +60,9 @@ msgstr "Close"
msgid "confirm"
msgstr "Confirm"

msgid "confirm.generic"
msgstr "Are you sure you want to confirm this action?"

msgid "configure.a"
msgstr "Configure {0}"

Expand Down Expand Up @@ -99,6 +105,9 @@ msgstr "Go"
msgid "identifiers.assign"
msgstr "Assign Identifiers"

msgid "identifiers.assign.confirm"
msgstr "Are you sure you want to assign identifiers to this record ({0})?"

msgid "last"
msgstr "Last"

Expand Down Expand Up @@ -126,6 +135,9 @@ msgstr "Make Primary"
msgid "provision"
msgstr "Provision Now"

msgid "provision.confirm"
msgstr "Are you sure you want to run provisioning?"

msgid "provisioning.status"
msgstr "Provisioning Status"

Expand All @@ -135,6 +147,9 @@ msgstr "Add/Restore Default Types"
msgid "reconcile"
msgstr "Reconcile"

msgid "reconcile.confirm"
msgstr "Are you sure you want to reconcile this group ({0})?"

msgid "remove"
msgstr "Remove"

Expand Down
11 changes: 4 additions & 7 deletions app/templates/Groups/columns.inc
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,12 @@ $rowActions = [
'action' => 'index',
'icon' => 'history'
],
[
'controller' => 'identifiers',
'action' => 'index',
'icon' => 'label',
'if' => 'notAutomatic'
],
[
'action' => 'reconcile',
'icon' => 'sync'
'icon' => 'sync',
'confirm' => [
'dg_confirm_btn' => __d('operation', 'reconcile')
]
]
];

Expand Down
45 changes: 45 additions & 0 deletions app/templates/Groups/fields-nav.inc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,51 @@ $topLinks = [
]
],
'class' => ''
],
[
'icon' => 'cloud_sync',
'order' => 'Default',
'label' => __d('operation', 'provisioning.status'),
'link' => [
'controller' => 'provisioning_targets',
'action' => 'status',
'?' => [
'group_id' => $vv_obj->id
]
],
'class' => ''
],
[
'icon' => 'badge',
'order' => 'Default',
'label' => __d('operation', 'identifiers.assign'),
'link' => [
'controller' => 'identifier_assignments',
'action' => 'assign',
'?' => [
'group_id' => $vv_obj->id
]
],
'if' => 'notAutomatic',
'confirm' => [
'dg_body_txt' => __d('operation', 'identifiers.assign.confirm',[$vv_obj->id]),
'dg_confirm_btn' => __d('operation', 'assign')
],
'class' => ''
],
[
'icon' => 'sync',
'order' => 'Default',
'label' => __d('operation', 'reconcile'),
'link' => [
'action' => 'reconcile',
$vv_obj->id
],
'confirm' => [
'dg_body_txt' => __d('operation', 'reconcile.confirm', [$vv_obj->id]),
'dg_confirm_btn' => __d('operation', 'reconcile')
],
'class' => ''
]
];

Expand Down
9 changes: 6 additions & 3 deletions app/templates/IdentifierAssignments/columns.inc
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ $rowActions = [
'icon' => 'electrical_services'
]
];

// TODO: develop $bulkActions. For now, use a placeholder.

/*
// When the $bulkActions variable exists in a columns.inc config, the "Bulk edit" switch will appear in the index.
$bulkActions = [
// TODO: develop bulk actions. For now, use a placeholder.
'delete' => true
];
];
*/
4 changes: 4 additions & 0 deletions app/templates/People/fields-nav.inc
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ $topLinks = [
'person_id' => $vv_obj->id
]
],
'confirm' => [
'dg_body_txt' => __d('operation', 'identifiers.assign.confirm', [$vv_obj->id]),
'dg_confirm_btn' => __d('operation', 'assign')
],
'class' => ''
]
];
Expand Down
79 changes: 44 additions & 35 deletions app/templates/ProvisioningTargets/status.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,10 @@

<!-- Our view is similar to index.php -->
<div class="table-container">
<?php
$indexTableClasses = 'index-table list-mode';
if (!empty($rowActions)) {
$indexTableClasses .= ' with-actions';
}
?>
<table id="<?= 'provisioningstatus-table'; ?>" class="<?= $indexTableClasses; ?>">
<table id="provisioningstatus-table" class="index-table list-mode with-actions">
<thead>
<tr>
<th class="actions"></th>
<td class="actions"></td>
<th><?= __d('controller', 'ProvisioningTargets', [1]); ?></th>
<th><?= __d('field', 'status'); ?></th>
<th><?= __d('field', 'comment'); ?></th>
Expand All @@ -74,34 +68,49 @@
</tbody>
<?php foreach($vv_provisioning_statuses as $p): ?>
<tr>
<td>
<!-- JIRA to merge this with menuActions, also to throw up "Are you sure?" -->
<a class="field-actions-menu" href="<?=
$this->Url->build([
'controller' => $vv_primary_link_model,
'action' => 'provision',
$vv_primary_link_obj->id,
'?' => [
'provisioning_target_id' => $p['target']->id
<td class="actions">
<div class="field-actions">
<!-- CFM-305 -- JIRA to throw up "Are you sure?" - also to simplify all the below -->
<?php
// Build the row actions
$action_args = array();
$action_args['vv_attr_id'] = $p['target']->id;
$action_args['vv_actions'] = [
[
'order' => $this->Menu->getMenuOrder('Default'),
'icon' => 'start',
'url' => [
'controller' => $vv_primary_link_model,
'action' => 'provision',
$vv_primary_link_obj->id,
'?' => [
'provisioning_target_id' => $p['target']->id
]
],
'label' => __d('operation', 'provision'),
'confirm' => [
'dg_body_txt' => __d('operation', 'provision.confirm'),
'dg_confirm_btn' => __d('operation', 'provision')
]
],
[
'order' => $this->Menu->getMenuOrder('Default'),
'icon' => 'history',
'url' => [
'controller' => 'provisioning_history_records',
'action' => 'index',
'?' => [
'provisioning_target_id' => $p['target']->id,
StringUtilities::entityToForeignKey($vv_primary_link_obj) => $vv_primary_link_obj->id
]
],
'label' => __d('controller', 'ProvisioningHistoryRecords', [99])
]
]);
?>">
<em class="material-icons">start</em>
<?= __d('operation', 'provision'); ?>
</a>
<a class="field-actions-menu" href="<?=
$this->Url->build([
'controller' => 'provisioning_history_records',
'action' => 'index',
'?' => [
'provisioning_target_id' => $p['target']->id,
StringUtilities::entityToForeignKey($vv_primary_link_obj) => $vv_primary_link_obj->id
]
]);
?>">
<em class="material-icons">history</em>
<?= __d('controller', 'ProvisioningHistoryRecords', [99]); ?>
</a>
];

print $this->element('menuAction', $action_args);
?>
</div>
</td>
<td><?= $p['target']->description; ?></td>
<td><?= __d('enumeration', 'ProvisioningStatusEnum.'.$p['status']); ?></td>
Expand Down
27 changes: 12 additions & 15 deletions app/templates/Standard/add-edit-view.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,32 +125,29 @@
$action_args['vv_actions'][] = [
'order' => $this->Menu->getMenuOrder($t['order']),
'icon' => $this->Menu->getMenuIcon($t['icon']),
'url' => $this->Url->build($t['link']),
'url' => $t['link'],
'label' => $t['label'],
'class' => !empty($t['class']) ? $t['class'] : '',
'confirm' => !empty($t['confirm']) ? $t['confirm'] : []
];
}
}

// Delete
if($vv_action != 'add' && !empty($vv_obj->id) && $vv_permissions['delete']) {
$actionPostBtnArray = ['action' => 'delete', $vv_obj->id];
$actionUrl = $this->Url->build(['action' => 'delete', $vv_obj->id]);
$action_args['vv_actions'][] = array(
$action_args['vv_actions'][] = [
'order' => $this->Menu->getMenuOrder('Delete'),
'icon' => $this->Menu->getMenuIcon('Delete'),
'url' => 'javascript:void(0);',
'url' => ['action' => 'delete', $vv_obj->id],
'label' => __d('operation', 'delete'),
'class' => 'deletebutton nospin',
'onclick' => array(
'dg_bd_txt' => __d('operation', 'delete.confirm', [$vv_obj->id]),
'dg_post_btn_array' => $actionPostBtnArray,
'dg_url' => $actionUrl,
'dg_conf_btn' => __d('operation', 'remove'),
'dg_cancel_btn' => __d('operation', 'cancel'),
'class' => 'deletebutton',
'confirm' => [
'method' => 'post',
'dg_title' => __d('operation', 'remove'),
'dg_bd_txt_repl_str' => ''
)
);
'dg_body_txt' => __d('operation', 'delete.confirm', [$vv_obj->id]),
'dg_confirm_btn' => __d('operation', 'remove')
]
];
}

if(!empty($action_args['vv_actions'])) {
Expand Down
Loading

0 comments on commit 4750ebc

Please sign in to comment.