Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions OaiPmhRepositoryPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class OaiPmhRepositoryPlugin extends Omeka_Plugin_AbstractPlugin
'oaipmh_repository_expose_files' => 1,
'oaipmh_repository_expose_empty_collections' => 1,
'oaipmh_repository_expose_item_type' => 0,
'oaipmh_repository_add_human_stylesheet' => 1,
);

/**
Expand Down
15 changes: 15 additions & 0 deletions config_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,18 @@
array('checked' => (boolean) get_option('oaipmh_repository_expose_item_type'))); ?>
</div>
</div>
<div class="field">
<div class="two columns alpha">
<?php echo $view->formLabel('oaipmh_repository_add_human_stylesheet',
__('Human display')); ?>
</div>
<div class="inputs five columns omega">
<p class="explanation">
<?php echo __('If checked, a stylesheet will be added to the output, so humans will be able to browse the repository through a themable %sBootstrap%s responsive interface.',
'<a href="http://getbootstrap.com/">', '</a>'); ?>
</p>
<?php echo $view->formCheckbox('oaipmh_repository_add_human_stylesheet', true,
array('checked' => (boolean) get_option('oaipmh_repository_add_human_stylesheet'))); ?>
</div>
</div>

8 changes: 7 additions & 1 deletion libraries/OaiPmhRepository/ResponseGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ public function __construct($query)
//adds some overhead, especially on large outputs.
$this->document->formatOutput = true;
$this->document->xmlStandalone = true;


if (get_option('oaipmh_repository_add_human_stylesheet')) {
$stylesheet = src('oai-pmh-repository', 'xsl', 'xsl');
$xslt = $this->document->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="' . $stylesheet . '"');
$this->document->appendChild($xslt);
}

$root = $this->document->createElementNS(self::OAI_PMH_NAMESPACE_URI,
'OAI-PMH');
$this->document->appendChild($root);
Expand Down
5 changes: 5 additions & 0 deletions views/public/css/bootstrap-theme.min.css

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions views/public/css/bootstrap.min.css

Large diffs are not rendered by default.

106 changes: 106 additions & 0 deletions views/public/css/oai-pmh-repository.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
/* Styles to adapt bootstrap. */
body {
padding-top: 70px;
}
footer a {
color: #000000;
}
footer a:hover {
color: #000000;
}
a#logo {
background: transparent none no-repeat scroll 0 0 / 100% 100%;
/* padding: 8px 51px; */
}
.vertical-space {
height: 20px;
}
.xoai-contexts div:nth-child(even) {
background-color: #eee;
}
pre {
line-height: 0.8;
}

/* Styles specific to OAI-PMH. */
.oaipmh h2 {
border-bottom-style: inset;
}
.oaipmh table small {
font-style: italic;
margin-left: 10px;
}
.oaipmh-response .panel-heading a {
color: #3c763d;
}
.oaipmh-description {
padding-top: 16px;
}
.oaipmh-formats table thead th:first-child,
.oaipmh-formats table tbody th,
.oaipmh-sets table thead th:first-child,
.oaipmh-sets table tbody th,
.oaipmh-identifiers table thead th:first-child,
.oaipmh-identifiers table tbody th,
.oaipmh-records table thead th:first-child,
.oaipmh-records table tbody th {
text-align: right;
}
.oaipmh-formats table dl {
margin-bottom: 12px;
margin-top: 12px;
}
.oaipmh-records table {
width: 100%;
}
.oaipmh-records table table {
table-layout:fixed;
}
.oaipmh-records table tr.collapse td {
word-wrap: break-word;
}
.oaipmh-record .panel-body {
word-wrap: break-word;
}

/* Stylesheet from http://www2.informatik.hu-berlin.de/~obecker/XSLT/xmlverbatim/xmlverbatim.css */
.xmlverb-default {
color: #333333;
background-color: #ffffff;
font-family: monospace;
}
.xmlverb-element-name {
color: #990000;
}
.xmlverb-element-nsprefix {
color: #666600;
}
.xmlverb-attr-name {
color: #660000;
}
.xmlverb-attr-content {
color: #000099;
font-weight: bold;
}
.xmlverb-ns-name {
color: #666600;
}
.xmlverb-ns-uri {
color: #330099;
}
.xmlverb-text {
color: #000000;
font-weight: bold;
}
.xmlverb-comment {
color: #006600;
font-style: italic;
}
.xmlverb-pi-name {
color: #006600;
font-style: italic;
}
.xmlverb-pi-content {
color: #006666;
font-style: italic;
}
Binary file not shown.
288 changes: 288 additions & 0 deletions views/public/fonts/glyphicons-halflings-regular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
7 changes: 7 additions & 0 deletions views/public/javascripts/bootstrap.min.js

Large diffs are not rendered by default.

Loading