| xqd
@@ -56,25 +56,16 @@
|
|
|
<td><img src="{{ $item->pic_url }}" width="50"/></td>
|
|
|
<td>{{ $item->created_at }}</td>
|
|
|
<td>
|
|
|
- <div class="btn-group">
|
|
|
- <button data-toggle="dropdown"
|
|
|
- class="btn btn-warning btn-sm dropdown-toggle"
|
|
|
- aria-expanded="false">
|
|
|
- 操作 <span class="caret"></span>
|
|
|
- </button>
|
|
|
- <ul class="dropdown-menu">
|
|
|
-
|
|
|
-
|
|
|
- @if(role('Album/Cat/update'))
|
|
|
- <li><a href="{{ U('Album/Cat/update',['id'=>$item->id])}}" class="font-bold">修改</a></li>
|
|
|
- @endif
|
|
|
-
|
|
|
- @if(role('Album/Cat/destroy'))
|
|
|
- <li class="divider"></li>
|
|
|
- <li><a href="{{ U('Album/Cat/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
|
|
|
- @endif
|
|
|
-
|
|
|
- </ul>
|
|
|
+ <div class="pull-left">
|
|
|
+ @if(role('Album/Cat/update'))
|
|
|
+ <a href="{{ U('Album/Cat/update',['id'=>$t->id])}}" class="btn btn-sm btn-warning pull-right">修改</a>
|
|
|
+ @endif
|
|
|
+ @if(role('Album/Cat/destroy'))
|
|
|
+ <a href="{{ U('Album/Cat/destroy',['id'=>$t->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
|
|
|
+ @endif
|
|
|
+ @if(isset($item->sonlist))
|
|
|
+ <a onclick="showHidden({{ $item->id }})" class="btn btn-sm btn-danger pull-right">查看/隐藏下级次啊单</a>
|
|
|
+ @endif
|
|
|
</div>
|
|
|
{{--@if(role('Album/Cat/view'))
|
|
|
<button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/Cat/view',['id'=>$item->id])}}'});" class="btn btn-primary ">查看</button>
|
| xqd
@@ -83,7 +74,7 @@
|
|
|
</tr>
|
|
|
@if(isset($item->sonlist))
|
|
|
@foreach($item->sonlist as $k => $t)
|
|
|
- <tr style="background-color: #f9f9f9;">
|
|
|
+ <tr style="background-color: #f9f9f9;" id="son{{ $item->id }}">
|
|
|
<td>{{ $t->id }}</td>
|
|
|
<td>{{ $t->name }}</td>
|
|
|
<td>{{ $t->level }}</td>
|
| xqd
@@ -125,4 +116,10 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+<script>
|
|
|
+ function showHidden(id){
|
|
|
+ $("#son"+id).toggle();
|
|
|
+ }
|
|
|
+</script>
|
|
|
@endsection
|