Author: sevein
Date: Thu Aug 9 15:47:33 2012
New Revision: 12067
Log:
Show publication status, fixes issue 2286
Modified:
trunk/lib/helper/QubitHelper.php
Modified: trunk/lib/helper/QubitHelper.php
==============================================================================
--- trunk/lib/helper/QubitHelper.php Thu Aug 9 15:47:07 2012 (r12066)
+++ trunk/lib/helper/QubitHelper.php Thu Aug 9 15:47:33 2012 (r12067)
@@ -200,23 +200,36 @@
}
else
{
- // Level of description
- $levelOfDescriptionId = $item instanceof QubitObject ?
$item->levelOfDescriptionId : $item->level_of_description_id;
- if (null !== $levelOfDescription =
QubitTerm::getById($levelOfDescriptionId))
+ if ($item instanceof QubitInformationObject)
{
- $node .= '<strong>'.$levelOfDescription->getName().'</strong>';
- }
+ // Publication status
+ if ((null !== $status = $item->getPublicationStatus()) &&
QubitTerm::PUBLICATION_STATUS_DRAFT_ID == $status->statusId)
+ {
+ $node .= '<strong
class="publicationStatus">('.$status->__toString().')</strong>';
+ }
+
+ // Level of description
+ if (null !== $levelOfDescription =
QubitTerm::getById($item->levelOfDescriptionId))
+ {
+ $node .= '<strong>'.$levelOfDescription->getName().'</strong>';
+ }
+
+ // Title
+ $title = '';
+ if ($item->identifier)
+ {
+ $title = $item->identifier . " - ";
+ }
+ $title .= $item->title;
- // Title
- $title = '';
- if ($item->identifier)
+ // Add link
+ $node .= link_to(render_title($title), array($item, 'module' =>
'informationobject'));
+ }
+ else if ($item instanceof QubitTerm)
{
- $title = $item->identifier . " - ";
+ // Add link
+ $node .= link_to(render_title($item), array($item, 'module' => 'term'));
}
- $title .= $item->title;
-
- // Add link
- $node .= link_to(render_title($title), array('module' =>
'informationobject', 'slug' => $item->slug));
}
// Close node tag
--
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.