Author: david
Date: 2008-12-03 15:20:15 -0800 (Wed, 03 Dec 2008)
New Revision: 1656

Modified:
   trunk/qubit/apps/qubit/modules/digitalobject/templates/_edit.php
   
trunk/qubit/apps/qubit/modules/digitalobject/templates/_editRepresentation.php
   trunk/qubit/web/css/form.css
Log:
Redesign digitalobject/edit partials for information object template using 
inline table.

Modified: trunk/qubit/apps/qubit/modules/digitalobject/templates/_edit.php
===================================================================
--- trunk/qubit/apps/qubit/modules/digitalobject/templates/_edit.php    
2008-12-03 08:13:34 UTC (rev 1655)
+++ trunk/qubit/apps/qubit/modules/digitalobject/templates/_edit.php    
2008-12-03 23:20:15 UTC (rev 1656)
@@ -1,32 +1,26 @@
 <?php if (count($digitalObject)): ?>
-  <div class="form-item">
-    <label for="mediatype"><?php echo __('media type'); ?></label>
-    <?php echo object_select_tag($digitalObject, 'getMediaTypeId',
-      array('related_class' => 'QubitTerm', 'peer_method' => 'getMediaTypes'
-      )) ?>
-  </div>
-
   <!-- Display/edit digital object representations -->
   <?php foreach ($representations as $usageId => $representation): ?>
   <?php if (is_object($representation) && $representation->getId()): ?>
