navbar.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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="search">
  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="dt">
  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: 'dd-mm-yy'});
  49. $( "#dt_list" ).datepicker( "setDate", "<?=date("d-m-Y", $setdate)?>" );
  50. } );
  51. </script>
  52. <!-- Right navbar links -->
  53. <ul class="navbar-nav ml-auto">
  54. <!-- Messages Dropdown Menu -->
  55. <li class="nav-item dropdown">
  56. <a class="nav-link" data-toggle="dropdown" href="#">
  57. <i class="far fa-comments"></i>
  58. <span class="badge badge-danger navbar-badge" id="user_active_count"></span>
  59. </a>
  60. <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
  61. <div id="user_active"></div>
  62. <a href="/manager/spy/view" class="dropdown-item dropdown-footer">Смотреть подробности</a>
  63. </div>
  64. </li>
  65. <!-- Notifications Dropdown Menu -->
  66. <li class="nav-item dropdown">
  67. <a class="nav-link" data-toggle="dropdown" href="#">
  68. <i class="far fa-bell"></i>
  69. <span class="badge badge-warning navbar-badge">15</span>
  70. </a>
  71. <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
  72. <span class="dropdown-header">15 Notifications</span>
  73. <div class="dropdown-divider"></div>
  74. <a href="#" class="dropdown-item">
  75. <i class="fas fa-envelope mr-2"></i> 4 new messages
  76. <span class="float-right text-muted text-sm">3 mins</span>
  77. </a>
  78. <div class="dropdown-divider"></div>
  79. <a href="#" class="dropdown-item">
  80. <i class="fas fa-users mr-2"></i> 8 friend requests
  81. <span class="float-right text-muted text-sm">12 hours</span>
  82. </a>
  83. <div class="dropdown-divider"></div>
  84. <a href="#" class="dropdown-item">
  85. <i class="fas fa-file mr-2"></i> 3 new reports
  86. <span class="float-right text-muted text-sm">2 days</span>
  87. </a>
  88. <div class="dropdown-divider"></div>
  89. <a href="#" class="dropdown-item dropdown-footer">See All Notifications</a>
  90. </div>
  91. </li>
  92. <li class="nav-item">
  93. <?= Html::a('<i class="fas fa-sign-out-alt"></i>', ['/site/logout'], ['data-method' => 'post', 'class' => 'nav-link']) ?>
  94. </li>
  95. <li class="nav-item">
  96. <a class="nav-link" data-widget="fullscreen" href="#" role="button">
  97. <i class="fas fa-expand-arrows-alt"></i>
  98. </a>
  99. </li>
  100. <li class="nav-item">
  101. <a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#" role="button">
  102. <i class="fas fa-th-large"></i>
  103. </a>
  104. </li>
  105. </ul>
  106. </nav>
  107. <!-- /.navbar -->