Skip to content

Commit

Permalink
Improvements to the messaging and code style for platform admin wayfi…
Browse files Browse the repository at this point in the history
…nding improvements (CFM-296)
  • Loading branch information
arlen committed Oct 11, 2023
1 parent 04a0316 commit 239314b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 30 deletions.
6 changes: 3 additions & 3 deletions app/resources/locales/en_US/information.po
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ msgid "cos.select"
msgstr "Please select the collaboration (CO) you wish to manage."

msgid "cmp.config.notice"
msgstr "Looking for <a href="{0}">platform-wide configurations</a>? Those are found in the <a href="{1}">COmanage CO</a>."
msgstr "<a href="{0}">Platform-wide configurations</a> are available in the <a href="{1}">COmanage CO</a>."

msgid "cmp.welcome"
msgstr "The COmanage CO provides platform-wide <a href="{0}">configurations</a>."
msgid "cmp.co.notice"
msgstr "You are viewing the platform-level COmanage CO."

msgid "entity.id"
msgstr "ID: {0}"
Expand Down
15 changes: 6 additions & 9 deletions app/resources/locales/en_US/menu.po
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ msgstr "Attributes"
msgid "co.configuration"
msgstr "Configuration"

msgid "co.configuration.desc"
msgstr "Configuration for the current CO"

msgid "co.configuration.short"
msgstr "Config"

Expand All @@ -58,19 +61,13 @@ msgid "co.configuration.panel.personalization.desc"
msgstr "Dashboards, custom text, and theming"

msgid "co.configuration.panel.platform"
msgstr "Platform-Wide Settings"
msgstr "Platform-Wide Configuration"

msgid "co.configuration.panel.platform.desc"
msgstr "These configurations are found only in the COmanage CO"

msgid "co.configuration.panel.setup"
msgstr "CO Setup"

msgid "co.configuration.panel.setup.desc"
msgstr "Settings for the current CO"

msgid "co.configuration.title.common"
msgstr "Common CO Settings"
msgid "co.configuration.title"
msgstr "CO Configuration"

msgid "co.connections"
msgstr "Connections"
Expand Down
7 changes: 2 additions & 5 deletions app/src/Controller/Component/RegistryAuthComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ public function getApplicationUserRoles(?int $coId): array {
// True for platform administrator
$appUserRoles['platform'] = $this->isPlatformAdmin();

// True for CO administrator
// True for administrator of the current CO
$appUserRoles['co'] = $this->isCoAdmin($coId);

// TODO: add other application roles such as 'cou' and 'support'
Expand Down Expand Up @@ -580,10 +580,7 @@ public function isApiUser(): bool {
*/

public function isAuthenticatedUser(): bool {
if(!empty($this->getAuthenticatedUser())) {
return true;
}
return false;
return !empty($this->authenticatedUser);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion app/templates/Dashboards/configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
</li>
<?php endforeach; // $vv_configuration_menu_items ?>
</ul>
<h2 class="config-subtitle mb-2"><?= __d('menu','co.configuration.title.common') ?></h2>
<h2 class="config-subtitle mb-2"><?= __d('menu','co.configuration.title') ?></h2>
<p class="menu-panel-links-desc"><?= __d('menu','co.configuration.desc') ?></p>
<?php endif; // $vv_platform_menu_items ?>
<ul id="configuration-menu" class="config-menu">
<?php foreach($vv_configuration_menu_items as $label => $cfg): ?>
Expand Down
4 changes: 2 additions & 2 deletions app/templates/element/menuPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@
<?php endif; // $vv_platform_menu_items ?>
<ul class="menu-panel-links">
<li>
<h3><?= __d('menu','co.configuration.panel.setup') ?></h3>
<p class="menu-panel-links-desc"><?= __d('menu','co.configuration.panel.setup.desc') ?></p>
<h3><?= __d('menu','co.configuration.title') ?></h3>
<p class="menu-panel-links-desc"><?= __d('menu','co.configuration.desc') ?></p>
<ul class="menu-panel-links-inner">
<li>
<?php
Expand Down
11 changes: 1 addition & 10 deletions app/templates/layout/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,8 @@
</div>

<?php if($isPlatformCO): ?>
<?php
$platformConfigUrl = $this->Url->build([
'plugin' => null,
'controller' => 'dashboards',
'action' => 'configuration',
'?' => [
'co_id' => 1
]]);
?>
<div id="platform-notice">
<?= __d('information','cmp.welcome', [$platformConfigUrl]) ?>
<?= __d('information','cmp.co.notice') ?>
</div>
<?php endif; ?>

Expand Down

0 comments on commit 239314b

Please sign in to comment.