Author: david
Date: Tue Sep 27 18:24:18 2011
New Revision: 9862

Log:
Reformat dates field using RDF-a + DC and a defintion list for extended 
properties

Modified:
   trunk/apps/qubit/modules/informationobject/templates/_dates.php
   trunk/plugins/sfCaribouPlugin/css/style.css

Modified: trunk/apps/qubit/modules/informationobject/templates/_dates.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/_dates.php     Tue Sep 
27 18:22:34 2011        (r9861)
+++ trunk/apps/qubit/modules/informationobject/templates/_dates.php     Tue Sep 
27 18:24:18 2011        (r9862)
@@ -1,32 +1,35 @@
-<?php foreach ($resource->getDates() as $item): ?>
-  <div class="field">
-    <h3><?php echo __('Date') ?></h3>
-    <div>
+<div class="field">
+  <h3><?php echo __('Date(s)') ?></h3>
 
-      <?php echo 
Qubit::renderDateStartEnd($item->getDate(array('cultureFallback' => true)), 
$item->startDate, $item->endDate) ?>
+  <div xmlns:dc="http://purl.org/dc/elements/1.1/"; about="<?php echo 
url_for(array($resource, 'module' => 'informationobject'), true) ?>">
 
-      <div class="note2" style="margin-left: 1.5em;">
-        <?php echo __('Type') ?>: <?php echo $item->type ?>
+  <ul>
+  <?php foreach ($resource->getDates() as $item): ?>
+    <li>
+      <div class="date">
+        <span property="dc:date" start="<?php echo $item->startDate ?>" 
end="<?php echo $item->endDate ?>"><?php echo 
Qubit::renderDateStartEnd($item->getDate(array('cultureFallback' => true)), 
$item->startDate, $item->endDate) ?></span> 
+        <span class="date-type">(<?php echo $item->type->__toString() 
?>)</span>
+
+        <dl>
+        <?php if (isset($item->actor) && null !== $item->type->getRole()): ?>
+          <dt><?php echo $item->type->getRole() ?></dt>
+          <dd><?php echo render_title($item->actor) ?></dd>
+        <?php endif; ?>
+
+        <?php if (null !== $item->getPlace()): ?>
+          <dt><?php echo __('Place') ?></dt>
+          <dd><?php echo $item->getPlace() ?></dd>
+        <?php endif; ?>
+
+        <?php if (0 < strlen($item->description)): ?>
+          <dt><?php echo __('Note') ?></dt>
+          <dd><?php echo $item->description ?></dd>
+        <?php endif; ?>
+        </dl>
       </div>
+    </li>
+  <?php endforeach; ?>
+  </ul>
 
-      <?php if (isset($item->actor) && null !== $item->type->getRole()): ?>
-        <div class="note2" style="margin-left: 1.5em;">
-          <?php echo $item->type->getRole() ?>: <?php echo 
render_title($item->actor) ?>
-        </div>
-      <?php endif; ?>
-
-      <?php if (null !== $item->getPlace()): ?>
-        <div class="note2" style="margin-left: 1.5em;">
-          <?php echo __('Place') ?>: <?php echo $item->getPlace() ?>
-        </div>
-      <?php endif; ?>
-
-      <?php if (0 < strlen($item->description)): ?>
-        <div class="note2" style="margin-left: 1.5em;">
-          <?php echo __('Note') ?>: <?php echo $item->description ?>
-        </div>
-      <?php endif; ?>
-
-    </div>
   </div>
-<?php endforeach; ?>
+</div>

Modified: trunk/plugins/sfCaribouPlugin/css/style.css
==============================================================================
--- trunk/plugins/sfCaribouPlugin/css/style.css Tue Sep 27 18:22:34 2011        
(r9861)
+++ trunk/plugins/sfCaribouPlugin/css/style.css Tue Sep 27 18:24:18 2011        
(r9862)
@@ -301,3 +301,26 @@
   background-color: #FFF;
   color: #000;
 }
+
+/* Format date with extended properties */
+.date dl
+{
+  margin: 0 0 0 1em;
+}
+
+.date dl dt:after
+{
+  content: ':';
+}
+
+.date dl dt
+{
+  clear: both;
+}
+
+.date dl dt,
+.date dl dd
+{
+  float: left;
+  margin: 0;
+}

-- 
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.

Reply via email to