Skip to content
Snippets Groups Projects
Commit 0eb4cd34 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Similar sidebar converted.

parent 758a073a
No related merge requests found
......@@ -12,8 +12,8 @@ li a.hidden {display:none}
.pad { padding:12px }
.pager { margin:0 0 8px 0 }
.pointer { cursor:pointer }
.sidebar { padding:0 }
.sidebar h4 { margin:10px 8px 4px 8px }
.sidebar { padding:4px 0 0 0 }
.sidebar h4 { margin:6px 8px }
.sidebar .small { color:#333;margin-top:1px }
.small { font-size:85% }
.switch-margins,.row .switch-margins,.row-fluid .switch-margins { display: inline-block; margin:auto 0 }
......
<div class="sidegroup">
<h4><?=$this->transEsc('Similar Items')?></h4>
<? $similarRecords = $this->related->getResults(); if (!empty($similarRecords)): ?>
<ul class="unstyled">
<? foreach ($similarRecords as $data): ?>
<li>
<? $formats = $data->getFormats(); if (count($formats) > 0): ?>
<span class="<?=preg_replace('/[^a-z0-9]/', '', strtolower($formats[0]))?>">
<? else: ?>
<span>
<? endif; ?>
<a href="<?=$this->recordLink()->getUrl($data)?>"><?=$this->escapeHtml($data->getTitle())?></a>
</span>
<h4><?=$this->transEsc('Similar Items')?></h4>
<? $similarRecords = $this->related->getResults(); ?>
<? if (!empty($similarRecords)): ?>
<ul class="nav nav-list">
<? foreach ($similarRecords as $data): ?>
<li>
<a href="<?=$this->recordLink()->getUrl($data)?>"><?=$this->escapeHtml($data->getTitle())?>
<span class="small">
<? $author = $data->getPrimaryAuthor(); if (!empty($author)): ?>
<?=$this->transEsc('by')?>: <?=$this->escapeHtml($author);?>
......@@ -19,10 +13,10 @@
<?=$this->transEsc('Published')?>: (<?=$this->escapeHtml($pubDates[0])?>)
<? endif; ?>
</span>
</li>
<? endforeach; ?>
</ul>
<? else: ?>
<p><?=$this->transEsc('Cannot find similar records')?></p>
<? endif; ?>
</div>
\ No newline at end of file
</a>
</li>
<? endforeach; ?>
</ul>
<? else: ?>
<p><?=$this->transEsc('Cannot find similar records')?></p>
<? endif; ?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment