Permalink
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
match/app/templates/Matchgrids/select.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Provide tabbed subnavigation for related models. Deprecate Noty.js in favor of Boostrap Alerts. (CO-2229) * Ensure flash messages are available on all pages. (CO-2229) * Clean up information alert on reconcile page. (CO-2229)
97 lines (92 sloc)
3.72 KB
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
<?php | |
/** | |
* COmanage Matchgrid Select Page | |
* | |
* 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); | |
use \App\Lib\Enum\PermissionEnum; | |
?> | |
<div class="pageTitleContainer"> | |
<div class="pageTitle"> | |
<h1><?= $vv_title; ?></h1> | |
</div> | |
</div> | |
<?php if(count($vv_matchgrids) == 0): ?> | |
<div class="co-info-topbox"> | |
<em class="material-icons">info</em> | |
<?= __('match.in.matchgrids.none'); ?> | |
</div> | |
<?php else: // vv_matchgrids ?> | |
<p><?= __('match.in.matchgrid.select') ?></p> | |
<div id="fp-list" class="co-grid co-grid-with-header container"> | |
<div class="co-grid-header row"> | |
<div class="col"><?= __('match.ct.Matchgrids', [1]) ?></div> | |
<div class="col"><?= __('match.fd.description') ?></div> | |
</div> | |
<?php foreach($vv_matchgrids as $mg): ?> | |
<?php | |
if(empty($vv_menu_permissions['gridroles'][$mg['id']]) | |
&& !$vv_menu_permissions['matchgrids']) { | |
continue; | |
} | |
// Can manage this matchgrid? | |
$canManageGrid = (isset($vv_menu_permissions['gridroles'][$mg['id']][PermissionEnum::MatchgridAdmin]) | |
&& $vv_menu_permissions['gridroles'][$mg['id']][PermissionEnum::MatchgridAdmin]) | |
// Proxy for platform admin | |
|| $vv_menu_permissions['matchgrids']; | |
// Can review pending requests for this matchgrid? | |
$canReconcile = (isset($vv_menu_permissions['gridroles'][$mg['id']][PermissionEnum::ReconciliationManager]) | |
&& $vv_menu_permissions['gridroles'][$mg['id']][PermissionEnum::ReconciliationManager]) | |
|| | |
(isset($vv_menu_permissions['gridroles'][$mg['id']][PermissionEnum::ReconciliationSupport]) | |
&& $vv_menu_permissions['gridroles'][$mg['id']][PermissionEnum::ReconciliationSupport]); | |
?> | |
<?php if($canManageGrid || $canReconcile): ?> | |
<div class="row co-row linked-row spin"> | |
<div class="col"> | |
<?php | |
if($canManageGrid) { | |
print $this->Html->link($mg['table_name'], | |
['controller' => 'Matchgrids', | |
'action' => 'manage', | |
$mg['id']], | |
['class' => 'row-link']); | |
} elseif($canReconcile) { | |
print $this->Html->link($mg['table_name'], | |
['controller' => 'Matchgrids', | |
'action' => 'pending', | |
$mg['id']], | |
['class' => 'row-link']); | |
} | |
// else the user has no permission, so why are we here? | |
?> | |
</div> | |
<div class="col"> | |
<?= filter_var($mg['description'], FILTER_SANITIZE_SPECIAL_CHARS); ?> | |
</div> | |
</div> | |
<?php endif; // canManageGrid || canReconcile ?> | |
<?php endforeach; // vv_matchgrids ?> | |
</div> | |
<?php endif; // vv_matchgrids ?> |