Browse Source

Merge pull request #111 from krisbulman/7.x

template changes
pull/112/head
Kris Bulman 13 years ago
parent
commit
46053257a8
  1. 74
      css/islandora.theme.css
  2. 67
      islandora-object.tpl.php
  3. 1
      islandora.module
  4. 16
      islandora_basic_collection/css/islandora_basic_collection.theme.css
  5. 9
      islandora_basic_collection/islandora-basic-collection.tpl.php
  6. 52
      islandora_basic_image/islandora-basic-image--islandora-27.tpl.php
  7. 2
      islandora_basic_image/islandora_basic_image.module

74
css/islandora.theme.css

@ -5,4 +5,78 @@
Purpose of the stylesheet follows.
*/
/*
* Thumbnails float optionally to the left or right of descriptive lists.
*/
.islandora-object-thumb img {
max-width: 100%;
*width: 100%;
}
dl.islandora-object-thumb {
float: left;
width: 15%;
margin: 0.75em auto;
}
.islandora-object-thumb dt,
.islandora-object-thumb dd {
margin: 0;
}
/*
* These rules will display DTs/DDs as columns.
* Constructs must follow a key/value pair pattern.
* The three last declarations are meant to kill white space between DTs/DDs
* (result of inline-block styling)
*/
dl.islandora-object-fields {
float: right;
width:83%;
margin: 0.75em auto;
letter-spacing:-0.34em;
*letter-spacing:normal;
word-spacing:-0.44em;
border-top:3px solid #ddd;
}
/*
* The width + left/right padding of DTs/DDs equals 88% when compensating for an image
*/
.islandora-object-fields dt {
margin-right:-1px;
width:22.5%;
font-weight: bold;
}
.islandora-object-fields dd {
width:67%;
}
/*
* In this rule, we reset the white-space (see hack above)
*/
.islandora-object-fields dt,
.islandora-object-fields dd {
display:inline-block;
*display:inline;
zoom:1;
letter-spacing:normal;
word-spacing:normal;
vertical-align:top;
padding:6px 2% 4px;
margin:0;
border-top:1px solid #ddd;
-ms-word-break: break-all;
word-break: break-all;
word-break: break-word; /* webkit */
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}
.islandora-object-fields dt.first,
.islandora-object-fields dd.first {
border-top: 0;
}

67
islandora-object.tpl.php

@ -46,29 +46,48 @@
//dsm($object);
drupal_set_title($islandora_object->label);
$dublin_core = $variables['islandora_dublin_core'];
print($islandora_object->label . ' ' . $islandora_object->id);
print ('<h3>datastreams</h3>');
foreach ($islandora_object as $ds) {
print $ds->label . '<br>';
//do something
}
print('<h3>Dublin Core</h3>');
// $dublin_core = $variables['islandora_dublin_core'];
// print($islandora_object->label . ' ' . $islandora_object->id);
// print ('<h3>datastreams</h3>');
// foreach ($islandora_object as $ds) {
// print $ds->label . '<br>';
// //do something
// }
// print('<h3>Dublin Core</h3>');
foreach ($dublin_core as $element) {
if (!empty($element)) {
// print($element);
foreach ($element as $key => $value) {
foreach($value as $v){
if(!empty($v)){
print '<strong>'.($key).'</strong>: ';print($v).'<br />';
}
}
}
}
}
if(isset($variables['islandora_thumbnail_url'])){
print('<img src = "'.$variables['islandora_thumbnail_url'].'"/>');
}
?>
// foreach ($dublin_core as $element) {
// if (!empty($element)) {
// // print($element);
// foreach ($element as $key => $value) {
// foreach($value as $v){
// if(!empty($v)){
// print '<strong>'.($key).'</strong>: ';print($v).'<br />';
// }
// }
// }
// }
// }
?>
<div class="islandora-object">
<h2>Details</h2>
<dl class="islandora-object-thumb">
<dt>
<?php if(isset($variables['islandora_thumbnail_url'])): ?>
<?php print('<img src = "'.$variables['islandora_thumbnail_url'].'"/>'); ?></dt>
<?php endif; ?>
<dd></dd>
</dl>
<dl class="islandora-object-fields">
<?php $row_field = 0; ?>
<?php foreach($dc_array as $key => $value): ?>
<dt class="<?php print $value['class']; ?><?php print $row_field == 0 ? ' first' : ''; ?>">
<?php print $value['label']; ?>
</dt>
<dd class="<?php print $value['class']; ?><?php print $row_field == 0 ? ' first' : ''; ?>">
<?php print $value['value']; ?>
</dd>
<?php $row_field++; ?>
<?php endforeach; ?>
</dl>
</div>

