navbar.blade.php 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <!-- Main navbar -->
  2. <div class="head_nav navbar navbar-expand-md navbar-dark pr-0">
  3. <div class="navbar-brand">
  4. <a href="{{ route('dashboard') }}" class="d-inline-block"><img src="{{ asset('/images/logo.png') }}" alt=""></a>
  5. </div>
  6. <div class="position-relative d-flex flex-wrap flex-1 align-items-center px-2">
  7. <div class="nav_wrap">
  8. <button class="btn" type="button" data-toggle="collapse" data-target="#navbar-mobile">
  9. <i class="icon-tree5"></i>
  10. </button>
  11. <button class="btn sidebar-mobile-main-toggle" type="button">
  12. <i class="icon-paragraph-justify3"></i>
  13. </button>
  14. </div>
  15. <div class="collapse navbar-collapse show" id="navbar-mobile">
  16. <ul class="navbar-nav">
  17. <li class="nav-item btn_left_collapse">
  18. <a href="#" id="sidebar-main" class="navbar-nav-link sidebar-control sidebar-main-toggle">
  19. <i class="icon-paragraph-justify3"></i>
  20. </a>
  21. </li>
  22. <!-- 언어변환 셀렉트 시작 -->
  23. <li class="sel_lang nav-item dropdown dropdown-user mx-0 mr-md-2 w-100 w-md-auto mb-2 mb-md-0">
  24. <select class="select w-100 w-md-auto bg-dark-100 select-sm" onchange="window.location.href='/country-code?code='+this.value">
  25. @foreach(config('constants.countries') ?? [] as $country)
  26. <option {{ session('user.CountryCode') == $country ? 'selected' : '' }}
  27. value="{{ $country }}">
  28. {{ config('languages')[strtolower(explode('_', $country)[0])]['isoName'] }}
  29. </option>
  30. @endforeach
  31. </select>
  32. </li>
  33. <!--// 언어변환 셀렉트 끝 -->
  34. </ul>
  35. <span class="badge ml-md-3 mr-md-auto d-none d-md-flex">&nbsp</span>
  36. <x-nav-bar-form-component />
  37. </div>
  38. <div class="head_right d-md-flex">
  39. <ul class="navbar-nav align-items-center right-extend">
  40. <li class="nav-item">
  41. <button type="button" class="btn toggle-full-screen">
  42. <i class="fas fa-expand-arrows-alt"></i>
  43. </button>
  44. </li>
  45. <!-- sort 메뉴 -->
  46. <li class="nav_sort nav-item dropdown">
  47. <button type="button" class="btn dropdown-toggle" id="navSortButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  48. <i class="fas fa-th-large" style="font-size:17px;"></i>
  49. </button>
  50. <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navSortButton">
  51. <x-sort-menu-component />
  52. {{-- <a class="dropdown-item" href="#">--}}
  53. {{-- <span class="icon bg-blue"><i class="fas fa-sitemap"></i></span>--}}
  54. {{-- 메뉴1--}}
  55. {{-- </a>--}}
  56. {{-- <a class="dropdown-item" href="#">--}}
  57. {{-- <span class="icon bg-green"><i class="fas fa-layer-group"></i></span>--}}
  58. {{-- 메뉴2-일이삼사오육칠팔--}}
  59. {{-- </a>--}}
  60. {{-- <a class="dropdown-item" href="#">--}}
  61. {{-- <span class="icon bg-warning"><i class="fab fa-sellsy"></i></span>--}}
  62. {{-- 메뉴<br/>--}}
  63. {{-- 일이삼사오육칠팔--}}
  64. {{-- </a>--}}
  65. {{-- <a class="dropdown-item" href="#">--}}
  66. {{-- <span class="icon bg-indigo"><i class="fas fa-sitemap"></i></span>--}}
  67. {{-- 메뉴4--}}
  68. {{-- </a>--}}
  69. {{-- <a class="dropdown-item" href="#">--}}
  70. {{-- <span class="icon bg-pink"><i class="fas fa-layer-group"></i></span>--}}
  71. {{-- 메뉴5--}}
  72. {{-- </a>--}}
  73. {{-- <a class="dropdown-item" href="#">--}}
  74. {{-- <span class="icon bg-yellow"><i class="fab fa-sellsy"></i></span>--}}
  75. {{-- 메뉴6--}}
  76. {{-- </a>--}}
  77. {{-- <a class="dropdown-item" href="#">--}}
  78. {{-- <span class="icon bg-blue"><i class="fas fa-sitemap"></i></span>--}}
  79. {{-- 메뉴7--}}
  80. {{-- </a>--}}
  81. {{-- <a class="dropdown-item" href="#">--}}
  82. {{-- <span class="icon bg-green"><i class="fas fa-layer-group"></i></span>--}}
  83. {{-- 메뉴8 - 메뉴가 추가됩니다.--}}
  84. {{-- </a>--}}
  85. </div>
  86. </li>
  87. <!--// sort 메뉴 끝 -->
  88. <li class="nav-item">
  89. <button type="button" class="btn sidebar-control sidebar-right-toggle">
  90. <i class="fas fa-sticky-note" style="font-size:16px;"></i>
  91. </button>
  92. </li>
  93. <li class="mx-0 mr-md-2 mb-2 mb-md-0 w-100 w-md-auto">
  94. <div class="media profile position-relative">
  95. <a href="#" class="dropdown-toggle" id="dropdownPermMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  96. <i class="fas fa-user-lock" style="font-size:17px;"></i>
  97. </a>
  98. <div class="dropdown-menu dropdown-menu-right" style="min-width: 4.5rem;" aria-labelledby="dropdownPermMenuButton">
  99. <div class="dropdown-item d-flex align-items-start flex-column">
  100. <div class="{{ session('user.MenuPermission.is_list') === '1' ? '' : 'my-line-through' }}">List</div>
  101. <div class="{{ session('user.MenuPermission.is_read') === '1' ? '' : 'my-line-through' }}">Read</div>
  102. <div class="{{ session('user.MenuPermission.is_create') === '1' ? '' : 'my-line-through' }}">Create</div>
  103. <div class="{{ session('user.MenuPermission.is_update') === '1' ? '' : 'my-line-through' }}">Update</div>
  104. <div class="{{ session('user.MenuPermission.is_delete') === '1' ? '' : 'my-line-through' }}">Delete</div>
  105. </div>
  106. </div>
  107. </div>
  108. </li>
  109. </ul>
  110. </div>
  111. <!-- 서치박스 시작 -->
  112. <div class="m_searchbox">
  113. <div>
  114. <div>
  115. <input type="text" id="user-menu-search" placeholder="User Menu Search And Move">
  116. <button type="button" onclick="user_menu_search_and_move($('#user-menu-search').val())"><i class="fas fa-search"></i></button>
  117. </div>
  118. {{-- <div class="collapse" id="collapseExample">--}}
  119. {{-- <a href="#">검색 결과가 나옵니다. 검색 결과가 나옵니다.</a>--}}
  120. {{-- <a href="#">검색 결과가 나옵니다. 검색 결과가 나옵니다.</a>--}}
  121. {{-- <a href="#">검색 결과가 나옵니다. 검색 결과가 나옵니다.</a>--}}
  122. {{-- <a href="#">검색 결과가 나옵니다. 검색 결과가 나옵니다.</a>--}}
  123. {{-- </div>--}}
  124. </div>
  125. </div>
  126. <!--// 서치박스 끝 -->
  127. </div>
  128. </div>
  129. <!-- /main navbar -->
  130. @push('js')
  131. <script>
  132. $(document).ready(function () {
  133. $('#user-menu-search').on('keyup',function(key){
  134. if(key.keyCode === 13) {
  135. user_menu_search_and_move($(this).val())
  136. this.blur()
  137. }
  138. });
  139. $('#user-menu-search').autocomplete({
  140. source: menuPages
  141. .filter(menu => menu['PageUri'])
  142. .map(menu => {
  143. return { code: menu['MenuCode'], value: menu['MenuName'] }
  144. }),
  145. focus: function (event, ui) {
  146. return false;
  147. },
  148. select: function (event, ui) {
  149. user_menu_search_and_move(ui['item']['value'])
  150. },
  151. minLength: 1,
  152. delay: 100,
  153. autoFocus: false,
  154. });
  155. });
  156. function user_menu_search_and_move(menu_name) {
  157. const search_menu = menuPages.filter(menu => menu['MenuName'] === menu_name)
  158. if (isEmpty(search_menu)) {
  159. return iziToast.error({
  160. title: 'Error', message: '존재하지 않는 메뉴명',
  161. });
  162. }
  163. const menu = search_menu[0]
  164. const url = menu['PageUri'] + '?bpa=' + menu['bpa']
  165. return window.location = url
  166. }
  167. </script>
  168. @endpush