Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
axel committed Jan 18, 2021
1 parent a48f8b9 commit 8f183f4
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 4 deletions.
10 changes: 9 additions & 1 deletion Controller/CoGrouperLitesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@ function beforeRender()
public function display($id)
{
$cfg = $this->CoGrouperLite->getConfig();

$services_url = Router::url([
'plugin' => "grouper_lite",
'controller' => 'GrouperGroups',
'action' => 'groupoptin',
'co' => $this->cur_co['Co']['id'],
'gdId' => $id
]);

$this->set('vv_services_url', $services_url);
$this->set('title_for_layout', _txt('pl.grouperlite.config.display.title'));
// Pass the config so we know which div to overwrite
$this->set('vv_config', $cfg);
Expand Down
2 changes: 1 addition & 1 deletion Model/GrouperGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class GrouperGroup extends GrouperLiteAppModel
{
//TODO - Add input validation
//TODO - Add input validation, possibly???
public $name = "GrouperGroup";
public $grouperAPI;
Expand Down
37 changes: 36 additions & 1 deletion View/CoGrouperLites/display.ctp
Original file line number Diff line number Diff line change
@@ -1 +1,36 @@
you are home
<?php
/**
* COmanage Registry Services Widget Display View
*
* This widget repurposes the Service Portal by directly
* rendering the service portal URL (as provided by the controller).
*
* 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 registry
* @since COmanage Registry v3.2.0
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
*/

// Figure out the widget ID so we can overwrite the dashboard's widget div
$divid = $vv_config['CoGrouperLite']['co_dashboard_widget_id'];
?>

<a rel="stylesheet" href="<?php print $vv_services_url; ?>">Click here</a>

2 changes: 1 addition & 1 deletion View/CoGrouperLites/fields.inc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ $args['action'] = 'index';
$args['codashboard'] = $co_grouper_lites[0]['CoDashboardWidget']['co_dashboard_id'];
$this->Html->addCrumb(_txt('ct.co_dashboard_widgets.1'), $args);

$crumbTxt = _txt('op.' . $this->action . '-a', array(filter_var($co_grouper_widgets[0]['CoDashboardWidget']['description'], FILTER_SANITIZE_SPECIAL_CHARS)));
$crumbTxt = _txt('op.' . $this->action . '-a', array(filter_var($co_grouper_lites[0]['CoDashboardWidget']['description'], FILTER_SANITIZE_SPECIAL_CHARS)));
$this->Html->addCrumb($crumbTxt);

print $this->Form->hidden('co_dashboard_widget_id', array('default' => $vv_dwid)) . "\n";
Expand Down

0 comments on commit 8f183f4

Please sign in to comment.