Permalink
Switch branches/tags
Find file
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (39 sloc) 2.06 KB
{*
* @param DatePaginator $paginator
*}
{if $paginator->days > 1}
<div class="date-paginator btn-toolbar">
<div class="btn-group">
{if $paginator->isOldest()}
<span class="btn disabled"><i class="icon-fast-backward"></i> {$paginator->getOldestDate()|date:$paginator->getFormatString()}</span>
{else}
<a n:href="this, 'date' => $paginator->getOldestDate()->format('Y-m-d')" class="btn"><i class="icon-fast-backward"></i> {$paginator->getOldestDate()|date:$paginator->getFormatString()}</a>
{/if}
{if $paginator->isOldest()}
<span class="btn disabled"><i class="icon-step-backward"></i> {$paginator->getPreviousDate()|date:$paginator->getFormatString()}</span>
{else}
<a n:href="this, 'date' => $paginator->getPreviousDate()->format('Y-m-d')" class="btn"><i class="icon-step-backward"></i> {$paginator->getPreviousDate()|date:$paginator->getFormatString()}</a>
{/if}
</div>
<div class="btn-group" style="top: -0.8em;">
{form dateForm class => 'form-inline'}
<div n:if="$form->hasErrors()" n:foreach="$form->errors as $error"class="alert alert-error">{$error}</div>
<div class="input-append date">
{input paginatorDate class => "input-small"}<span class="add-on"><i class="icon-calendar"></i></span>
</div>
{/form dateForm}
</div>
<div class="btn-group">
{if $paginator->isNewest()}
<span class="btn disabled">{$paginator->getNextDate()|date:$paginator->getFormatString()} <i class="icon-step-forward"></i></span>
{else}
<a n:href="this, 'date' => $paginator->getNextDate()->format('Y-m-d')" class="btn">{$paginator->getNextDate()|date:$paginator->getFormatString()} <i class="icon-step-forward"></i></a>
{/if}
{if $paginator->isNewest()}
<span class="btn disabled">{$paginator->getNewestDate()|date:$paginator->getFormatString()} <i class="icon-fast-forward"></i></span>
{else}
<a n:href="this, 'date' => $paginator->getNewestDate()->format('Y-m-d')" class="btn">{$paginator->getNewestDate()|date:$paginator->getFormatString()} <i class="icon-fast-forward"></i></a>
{/if}
</div>
</div>
{/if}