tab.blade.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. <div {!! $attributes !!}>
  2. <ul class="nav nav-tabs nav-tabs">
  3. @foreach($tabs as $id => $tab)
  4. @if($tab['type'] == \Encore\Admin\Widgets\Tab::TYPE_CONTENT)
  5. <li {{ $id == $active ? 'class=active' : '' }}><a href="#tab_{{ $tab['id'] }}" data-toggle="tab">{{ $tab['title'] }}</a></li>
  6. @elseif($tab['type'] == \Encore\Admin\Widgets\Tab::TYPE_LINK)
  7. <li {{ $id == $active ? 'class=active' : '' }}><a href="{{ $tab['href'] }}">{{ $tab['title'] }}</a></li>
  8. @endif
  9. @endforeach
  10. @if (!empty($dropDown))
  11. <li class="dropdown">
  12. <a class="dropdown-toggle" data-toggle="dropdown" href="#">
  13. Dropdown <span class="caret"></span>
  14. </a>
  15. <ul class="dropdown-menu">
  16. @foreach($dropDown as $link)
  17. <li role="presentation"><a role="menuitem" tabindex="-1" href="{{ $link['href'] }}">{{ $link['name'] }}</a></li>
  18. @endforeach
  19. </ul>
  20. </li>
  21. @endif
  22. <li class="pull-right header">{{ $title }}</li>
  23. </ul>
  24. <div class="tab-content">
  25. @foreach($tabs as $id => $tab)
  26. <div class="tab-pane {{ $id == $active ? 'active' : '' }}" id="tab_{{ $tab['id'] }}">
  27. {!! array_get($tab, 'content') !!}
  28. </div>
  29. @endforeach
  30. </div>
  31. </div>