nav-bar-form-component.blade.php_230117 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. <ul class="navbar-nav align-items-center d-flex flex-column flex-md-row">
  2. <li class="mx-0 mr-md-2 mb-2 mb-md-0 w-100 w-md-auto">
  3. <a href="/" target="_blank">{{ $form['FormVars']['Title']['Home'] }}</a>
  4. </li>
  5. <li class="mx-0 mr-md-2 mb-2 mb-md-0 w-100 w-md-auto">
  6. <button type="button" class="btn btn-outline-primary w-100 w-md-auto" onclick="clear_cache()">{{ $form['FormVars']['Title']['ClearCache'] }}</button>
  7. </li>
  8. <li class="mx-0 mr-md-2 mb-2 mb-md-0 nav-item dropdown dropdown-user">
  9. <a href="{{ route('user-logout') }}"><i class="icon-switch2"></i>&nbsp;{{ $form['FormVars']['Title']['Logout'] }}</a>
  10. </li>
  11. <li class="nav-item dropdown dropdown-user mx-0 mr-md-2 ml-md-3 w-100 w-md-auto mb-2 mb-md-0">
  12. <select class="select w-100 w-md-auto" onchange="window.location.href='/country-code?code='+this.value">
  13. @foreach(config('constants.countries') ?? [] as $country)
  14. <option {{ session('user.CountryCode') == $country ? 'selected' : '' }}
  15. value="{{ $country }}">
  16. {{ config('languages')[strtolower(explode('_', $country)[0])]['isoName'] }}
  17. </option>
  18. @endforeach
  19. </select>
  20. </li>
  21. </ul>
  22. @once
  23. @push('js')
  24. <script>
  25. function clear_cache() {
  26. confirm_message_shw_and_delete(function() {
  27. window.location.href = '{{ route('user.clear.cache') }}';
  28. })
  29. }
  30. </script>
  31. @endpush
  32. @endonce