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

Bootstrap theming for RandomRecommend. Some small tweaks to a similar template.

parent fe626631
No related merge requests found
...@@ -26,7 +26,8 @@ li a.hidden {display:none} ...@@ -26,7 +26,8 @@ li a.hidden {display:none}
.sidebar .nav-list li.applied input[type="checkbox"] { margin-top:7px } .sidebar .nav-list li.applied input[type="checkbox"] { margin-top:7px }
.sidebar .nav-list li .icon-ok { margin-top:3px } .sidebar .nav-list li .icon-ok { margin-top:3px }
.sidebar .nav-list li .icon-remove { margin-left:3px } .sidebar .nav-list li .icon-remove { margin-left:3px }
.sidebar .small { color:#333;margin-top:9px;line-height:85% } .sidebar .small { color:#333;line-height:85% }
.sidebar a .small { margin-top:6px }
.sidebar a.small,.sidebar .small a { color:#08C } .sidebar a.small,.sidebar .small a { color:#08C }
.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 }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<? foreach ($results as $driver): ?> <? foreach ($results as $driver): ?>
<li> <li>
<? $formats = $driver->getFormats(); $format = isset($formats[0]) ? $formats[0] : ''; ?> <? $formats = $driver->getFormats(); $format = isset($formats[0]) ? $formats[0] : ''; ?>
<a href="<?=$this->recordLink()->getUrl($driver)?>" class="title <?=$this->record($driver)->getFormatClass($format)?>"> <a href="<?=$this->recordLink()->getUrl($driver)?>" class="title <?=$this->record($driver)->getFormatClass($format)?> clearfix">
<? <?
$summHighlightedTitle = $driver->getHighlightedTitle(); $summHighlightedTitle = $driver->getHighlightedTitle();
$summTitle = $driver->getTitle(); $summTitle = $driver->getTitle();
...@@ -17,14 +17,13 @@ ...@@ -17,14 +17,13 @@
} }
?> ?>
<? $summAuthor = $driver->getPrimaryAuthor(); ?> <? $summAuthor = $driver->getPrimaryAuthor(); ?>
<? if (!empty($summAuthor)): ?> <? $summAuthor = $driver->getPrimaryAuthor(); ?>
<span class="small pull-right"> <span class="small<? if (!empty($summAuthor)): ?> pull-right<? endif; ?>">
<? $summDate = $driver->getPublicationDates(); ?> <? $summDate = $driver->getPublicationDates(); ?>
<? if (!empty($summDate)): ?> <? if (!empty($summDate)): ?>
<?=$this->transEsc('Published')?>: (<?=$this->escapeHtml($summDate[0])?>) <?=$this->transEsc('Published')?>: (<?=$this->escapeHtml($summDate[0])?>)
<? endif; ?> <? endif; ?>
</span> </span>
<? endif; ?>
</a> </a>
<? if (!empty($summAuthor)): ?> <? if (!empty($summAuthor)): ?>
<a class="small text-right" href="<?=$this->record($driver)->getLink('author', $summAuthor)?>"> <a class="small text-right" href="<?=$this->record($driver)->getLink('author', $summAuthor)?>">
......
<? $recommend = $this->recommend->getResults(); if (count($recommend)> 0): ?> <? $recommend = $this->recommend->getResults(); if (count($recommend)> 0): ?>
<h4><?=$this->transEsc("random_recommendation_title")?></h4> <h4><?=$this->transEsc("random_recommendation_title")?></h4>
<ul class="random <?=$this->recommend->getDisplayMode()?>"> <ul class="random <?=$this->recommend->getDisplayMode()?> nav nav-list collapsed <? if(!in_array($title, $collapsedFacets)): ?> open<? endif ?>">
<? foreach ($recommend as $driver): ?> <? foreach ($recommend as $driver): ?>
<li> <li>
<?if($this->recommend->getDisplayMode() === "images" || $this->recommend->getDisplayMode() === "mixed"):?>
<?if($this->recommend->getDisplayMode() === "images" || $this->recommend->getDisplayMode() === "mixed"):?> <? /* Display thumbnail if appropriate: */ ?>
<? $smallThumb = $this->record($driver)->getThumbnail('small');
<? /* Display thumbnail if appropriate: */ ?> $mediumThumb = $this->record($driver)->getThumbnail('medium'); ?>
<? $smallThumb = $this->record($driver)->getThumbnail('small'); $mediumThumb = $this->record($driver)->getThumbnail('medium'); ?> <? if ($smallThumb): ?>
<? if ($smallThumb): ?> <a href="<?=$this->recordLink()->getUrl($driver)?>">
<a href="<?=$this->recordLink()->getUrl($driver)?>"> <img alt="<?=$this->transEsc('Cover Image')?>" src="<?=$this->escapeHtml($smallThumb);?>"/><br />
<img alt="<?=$this->transEsc('Cover Image')?>" src="<?=$this->escapeHtml($smallThumb);?>"/><br /> </a>
</a> <?elseif($mediumThumb):?>
<?elseif($mediumThumb):?> <a href="<?=$this->recordLink()->getUrl($driver)?>">
<a href="<?=$this->recordLink()->getUrl($driver)?>"> <img alt="<?=$this->transEsc('Cover Image')?>" src="<?=$this->escapeHtml($mediumThumb);?>"/><br />
<img alt="<?=$this->transEsc('Cover Image')?>" src="<?=$this->escapeHtml($mediumThumb);?>"/><br /> </a>
</a> <? else: ?>
<? else: ?> <img src="<?=$this->url('cover-unavailable')?>" alt="<?=$this->transEsc('No Cover Image')?>"/><br />
<img src="<?=$this->url('cover-unavailable')?>" alt="<?=$this->transEsc('No Cover Image')?>"/><br /> <? endif; ?>
<? endif; ?>
<?endif;?> <?endif;?>
<?if($this->recommend->getDisplayMode() === "standard" || $this->recommend->getDisplayMode() === "mixed"):?> <? $formats = $driver->getFormats(); $format = isset($formats[0]) ? $formats[0] : ''; ?>
<? $formats = $driver->getFormats(); $format = isset($formats[0]) ? $formats[0] : ''; ?> <a href="<?=$this->recordLink()->getUrl($driver)?>" class="title <?=$this->record($driver)->getFormatClass($format)?> clearfix">
<a href="<?=$this->recordLink()->getUrl($driver)?>" class="title <?=$this->record($driver)->getFormatClass($format)?>"><? <?
$summHighlightedTitle = $driver->getHighlightedTitle();
$summTitle = $driver->getTitle(); $summTitle = $driver->getTitle();
if (!empty($summTitle)) { if (!empty($summHighlightedTitle)) {
echo $this->highlight($this->addEllipsis($summHighlightedTitle, $summTitle));
} else if (!empty($summTitle)) {
echo $this->escapeHtml($this->truncate($summTitle, 180)); echo $this->escapeHtml($this->truncate($summTitle, 180));
} else { } else {
echo $this->transEsc('Title not available'); echo $this->transEsc('Title not available');
} }
?>
<? $summAuthor = $driver->getPrimaryAuthor(); ?>
<span class="small<? if (!empty($summAuthor)): ?> pull-right<? endif; ?>">
<? $summDate = $driver->getPublicationDates(); ?>
<? if (!empty($summDate)): ?>
<?=$this->transEsc('Published')?>: (<?=$this->escapeHtml($summDate[0])?>)
<? endif; ?>
</span>
</a>
<? if (!empty($summAuthor)): ?>
<a class="small text-right" href="<?=$this->record($driver)->getLink('author', $summAuthor)?>">
<span><?=$this->transEsc('By')?></span>
<?
$summHighlightedAuthor = $driver->getHighlightedAuthor();
echo !empty($summHighlightedAuthor)
? $this->highlight($summHighlightedAuthor)
: $this->escapeHtml($summAuthor);
?></a> ?></a>
<? $summAuthor = $driver->getPrimaryAuthor(); if (!empty($summAuthor)): ?> <? endif; ?>
<br />
<?=$this->transEsc('By')?>:
<a href="<?=$this->record($driver)->getLink('author', $summAuthor)?>">
<?=$this->escapeHtml($summAuthor)?>
</a>
<? endif; ?>
<? $summDate = $driver->getPublicationDates(); if (!empty($summDate)): ?>
<br/><?=$this->transEsc('Published')?>: (<?=$this->escapeHtml($summDate[0])?>)
<? endif; ?>
<?endif;?>
</li> </li>
<? endforeach; ?> <? endforeach; ?>
</ul> </ul>
......
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