navbar.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. use yii\helpers\Html;
  3. ?>
  4. <!-- Navbar -->
  5. <nav class="main-header navbar navbar-expand navbar-white navbar-light">
  6. <!-- Left navbar links -->
  7. <ul class="navbar-nav">
  8. <li class="nav-item">
  9. <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
  10. </li>
  11. <li class="nav-item d-none d-sm-inline-block">
  12. <a href="<?=\yii\helpers\Url::home()?>" class="nav-link">amic.ru</a>
  13. </li>
  14. </ul>
  15. <!-- SEARCH FORM -->
  16. <form class="form-inline ml-3">
  17. <div class="input-group input-group-sm">
  18. <input class="form-control form-control-navbar" type="search" placeholder="Search" aria-label="Search" name="CommentsSearch[message]">
  19. <div class="input-group-append">
  20. <button class="btn btn-navbar" type="submit">
  21. <i class="fas fa-search"></i>
  22. </button>
  23. </div>
  24. </div>
  25. </form>
  26. <form class="form-inline ml-3">
  27. <div class="input-group input-group-sm">
  28. <div class="input-group-prepend">
  29. <span class="input-group-text" id="basic-addon1"> <i class="fa fa-calendar"></i></span>
  30. </div>
  31. <input type="text" id="dt_list" class="col-auto" placeholder="Дата" aria-label="Дата" aria-describedby="basic-addon1" value="" name="CommentsSearch[created_at]">
  32. <div class="input-group-append">
  33. <button class="btn btn-outline-secondary" type="submit" id="go"><i class="fas fa-sync"></i></button>
  34. </div>
  35. </div>
  36. </form>
  37. <script>
  38. <?
  39. if( $get = Yii::$app->session->get('dt-newslistadm') ){
  40. $get=strtotime($get);
  41. }else{
  42. $get = time();
  43. }
  44. $setdate = (isset($_GET['dt']))?strtotime($_GET['dt']):$get;
  45. ?>
  46. $( function() {
  47. $( "#dt_list" ).datepicker();
  48. $( "#dt_list" ).datepicker("option",{ dateFormat: 'yy-mm-dd'});
  49. $( "#dt_list" ).datepicker( "setDate", "<?=date("Y-m-d", $setdate)?>" );
  50. } );
  51. </script>
  52. <!-- Right navbar links -->
  53. <ul class="navbar-nav ml-auto">
  54. <li class="nav-item">
  55. <?= Html::a('<i class="fas fa-sign-out-alt"></i>', ['/site/logout'], ['data-method' => 'post', 'class' => 'nav-link']) ?>
  56. </li>
  57. <li class="nav-item">
  58. <a class="nav-link" data-widget="fullscreen" href="#" role="button">
  59. <i class="fas fa-expand-arrows-alt"></i>
  60. </a>
  61. </li>
  62. </ul>
  63. </nav>
  64. <!-- /.navbar -->