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} ...@@ -12,8 +12,8 @@ li a.hidden {display:none}
.pad { padding:12px } .pad { padding:12px }
.pager { margin:0 0 8px 0 } .pager { margin:0 0 8px 0 }
.pointer { cursor:pointer } .pointer { cursor:pointer }
.sidebar { padding:0 } .sidebar { padding:4px 0 0 0 }
.sidebar h4 { margin:10px 8px 4px 8px } .sidebar h4 { margin:6px 8px }
.sidebar .small { color:#333;margin-top:1px } .sidebar .small { color:#333;margin-top:1px }
.small { font-size:85% } .small { font-size:85% }
.switch-margins,.row .switch-margins,.row-fluid .switch-margins { display: inline-block; margin:auto 0 } .switch-margins,.row .switch-margins,.row-fluid .switch-margins { display: inline-block; margin:auto 0 }
......
<div class="sidegroup"> <h4><?=$this->transEsc('Similar Items')?></h4>
<h4><?=$this->transEsc('Similar Items')?></h4> <? $similarRecords = $this->related->getResults(); ?>
<? $similarRecords = $this->related->getResults(); if (!empty($similarRecords)): ?> <? if (!empty($similarRecords)): ?>
<ul class="unstyled"> <ul class="nav nav-list">
<? foreach ($similarRecords as $data): ?> <? foreach ($similarRecords as $data): ?>
<li> <li>
<? $formats = $data->getFormats(); if (count($formats) > 0): ?> <a href="<?=$this->recordLink()->getUrl($data)?>"><?=$this->escapeHtml($data->getTitle())?>
<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>
<span class="small"> <span class="small">
<? $author = $data->getPrimaryAuthor(); if (!empty($author)): ?> <? $author = $data->getPrimaryAuthor(); if (!empty($author)): ?>
<?=$this->transEsc('by')?>: <?=$this->escapeHtml($author);?> <?=$this->transEsc('by')?>: <?=$this->escapeHtml($author);?>
...@@ -19,10 +13,10 @@ ...@@ -19,10 +13,10 @@
<?=$this->transEsc('Published')?>: (<?=$this->escapeHtml($pubDates[0])?>) <?=$this->transEsc('Published')?>: (<?=$this->escapeHtml($pubDates[0])?>)
<? endif; ?> <? endif; ?>
</span> </span>
</li> </a>
<? endforeach; ?> </li>
</ul> <? endforeach; ?>
<? else: ?> </ul>
<p><?=$this->transEsc('Cannot find similar records')?></p> <? else: ?>
<? endif; ?> <p><?=$this->transEsc('Cannot find similar records')?></p>
</div> <? endif; ?>
\ No newline at end of file \ 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