Skip to content

Refactor topLinks and add fields-nav.inc for edit view. (CFM-143) #54

Merged
merged 1 commit into from
Sep 25, 2022
Merged
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
14 changes: 13 additions & 1 deletion app/templates/Cos/columns.inc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,19 @@ $indexColumns = [
]
];

// $topLinks appear as an upper right menu
$topLinks = [];

// $rowActions appear as row-level menu items in the index view gear icon
$rowActions = [
[
'action' => 'duplicate',
'class' => '',
'icon' => 'content_copy'
]
];

// TODO: develop bulk actions. For now, use a placeholder.
$bulkActions = [
// TODO: develop bulk actions. For now, use a placeholder.
'delete' => true
];
73 changes: 0 additions & 73 deletions app/templates/Groups/actions.inc

This file was deleted.

39 changes: 38 additions & 1 deletion app/templates/Groups/columns.inc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,44 @@ $indexColumns = [
]
];

// $topLinks appear as an upper right menu
$topLinks = [];

// $rowActions appear as row-level menu items in the index view gear icon
$rowActions = [
[
'controller' => 'group_members',
'action' => 'index',
'icon' => 'people'
],
[
'controller' => 'group_owners',
'action' => 'index',
'icon' => 'settings'
],
[
'controller' => 'group_nestings',
'action' => 'index',
'icon' => 'group_add'
],
[
'controller' => 'history_records',
'action' => 'index',
'icon' => 'history'
],
[
'controller' => 'identifiers',
'action' => 'index',
'icon' => 'label',
'if' => 'notAutomatic'
],
[
'action' => 'reconcile',
'icon' => 'sync'
]
];

// TODO: develop bulk actions. For now, use a placeholder.
$bulkActions = [
// TODO: develop bulk actions. For now, use a placeholder.
'delete' => true
];
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
Copy link
Contributor Author

@arlen arlen Sep 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why git chose to handle this update in this way (where it looks like the actions.inc file was renamed), but the outcome is the same: the "Names/actions.inc" file has been removed and a new file "Groups/fields-nav.inc" has been created.

/**
* COmanage Registry Names Actions Menu Configuration
* COmanage Registry Groups Edit Navigation
*
* Portions licensed to the University Corporation for Advanced Internet
* Development, Inc. ("UCAID") under one or more contributor license agreements.
Expand All @@ -25,15 +25,14 @@
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
*/

// Index top-links appear as top links in the index view
$indexTopLinks = [];

// Actions appear as row-level menu items in the index view gear icon and as a tab menu or top-link menu on
// edit and view pages based on user permissions.
$actions = [
$topLinks = [
[
'action' => 'primary',
'icon' => 'publish',
'if' => 'notPrimary'
'icon' => 'sync',
'order' => 'Default',
'label' => __d('operation', 'reconcile'),
'link' => [
'action' => 'reconcile'
],
'class' => ''
]
];
14 changes: 13 additions & 1 deletion app/templates/Names/columns.inc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,19 @@ $indexColumns = [
]
];

// $topLinks appear as an upper right menu
$topLinks = [];

// $rowActions appear as row-level menu items in the index view gear icon
$rowActions = [
[
'action' => 'primary',
'icon' => 'publish',
'if' => 'notPrimary'
]
];

// TODO: develop bulk actions. For now, use a placeholder.
$bulkActions = [
// TODO: develop bulk actions. For now, use a placeholder.
'delete' => true
];
103 changes: 0 additions & 103 deletions app/templates/People/actions.inc

This file was deleted.

75 changes: 74 additions & 1 deletion app/templates/People/columns.inc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,80 @@ $indexColumns = [
]
];

// $topLinks appear as an upper right menu
$topLinks = [];

// $rowActions appear as row-level menu items in the index view gear icon
$rowActions = [
[
'controller' => 'names',
'action' => 'index',
'icon' => 'account_box',
'iconClass' => 'material-icons-outlined',
'type' => 'tab'
],
[
'controller' => 'email_addresses',
'action' => 'index',
'icon' => 'email',
'iconClass' => 'material-icons-outlined',
'type' => 'tab'
],
[
'controller' => 'identifiers',
'action' => 'index',
'icon' => 'fingerprint',
'type' => 'tab',
'class' => 'bottom-border'
],
[
'controller' => 'person_roles',
'action' => 'index',
'icon' => 'emoji_people',
'type' => 'tab'
],
[
'controller' => 'external_identities',
'action' => 'index',
'icon' => 'system_update_alt',
'type' => 'tab',
'class' => 'bottom-border'
],
[
'controller' => 'ad_hoc_attributes',
'action' => 'index',
'icon' => 'check_box',
'iconClass' => 'material-icons-outlined',
'type' => 'tab'
],
[
'controller' => 'addresses',
'action' => 'index',
'icon' => 'contact_mail',
'iconClass' => 'material-icons-outlined',
'type' => 'tab'
],
[
'controller' => 'history_records',
'action' => 'index',
'icon' => 'history',
'type' => 'tab'
],
[
'controller' => 'telephone_numbers',
'action' => 'index',
'icon' => 'phone',
'type' => 'tab'
],
[
'controller' => 'urls',
'action' => 'index',
'icon' => 'link',
'type' => 'tab'
]
];

// TODO: develop bulk actions. For now, use a placeholder.
$bulkActions = [
// TODO: develop bulk actions. For now, use a placeholder.
'expunge' => true
];
Loading