Author: sevein
Date: Thu Aug 16 11:55:37 2012
New Revision: 12122
Log:
Improve the way the popup title shows different values
Modified:
trunk/lib/helper/QubitHelper.php
Modified: trunk/lib/helper/QubitHelper.php
==============================================================================
--- trunk/lib/helper/QubitHelper.php Thu Aug 16 11:48:58 2012 (r12121)
+++ trunk/lib/helper/QubitHelper.php Thu Aug 16 11:55:37 2012 (r12122)
@@ -191,9 +191,16 @@
if ($item instanceof QubitInformationObject)
{
- $node .= ' data-title="'.esc_entities(implode(array(
- $item->levelOfDescription,
- "({$item->getPublicationStatus()->__toString()})"), ' ')).'"';
+ $dataTitle = $item->levelOfDescription;
+
+ if (0 < strlen($dataTitle))
+ {
+ $dataTitle .= ' - ';
+ }
+
+ $dataTitle .= $item->getPublicationStatus()->__toString();
+
+ $node .= ' data-title="'.esc_entities($dataTitle).'"';
}
else if ($item instanceof QubitTerm)
{
@@ -219,12 +226,6 @@
{
if ($item instanceof QubitInformationObject)
{
- // Publication status
- if ((null !== $status = $item->getPublicationStatus()) &&
QubitTerm::PUBLICATION_STATUS_DRAFT_ID == $status->statusId)
- {
- $node .= '<span class="pubStatus">('.$status->__toString().')</span>';
- }
-
// Level of description
if (null !== $levelOfDescription =
QubitTerm::getById($item->levelOfDescriptionId))
{
@@ -241,6 +242,12 @@
// Add link
$node .= link_to(render_title($title), array($item, 'module' =>
'informationobject'), array('title' => null));
+
+ // Publication status
+ if ((null !== $status = $item->getPublicationStatus()) &&
QubitTerm::PUBLICATION_STATUS_DRAFT_ID == $status->statusId)
+ {
+ $node .= '<span class="pubStatus">('.$status->__toString().')</span>';
+ }
}
else if ($item instanceof QubitTerm)
{
--
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.