0
0
Files
Babyclass/app/Admin/Views/categories/index.blade.php
2020-08-04 10:09:42 +08:00

111 lines
5.7 KiB
PHP

<div class="pageContent">
<div style="float:left;width:240px;border-right:1px #B8D0D6 solid;">
<div class="pageHeader">
<h2 style="line-height:24px;">分类结构</h2>
</div>
<ul class="tree treeFolder expand" layoutH="36">
@foreach($categoryTree as $category)
<li><a>{{ $category->title }}</a>
@if ($category->children->count())
<ul>
@foreach($category->children as $child)
<li><a href="" title="">{{ $child->title }}</a>
@if ($child->children->count())
<ul>
@foreach($child->children as $son)
<li><a href="" title="">{{ $son->title }}</a></li>
@endforeach
</ul>
@endif
</li>
@endforeach
</ul>
@endif
</li>
@endforeach
</ul>
</div>
<div style="margin-left:245px;border-left:1px #B8D0D6 solid;">
<div class="pageHeader">
<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="{{ url()->current() }}" method="post">
<div class="searchBar">
<table class="searchContent">
<tr>
<td>
分类名称:
<input type="text" name="title" value="{{ Request::input('title') }}"/>
</td>
<td>
<input type="hidden" name="parent_id" value="{{ Request::get('parent_id') }}">
<div class="buttonActive"><div class="buttonContent"><button type="submit">检索结果</button></div></div>
</td>
</tr>
</table>
</div>
</form>
</div>
<div class="panelBar">
<ul class="toolBar">
@if (Request::get('parent_id'))
<li><a class="add" href="{{ route('Admin.categories.create', ['parent_id' => Request::get('parent_id')]) }}" target="dialog" mask="true" width="600" height="400" rel="diaolog_{{ time() }}" title="添加分类"><span>添加分类</span></a></li>
@else
<li><a class="add" href="{{ route('Admin.categories.create') }}" target="dialog" mask="true" width="600" height="400" rel="diaolog_{{ time() }}" title="添加分类"><span>添加分类</span></a></li>
@endif
</ul>
</div>
<table class="table" width="100%" layoutH="112">
<thead>
<tr>
<th width="40">ID</th>
<th width="130">分类名称</th>
<th width="50">排序</th>
<th width="100">是否推荐</th>
<th width="100">推荐排序</th>
<th></th>
<th width="120">创建时间</th>
<th width="120">更新时间</th>
<th width="80"></th>
</tr>
</thead>
<tbody>
@foreach ($categories as $category)
<tr target="sid" rel="{$vo.id}">
<td>{{ $category->id }}</td>
<td><a href="{{ route('Admin.categories.index', ['parent_id' => $category->id]) }}" target="navTab" rel="categories" title="分类管理">{{ $category->title }}</a></td>
<td>{{ $category->sort }}</td>
<td>{{ $category->is_recommend == 1 ? '是' : '否' }}</td>
<td>{{ $category->recommend_sort }}</td>
<td>{{ $category->description }}</td>
<td>{{ $category->created_at }}</td>
<td>{{ $category->updated_at }}</td>
<td>
<a title="编辑" target="dialog" href="{{ route('Admin.categories.edit', $category) }}" rel="dialog_{{ time() }}" mask="true" width="600" height="400" class="btnEdit">编辑</a>
<a title="删除" target="ajaxDelete" href="{{ route('Admin.categories.destroy', $category) }}" class="btnDel">删除</a>
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="panelBar">
<form id="pagerForm" method="post" action="#rel#">
<input type="hidden" name="page" value="{{ $categories->currentPage() }}" />
<input type="hidden" name="numPerPage" value="{{ $categories->perPage() }}" />
<input type="hidden" name="orderField" value="{{ Request::input('orderField') }}" />
<input type="hidden" name="orderDirection" value="{{ Request::input('orderDirection') }}" />
</form>
<div class="pages">
<span>显示</span>
<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
<option @if ($categories->perPage() == 30) selected @endif value="30">30</option>
<option @if ($categories->perPage() == 100) selected @endif value="100">100</option>
<option @if ($categories->perPage() == 200) selected @endif value="200">200</option>
</select>
<span>条,共 {{ $categories->total() }} </span>
</div>
<div class="pagination" targetType="navTab" totalCount="{{ $categories->total() }}" numPerPage="{{ $categories->perPage() }}" pageNumShown="10" currentPage="{{ $categories->currentPage() }}"></div>
</div>
</div>
</div>