Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #8 from Ioannis/spring_semester2024
Ioannis Work Segment
aaschenbrener committed Feb 20, 2024
2 parents a9fd11f + 0da100c commit 07e6ef7
Showing 38 changed files with 1,597 additions and 1,446 deletions.
Empty file removed Config/Schema/empty
Empty file.
6 changes: 4 additions & 2 deletions Config/Schema/schema.xml
@@ -25,7 +25,7 @@
must be specified in raw SQL, which needs the prefixed table name.
-->
<schema version="0.3">
<table name="co_grouper_lites">
<table name="co_grouper_lite_widgets">
<field name="id" type="I">
<key />
<autoincrement />
@@ -34,8 +34,10 @@
<constraint>REFERENCES cm_co_dashboard_widgets(id)</constraint>
</field>
<field name="conn_url" type="C" size="256" />
<field name="identifier_type" type="C" size="32" />
<field name="conn_ver" type="C" size="256" />
<field name="grouper_url" type="C" size="256" />
<field name="act_as_grp_name" type="C" size="512" />
<field name="conn_user" type="C" size="64" />
<field name="conn_pass" type="C" size="64" />
<field name="adhoc_heading" type="C" size="64" />
@@ -44,7 +46,7 @@
<field name="created" type="T" />
<field name="modified" type="T" />

<index name="co_grouper_lites_i1">
<index name="co_grouper_lite_widgets_i1">
<col>co_dashboard_widget_id</col>
<unique />
</index>
@@ -2,16 +2,18 @@

App::uses("SDWController", "Controller");

class CoGrouperLitesController extends SDWController {
class CoGrouperLiteWidgetsController extends SDWController {

public $helpers = array('Html', 'Form', 'Flash');
public $components = array('Flash');

// Class name, used by Cake
public $name = "CoGrouperLites";
public $name = "CoGrouperLiteWidgets";

public $uses = array(
"GrouperLite.CoGrouperLite"
'GrouperLiteWidget.CoGrouperLiteWidget',
'Identifier',
'Co',
);

/**
@@ -21,13 +23,26 @@ class CoGrouperLitesController extends SDWController {
*/

function beforeRender() {
parent::beforeRender();

$this->set('title_for_layout', _txt('pl.grouperlite.config.edit.title'));

parent::beforeRender();
// Gather the available identifier address types for the config form
$this->set('vv_available_types', $this->Identifier->types($this->cur_co['Co']['id'], 'type'));
// Pass the config
$cfg = $this->CoGrouperLiteWidget->getConfig();
$this->set('vv_config', $cfg);
}


/**
* Render the widget according to the requested user and current configuration.
*
* @since COmanage Registry v4.4.0
* @param Integer $id CO Grouper Lite Widget ID
*/
public function display($id) {
$cfg = $this->CoGrouperLite->getConfig();
$cfg = $this->CoGrouperLiteWidget->getConfig();

$this->set('pl_grouperlite_index_url', Router::url([
'plugin' => "grouper_lite",
@@ -43,6 +58,14 @@ public function display($id) {

// Pass the config so we know which div to overwrite
$this->set('vv_config', $cfg);

// Pass the Dashboard Widget configuration
$args = array();
$args['conditions']['CoGrouperLiteWidget.id'] = $id;
$args['contain']['CoDashboardWidget'][] = 'CoDashboard';

$codw = $this->CoGrouperLiteWidget->find('first', $args);
$this->set('vv_codw', $codw);
}


0 comments on commit 07e6ef7

Please sign in to comment.