正在显示
5 个修改的文件
包含
66 行增加
和
2 行删除
@@ -42,6 +42,7 @@ class AdminRegionGalleryController extends AdminBaseController | @@ -42,6 +42,7 @@ class AdminRegionGalleryController extends AdminBaseController | ||
42 | $categoryTree = $portalCategoryModel->adminCategoryTree($categoryId); | 42 | $categoryTree = $portalCategoryModel->adminCategoryTree($categoryId); |
43 | $this->assign('start_time', isset($param['start_time']) ? $param['start_time'] : ''); | 43 | $this->assign('start_time', isset($param['start_time']) ? $param['start_time'] : ''); |
44 | $this->assign('end_time', isset($param['end_time']) ? $param['end_time'] : ''); | 44 | $this->assign('end_time', isset($param['end_time']) ? $param['end_time'] : ''); |
45 | + $this->assign('post_title', isset($param['post_title']) ? $param['post_title'] : ''); | ||
45 | $this->assign('articles', $articles); | 46 | $this->assign('articles', $articles); |
46 | $this->assign('category_tree', $categoryTree); | 47 | $this->assign('category_tree', $categoryTree); |
47 | $this->assign('category', $categoryId); | 48 | $this->assign('category', $categoryId); |
@@ -15,8 +15,10 @@ use think\Validate; | @@ -15,8 +15,10 @@ use think\Validate; | ||
15 | class AdminRegionGalleryValidate extends Validate | 15 | class AdminRegionGalleryValidate extends Validate |
16 | { | 16 | { |
17 | protected $rule = [ | 17 | protected $rule = [ |
18 | + 'post_title' => 'require', | ||
18 | ]; | 19 | ]; |
19 | protected $message = [ | 20 | protected $message = [ |
21 | + 'post_title.require' => '文章标题不能为空!', | ||
20 | ]; | 22 | ]; |
21 | 23 | ||
22 | protected $scene = [ | 24 | protected $scene = [ |
@@ -38,8 +38,23 @@ | @@ -38,8 +38,23 @@ | ||
38 | <table class="table table-bordered"> | 38 | <table class="table table-bordered"> |
39 | <input class="form-control" type="hidden" value="{$categories}" name="post[categories]" | 39 | <input class="form-control" type="hidden" value="{$categories}" name="post[categories]" |
40 | id="js-categories-id-input"/> | 40 | id="js-categories-id-input"/> |
41 | + <tr width="100"> | ||
42 | + <th width="100">标题<span class="form-required">*</span></th> | ||
43 | + <td> | ||
44 | + <input class="form-control" type="text" name="post[post_title]" | ||
45 | + id="title" required value="" placeholder="请输入标题"/> | ||
46 | + </td> | ||
47 | + </tr> | ||
48 | + <tr> | ||
49 | + <th>相册<span class="form-required">*</span></th> | ||
50 | + <td> | ||
51 | + <ul id="photos" class="pic-list list-unstyled form-inline"></ul> | ||
52 | + <a href="javascript:uploadMultiImage('图片上传','#photos','photos-item-tpl');" | ||
53 | + class="btn btn-default btn-sm">选择图片</a> | ||
54 | + </td> | ||
55 | + </tr> | ||
41 | <tr> | 56 | <tr> |
42 | - <th width="100">权重</th> | 57 | + <th>权重</th> |
43 | <td> | 58 | <td> |
44 | <input class="form-control" type="number" name="post[weigh]" value="0"> | 59 | <input class="form-control" type="number" name="post[weigh]" value="0"> |
45 | </td> | 60 | </td> |
@@ -43,7 +43,41 @@ | @@ -43,7 +43,41 @@ | ||
43 | <input class="form-control" type="hidden" value="{$categories}" name="post[categories]" | 43 | <input class="form-control" type="hidden" value="{$categories}" name="post[categories]" |
44 | id="js-categories-id-input"/> | 44 | id="js-categories-id-input"/> |
45 | <tr> | 45 | <tr> |
46 | - <th width="100">权重</th> | 46 | + <th width="100">标题<span class="form-required">*</span></th> |
47 | + <td> | ||
48 | + <input class="form-control" type="text" name="post[post_title]" | ||
49 | + required value="{$post.post_title}" placeholder="请输入标题"/> | ||
50 | + </td> | ||
51 | + </tr> | ||
52 | + <tr> | ||
53 | + <th>相册<span class="form-required">*</span></th> | ||
54 | + <td> | ||
55 | + <ul id="photos" class="pic-list list-unstyled form-inline"> | ||
56 | + <notempty name="post.more.photos"> | ||
57 | + <foreach name="post.more.photos" item="vo"> | ||
58 | + <php>$img_url=cmf_get_image_preview_url($vo['url']);</php> | ||
59 | + <li id="saved-image{$key}"> | ||
60 | + <input id="photo-{$key}" type="hidden" name="photo_urls[]" | ||
61 | + value="{$vo.url}"> | ||
62 | + <input class="form-control" id="photo-{$key}-name" type="text" | ||
63 | + name="photo_names[]" | ||
64 | + value="{$vo.name|default=''}" style="width: 200px;" title="图片名称"> | ||
65 | + <img id="photo-{$key}-preview" | ||
66 | + src="{:cmf_get_image_preview_url($vo['url'])}" | ||
67 | + style="height:36px;width: 36px;" | ||
68 | + onclick="parent.imagePreviewDialog(this.src);"> | ||
69 | + <a href="javascript:uploadOneImage('图片上传','#photo-{$key}');">替换</a> | ||
70 | + <a href="javascript:(function(){$('#saved-image{$key}').remove();})();">移除</a> | ||
71 | + </li> | ||
72 | + </foreach> | ||
73 | + </notempty> | ||
74 | + </ul> | ||
75 | + <a href="javascript:uploadMultiImage('图片上传','#photos','photos-item-tpl');" | ||
76 | + class="btn btn-sm btn-default">选择图片</a> | ||
77 | + </td> | ||
78 | + </tr> | ||
79 | + <tr> | ||
80 | + <th>权重</th> | ||
47 | <td> | 81 | <td> |
48 | <input class="form-control" type="number" name="post[weigh]" value="{$post.weigh}"> | 82 | <input class="form-control" type="number" name="post[weigh]" value="{$post.weigh}"> |
49 | </td> | 83 | </td> |
@@ -12,6 +12,10 @@ | @@ -12,6 +12,10 @@ | ||
12 | <!--<option value='0'>全部</option>--> | 12 | <!--<option value='0'>全部</option>--> |
13 | <!--{$category_tree|default=''}--> | 13 | <!--{$category_tree|default=''}--> |
14 | <!--</select> --> | 14 | <!--</select> --> |
15 | + 标题: | ||
16 | + <input type="text" class="form-control" name="post_title" | ||
17 | + value="{$post_title|default=''}" | ||
18 | + style="width: 140px;"> | ||
15 | 时间: | 19 | 时间: |
16 | <input type="text" class="form-control js-bootstrap-datetime" name="start_time" | 20 | <input type="text" class="form-control js-bootstrap-datetime" name="start_time" |
17 | value="{$start_time|default=''}" | 21 | value="{$start_time|default=''}" |
@@ -37,6 +41,7 @@ | @@ -37,6 +41,7 @@ | ||
37 | <!--<th width="50">{:lang('SORT')}</th>--> | 41 | <!--<th width="50">{:lang('SORT')}</th>--> |
38 | <!--</notempty>--> | 42 | <!--</notempty>--> |
39 | <th width="50">ID</th> | 43 | <th width="50">ID</th> |
44 | + <th width="200">标题</th> | ||
40 | <th width="100">缩略图</th> | 45 | <th width="100">缩略图</th> |
41 | <th width="65">点击量</th> | 46 | <th width="65">点击量</th> |
42 | <th width="130">创建时间</th> | 47 | <th width="130">创建时间</th> |
@@ -59,6 +64,13 @@ | @@ -59,6 +64,13 @@ | ||
59 | <!--</notempty>--> | 64 | <!--</notempty>--> |
60 | <td><b>{$vo.id}</b></td> | 65 | <td><b>{$vo.id}</b></td> |
61 | <td> | 66 | <td> |
67 | + <notempty name="category"> | ||
68 | + {$vo.post_title} | ||
69 | + <else/> | ||
70 | + {$vo.post_title} | ||
71 | + </notempty> | ||
72 | + </td> | ||
73 | + <td> | ||
62 | <notempty name="vo.more.thumbnail"> | 74 | <notempty name="vo.more.thumbnail"> |
63 | <a href="javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($vo.more.thumbnail)}');"> | 75 | <a href="javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($vo.more.thumbnail)}');"> |
64 | <i class="fa fa-photo fa-fw"></i> | 76 | <i class="fa fa-photo fa-fw"></i> |
-
请 注册 或 登录 后发表评论