Files
Testing/templates/browse_polls.tpl

140 lines
6.6 KiB
Smarty
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
{include file='header.tpl'}
{* $Id: browse_polls.tpl 246 2009-11-14 03:30:06Z phil $ *}
<div class='page_header'><span class="defaultheader">POLLS</span>
</div>
<div style='padding: 7px 10px 7px 10px; background: #000000; border: 1px solid #BBBBBB; margin: 10px 0px 10px 0px; font-weight: bold;'>
<form method="get" name="seBrowseBlogs" action="search.php"><input type="hidden" name="task" value="dosearch">
<input type="hidden" name="t" value="poll">
<input type="hidden" name="p" value="{$p|default:1}" /> <div class="col-md-3 nopadding">
<div class="col-md-3 nopadding">
{lang_print id=643}
</div>
<div class="col-md-5 nopadding">
<input type="text" name="search_text" value="{$search_text}" class="text form-control" />
</div><div class="col-md-3 nopadding">
<input type='submit' class='button form-control' value='{lang_print id=646}' />
</div>
<div class="clearfix"></div>
</div></form>
<div class="col-md-3 nopadding">
<div class="col-md-2 nopadding">
{lang_print id=1500032}
</div>
<div class="col-md-9 nopadding">
<select class='small form-control' name='v' onchange="window.location.href='browse_polls.php?s={$s}&v='+this.options[this.selectedIndex].value;">
<option value='0'{if $v == "0"} SELECTED{/if}>{lang_print id=2500103}</option>
{if $user->user_exists}<option value='1'{if $v == "1"} SELECTED{/if}>{lang_print id=2500104}</option>{/if}
</select>
</div><div class="clearfix"></div>
</div><div class="col-md-5 nopadding">
<div class="col-md-2 nopadding">
{lang_print id=1500033}
</div>
<div class="col-md-5 nopadding">
<select class='small form-control' name='s' onchange="window.location.href='browse_polls.php?v={$v}&s='+this.options[this.selectedIndex].value;">
<option value='poll_datecreated DESC'{if $s == "poll_datecreated DESC"} SELECTED{/if}>{lang_print id=2500105}</option>
<option value='poll_totalvotes DESC'{if $s == "poll_totalvotes DESC"} SELECTED{/if}>{lang_print id=2500106}</option>
<option value='poll_views DESC'{if $s == "poll_views DESC"} SELECTED{/if}>{lang_print id=2500107}</option>
</select>
</div>
</div><div class="clearfix"></div>
</div>
{* DISPLAY PAGINATION MENU IF APPLICABLE *}
{if $maxpage > 1}
<div class='browse_pages'>
{if $p != 1}<a href="{$smarty.server.PHP_SELF}?s={$s}&v={$v}&p=1"><span class="white arrow">&#171;</span></a> <a href='{$smarty.server.PHP_SELF}?s={$s}&v={$v}&p={math equation='p-1' p=$p}'><span class="white arrow">&#8249;</span></a>{else}<font class='disabled'><span class="white arrow">&#171; &#8249;</span></font>{/if}
| {foreach from=$for item=foo}
<a href='{$smarty.server.PHP_SELF}?s={$s}&v={$v}&p={$foo}'>{$foo}</a>
{/foreach} |
{if $p != $maxpage}<a href='{$smarty.server.PHP_SELF}?s={$s}&v={$v}&p={math equation='p+1' p=$p}'><span class="white arrow">&#8250;</span></a> <a href="{$smarty.server.PHP_SELF}?s={$s}&v={$v}&p={$maxpage}"><span class="white arrow">&#187;</span></a>{else}<font class='disabled'><span class="white arrow">&#8250; &#187;</span></font>{/if}
<br /><span style="font-weight:normal;">{if $p_start == $p_end}
{lang_sprintf id=184 1=$p_start 2=$total_polls}
{else}
{lang_sprintf id=185 1=$p_start 2=$p_end 3=$total_polls}
{/if}</span><br />
<form>Go to Page: <input type="text" name="p" class="gotext" /><input type="hidden" name="s" value="{$s}" /><input type="hidden" name="v" value="{$v}" /><input type="submit" value="Go" /></form>
</div>
{/if}
<div class="insidesearch">
{section name=poll_loop loop=$polls}
<div class='polls_browse_item col-md-6 '>
<table cellpadding='0' cellspacing='0'>
<tr>
<td style='vertical-align: top; padding-left: 0px;'>
<div style='font-weight: bold; font-size: 13px;'>
<!--<img src="./images/icons/poll_poll16.gif" class='button' style='float: left;'>-->
<a href='{$url->url_create("poll", $polls[poll_loop]->poll_owner->user_info.user_username, $polls[poll_loop]->poll_info.poll_id)}' title="{$polls[poll_loop]->poll_info.poll_title}">{$polls[poll_loop]->poll_info.poll_title|truncate:30:"...":true}</a>
</div>
<div class='polls_browse_date'>
{assign var='poll_datecreated' value=$datetime->time_since($polls[poll_loop]->poll_info.poll_datecreated)}{capture assign="created"}{lang_sprintf id=$poll_datecreated[0] 1=$poll_datecreated[1]}{/capture}
{lang_sprintf id=2500108 1=$created 2=$url->url_create("profile", $polls[poll_loop]->poll_owner->user_info.user_username) 3=$polls[poll_loop]->poll_owner->user_displayname}
</div>
<div style="margin-top: 5px;">
{lang_sprintf id=2500028 1=$polls[poll_loop]->poll_info.poll_totalvotes},
{lang_sprintf id=507 1=$polls[poll_loop]->poll_info.total_comments},
{lang_sprintf id=949 1=$polls[poll_loop]->poll_info.poll_views}
</div>
<div style='margin-top: 10px;'>
{$polls[poll_loop]->poll_info.poll_desc|escape:html|truncate:75:"...":true}
</div>
</td>
</tr>
</table>
</div>
{cycle values=",<div class='clearfix'></div>"}
{/section}
</div>
{if $maxpage > 1}
<div class='browse_pages'>
{if $p != 1}<a href="{$smarty.server.PHP_SELF}?s={$s}&v={$v}&p=1"><span class="white arrow">&#171;</span></a> <a href='{$smarty.server.PHP_SELF}?s={$s}&v={$v}&p={math equation='p-1' p=$p}'><span class="white arrow">&#8249;</span></a>{else}<font class='disabled'><span class="white arrow">&#171; &#8249;</span></font>{/if}
| {foreach from=$for item=foo}
<a href='{$smarty.server.PHP_SELF}?s={$s}&v={$v}&p={$foo}'>{$foo}</a>
{/foreach} |
{if $p != $maxpage}<a href='{$smarty.server.PHP_SELF}?s={$s}&v={$v}&p={math equation='p+1' p=$p}'><span class="white arrow">&#8250;</span></a> <a href="{$smarty.server.PHP_SELF}?s={$s}&v={$v}&p={$maxpage}"><span class="white arrow">&#187;</span></a>{else}<font class='disabled'><span class="white arrow">&#8250; &#187;</span></font>{/if}
<br /><span style="font-weight:normal;">{if $p_start == $p_end}
{lang_sprintf id=184 1=$p_start 2=$total_polls}
{else}
{lang_sprintf id=185 1=$p_start 2=$p_end 3=$total_polls}
{/if}</span><br />
<form>Go to Page: <input type="text" name="p" class="gotext" /><input type="hidden" name="s" value="{$s}" /><input type="hidden" name="v" value="{$v}" /><input type="submit" value="Go" /></form>
</div>
{/if}
{include file='footer.tpl'}