Skip to content
This repository has been archived by the owner on Apr 23, 2018. It is now read-only.

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Schihin committed Apr 4, 2014
2 parents 473c8a4 + fe1dbff commit 11fb0fc
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<? if(method_exists($this->driver,'setUseMostSpecificFormat')) $this->driver->setUseMostSpecificFormat(true); ?>
<? foreach ($this->driver->getFormats() as $format): ?>
<h6 class="iconlabel <?=$this->record($this->driver)->getFormatClass($format)?>"><?=$this->transEsc($format)?></h6>
<span
class="iconlabel <?= $this->record($this->driver)->getFormatClass($format) ?>"><?= $this->transEsc($format) ?></span>
<? endforeach; ?>
51 changes: 39 additions & 12 deletions themes/swissbib/templates/RecordDriver/SolrDefault/list-entry.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,44 @@
}

$record = $this->driver;
$viewRecord = $this->record($record);
$thumbnail = $viewRecord->getThumbnail('small');
$thumbnailSrc = $thumbnail ? $thumbnail : $this->url('cover-unavailable');
$titleStatement = $record->getTitleStatement(true);
$shortTitle = $record->getShortTitle();
$subtitle = $viewRecord->getSubtitle($titleStatement);
$responsible = $viewRecord->getResponsible($titleStatement, $record);
$publishers = $record->getPublishers(true);
$publicationDate = $this->publicationDateMarc($record->getPublicationDates());
$hostitems = $record->getHostItemEntry();
$isEditAllowed = (isset($list) && $list->editAllowed($this->user)) || (!isset($list) && $this->user);
if ($record instanceof \Swissbib\RecordDriver\Missing) {
$thumbnailSrc = $this->url('cover-unavailable');
$shortTitle = '[Titel fehlt]';
$subtitle = '[Aufnahme im Index gelöscht]';
$publicationDate = '0000';
}
elseif ($record instanceof \Swissbib\RecordDriver\SolrMarc) {
$viewRecord = $this->record($record);
$thumbnail = $viewRecord->getThumbnail('small');
$thumbnailSrc = $thumbnail ? $thumbnail : $this->url('cover-unavailable');
$titleStatement = $record->getTitleStatement(true);
$shortTitle = $record->getShortTitle();
$subtitle = $viewRecord->getSubtitle($titleStatement);
$responsible = $viewRecord->getResponsible($titleStatement, $record);
$publishers = $record->getPublishers(true);
$publicationDate = $this->publicationDateMarc($record->getPublicationDates());
$hostitems = $record->getHostItemEntry();
$format = $viewRecord->getFormatList();
$isEditAllowed = (isset($list) && $list->editAllowed($this->user)) || (!isset($list) && $this->user);
}
elseif ($record instanceof \VuFind\RecordDriver\Summon) {
$viewRecord = $this->record($record);
$thumbnail = $viewRecord->getThumbnail('small');
$thumbnailSrc = $thumbnail ? $thumbnail : $this->url('cover-unavailable');
$titleStatement = $record->getTitleStatement(true);
$shortTitle = $record->getShortTitle();
$subtitle = $viewRecord->getSubtitle($titleStatement);
$responsible = $viewRecord->getResponsible($titleStatement, $record);
$publishers = $record->getPublishers(true);
$publicationDate = $this->publicationDateSummon($record->getPublicationDates());
$hostitem = $record->getContainerTitle();
if ($hostitem) {
$hostitem = '. - ' .$record->getContainerReference();
}
$format = $viewRecord->getFormatList();
$isEditAllowed = (isset($list) && $list->editAllowed($this->user)) || (!isset($list) && $this->user);

}

// get user generated content (tags and notes)
$listTags = $this->driver->getTags($list_id, $user_id, 'tag');
Expand Down Expand Up @@ -98,7 +125,7 @@
</div>
<!-- format -->
<div class="format">
<p><?=$viewRecord->getFormatList()?></p>
<p><?= $format ?></p>
</div>
<!-- user content (tags, notes -->
<div class="meta">
Expand Down

0 comments on commit 11fb0fc

Please sign in to comment.