William Panting
12 years ago
9 changed files with 270 additions and 31 deletions
@ -0,0 +1,72 @@
|
||||
/** |
||||
* @file |
||||
* Print styling |
||||
* |
||||
* We provide some sane print styling for Drupal, hiding most visuals. |
||||
*/ |
||||
a:link, |
||||
a:visited { /* underline all links */ |
||||
text-decoration: underline !important; |
||||
} |
||||
|
||||
#site-name a:link, |
||||
#site-name a:visited { /* Don't underline header */ |
||||
text-decoration: none !important; |
||||
} |
||||
|
||||
#content a[href^="javascript:"]:after, |
||||
#content a[href^="#"]:after { /* Only display useful links. */ |
||||
/* content: ""; */ |
||||
} |
||||
|
||||
#content abbr[title]:after { /* Add visible title after abbreviations. */ |
||||
/* content: " (" attr(title) ")"; */ |
||||
} |
||||
|
||||
#content { |
||||
left: 0 !important; |
||||
width: 100% !important; |
||||
} |
||||
uncomment when ready to test printing |
||||
#header { |
||||
display: none !important; |
||||
} |
||||
|
||||
#content { /* Un-float the content */ |
||||
float: none !important; |
||||
width: 100% !important; |
||||
margin: 0 !important; |
||||
padding: 0 !important; |
||||
} |
||||
|
||||
body, |
||||
#page, |
||||
#main, |
||||
#content { /* Turn off any background colors or images */ |
||||
color: #000; |
||||
background-color: transparent !important; |
||||
background-image: none !important; |
||||
} |
||||
|
||||
body.sidebar-first { |
||||
left: 0 !important; |
||||
width: 100% !important; |
||||
} |
||||
#skip-link, |
||||
#toolbar, |
||||
#navigation, |
||||
/* .region-sidebar-first, */ |
||||
/* .region-sidebar-second, */ |
||||
#header, |
||||
#footer, |
||||
.breadcrumb, |
||||
.tabs, |
||||
.action-links, |
||||
.links, |
||||
.book-navigation, |
||||
.forum-topic-navigation, |
||||
.pager, |
||||
.feed-icons { /* Hide sidebars and nav elements */ |
||||
visibility: hidden !important; |
||||
display: none !important; |
||||
} |
After Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,18 @@
|
||||
/** |
||||
* @file |
||||
* JavaScript file responsable for the print button behaviour. |
||||
*
|
||||
* The print button is added automatically to every view, as metadata |
||||
* can be printed from every object. |
||||
* |
||||
*/ |
||||
(function ($) { |
||||
$(document).ready(function() { |
||||
$('.tabs .primary').append('<img id="print_btn" title="Print" src="/' + Drupal.settings.islandora.print_img + '"></img>'); |
||||
$('#print_btn').css("cursor","pointer"); |
||||
$('#print_btn').click(function() { |
||||
window.location=Drupal.settings.islandora.print_link; |
||||
}); |
||||
}); |
||||
})(jQuery);
|
||||
|
@ -0,0 +1,18 @@
|
||||
<?php |
||||
|
||||
/** |
||||
* @file |
||||
* The default view to theme an image of an object. |
||||
* |
||||
* This view is passed into 'islandora-object-print' theme file |
||||
* and is rendred as an image. Allows for seperate theming of image |
||||
* and metadata. |
||||
* |
||||
*/ |
||||
|
||||
?> |
||||
<?php if (isset($islandora_content)): ?> |
||||
<div> |
||||
<?php print $islandora_content; ?> |
||||
</div> |
||||
<?php endif; ?> |
@ -0,0 +1,30 @@
|
||||
<?php |
||||
|
||||
/** |
||||
* @file |
||||
* The default view to print objects. |
||||
* |
||||
*/ |
||||
?> |
||||
<div> |
||||
<div> |
||||
<?php print $islandora_content; ?> |
||||
</div> |
||||
<fieldset class="islandora-basic-image-metadata islandora"> |
||||
<legend><span class="fieldset-legend"><?php print t('Details'); ?></span></legend>
|
||||
<div class="fieldset-wrapper"> |
||||
<dl class="islandora-inline-metadata islandora-basic-image-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> |
||||
</fieldset> |
||||
</div> |
Loading…
Reference in new issue