Author: sevein
Date: Mon Aug 13 23:14:35 2012
New Revision: 12095
Log:
Hide fileList and itemList choices if DC or MODS, fixes issue 2176.
Modified:
trunk/apps/qubit/modules/informationobject/actions/reportsAction.class.php
Modified:
trunk/apps/qubit/modules/informationobject/actions/reportsAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/reportsAction.class.php
Mon Aug 13 22:57:04 2012 (r12094)
+++ trunk/apps/qubit/modules/informationobject/actions/reportsAction.class.php
Mon Aug 13 23:14:35 2012 (r12095)
@@ -30,10 +30,19 @@
switch ($name)
{
case 'report':
- $choices = array(
- $this->context->routing->generate(null, array($this->resource,
'module' => 'informationobject', 'action' => 'fileList')) =>
$this->context->i18n->__('File list'),
- $this->context->routing->generate(null, array($this->resource,
'module' => 'informationobject', 'action' => 'itemList')) =>
$this->context->i18n->__('Item list'),
- );
+
+ // Hide if DC or MODS since they don't use such levels of description
+ if (!in_array($this->resource->sourceStandard, array('Dublin Core
Simple version 1.1', 'MODS version 3.3')))
+ {
+ $choices = array(
+ $this->context->routing->generate(null, array($this->resource,
'module' => 'informationobject', 'action' => 'fileList')) =>
$this->context->i18n->__('File list'),
+ $this->context->routing->generate(null, array($this->resource,
'module' => 'informationobject', 'action' => 'itemList')) =>
$this->context->i18n->__('Item list'),
+ );
+ }
+ else
+ {
+ $choices = array();
+ }
if ($this->getUser()->isAuthenticated())
{
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.