-  <?php include_component('digitalobject', 'editRepresentation',
-    array('digitalObject'=>$digitalObject, 
'representation'=>$representation)); ?>
-  <?php else: ?>
-  <div class="form-item">
-    <label for="upload"><?php echo __('Add a new %1% representation', 
array('%1%'=>QubitTerm::getById($usageId))); ?></label>
-    <table class="inline">
-    <tr>
-      <td width="60%">
-        <?php include_component('digitalobject', 'upload', 
array('usageId'=>$usageId)); ?>
-        <?php if ($digitalObject->canThumbnail()): ?>
-        <br/><?php echo __('or'); ?>
-        <?php echo checkbox_tag('createDerivative', $usageId, false, 
array('class'=>'checkbox')); ?>
-        <?php echo __('auto-generate'); ?>
-        <?php endif; ?>
-      </td>
-    </tr>
-    </table>
-  </div>
+    <?php include_component('digitalobject', 'editRepresentation',
+      array('digitalObject'=>$digitalObject, 
'representation'=>$representation)); ?>
+    <?php else: ?>
+    <div class="form-item">
+      <table class="inline">
+        <tr>
+          <th><?php echo __('Add a new %1% representation', 
array('%1%'=>QubitTerm::getById($usageId))); ?></th>
+        </tr>
+        <tr style="border-bottom: 1px solid #CCC">
+          <td>
+            <?php include_component('digitalobject', 'upload', 
array('usageId'=>$usageId)); ?><br />
+            <?php if ($digitalObject->canThumbnail()): ?>
+              <?php echo __('<i>or</i> Auto-generate a new representation from 
master image'); ?>
+              <?php echo checkbox_tag('createDerivative', $usageId, true, 
array('class'=>'checkbox')); ?>
+            <?php endif; ?>
+          </td>
+        </tr>
+      </table>
+    </div>
   <?php endif; ?>
   <?php endforeach; ?>
 <?php else: ?>

Modified: 
trunk/qubit/apps/qubit/modules/digitalobject/templates/_editRepresentation.php
===================================================================
--- 
trunk/qubit/apps/qubit/modules/digitalobject/templates/_editRepresentation.php  
    2008-12-03 08:13:34 UTC (rev 1655)
+++ 
trunk/qubit/apps/qubit/modules/digitalobject/templates/_editRepresentation.php  
    2008-12-03 23:20:15 UTC (rev 1656)
@@ -1,31 +1,50 @@
-<div class="form-item">
-  <label for="usagetype">
-    <?php echo $representation->getUsage(); ?>
-    <?php $confirmDeleteString = __('Delete this %1%? This cannot be undone!', 
array('%1%'=>sfConfig::get('app_ui_label_digitalobject'))) ?>
-    <?php echo link_to(
-      image_tag('/images/delete.png', array('style'=>'vertical-align: 
middle')),
-      'digitalobject/delete?id='.$representation->getId(), 
array('confirm'=>$confirmDeleteString)); ?>
-  </label>
-  <div style="margin: 5px 5px 0px 0px; float: left">
-    <div class="digitalObjectRep">
+<?php $confirmDeleteString = __('Delete this %1%? This cannot be undone!', 
array('%1%'=>sfConfig::get('app_ui_label_digitalobject'))) ?>
+
+<table class="inline" style="width: 98%">
+  <tr>
+    <th colspan="2">
+      <?php echo __('%1% representation', array('%1%' => 
$representation->getUsage())); ?>
+      <?php echo link_to(
+        image_tag('/images/delete.png', array('style'=>'vertical-align: 
middle')),
+        'digitalobject/delete?id='.$representation->getId(), 
array('confirm'=>$confirmDeleteString)); ?>
+    </th>
+  </tr>
+  <tr>
+    <td>
+      <div class="digitalObjectRep">
       <?php include_component('digitalobject', 'show', array(
         'digitalObject'=>$representation,
         'usageType'=>QubitTerm::THUMBNAIL_ID,
         'link'=>$link,
         'iconOnly'=>true
       )); ?>
-    </div>
-  </div>
-</div>
-
-<div class="form-item">
-  <label for="filename"><?php echo __('filename'); ?></label>
-  <?php echo $representation->getName(); ?>
-</div>
-
-<div class="form-item">
-  <label for="filesize"><?php echo __('filesize'); ?></label>
-  <?php echo $representation->getHRfileSize(); ?>
-</div>
-
-<br style="clear:both" />
\ No newline at end of file
+      </div>
+    </td>
+    <td style="padding: 0px; margin: 0px;">
+      <table style="width: 350px; padding: 0px; margin: 0px">
+        <?php if ($representation->getUsageId() == QubitTerm::MASTER_ID): ?>
+        <tr> 
+          <td style="border: 0px none">
+            <label for="mediatype"><?php echo __('media type'); ?></label>
+            <?php echo object_select_tag($digitalObject, 'getMediaTypeId',
+              array('related_class' => 'QubitTerm', 'peer_method' => 
'getMediaTypes'
+              )) ?>
+          </td>
+        </tr>
+        <?php endif; ?>
+        <tr>
+          <td>
+            <label for="filename"><?php echo __('filename'); ?></label>
+            <div><?php echo $representation->getName(); ?></div>
+          </td>
+        </tr>
+        <tr>
+          <td>
+            <label for="filesize"><?php echo __('filesize'); ?></label>
+            <?php echo $representation->getHRfileSize(); ?>
+          </td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
\ No newline at end of file

Modified: trunk/qubit/web/css/form.css
===================================================================
--- trunk/qubit/web/css/form.css        2008-12-03 08:13:34 UTC (rev 1655)
+++ trunk/qubit/web/css/form.css        2008-12-03 23:20:15 UTC (rev 1656)
@@ -13,9 +13,9 @@
 
 form
 {
-margin: 0;
-padding: 0;
-border: 0;
+  margin: 0;
+  padding: 0;
+  border: 0;
 }
 
 form input
@@ -28,9 +28,8 @@
   border: 1px solid #a3a3a3;
 }
 
-form 
-  input[type="radio"], input.radio, 
-  input[type="checkbox"], input.checkbox
+input[type="radio"], input.radio,
+input[type="checkbox"], input.checkbox
 {
   padding: 0;
   margin: 0;
@@ -52,8 +51,8 @@
 
 form ul.radio_list li
 {
-       background: none;
-       display: inline;
+  background: none;
+  display: inline;
   padding: 0 5px 0 0;
   list-style-type: none;
 }
@@ -179,14 +178,15 @@
 {
   font-size: 0.85em;
 }
-.form-item label
+
+label
 {
   display: block;
   font-weight: bold;
   color: #999999;
 }
 
-.form-item label.option
+label.option
 {
   display: inline;
   font-weight: normal;
@@ -309,54 +309,54 @@
 
 .login-form
 {
-       border: 0;
-       width: 450px;
-       margin: 0 0 0 20px;
-       font: bold 18px/19px georgia, serif;
+  border: 0;
+  width: 450px;
+  margin: 0 0 0 20px;
+  font: bold 18px/19px georgia, serif;
 }
 
 .login-form legend
 {
-       font: bold 18px/20px georgia, serif;
-       color: #000000;
-       margin: 0;
+  font: bold 18px/20px georgia, serif;
+  color: #000000;
+  margin: 0;
 }
 
 .login-form input
 {
-       width: 400px;
-       font: bold 27px/27px georgia, serif;
-       border: 1px solid #999999;
+  width: 400px;
+  font: bold 27px/27px georgia, serif;
+  border: 1px solid #999999;
 }
 
 .login-form input.submit
 {
-       text-decoration: none;
-       padding: 0 6px 1px 6px;
-       margin: 16px 15px 0 5px;
-       font: normal 15px/15px georgia, serif;
-       width: 60px;
-       height: 25px;
-       float: right;
-       color: #ffffff;
-       background-color: #000000;
-       border-right: 3px solid #999999;
-       border-bottom: 3px solid #999999;
+  text-decoration: none;
+  padding: 0 6px 1px 6px;
+  margin: 16px 15px 0 5px;
+  font: normal 15px/15px georgia, serif;
+  width: 60px;
+  height: 25px;
+  float: right;
+  color: #ffffff;
+  background-color: #000000;
+  border-right: 3px solid #999999;
+  border-bottom: 3px solid #999999;
 }
 
 .login-form input.submithover
 {
-       text-decoration: none;
-       padding: 0 6px 1px 6px;
-       margin: 16px 15px 0 5px;
-       font: normal 15px/15px georgia, serif;
-       width: 60px;
-       height: 25px;
-       float: right;
-       color: #000000;
-       background-color: #ffffff;
-       border-right: 3px solid #999999;
-       border-bottom: 3px solid #999999;
+  text-decoration: none;
+  padding: 0 6px 1px 6px;
+  margin: 16px 15px 0 5px;
+  font: normal 15px/15px georgia, serif;
+  width: 60px;
+  height: 25px;
+  float: right;
+  color: #000000;
+  background-color: #ffffff;
+  border-right: 3px solid #999999;
+  border-bottom: 3px solid #999999;
 }
 
 .login-form table
@@ -366,9 +366,9 @@
 
 .login-form table th
 {
-       border: 0;
-       vertical-align: center;
-       text-align: right;
+  border: 0;
+  vertical-align: center;
+  text-align: right;
 }
 
 .login-form table tr
@@ -402,9 +402,9 @@
 
 ul.validation_error li
 {
-       background: url(../images/exclamation.png) no-repeat 1px;
-       padding: 0.1em 0.1em 0.1em 20px;
-       margin: 0;
+  background: url(../images/exclamation.png) no-repeat 1px;
+  padding: 0.1em 0.1em 0.1em 20px;
+  margin: 0;
 }
 
 /* see also app/config/settings.yml


--~--~---------~--~----~------------~-------~--~----~
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.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to