Skip to content

Improve access to related models (CO-2229) #57

merged 3 commits into from Jan 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
Ensure flash messages are available on all pages. (CO-2229)
arlen committed Jan 12, 2023
commit 2413542edf1fc33084c7cda6650b154d722f7657
66 changes: 39 additions & 27 deletions app/templates/Matchgrids/configure.php
@@ -1,38 +1,50 @@
<?php
/**
* COmanage Match Matchgrid Configure Template
*
* 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 http://www.internet2.edu/comanage COmanage Project
* @package match
* @since COmanage Match v1.0.0
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
*/

declare(strict_types = 1);
/**
* COmanage Match Matchgrid Configure Template
*
* 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 http://www.internet2.edu/comanage COmanage Project
* @package match
* @since COmanage Match v1.0.0
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
*/

declare(strict_types = 1);

// $flashArgs pass banner messages to the flash element container
$flashArgs = [];
if(!empty($indexBanners)) {
$flashArgs['vv_index_banners'] = $indexBanners;
}
if(!empty($banners)) {
$flashArgs['vv_banners'] = $banners;
}
?>

<div class="pageTitleContainer">
<div class="pageTitle">
<h1><?= $vv_title; ?></h1>
</div>
</div>

<?= $this->element('flash', $flashArgs); ?>

<?= __('match.meta.version', [chop(file_get_contents(CONFIG . DS . "VERSION"))]); ?>

<section class="inner-content">
2 changes: 1 addition & 1 deletion app/templates/Matchgrids/delete.php
@@ -28,7 +28,7 @@
declare(strict_types = 1);

?>
<div class="titleNavContainer">
<div class="pageTitleContainer">
<div class="pageTitle">
<h1><?= $vv_title; ?></h1>
</div>
11 changes: 11 additions & 0 deletions app/templates/Matchgrids/manage.php
@@ -26,6 +26,15 @@
*/

declare(strict_types = 1);

// $flashArgs pass banner messages to the flash element container
$flashArgs = [];
if(!empty($indexBanners)) {
$flashArgs['vv_index_banners'] = $indexBanners;
}
if(!empty($banners)) {
$flashArgs['vv_banners'] = $banners;
}
?>
<div class="pageTitleContainer">
<div class="pageTitle">
@@ -63,6 +72,8 @@
</p>
<?php endif; ?>

<?= $this->element('flash', $flashArgs); ?>

<!-- Matchgrid Management -->
<div id="matchgrid-management" class="call-to-action-blocks">
<div class="call-to-action">
13 changes: 12 additions & 1 deletion app/templates/Matchgrids/pending.php
@@ -26,14 +26,25 @@
*/

declare(strict_types = 1);

// $flashArgs pass banner messages to the flash element container
$flashArgs = [];
if(!empty($indexBanners)) {
$flashArgs['vv_index_banners'] = $indexBanners;
}
if(!empty($banners)) {
$flashArgs['vv_banners'] = $banners;
}
?>

<div class="titleNavContainer">
<div class="pageTitleContainer">
<div class="pageTitle">
<h1><?= $vv_title; ?></h1>
</div>
</div>

<?= $this->element('flash', $flashArgs); ?>

<h2><?= __('match.rs.pending', [count($vv_pending)]); ?></h2>

<table>
2 changes: 1 addition & 1 deletion app/templates/Matchgrids/reconcile.php
@@ -86,7 +86,7 @@
$canAttr = array_merge($canAttr, $tempArr);
?>

<div class="titleNavContainer">
<div class="pageTitleContainer">
<div class="pageTitle">
<h1><?= __('match.op.reconcile.requests'); ?></h1>
</div>
2 changes: 1 addition & 1 deletion app/templates/Matchgrids/select.php
@@ -29,7 +29,7 @@

use \App\Lib\Enum\PermissionEnum;
?>
<div class="titleNavContainer">
<div class="pageTitleContainer">
<div class="pageTitle">
<h1><?= $vv_title; ?></h1>
</div>
14 changes: 7 additions & 7 deletions app/templates/Standard/index.php
@@ -85,13 +85,13 @@ function _column_key($modelsName, $c, $tz=null) {
}

// $flashArgs pass banner messages to the flash element container
$flashArgs = [];
if(!empty($indexBanners)) {
$flashArgs['vv_index_banners'] = $indexBanners;
}
if(!empty($banners)) {
$flashArgs['vv_banners'] = $banners;
}
$flashArgs = [];
if(!empty($indexBanners)) {
$flashArgs['vv_index_banners'] = $indexBanners;
}
if(!empty($banners)) {
$flashArgs['vv_banners'] = $banners;
}
?>

<?php if(!empty($subnav)): ?>
4 changes: 2 additions & 2 deletions app/webroot/css/co-base.css
@@ -394,8 +394,8 @@ ul.form-list li.alert-banner .co-alert {
.co-info-topbox {
clear: both;
padding: 1em;
background-color: var(--cmg-color-yellow-002);
border: 1px solid var(--cmg-color-lightgray-005);
background-color: var(--cmg-color-yellow-001);
border: 1px solid var(--cmg-color-yellow-003);
margin-bottom: 1em;
}
#lastLogin p {
4 changes: 3 additions & 1 deletion app/webroot/css/co-color.css
@@ -69,11 +69,13 @@
--cmg-color-yellow-003: #f6f5ae; /* alert: warning border color */
--cmg-color-yellow-004: #ffd; /* forms: focused input */

--cmg-color-red-001: #fcc; /* red warning */
--cmg-color-red-001: #ffd4d4; /* alert: danger */
--cmg-color-red-002: #c00; /* forms: error icons */
--cmg-color-red-003: #e33; /* title for deleted/archived */
--cmg-color-red-004: #c33; /* button */
--cmg-color-red-005: #dc3545; /* danger badge */
--cmg-color-red-006: #842029; /* alert: danger text color */
--cmg-color-red-007: #f8cece; /* alert: danger border color */

--cmg-color-white: #fff; /* white */
--cmg-color-black: #000; /* black */