From c1ec867d15661ed41e6e1872bde49f17aa5adcbb Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Mon, 3 Jan 2022 11:32:08 -0500 Subject: [PATCH] Remove Platform menu, refactor several message strings to use correct localization, and replace Match references from copied files (CFM-55) --- app/config/app.php | 2 +- app/resources/locales/en_US/operation.po | 18 +++++++++ app/src/Controller/AppController.php | 2 +- .../Component/RegistryAuthComponent.php | 2 +- app/src/Lib/Enum/SuspendableStatusEnum.php | 2 +- app/src/Lib/Random/RandomString.php | 2 +- app/templates/Cos/select.php | 1 - app/templates/Standard/index.php | 30 +++++++------- app/templates/element/badgeList.php | 8 ++-- app/templates/element/dialog.php | 10 ++--- app/templates/element/menuAction.php | 10 ++--- app/templates/element/menuTop.php | 40 ------------------- app/templates/element/search.php | 15 +++---- app/webroot/css/co-base.css | 4 +- app/webroot/css/co-color.css | 2 +- app/webroot/css/co-responsive.css | 4 +- app/webroot/js/comanage.js | 2 +- 17 files changed, 66 insertions(+), 88 deletions(-) diff --git a/app/config/app.php b/app/config/app.php index 1221c1e41..3692e7ccd 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -19,7 +19,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * @link http://www.internet2.edu/comanage COmanage Project + * @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) diff --git a/app/resources/locales/en_US/operation.po b/app/resources/locales/en_US/operation.po index 1271813d5..4d2266ac6 100644 --- a/app/resources/locales/en_US/operation.po +++ b/app/resources/locales/en_US/operation.po @@ -33,6 +33,21 @@ msgstr "Generate API Key" msgid "api.key.generate.confirm" msgstr "Are you sure you wish to generate a new API Key?" +msgid "cancel" +msgstr "Cancel" + +msgid "clear" +msgstr "Clear" + +msgid "clear.filters" +msgstr "{0,plural,=1{Clear Filter} other{Clear Filters}}" + +msgid "close" +msgstr "Close" + +msgid "confirm" +msgstr "Confirm" + msgid "dashboard.configuration" msgstr "Manage {0} Configuration" @@ -51,6 +66,9 @@ msgstr "Edit" msgid "edit.a" msgstr "Edit {0}" +msgid "filter" +msgstr "Filter" + msgid "first" msgstr "First" diff --git a/app/src/Controller/AppController.php b/app/src/Controller/AppController.php index b351d2bcc..da8b0ea6f 100644 --- a/app/src/Controller/AppController.php +++ b/app/src/Controller/AppController.php @@ -19,7 +19,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * @link http://www.internet2.edu/comanage COmanage Project + * @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) diff --git a/app/src/Controller/Component/RegistryAuthComponent.php b/app/src/Controller/Component/RegistryAuthComponent.php index f0b473a04..853a159b8 100644 --- a/app/src/Controller/Component/RegistryAuthComponent.php +++ b/app/src/Controller/Component/RegistryAuthComponent.php @@ -320,7 +320,7 @@ public function getAuthenticatedUser() { public function getMenuPermissions() { $permissions = []; - // XXX need to set permissions according to current user's roles +// XXX need to set permissions according to current user's roles $permissions['platform'] = true; // Can access the Configuration Dashboard for the current CO diff --git a/app/src/Lib/Enum/SuspendableStatusEnum.php b/app/src/Lib/Enum/SuspendableStatusEnum.php index a8001d327..922f25e04 100644 --- a/app/src/Lib/Enum/SuspendableStatusEnum.php +++ b/app/src/Lib/Enum/SuspendableStatusEnum.php @@ -19,7 +19,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * @link http://www.internet2.edu/comanage COmanage Project + * @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) diff --git a/app/src/Lib/Random/RandomString.php b/app/src/Lib/Random/RandomString.php index 693b8a922..7b62dd0e2 100644 --- a/app/src/Lib/Random/RandomString.php +++ b/app/src/Lib/Random/RandomString.php @@ -20,7 +20,7 @@ * limitations under the License. * * @link https://www.internet2.edu/comanage COmanage Project - * @package match + * @package registry * @since COmanage Registry v5.0.0 * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ diff --git a/app/templates/Cos/select.php b/app/templates/Cos/select.php index c2d97a0bc..0993a734d 100644 --- a/app/templates/Cos/select.php +++ b/app/templates/Cos/select.php @@ -51,7 +51,6 @@
Html->link( - // XXX do we need filter_var? -- Yes -- should sanitize $co->name, ['plugin' => null, 'controller' => 'dashboards', diff --git a/app/templates/Standard/index.php b/app/templates/Standard/index.php index 915cfc9b1..5c188de78 100644 --- a/app/templates/Standard/index.php +++ b/app/templates/Standard/index.php @@ -1,6 +1,6 @@ ' . $this->Html->link( ' ' . $t['label'], @@ -197,7 +197,7 @@ function _column_key($modelsName, $c, $tz=null) { $f = null; if(preg_match('/^(.*?)_id$/', $col, $f)) { $avv = \Cake\Utility\Inflector::variable(\Cake\Utility\Inflector::pluralize($f[1])); - + if(!empty(${$avv}[$entity->$col])) { // We found the viewvar (eg: $foos), and it has a corresponding value // (eg: $foos[3]), so render it @@ -248,18 +248,18 @@ function _column_key($modelsName, $c, $tz=null) { default: // By default our label is the column value, but it might be overridden $label = $entity->$col; - + if(!empty($cfg['model']) && !empty($cfg['field'])) { $m = $cfg['model']; $f = $cfg['field']; - + if(!empty($entity->$m->$f)) { $label = $entity->$m->$f; } } - + $linked = false; - + if($cfg['type'] == 'link') { foreach($linkActions as $a) { // Does this user have permission for this action? @@ -271,7 +271,7 @@ function _column_key($modelsName, $c, $tz=null) { } } } - + if(!$linked) { // Just echo the value print $label; @@ -358,4 +358,4 @@ function _column_key($modelsName, $c, $tz=null) {
element("pagination"); + print $this->element("pagination"); \ No newline at end of file diff --git a/app/templates/element/badgeList.php b/app/templates/element/badgeList.php index 972b3eaf6..8c27a8991 100644 --- a/app/templates/element/badgeList.php +++ b/app/templates/element/badgeList.php @@ -1,6 +1,6 @@ diff --git a/app/templates/element/dialog.php b/app/templates/element/dialog.php index e87d259f1..724441136 100644 --- a/app/templates/element/dialog.php +++ b/app/templates/element/dialog.php @@ -19,7 +19,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * @link http://www.internet2.edu/comanage COmanage Project + * @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) @@ -34,16 +34,16 @@ diff --git a/app/templates/element/menuAction.php b/app/templates/element/menuAction.php index 7027556ae..7b80ae9f2 100644 --- a/app/templates/element/menuAction.php +++ b/app/templates/element/menuAction.php @@ -1,6 +1,6 @@ "> 'data-bs-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false, - 'title' => __('match.fd.action') + 'title' => __d('field', 'action') ); print $this->Html->link( 'settings', diff --git a/app/templates/element/menuTop.php b/app/templates/element/menuTop.php index d3adbada1..01feae8c5 100644 --- a/app/templates/element/menuTop.php +++ b/app/templates/element/menuTop.php @@ -28,46 +28,6 @@ ?>