Skip to content

Commit

Permalink
Refactor topLinks and add fields-nav.inc for edit view. (CFM-143) (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
arlen authored Sep 25, 2022
1 parent e8f4f8e commit 9691be0
Show file tree
Hide file tree
Showing 11 changed files with 202 additions and 243 deletions.
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
/**
* 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

0 comments on commit 9691be0

Please sign in to comment.