1
islandora.module

@ -579,6 +579,7 @@ function islandora_preprocess_islandora_default(&$variables) {
} catch (Exception $e) {
drupal_set_message(t('Error retrieving object %s %t', array('%s' => $islandora_object->id, '%t' => $e->getMessage())), 'error');
}
$variables['dc_array'] = $dc_object->as_formatted_array();
$variables['islandora_dublin_core'] = $dc_object;
$variables['islandora_object_label'] = $islandora_object->label;
global $base_url;

16
islandora_basic_collection/css/islandora_basic_collection.theme.css

@ -5,20 +5,24 @@
Purpose of the stylesheet follows.
*/
/* islandora-basic-collection STYLES*/
.islandora-basic-collection {
margin: 2% auto;
margin: 1.5em auto;
overflow: hidden;
width: 96%;
}
dl.islandora-basic-collection-object
{
float: left;
margin: 2% 2% 50px;
width: 20%;
height: 180px;
min-width: 100px;
min-height: 180px;
display: -moz-inline-stack;
display: inline-block;
vertical-align: top;
margin: 1.5em 2%;
zoom: 1;
*display: inline;
_height: 180px;
}
.islandora-basic-collection-object dt img {

9
islandora_basic_collection/islandora-basic-collection.tpl.php

@ -22,11 +22,14 @@
*/
?>
<?php drupal_set_title($islandora_object->label); ?>
<div class="islandora-basic-collection-wrapper">
<div class="islandora-basic-collection clearfix">
<?php foreach($associated_objects_array as $key => $value): ?>
<dl class="islandora-basic-collection-object">
<dt class="<?php print $value['class']; ?>"><?php print $value['thumb_link']; ?></dt>
<dd class="<?php print $value['class']; ?>"><?php print $value['title_link']; ?></dd>
<dl class="islandora-basic-collection-object <?php print $value['class']; ?>">
<dt class="islandora-basic-collection-thumb"><?php print $value['thumb_link']; ?></dt>
<dd class="islandora-basic-collection-caption"><?php print $value['title_link']; ?></dd>
</dl>
<?php endforeach; ?>
</div>
</div>

52
islandora_basic_image/islandora-basic-image--islandora-27.tpl.php

@ -1,52 +0,0 @@
<?php
/*
* islandora-basic-image--islandora-27.tpl.php
*
*
*
* This file is part of Islandora.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program. If not, see <http ://www.gnu.org/licenses/>.
*/
?>
<?php drupal_set_title(""); ?>
<div class="islandora-basic-image-object">
<div class="islandora-basic-image-content clearfix">
<?php print $islandora_medium_img; ?>
</div>
<div class="islandora-basic-image-sidebar">
<h1 class="title"><?php print $islandora_object_label; ?></h1>
<h3><?php print $dc_array['dc:description']['label']; ?></h3>
<p><?php print $dc_array['dc:description']['value']; ?></p>
</div>
<div class="islandora-basic-image-metadata">
<h4>Details</h4>
<dl class="islandora-basic-image-fields">
<?php $row_field = 0; ?>
<?php foreach($dc_array as $key => $value): ?>
<dt class="solr-label <?php print $value['class']; ?><?php print $row_field == 0 ? ' first' : ''; ?>">
<?php print $value['label']; ?>
</dt>
<?php if ($key == 'PID'): ?>
<?php $value['value'] = l($value['value'], 'fedora/repository/' . htmlspecialchars($value['value'], ENT_QUOTES, 'utf-8')); ?>
<?php endif; ?>
<dd class="solr-value <?php print $value['class']; ?><?php print $row_field == 0 ? ' first' : ''; ?>">
<?php print $value['value']; ?>
</dd>
<?php $row_field++; ?>
<?php endforeach; ?>
</dl>
</div>
</div>

2
islandora_basic_image/islandora_basic_image.module

@ -77,7 +77,7 @@ function islandora_basic_image_menu() {
* @param string $object_id
* @return string
*/
/**
/*
function islandora_basic_image_manage_object($object_id){
return 'Image CModel edit function '.$object_id;
}*/

Loading…
Cancel
Save