Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feature-cfm291-bulkActions (#198)
* Add first-pass at Bulk Actions box. Turn on bulk actions for Groups and Group Members. * Support bulk delete * Use Modal for bulk actions * css tweaks * Modal vue module * Style the bulk select actions; provide "dismissable" configuration on alert component; add language strings (CFM-291) * add datatables * improvements * mvea use common modal element * remove obsolete dependency * fix forgotten form field * use api/ajax/v2 endpoint * take into account restful and not only ajax requests.Description as a subject value on the report datatable. * fix typo * Stylistic and textual updates for Bulk Edit (CFM-291) --------- Co-authored-by: Arlen Johnson <arlen@sphericalcowgroup.com>
Showing
30 changed files
with
1,491 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?php | ||
/** | ||
* COmanage Registry Bulk Action Enum | ||
* | ||
* Portions licensed to the University Corporation for Advanced Internet | ||
* Development, Inc. ("UCAID") under one or more contributor license agreements. | ||
* See the NOTICE file distributed with this work for additional information | ||
* regarding copyright ownership. | ||
* | ||
* UCAID licenses this file to you under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with the | ||
* License. You may obtain a copy of the License at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* @link https://www.internet2.edu/comanage COmanage Project | ||
* @package registry | ||
* @since COmanage Registry v5.0.0 | ||
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) | ||
*/ | ||
|
||
declare(strict_types = 1); | ||
|
||
namespace App\Lib\Enum; | ||
|
||
class BulkActionEnum extends StandardEnum { | ||
public const Delete = 'delete'; | ||
public const PromoteToOwner = 'owner'; | ||
|
||
/** | ||
* Return action to request http method | ||
* | ||
* @param string $action | ||
* | ||
* @return string | ||
* @since COmanage Registry v5.0.0 | ||
*/ | ||
|
||
public static function actionToMethod(string $action) : string | ||
{ | ||
return match($action) { | ||
'delete' => 'delete', | ||
'owner' => 'post', | ||
default => 'get' | ||
}; | ||
} | ||
|
||
/** | ||
* Return actions to request http methods | ||
* | ||
* @param array $actions | ||
* | ||
* @return array | ||
* @since COmanage Registry v5.0.0 | ||
*/ | ||
|
||
public static function actionsToMethods() : array | ||
{ | ||
$ret = []; | ||
foreach (self::getConstValues() as $act) { | ||
$ret[$act] = match($act) { | ||
'delete' => 'delete', | ||
'owner' => 'post', | ||
default => 'get' | ||
}; | ||
} | ||
|
||
return $ret; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.