切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
anyv
6 years ago
提交
6cb6553b03d1da31e578a2a6843ca747e394d3d1
1 个父辈
4c1081c2
1 个管道 的构建
通过
耗费 0 秒
分类编辑
变更
3
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
80 行增加
和
1 行删除
app/admin/controller/LabelController.php
public/themes/admin_simpleboot3/admin/label/classify_edit.html
public/themes/admin_simpleboot3/admin/label/classify_list.html
app/admin/controller/LabelController.php
查看文件 @
6cb6553
...
...
@@ -37,6 +37,17 @@ class LabelController extends AdminBaseController{
}
/**
* 分类编辑
*/
public
function
classify_edit
(){
$id
=
$this
->
request
->
param
();
$data
=
Db
::
name
(
'classification'
)
->
where
(
'id'
,
$id
[
'id'
])
->
find
();
$this
->
assign
(
'data'
,
$data
);
return
$this
->
fetch
();
}
/**
...
...
public/themes/admin_simpleboot3/admin/label/classify_edit.html
0 → 100644
查看文件 @
6cb6553
<include
file=
"public@header"
/>
</head>
<body>
<div
class=
"wrap js-check-wrap"
>
<ul
class=
"nav nav-tabs"
>
<li><a
href=
"{:url('Label/classify_list')}"
>
分类管理
</a></li>
<li
class=
"active"
><a
href=
"#"
>
编辑分类
</a></li>
</ul>
<form
action=
"{:url('Label/classify_edit')}"
method=
"post"
class=
"form-horizontal js-ajax-form margin-top-20"
>
<div
class=
"row"
>
<div
class=
"col-md-9"
>
<table
class=
"table table-bordered"
>
<tr>
<th>
分类名称
<span
class=
"form-required"
>
*
</span></th>
<td>
<input
class=
"form-control"
type=
"text"
name=
"name"
id=
"title"
required
value=
"{$data.name}"
placeholder=
"请输入分类名称"
/>
</td>
</tr>
</table>
<div
class=
"form-group"
>
<div
class=
"col-sm-offset-2 col-sm-10"
>
<button
type=
"submit"
class=
"btn btn-primary js-ajax-submit"
>
保存
</button>
</div>
</div>
</div>
<div
class=
"col-md-3"
>
<table
class=
"table table-bordered"
>
<tr>
<th><b>
缩略图
</b></th>
</tr>
<tr>
<td>
<div
style=
"text-align: center;"
>
<input
type=
"hidden"
name=
"thumbnail"
id=
"thumbnail"
value=
"{$data.thumbnail|default=''}"
>
<a
href=
"javascript:uploadOneImage('图片上传','#thumbnail');"
>
<if
condition=
"empty($data.thumbnail)"
>
<img
src=
"__TMPL__/public/assets/images/default-thumbnail.png"
id=
"thumbnail-preview"
width=
"135"
style=
"cursor: pointer"
/>
<else/>
<img
src=
"{:cmf_get_image_preview_url($data.thumbnail)}"
id=
"thumbnail-preview"
width=
"135"
style=
"cursor: pointer"
/>
</if>
</a>
<input
type=
"button"
class=
"btn btn-sm btn-cancel-thumbnail"
value=
"取消图片"
>
</div>
</td>
</tr>
</table>
</div>
</div>
</form>
</div>
<script
type=
"text/javascript"
src=
"__STATIC__/js/admin.js"
></script>
<script>
$
(
function
()
{
$
(
'.btn-cancel-thumbnail'
).
click
(
function
()
{
$
(
'#thumbnail-preview'
).
attr
(
'src'
,
'__TMPL__/public/assets/images/default-thumbnail.png'
);
$
(
'#thumbnail'
).
val
(
''
);
});
});
</script>
</body>
</html>
\ No newline at end of file
...
...
public/themes/admin_simpleboot3/admin/label/classify_list.html
查看文件 @
6cb6553
...
...
@@ -22,7 +22,7 @@
<td>
{$vo.name}
</td>
<td>
{$vo.create_time|date="Y-m-d H:i:s",###}
</td>
<td>
<
button
type=
"button"
class=
"btn btn-default"
>
编辑
</button
>
<
a
href=
"{:url('Label/classify_edit',array('id'=>$vo.id))}"
><button
type=
"button"
class=
"btn btn-default"
>
编辑
</button></a
>
<button
type=
"button"
class=
"btn btn-default"
onclick=
"del({$vo.id})"
>
删除
</button>
</td>
</tr>
...
...
请
注册
或
登录
后发表评论