tab.blade.php 1.6 KB

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