Esempio n. 1
0

<?php 
$presenter = new Illuminate\Pagination\BootstrapPresenter($paginator);
?>

<div class="row">
    <div class="col-md-12">
        <div class="pagination pull-right">
            <?php 
echo $presenter->render();
?>
        </div>
    </div>
</div>
Esempio n. 2
0
<?php

$presenter = new Illuminate\Pagination\BootstrapPresenter($paginator);
$trans = $environment->getTranslator();
?>

<?php 
if ($paginator->getLastPage() > 1) {
    ?>
	<div class="pagination">
		<ul class="pager">
			<?php 
    echo $presenter->getPrevious($trans->trans('pagination.previous'));
    echo $presenter->getNext($trans->trans('pagination.next'));
    ?>
		</ul>
	</div>
<?php 
}
<?php

$presenter = new Illuminate\Pagination\BootstrapPresenter($paginator);
$trans = $environment->getTranslator();
?>

<?php 
if ($paginator->getLastPage() > 1) {
    ?>
	<ul class="pager">
		<?php 
    if ($paginator->getCurrentPage() != '1') {
        echo $presenter->getPrevious('<i class="glyphicon glyphicon-chevron-left"></i>');
    }
    if ($paginator->getCurrentPage() != $paginator->getLastPage()) {
        echo $presenter->getNext('<i class="glyphicon glyphicon-chevron-right"></i>');
    }
    ?>
	</ul>
<?php 
}
Esempio n. 4
0
<?php

