<?php for ($i = 1; $i <= $maxPages; $i++) { ?> <li<?php echo $i == $page ? ' class="active"' : ''; ?> ><a href="<?php echo Unit::generateLink(['page' => $i]); ?> "><?php echo $i; ?> </a></li> <?php } ?> <li<?php echo $maxPages == $page ? ' class="disabled"' : ''; ?> > <a href="<?php echo Unit::generateLink(['page' => $maxPages]); ?> " aria-label="last"> <span aria-hidden="true">»</span> </a> </li> </ul> </nav> <?php }
<?php use controller\UnitController as Unit; ?> <div class="row"> <div class="col-xs-12"> <label>Order by:</label> <label><a href="<?php echo Unit::generateLink(['sort' => 'name']); ?> ">Name</a></label> <span style="margin: 0 3px;">|</span> <label><a href="<?php echo Unit::generateLink(['sort' => 'original']); ?> ">Original name</a></label> <span style="margin: 0 3px;">|</span> <label><a href="<?php echo Unit::generateLink(['sort' => 'rarity']); ?> ">Rarity</a></label> </div> </div>
<?php use controller\UnitController; ?> <div class="container-fluid"> <form class="navbar-form navbar-right" action="<?php echo Main::$app->router->pathFor('home'); ?> " style="display:inline-block" role="search"> <div class="input-group"> <input type="text" class="form-control" placeholder="Search" name="q" value="<?php echo UnitController::getSearchQuery(); ?> "> <div class="input-group-btn"> <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button> <button type="button" class="btn btn-default" data-placement="bottom" data-toggle="popover" title="how to use search form" data-container="body" data-content="You can use in search form: <namespace>:<value> || avaible namespaces: name, rarity, original || example: iris rarity:gold || You can also use: male(for male units), dmm(for only dmm units), nutaku(for nutaku units)"> <span class="glyphicon glyphicon-question-sign"></span> </button> <a href="<?php echo Main::$app->router->pathFor('oauth'); ?> " role="button" class="btn btn-default"><span class="glyphicon glyphicon-log-in"></span></a> </div> </div> </form> </div>