切换导航条
此项目
正在载入...
登录
景龙
/
xingqiu
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
jinglong
6 years ago
提交
06ea84894b2664b0ae7b340a07d08dd1bcfeb422
1 个父辈
cea39861
1 个管道 的构建
通过
耗费 0 秒
增加后台画廊相册
变更
5
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
66 行增加
和
2 行删除
app/portal/controller/AdminRegionGalleryController.php
app/portal/validate/AdminRegionGalleryValidate.php
public/themes/admin_simpleboot3/portal/admin_region_gallery/add.html
public/themes/admin_simpleboot3/portal/admin_region_gallery/edit.html
public/themes/admin_simpleboot3/portal/admin_region_gallery/index.html
app/portal/controller/AdminRegionGalleryController.php
查看文件 @
06ea848
...
...
@@ -42,6 +42,7 @@ class AdminRegionGalleryController extends AdminBaseController
$categoryTree
=
$portalCategoryModel
->
adminCategoryTree
(
$categoryId
);
$this
->
assign
(
'start_time'
,
isset
(
$param
[
'start_time'
])
?
$param
[
'start_time'
]
:
''
);
$this
->
assign
(
'end_time'
,
isset
(
$param
[
'end_time'
])
?
$param
[
'end_time'
]
:
''
);
$this
->
assign
(
'post_title'
,
isset
(
$param
[
'post_title'
])
?
$param
[
'post_title'
]
:
''
);
$this
->
assign
(
'articles'
,
$articles
);
$this
->
assign
(
'category_tree'
,
$categoryTree
);
$this
->
assign
(
'category'
,
$categoryId
);
...
...
app/portal/validate/AdminRegionGalleryValidate.php
查看文件 @
06ea848
...
...
@@ -15,8 +15,10 @@ use think\Validate;
class
AdminRegionGalleryValidate
extends
Validate
{
protected
$rule
=
[
'post_title'
=>
'require'
,
];
protected
$message
=
[
'post_title.require'
=>
'文章标题不能为空!'
,
];
protected
$scene
=
[
...
...
public/themes/admin_simpleboot3/portal/admin_region_gallery/add.html
查看文件 @
06ea848
...
...
@@ -38,8 +38,23 @@
<table
class=
"table table-bordered"
>
<input
class=
"form-control"
type=
"hidden"
value=
"{$categories}"
name=
"post[categories]"
id=
"js-categories-id-input"
/>
<tr
width=
"100"
>
<th
width=
"100"
>
标题
<span
class=
"form-required"
>
*
</span></th>
<td>
<input
class=
"form-control"
type=
"text"
name=
"post[post_title]"
id=
"title"
required
value=
""
placeholder=
"请输入标题"
/>
</td>
</tr>
<tr>
<th>
相册
<span
class=
"form-required"
>
*
</span></th>
<td>
<ul
id=
"photos"
class=
"pic-list list-unstyled form-inline"
></ul>
<a
href=
"javascript:uploadMultiImage('图片上传','#photos','photos-item-tpl');"
class=
"btn btn-default btn-sm"
>
选择图片
</a>
</td>
</tr>
<tr>
<th
width=
"100"
>
权重
</th>
<th>
权重
</th>
<td>
<input
class=
"form-control"
type=
"number"
name=
"post[weigh]"
value=
"0"
>
</td>
...
...
public/themes/admin_simpleboot3/portal/admin_region_gallery/edit.html
查看文件 @
06ea848
...
...
@@ -43,7 +43,41 @@
<input
class=
"form-control"
type=
"hidden"
value=
"{$categories}"
name=
"post[categories]"
id=
"js-categories-id-input"
/>
<tr>
<th
width=
"100"
>
权重
</th>
<th
width=
"100"
>
标题
<span
class=
"form-required"
>
*
</span></th>
<td>
<input
class=
"form-control"
type=
"text"
name=
"post[post_title]"
required
value=
"{$post.post_title}"
placeholder=
"请输入标题"
/>
</td>
</tr>
<tr>
<th>
相册
<span
class=
"form-required"
>
*
</span></th>
<td>
<ul
id=
"photos"
class=
"pic-list list-unstyled form-inline"
>
<notempty
name=
"post.more.photos"
>
<foreach
name=
"post.more.photos"
item=
"vo"
>
<php>
$img_url=cmf_get_image_preview_url($vo['url']);
</php>
<li
id=
"saved-image{$key}"
>
<input
id=
"photo-{$key}"
type=
"hidden"
name=
"photo_urls[]"
value=
"{$vo.url}"
>
<input
class=
"form-control"
id=
"photo-{$key}-name"
type=
"text"
name=
"photo_names[]"
value=
"{$vo.name|default=''}"
style=
"width: 200px;"
title=
"图片名称"
>
<img
id=
"photo-{$key}-preview"
src=
"{:cmf_get_image_preview_url($vo['url'])}"
style=
"height:36px;width: 36px;"
onclick=
"parent.imagePreviewDialog(this.src);"
>
<a
href=
"javascript:uploadOneImage('图片上传','#photo-{$key}');"
>
替换
</a>
<a
href=
"javascript:(function(){$('#saved-image{$key}').remove();})();"
>
移除
</a>
</li>
</foreach>
</notempty>
</ul>
<a
href=
"javascript:uploadMultiImage('图片上传','#photos','photos-item-tpl');"
class=
"btn btn-sm btn-default"
>
选择图片
</a>
</td>
</tr>
<tr>
<th>
权重
</th>
<td>
<input
class=
"form-control"
type=
"number"
name=
"post[weigh]"
value=
"{$post.weigh}"
>
</td>
...
...
public/themes/admin_simpleboot3/portal/admin_region_gallery/index.html
查看文件 @
06ea848
...
...
@@ -12,6 +12,10 @@
<!--<option value='0'>全部</option>-->
<!--{$category_tree|default=''}-->
<!--</select> -->
标题:
<input
type=
"text"
class=
"form-control"
name=
"post_title"
value=
"{$post_title|default=''}"
style=
"width: 140px;"
>
时间:
<input
type=
"text"
class=
"form-control js-bootstrap-datetime"
name=
"start_time"
value=
"{$start_time|default=''}"
...
...
@@ -37,6 +41,7 @@
<!--<th width="50">{:lang('SORT')}</th>-->
<!--</notempty>-->
<th
width=
"50"
>
ID
</th>
<th
width=
"200"
>
标题
</th>
<th
width=
"100"
>
缩略图
</th>
<th
width=
"65"
>
点击量
</th>
<th
width=
"130"
>
创建时间
</th>
...
...
@@ -59,6 +64,13 @@
<!--</notempty>-->
<td><b>
{$vo.id}
</b></td>
<td>
<notempty
name=
"category"
>
{$vo.post_title}
<else/>
{$vo.post_title}
</notempty>
</td>
<td>
<notempty
name=
"vo.more.thumbnail"
>
<a
href=
"javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($vo.more.thumbnail)}');"
>
<i
class=
"fa fa-photo fa-fw"
></i>
...
...
请
注册
或
登录
后发表评论