From b28638d7bf532fc5ee6d67c815c3947e0dae94ed Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Fri, 9 May 2014 12:24:57 -0400 Subject: [PATCH] Added missing templates/CSS. --- themes/bootprint/css/bootprint-custom.css | 27 +++++++++- .../templates/Recommend/RandomRecommend.phtml | 49 +++++++++++++++++++ .../templates/Recommend/RandomRecommend.phtml | 1 + 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 themes/bootstrap/templates/Recommend/RandomRecommend.phtml create mode 100644 themes/jquerymobile/templates/Recommend/RandomRecommend.phtml diff --git a/themes/bootprint/css/bootprint-custom.css b/themes/bootprint/css/bootprint-custom.css index 99b280b24dd..978291a4327 100644 --- a/themes/bootprint/css/bootprint-custom.css +++ b/themes/bootprint/css/bootprint-custom.css @@ -202,4 +202,29 @@ select, .btn:not(.btn-link){vertical-align:top} #custom_recaptcha_widget embed { display:none; } #custom_recaptcha_widget #recaptcha_image { border:1px solid #000;padding:6px;margin:1em 0; } #custom_recaptcha_widget #recaptcha_response_field { margin:0 .5em } -#custom_recaptcha_widget > div > a { display:inline-block;float:left;margin:5px 10px 5px 0; } \ No newline at end of file +#custom_recaptcha_widget > div > a { display:inline-block;float:left;margin:5px 10px 5px 0; } + +/* --- Random Items (results view) --- */ + +ul.random { + list-style: none; + padding: 0; + margin: 0px; + text-align:justified; +} + +ul.random li { + padding-bottom:10px; +} + +ul.random li img { + margin: 0 auto 1em auto; +} + +ul.random.image, ul.random.mixed { + text-align: center; +} + +ul.random.image li img { + margin: 0 auto; +} \ No newline at end of file diff --git a/themes/bootstrap/templates/Recommend/RandomRecommend.phtml b/themes/bootstrap/templates/Recommend/RandomRecommend.phtml new file mode 100644 index 00000000000..66c5eba84e4 --- /dev/null +++ b/themes/bootstrap/templates/Recommend/RandomRecommend.phtml @@ -0,0 +1,49 @@ +<? $recommend = $this->recommend->getResults(); if (count($recommend)> 0): ?> + <h4><?=$this->transEsc("random_recommendation_title")?></h4> + <ul class="random <?=$this->recommend->getDisplayMode()?>"> + <? foreach ($recommend as $driver): ?> + <li> + + <?if($this->recommend->getDisplayMode() === "images" || $this->recommend->getDisplayMode() === "mixed"):?> + + <? /* Display thumbnail if appropriate: */ ?> + <? $smallThumb = $this->record($driver)->getThumbnail('small'); $mediumThumb = $this->record($driver)->getThumbnail('medium'); ?> + <? if ($smallThumb): ?> + <a href="<?=$this->recordLink()->getUrl($driver)?>"> + <img alt="<?=$this->transEsc('Cover Image')?>" src="<?=$this->escapeHtml($smallThumb);?>"/><br /> + </a> + <?elseif($mediumThumb):?> + <a href="<?=$this->recordLink()->getUrl($driver)?>"> + <img alt="<?=$this->transEsc('Cover Image')?>" src="<?=$this->escapeHtml($mediumThumb);?>"/><br /> + </a> + <? else: ?> + <img src="<?=$this->url('cover-unavailable')?>" alt="<?=$this->transEsc('No Cover Image')?>"/><br /> + <? endif; ?> + + <?endif;?> + + <?if($this->recommend->getDisplayMode() === "standard" || $this->recommend->getDisplayMode() === "mixed"):?> + <? $formats = $driver->getFormats(); $format = isset($formats[0]) ? $formats[0] : ''; ?> + <a href="<?=$this->recordLink()->getUrl($driver)?>" class="title <?=$this->record($driver)->getFormatClass($format)?>"><? + $summTitle = $driver->getTitle(); + if (!empty($summTitle)) { + echo $this->escapeHtml($this->truncate($summTitle, 180)); + } else { + echo $this->transEsc('Title not available'); + } + ?></a> + <? $summAuthor = $driver->getPrimaryAuthor(); if (!empty($summAuthor)): ?> + <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> + <? endforeach; ?> + </ul> +<?endif;?> diff --git a/themes/jquerymobile/templates/Recommend/RandomRecommend.phtml b/themes/jquerymobile/templates/Recommend/RandomRecommend.phtml new file mode 100644 index 00000000000..0df1e74df18 --- /dev/null +++ b/themes/jquerymobile/templates/Recommend/RandomRecommend.phtml @@ -0,0 +1 @@ +<? /* Not supported in mobile theme. */ ?> \ No newline at end of file -- GitLab