comanage-dev - [comanage-dev] r468 - in registry/trunk/app: View/CoPeople View/Layouts View/OrgIdentities View/Standard webroot/css
Subject: COmanage Developers List
List archive
[comanage-dev] r468 - in registry/trunk/app: View/CoPeople View/Layouts View/OrgIdentities View/Standard webroot/css
Chronological Thread
- From:
- To:
- Subject: [comanage-dev] r468 - in registry/trunk/app: View/CoPeople View/Layouts View/OrgIdentities View/Standard webroot/css
- Date: Mon, 25 Feb 2013 18:45:58 -0500
- Authentication-results: sfpop-ironport05.merit.edu; dkim=neutral (message not signed) header.i=none
Author: marie
Date: 2013-02-25 18:45:58 -0500 (Mon, 25 Feb 2013)
New Revision: 468
Modified:
registry/trunk/app/View/CoPeople/fields.inc
registry/trunk/app/View/CoPeople/index.ctp
registry/trunk/app/View/Layouts/default.ctp
registry/trunk/app/View/OrgIdentities/fields.inc
registry/trunk/app/View/OrgIdentities/index.ctp
registry/trunk/app/View/Standard/view.ctp
registry/trunk/app/webroot/css/comanage.css
Log:
CO428 Create Sidebar Part1
Modified: registry/trunk/app/View/CoPeople/fields.inc
===================================================================
--- registry/trunk/app/View/CoPeople/fields.inc 2013-02-25 21:11:49 UTC (rev
467)
+++ registry/trunk/app/View/CoPeople/fields.inc 2013-02-25 23:45:58 UTC (rev
468)
@@ -42,23 +42,23 @@
if(!$e && !$permissions['view'])
return(false);
+ // Add buttons to sidebar
+ $sidebarButtons = $this->get('sidebarButtons');
+
if($e)
{
- print $this->Html->link(_txt('op.back'),
- array('controller' => 'co_people', 'action' =>
'index', 'co' => $cur_co['Co']['id']),
- array('class' => 'cancelbutton'));
+ // Add related links to the sidebar
+ $sidebarButtons[] = array(
+ 'icon' => 'circle-close',
+ 'title' => _txt('op.back'),
+ 'url' => array(
+ 'controller' => 'co_people',
+ 'action' => 'index',
+ 'co' => $cur_co['Co']['id'])
+ );
if($this->action != "invite")
- {
- if(!empty($co_people[0]['CoOrgIdentityLink'][0]['org_identity_id'])) {
- print $this->Html->link(_txt('ct.org_identities.1'),
- array('controller' => 'org_identities',
- 'action' => ($e && !$es ? 'edit' :
'view'),
-
$co_people[0]['CoOrgIdentityLink'][0]['org_identity_id'],
- 'co' => ($pool_org_identities ? false
: $cur_co['Co']['id'])),
- array('class' => 'linkbutton'));
- }
-
+ {
// Adjust the link to the NSF Demographics Controller according to
whether or
// not data has been set.
@@ -75,9 +75,11 @@
$l['co'] = $co_people[0]['CoPerson']['co_id'];
- print $this->Html->link(_txt('ct.co_nsf_demographics.1'),
- $l,
- array('class' => 'linkbutton'));
+ $sidebarButtons[] = array(
+ 'icon' => 'image',
+ 'title' => _txt('ct.co_nsf_demographics.1'),
+ 'url' => $l
+ );
// Autogenerate Identifiers button
if(!empty($co_identifier_assignments)) {
@@ -91,9 +93,16 @@
// Provisioning status
if($permissions['provision']) {
- print $this->Html->link(_txt('op.prov.view'),
- array('controller' => 'co_people', 'action'
=> 'provision', $co_people[0]['CoPerson']['id'], 'co' => $cur_co['Co']['id']),
- array('class' => 'historybutton')); // XXX
This should use a different image
+ $sidebarButtons[] = array(
+ 'icon' => 'note',
+ 'title' => _txt('op.prov.view'),
+ 'url' => array(
+ 'controller' => 'co_people',
+ 'action' => 'provision',
+ $co_people[0]['CoPerson']['id'],
+ 'co' => $cur_co['Co']['id']
+ )
+ );
}
}
@@ -109,31 +118,37 @@
else
{
// Back button
- print $this->Html->link(_txt('op.back'),
- array('controller' => 'co_people', 'action' =>
'index', 'co' => $cur_co['Co']['id']),
- array('class' => 'backbutton'));
+ $sidebarButtons[] = array(
+ 'icon' => 'circle-arrow-w',
+ 'title' => _txt('op.back'),
+ 'url' => array(
+ 'controller' => 'co_people',
+ 'action' => 'index',
+ 'co' => $cur_co['Co']['id'])
+ );
}
// View History button
if($this->action != "add" && $this->action != "invite") {
- print $this->Html->link(
- _txt('op.history'),
- array(
+ $sidebarButtons[] = array(
+ 'icon' => 'note',
+ 'title' => _txt('op.history'),
+ 'url' => array(
'controller' => 'history_records',
'action' => 'index',
'copersonid' => $co_people[0]['CoPerson']['id'],
'co' => $cur_co['Co']['id']
- ),
- array('class' => 'historybutton')
+ )
);
}
+ // Set buttons for rendering in sidebar
+ $this->set('sidebarButtons', $sidebarButtons);
// Line number, for rendering
$l = 1;
?>
-<br />
-<br />
+
<script type="text/javascript">
<!-- /* JS specific to these fields */ -->
@@ -815,6 +830,7 @@
</table>
</div> <!-- tabs-orgid -->
<?php endif; // if not invite ?>
+ </div>
</div>
<div id="autogenerate-dialog" title="<?php print _txt('op.id.auto'); ?>">
Modified: registry/trunk/app/View/CoPeople/index.ctp
===================================================================
--- registry/trunk/app/View/CoPeople/index.ctp 2013-02-25 21:11:49 UTC (rev
467)
+++ registry/trunk/app/View/CoPeople/index.ctp 2013-02-25 23:45:58 UTC (rev
468)
@@ -26,21 +26,33 @@
$params = array('title' => _txt('fd.people',
array($cur_co['Co']['name'])));
print $this->element("pageTitle", $params);
+ // Add buttons to sidebar
+ $sidebarButtons = $this->get('sidebarButtons');
+
if($permissions['enroll'] && !empty($co_enrollment_flows)) {
- print $this->Html->link(_txt('op.enroll'),
- array('controller' => 'co_enrollment_flows',
'action' => 'select', 'co' => $cur_co['Co']['id']),
- array('class' => 'addbutton')) . '
- <br />
- <br />
- ';
+ $sidebarButtons[] = array(
+ 'icon' => 'circle-plus',
+ 'title' => _txt('op.enroll'),
+ 'url' => array(
+ 'controller' => 'co_enrollment_flows',
+ 'action' => 'select',
+ 'co' => $cur_co['Co']['id']
+ )
+ );
+
} elseif($permissions['add']) {
- print $this->Html->link(_txt('op.inv'),
- array('controller' => 'org_identities', 'action'
=> 'find', 'co' => $cur_co['Co']['id']),
- array('class' => 'addbutton')) . '
- <br />
- <br />
- ';
+ $sidebarButtons[] = array(
+ 'icon' => 'circle-plus',
+ 'title' => _txt('op.inv'),
+ 'url' => array(
+ 'controller' => 'org_identities',
+ 'action' => 'find',
+ 'co' => $cur_co['Co']['id']
+ )
+ );
}
+
+ $this->set('sidebarButtons', $sidebarButtons);
?>
<table id="co_people" class="ui-widget">
Modified: registry/trunk/app/View/Layouts/default.ctp
===================================================================
--- registry/trunk/app/View/Layouts/default.ctp 2013-02-25 21:11:49 UTC (rev
467)
+++ registry/trunk/app/View/Layouts/default.ctp 2013-02-25 23:45:58 UTC (rev
468)
@@ -320,6 +320,11 @@
}
});
});
+
+ // Turn on the sidebar menus
+ $(function() {
+ $( "#menu" ).menu();
+ });
</script>
<!-- Include external files and scripts -->
@@ -412,6 +417,32 @@
<?php print $this->fetch('content'); ?>
</div>
</div>
+
+ <?php
+ $sidebarButtons = $this->getVar('sidebarButtons');
+
+ if($sidebarButtons != null):
+ ?>
+ <!-- Display sidebar for content -->
+ <div id="sidebar">
+ <ul id="menu">
+ <?php
+ foreach($sidebarButtons as $button => $link){
+ print '<li>';
+ print $this->Html->link(
+ '<span class="ui-icon ui-icon-'
+ . $link['icon']
+ . '"></span>'
+ . $link['title'],
+ $link['url'],
+ array('escape' => FALSE)
+ ); // end of a
+ print '</li>';
+ }
+ ?>
+ </ul>
+ </div>
+ <?php endif; ?>
<?php if(Configure::read('debug') > 0) print $this->element('sql_dump');
?>
<!-- Common UI components -->
Modified: registry/trunk/app/View/OrgIdentities/fields.inc
===================================================================
--- registry/trunk/app/View/OrgIdentities/fields.inc 2013-02-25 21:11:49
UTC (rev 467)
+++ registry/trunk/app/View/OrgIdentities/fields.inc 2013-02-25 23:45:58
UTC (rev 468)
@@ -62,24 +62,26 @@
array('default' => $cur_co['Co']['id'])).
"\n";
}
+ // Add links to sidebar
+
if($this->action != "add") {
- print $this->Html->link(
- _txt('op.history'),
- array(
- 'controller' => 'history_records',
- 'action' => 'index',
+ // Get any existing buttons
+ $sidebarButtons = $this->get('sidebarButtons');
+
+ $sidebarButtons[] = array(
+ 'icon' => 'note',
+ 'title' => _txt('op.history'),
+ 'url' => array(
+ 'controller' => 'history_records',
+ 'action' => 'index',
'orgidentityid' => $org_identities[0]['OrgIdentity']['id'],
- 'co' => ($pool_org_identities ? false : $cur_co['Co']['id'])
- ),
- array('class' => 'historybutton')
+ 'co' => ($pool_org_identities ? false :
$cur_co['Co']['id'])
+ )
);
+
+ $this->set('sidebarButtons', $sidebarButtons);
}
-?>
-<br />
-<br />
-<?php
-
// The fields to render are determined by the CMP Enrollment Flow
configuration,
// which is passed to us in $cmp_ef_attributes. The minor gotcha is that
MVPAs
// allow multiple versions their attributes where the enrollment flow
configuration
Modified: registry/trunk/app/View/OrgIdentities/index.ctp
===================================================================
--- registry/trunk/app/View/OrgIdentities/index.ctp 2013-02-25 21:11:49
UTC (rev 467)
+++ registry/trunk/app/View/OrgIdentities/index.ctp 2013-02-25 23:45:58
UTC (rev 468)
@@ -28,15 +28,22 @@
$params = array('title' => _txt('ct.org_identities.pl'));
print $this->element("pageTitle", $params);
- if($permissions['add'])
- print $this->Html->link(_txt('op.add.new',
array(_txt('ct.org_identities.1'))),
- array('controller' => 'org_identities',
- 'action' => 'add',
- 'co' => ($pool_org_identities ? false :
$this->params['named']['co'])),
- array('class' => 'addbutton')) . '
- <br />
- <br />
- ';
+ if($permissions['add']) {
+ // Add button to sidebar
+ $sidebarButtons = $this->get('sidebarButtons');
+
+ $sidebarButtons[] = array(
+ 'icon' => 'circle-plus',
+ 'title' => _txt('op.add.new', array(_txt('ct.org_identities.1'))),
+ 'url' => array(
+ 'controller' => 'org_identities',
+ 'action' => 'add',
+ 'co' => ($pool_org_identities ? false : $this->params['named']['co'])
+ )
+ );
+
+ $this->set('sidebarButtons', $sidebarButtons);
+ }
?>
<table id="org_identities" class="ui-widget">
Modified: registry/trunk/app/View/Standard/view.ctp
===================================================================
--- registry/trunk/app/View/Standard/view.ctp 2013-02-25 21:11:49 UTC (rev
467)
+++ registry/trunk/app/View/Standard/view.ctp 2013-02-25 23:45:58 UTC (rev
468)
@@ -41,8 +41,8 @@
}
print '</div>';
- print '<div style = "float:right">';
- // If user has edit permission, offer an edit button
+ // If user has edit permission, offer an edit button in the sidebar
+ $sidebarButtons = $this->get('sidebarButtons');
if($permissions['edit'])
{
@@ -51,9 +51,15 @@
if(isset($this->params['named']['co']))
$a['co'] = $this->params['named']['co'];
- echo $this->Html->link(_txt('op.edit'),
- $a,
- array('class' => 'editbutton'));
+ // Add edit button to the sidebar
+ $sidebarButtons = $this->get('sidebarButtons');
+ $sidebarButtons[] = array(
+ 'icon' => 'pencil',
+ 'title' => _txt('op.edit'),
+ 'url' => $a
+ );
+
+ $this->set('sidebarButtons', $sidebarButtons);
+
}
?>
-</div>
Modified: registry/trunk/app/webroot/css/comanage.css
===================================================================
--- registry/trunk/app/webroot/css/comanage.css 2013-02-25 21:11:49 UTC (rev
467)
+++ registry/trunk/app/webroot/css/comanage.css 2013-02-25 23:45:58 UTC (rev
468)
@@ -79,7 +79,8 @@
/* Content */
#content {
- width:960px;
+ min-width: 600px;
+ float: left;
margin-left:auto;
margin-right:auto;
overflow:hidden;
@@ -226,6 +227,15 @@
float:right;
}
+ /* Sidebar (right) */
+ #sidebar {
+ float: left;
+ min-width: 200px;
+ min-height: 400px;
+ padding: 10px;
+ margin: 60px 0 0 0;
+ }
+
/* Footer */
.footer {
- [comanage-dev] r468 - in registry/trunk/app: View/CoPeople View/Layouts View/OrgIdentities View/Standard webroot/css, svnlog, 02/25/2013
Archive powered by MHonArc 2.6.16.