$presenter = new Illuminate\Pagination\BootstrapPresenter($paginator);
if ($paginator->getLastPage() > 1) {
    ?>
    <div class="row">
        <div class="col-xs-9">
            <ul class="pagination pagination-sm pull-left">
                <?php 
    /* How many pages need to be shown before and after the current page */
    $showBeforeAndAfter = 2;
    /* Current Page */
    $currentPage = $paginator->getCurrentPage();
    $lastPage = $paginator->getLastPage();
    $firstPage = 1;
    /* Check if the pages before and after the current really exist */
    $start = $currentPage - $showBeforeAndAfter;
    /* 
    Check if first page in pagination goes below 1, and substract that from 
    $showBeforeAndAfter var so the pagination won't start with page 0 or below 
    */
    if ($start < 1) {
        $diff = $start - 1;
        $start = $currentPage - ($showBeforeAndAfter + $diff);
    }
    $end = $currentPage + $showBeforeAndAfter;
    $numEnd = $paginator->getLastPage();
    if ($end > $lastPage) {
        $diff = $end - $lastPage;
        $end = $end - $diff;
    }
Esempio n. 5
0
<?php

$presenter = new Illuminate\Pagination\BootstrapPresenter($paginator);
if ($paginator->getLastPage() > 1) {
    ?>
	
    <ul class="uk-pagination">
        <?php 
    /* How many pages need to be shown before and after the current page */
    $showBeforeAndAfter = 5;
    /* Current Page */
    $currentPage = $paginator->getCurrentPage();
    $lastPage = $paginator->getLastPage();
    /* Check if the pages before and after the current really exist */
    $start = $currentPage - $showBeforeAndAfter;
    if ($start < 1) {
        $diff = $start - 1;
        $start = $currentPage - ($showBeforeAndAfter + $diff);
    }
    $end = $currentPage + $showBeforeAndAfter;
    if ($end > $lastPage) {
        $diff = $end - $lastPage;
        $end = $end - $diff;
    }
    echo $presenter->getPrevious('&lt;&lt;');
    echo $presenter->getPageRange($start, $end);
    echo $presenter->getNext('&gt;&gt;');
    ?>
    </ul>

<?php 
							<td style="text-align:center;">
								@if($venta->valor_comp == 0)
									Sin valorar
								@elseif($venta->valor_comp == 1)
									<i class="fa fa-plus-circle textoPromedio" style="color:green;"></i>
								@elseif($venta->valor_comp == -1)
									<i class="fa fa-minus-circle textoPromedio" style="color:red;"></i>
								@endif
							</td>
						</tr>
					@endforeach
					</tbody>
				</table>
				<nav role="navigation">
		          <?php 
$presenter = new Illuminate\Pagination\BootstrapPresenter($ventas);
?>
		          @if ($ventas->getLastPage() > 1)
		          <ul class="cd-pagination no-space">
		            <?php 
$beforeAndAfter = 2;
//Página actual
$currentPage2 = $ventas->getCurrentPage();
//Última página
$lastPage = $ventas->getLastPage();
//Comprobamos si las páginas anteriores y siguientes de la actual existen
$start = $currentPage2 - $beforeAndAfter;
//Comprueba si la primera página en la paginación está por debajo de 1
//para saber como colocar los enlaces
if ($start < 1) {
    $pos = $start - 1;
Esempio n. 7
0
      @foreach($c->subcat as $s)
        <div>
          <a href="{{ URL::to('articulos/sub-categoria/'.$s->id) }}">
            <img src="{{ asset('images/categorias/'.$s->img) }}">
            <div class="tituloCat">
              <h3>{{ $s->sub_desc }}</h3>
            </div>
          </a>
        </div>
      @endforeach
      </div>
    </div>
    @endforeach
     <nav role="navigation">
          <?php 
$presenter = new Illuminate\Pagination\BootstrapPresenter($pag);
?>
          @if ($pag->getLastPage() > 1)
          <ul class="cd-pagination no-space">
            <?php 
$beforeAndAfter = 2;
//Página actual
$currentPage = $pag->getCurrentPage();
//Última página
$lastPage = $pag->getLastPage();
//Comprobamos si las páginas anteriores y siguientes de la actual existen
$start = $currentPage - $beforeAndAfter;
//Comprueba si la primera página en la paginación está por debajo de 1
//para saber como colocar los enlaces
if ($start < 1) {
    $pos = $start - 1;
<?php

$presenter = new Illuminate\Pagination\BootstrapPresenter($paginator);
$trans = $environment->getTranslator();
if ($paginator->getLastPage() > 1) {
    /* How many pages need to be shown before and after the current page */
    $showBeforeAndAfter = 3;
    /* Current Page */
    $currentPage = $paginator->getCurrentPage();
    $lastPage = $paginator->getLastPage();
    /* Check if the pages before and after the current really exist */
    $start = $currentPage - $showBeforeAndAfter;
    /*
        Check if first page in pagination goes below 1, and substract that from
        $showBeforeAndAfter var so the pagination won't start with page 0 or below
    */
    if ($start < 1) {
        $diff = $start - 1;
        $start = $currentPage - ($showBeforeAndAfter + $diff);
    }
    $end = $currentPage + $showBeforeAndAfter;
    if ($end > $lastPage) {
        $diff = $end - $lastPage;
        $end = $end - $diff;
    }
    ?>

<div class="pager">
    <div class="puls previous">
        <?php 
    echo $presenter->getPrevious('&larr; 前一页');
Esempio n. 9
0
<?php

$presenter = new Illuminate\Pagination\BootstrapPresenter($paginator);
?>

<?php 
if ($paginator->getLastPage() > 1) {
    ?>
    <nav class="text-right"> 
    
        <ul class="pagination">
            <?php 
    echo getPrevious($paginator->getCurrentPage(), $paginator->getUrl($paginator->getCurrentPage() - 1));
    ?>
            <?php 
    echo $presenter->getPageRange(1, $paginator->getLastPage());
    ?>
            <?php 
    echo getNext($paginator->getCurrentPage(), $paginator->getLastPage(), $paginator->getUrl($paginator->getCurrentPage() + 1));
    ?>

        </ul>
        
    </nav>
   
<?php 
}
?>

<?php 
function getPrevious($currentPage, $url)
Esempio n. 10
0
<?php

$presenter = new Illuminate\Pagination\BootstrapPresenter($paginator);
if ($paginator->getLastPage() > 1) {
    echo '<ul class="pagination">' . $presenter->render() . '</ul>';
}