Skip to content
Permalink
Browse files

show number of recommendations at search results and startpage

  • Loading branch information...
Slini11 committed Aug 26, 2015
1 parent 330bcd3 commit 5a8a081ae4d8419bf4ad975aeb8f3fba27e3852c
Showing with 38 additions and 25 deletions.
  1. +26 −20 htdocs/templates2/ocstyle/res_newratings.tpl
  2. +12 −5 htdocs/templates2/ocstyle/search.result.caches.row.tpl
@@ -6,27 +6,33 @@
<ul class="nodot">
{foreach name=topratings from=$topratings item=cacheitem}
<li class="newcache_list_multi" style="margin-bottom: 8px;">
<table class="null" cellspacing="0" cellpadding="0"><tr>
<td style="vertical-align:top; padding-right:2px; padding-top:2px" rowspan="2">{include file="res_cacheicon_22.tpl" cachetype=$cacheitem.type}</td>
<td style="vertical-align:top; ">
{if $cacheitem.cRatings>=1}<img src="images/rating-star.gif" border="0" alt="{t 1=$cacheitem.cRatings}%1 Recommendations in the last 30 days{/t}" />{/if}
{if $cacheitem.cRatings>=2}<img src="images/rating-star.gif" border="0" alt="{t 1=$cacheitem.cRatings}%1 Recommendations in the last 30 days{/t}" />{/if}
{if $cacheitem.cRatings==3}<img src="images/rating-star.gif" border="0" alt="{t 1=$cacheitem.cRatings}%1 Recommendations in the last 30 days{/t}" />{/if}
{if $cacheitem.cRatings>3}<img src="images/rating-plus.gif" border="0" alt="{t 1=$cacheitem.cRatings}%1 Recommendations in the last 30 days{/t}" />{/if}
&nbsp;
<b><a class="links" href="viewcache.php?cacheid={$cacheitem.cache_id}">{$cacheitem.name|escape}</a></b> {include file="res_oconly.tpl" oconly=$cacheitem.oconly}
{t}by{/t}
<b><a class="links" href="viewprofile.php?userid={$cacheitem.user_id}">{$cacheitem.username|escape}</a></b></td>
<table class="null" cellspacing="0" cellpadding="0">
<tr>
<td style="vertical-align:top; padding-right:2px; padding-top:2px" rowspan="2">{include file="res_cacheicon_22.tpl" cachetype=$cacheitem.type}</td>
<td style="vertical-align:top; ">
{if $cacheitem.cRatings<4}
{if $cacheitem.cRatings>0}<img src="images/rating-star.gif" border="0" alt="{t 1=$cacheitem.cRatings}%1 Recommendations in the last 30 days{/t}" style="margin-top: -2px;"/>{/if}
{if $cacheitem.cRatings>1}<img src="images/rating-star.gif" border="0" alt="{t 1=$cacheitem.cRatings}%1 Recommendations in the last 30 days{/t}" style="margin-top: -2px;"/>{/if}
{if $cacheitem.cRatings>2}<img src="images/rating-star.gif" border="0" alt="{t 1=$cacheitem.cRatings}%1 Recommendations in the last 30 days{/t}" style="margin-top: -2px;"/>{/if}
{/if}
{if $cacheitem.cRatings>3}
<b><span style="color:#02c602; font-size: 14px;" >{$cacheitem.cRatings}x</span></b><img src="images/rating-star.gif" border="0" alt="{t 1=$cacheitem.cRatings}%1 Recommendations in the last 30 days{/t}" style="margin-top: -2px;" />
{/if}
<b><a class="links" href="viewcache.php?cacheid={$cacheitem.cache_id}">{$cacheitem.name|escape}</a></b> {include file="res_oconly.tpl" oconly=$cacheitem.oconly}
<text class="links">{t}by{/t}</text>
<b><a class="links" href="viewprofile.php?userid={$cacheitem.user_id}">{$cacheitem.username|escape}</a></b>
</td>
</tr>
<tr><td colspan="2">
<strong>
<p class="content-title-noshade">
{$cacheitem.adm1|escape} {if $cacheitem.adm1!=null & $cacheitem.adm2!=null} &gt; {/if}
{$cacheitem.adm2|escape} {if ($cacheitem.adm2!=null & $cacheitem.adm4!=null) | ($cacheitem.adm1!=null & $cacheitem.adm4!=null)} &gt; {/if}
{$cacheitem.adm4|escape}
</p>
</strong>
</td>
<tr>
<td colspan="2">
<strong>
<p class="content-title-noshade">
{$cacheitem.adm1|escape} {if $cacheitem.adm1!=null & $cacheitem.adm2!=null} &gt; {/if}
{$cacheitem.adm2|escape} {if ($cacheitem.adm2!=null & $cacheitem.adm4!=null) | ($cacheitem.adm1!=null & $cacheitem.adm4!=null)} &gt; {/if}
{$cacheitem.adm4|escape}
</p>
</strong>
</td>
</tr></table>
</li>
{/foreach}
@@ -27,11 +27,18 @@
<td width="25" class="{$listcolor}">&nbsp;</td>
<td width="32" class="{$listcolor}" valign="top">{if $cache.direction_deg !== false}<img src="resource2/ocstyle/images/direction/16x16-{$cache.direction_deg}deg.png" title="{t}Cardinal direction{/t}: {$cache.direction_txt}" />&nbsp;{/if}</td>
<td width="448" class="{$listcolor}" valign="top">
<p>{strip}
{if $cache.topratings>0}<img src="images/rating-star.gif" title="{t}Recommendations{/t}" width="17" height="16" />{/if}
{if $cache.topratings>1}<img src="images/rating-star.gif" title="{t}Recommendations{/t}" width="17" height="16" />{/if}
{if $cache.topratings>2}<img src="images/rating-plus.gif" title="{t}Recommendations{/t}" width="17" height="16" />{/if}
{/strip}
<p>
{strip}
{if $cache.topratings<4}
{if $cache.topratings>0}<img src="images/rating-star.gif" title="{t}Recommendations{/t}" width="14" height="13" style="margin-top: -3px;"/>{/if}
{if $cache.topratings>1}<img src="images/rating-star.gif" title="{t}Recommendations{/t}" width="14" height="13" style="margin-top: -3px;"/>{/if}
{if $cache.topratings>2}<img src="images/rating-star.gif" title="{t}Recommendations{/t}" width="14" height="13" style="margin-top: -3px;"/>{/if}
{/if}
{if $cache.topratings>3}
<b><span class="txtblack" style="color:#02c602; font-size: 13px;">{$cache.topratings}x</span></b>
<img src="images/rating-star.gif" title="{t}Recommendations{/t}" width="14" height="13" style="margin-top: -3px;"/>
{/if}
{/strip}
{foreach from=$cache.desclangs item=desclang}
<a href="viewcache.php?cacheid={$cache.cache_id}&desclang={$desclang|escape}" style="text-decoration:none"><b><span style="color:blue">{$desclang|escape}</span></b></a>
{/foreach}

0 comments on commit 5a8a081

Please sign in to comment.
You can’t perform that action at this time.