提交 c11d4f5c 编写于 作者: G gongfuxiang

应用管理添加

上级 a47125a3
......@@ -96,6 +96,52 @@ class Pluginsadmin extends Common
}
}
/**
* 添加/编辑页面
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-02-12T21:30:26+0800
*/
public function SaveInfo()
{
// 参数
$params = input();
// 参数
$this->assign('params', $params);
if(empty($params['plugins']))
{
return $this->fetch('first_step');
} else {
// 获取数据
if(!empty($params['id']))
{
}
// 编辑器文件存放地址
$this->assign('editor_path_type', 'plugins_'.$params['plugins']);
// 唯一标记
$this->assign('plugins', $params['plugins']);
return $this->fetch('save_info');
}
}
/**
* 添加/编辑
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-02-12T21:30:26+0800
*/
public function Save()
{
print_r(input());
}
/**
* [StatusUpdate 状态更新]
* @author Devil
......
{{include file="public/header" /}}
<!-- right content start -->
<div class="content-right">
<div class="content">
<!-- form start -->
<form class="am-form form-validation view-save" action="{{:MyUrl('admin/pluginsadmin/saveinfo')}}" method="POST" request-type="form" enctype="multipart/form-data">
<legend>
<span class="fs-16">
{{if empty($data['id'])}}
应用添加
{{else /}}
应用编辑
{{/if}}
</span>
<a href="{{:MyUrl('admin/pluginsadmin/index', $params)}}" class="fr fs-14 m-t-5 am-icon-mail-reply"> 返回</a>
</legend>
<div class="am-form-group">
<label>应用唯一标记<span class="fs-12 fw-100 cr-999">(以数字、字母、下划线)</span></label>
<input type="text" name="plugins" placeholder="名称" minlength="2" maxlength="30" data-validation-message="应用唯一标记格式 2~30 个字符" pattern="^[A-Za-z0-9_]{5,18}$" class="am-radius" {{if !empty($data)}} value="{{$data.plugins}}"{{/if}} required />
</div>
<div class="am-form-group">
<input type="hidden" name="id" {{if !empty($data)}} value="{{$data.id}}"{{/if}} />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'处理中...'}">下一步</button>
</div>
</form>
<!-- form end -->
</div>
</div>
<!-- right content end -->
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
\ No newline at end of file
{{include file="public/header" /}}
<!-- right content start -->
<div class="content-right">
<div class="content">
<!-- form start -->
<form class="am-form form-validation view-save" action="{{:MyUrl('admin/pluginsadmin/save')}}" method="POST" request-type="ajax-url" request-value="{{:MyUrl('admin/pluginsadmin/index', $params)}}" enctype="multipart/form-data">
<input type="hidden" name="max_file_size" value="{{:MyC('home_max_limit_file', 51200000)}}" />
<legend>
<span class="fs-16">
{{if empty($data['id'])}}
应用添加
{{else /}}
应用编辑
{{/if}}
</span>
<a href="{{:MyUrl('admin/pluginsadmin/index', $params)}}" class="fr fs-14 m-t-5 am-icon-mail-reply"> 返回</a>
</legend>
<div class="am-form-group">
<label>应用唯一标记<span class="fs-12 fw-100 cr-999">(以数字、字母、下划线)</span></label>
<input type="text" name="plugins" placeholder="名称" minlength="2" maxlength="30" data-validation-message="应用唯一标记格式 2~30 个字符" pattern="^[A-Za-z0-9_]{5,18}$" class="am-radius" {{if !empty($plugins)}} value="{{$plugins}}"{{/if}} readonly="true" required />
</div>
<div class="am-form-group am-form-file">
<label class="block">LOGO<span class="fs-12 fw-100 cr-999">(建议100像数X100像数)</span></label>
<ul class="plug-file-upload-view plugins-logo-view" data-form-name="logo" data-max-number="1" data-delete="0" data-dialog-type="images">
<li>
<input type="text" name="logo" value="{{if !empty($data['logo'])}}{{$data.logo}}{{/if}}" data-validation-message="请上传图片" required />
<img src="{{if !empty($data['logo_old'])}}{{$data.logo_old}}{{else /}}{{$attachment_host}}/static/admin/default/images/default-images.png{{/if}}" />
</li>
</ul>
<div class="plug-file-upload-submit" data-view-tag="ul.plugins-logo-view">+上传图片</div>
</div>
<div class="am-form-group">
<label>名称</label>
<input type="text" name="name" placeholder="名称" minlength="2" maxlength="30" data-validation-message="名称格式 2~30 个字符" class="am-radius" {{if !empty($data)}} value="{{$data.name}}"{{/if}} required />
</div>
<div class="am-form-group">
<label>作者</label>
<input type="text" name="author" placeholder="作者" minlength="2" maxlength="30" data-validation-message="作者格式 2~30 个字符" class="am-radius" {{if !empty($data)}} value="{{$data.author}}"{{/if}} required />
</div>
<div class="am-form-group">
<label>作者主页<span class="fs-12 fw-100 cr-999">(带http://或https://)</span></label>
<input type="url" placeholder="作者主页" name="author_url" data-validation-message="作者主页格式有误" class="am-radius" {{if !empty($data)}} value="{{$data.author_url}}"{{/if}} />
</div>
<div class="am-form-group">
<label>版本<span class="fs-12 fw-100 cr-999">(主版本.次版本号.修订号,每个段不超过6位,如 1.0.0)</span></label>
<input type="text" name="version" placeholder="版本" minlength="2" maxlength="16" data-validation-message="版本格式 2~16 个字符" pattern="^[0-9]{1,6}\.[0-9]{1,6}\.[0-9]{1,6}$" class="am-radius" {{if !empty($data)}} value="{{$data.version}}"{{/if}} required />
</div>
<div class="am-form-group am-form-file">
<label class="block">描述</label>
<textarea rows="3" name="desc" class="am-radius am-field-valid" placeholder="描述" minlength="2" maxlength="60" data-validation-message="描述内容格式 2~60 个字符">{{if !empty($data['desc'])}}{{$data.desc}}{{/if}}</textarea>
</div>
<div class="am-form-group">
<input type="hidden" name="id" {{if !empty($data)}} value="{{$data.id}}"{{/if}} />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
</form>
<!-- form end -->
</div>
</div>
<!-- right content end -->
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
\ No newline at end of file
......@@ -13,9 +13,9 @@
<div class="am-form-group am-form-file">
<button type="button" class="am-btn am-btn-default am-btn-sm am-radius">
<i class="am-icon-cloud-upload"></i> 选择文件</button>
<input type="file" name="plugins" class="file-event" data-tips-tag="#form-plugins-tips" multiple data-validation-message="请选择需要上传的文件" required />
<input type="file" name="file" class="file-event" data-tips-tag="#form-file-tips" multiple data-validation-message="请选择需要上传的文件" required />
<span class="tips fs-12">上传一个zip压缩格式的主题安装包</span>
<div id="form-plugins-tips"></div>
<div id="form-file-tips"></div>
</div>
<div class="am-form-group">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm" data-am-loading="{loadingText:'上传中...'}">上传</button>
......
......@@ -21,7 +21,7 @@
<form class="am-form form-validation admin-save" action="{{:MyUrl('admin/power/powersave')}}" method="POST" request-type="ajax-reload" request-value="">
<div class="am-form-group">
<label>栏目级别</label>
<select class="am-radius c-p" name="pid" data-validation-message="栏目级别选择错误">
<select class="am-radius c-p chosen-select" name="pid" data-validation-message="栏目级别选择错误">
<option value="0">一级栏目...</option>
{{foreach $data as $v}}
<option value="{{$v.id}}">{{$v.name}}</option>
......
......@@ -67,8 +67,8 @@ class AdminPowerService
[
'checked_type' => 'length',
'key_name' => 'name',
'checked_data' => '2,8',
'error_msg' => '权限名称格式 2~8 个字符之间',
'checked_data' => '2,16',
'error_msg' => '权限名称格式 2~16 个字符之间',
],
[
'checked_type' => 'empty',
......
此差异已折叠。
/**
* 列表
*/
.content ul {
.content ul.am-gallery-bordered {
padding: 0px;
width: calc(100% + 10px);
margin-left: -5px;
}
.content ul .icon {
.content ul.am-gallery-bordered .icon {
width: 80px;
height: 80px;
border-radius: 10px;
box-shadow: 0px 10px 10px -6px rgba(0,0,0,.4);
}
.content ul.am-gallery-bordered .am-gallery-item {
.content ul.am-gallery-bordered.am-gallery-bordered .am-gallery-item {
box-shadow: none;
border: 1px solid #d4d4d4;
border-radius: 2px;
}
.content ul.am-gallery-bordered .am-gallery-item.am-active {
.content ul.am-gallery-bordered.am-gallery-bordered .am-gallery-item.am-active {
border: 1px solid #fde2e2;
background: #fffbfb;
}
.content ul.am-gallery-bordered .am-gallery-item:hover {
.content ul.am-gallery-bordered.am-gallery-bordered .am-gallery-item:hover {
border: 1px solid #999;
box-shadow: 0px 12px 12px -10px rgba(0,0,0,.4);
}
.content ul li {
.content ul.am-gallery-bordered li {
position: relative;
}
.content ul li .base {
.content ul.am-gallery-bordered li .base {
position: absolute;
top: 10px;
left: 100px;
width: calc(100% - 112px);
}
.content ul li .base h3 {
.content ul.am-gallery-bordered li .base h3 {
font-weight: 700;
color: #333;
margin: 2px 0px 3px 0px;
}
.content ul li .base p {
.content ul.am-gallery-bordered li .base p {
line-height: 18px;
margin: 0;
font-size: 12px;
font-weight: 300;
color: #999;
}
.content ul li .base h3, .content ul li .base p {
.content ul.am-gallery-bordered li .base h3, .content ul.am-gallery-bordered li .base p {
word-wrap: normal;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.content ul.am-gallery-bordered .am-gallery-desc {
.content ul.am-gallery-bordered.am-gallery-bordered .am-gallery-desc {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
......@@ -64,35 +64,35 @@
font-weight: 300;
color: #b3b3b3;
}
.content ul li .operation {
.content ul.am-gallery-bordered li .operation {
border-top: 1px dashed #eee;
padding: 10px 0 5px 0;
}
.content ul li .am-btn, .content ul li .am-icon-btn {
.content ul.am-gallery-bordered li .am-btn, .content ul.am-gallery-bordered li .am-icon-btn {
width: 35px;
}
.content ul li .submit-state {
.content ul.am-gallery-bordered li .submit-state {
height: 28px;
line-height: 28px;
border-radius: 2px;
font-size: 12px;
}
.content ul li .submit-state.am-default {
.content ul.am-gallery-bordered li .submit-state.am-default {
background-color: #e6e6e6;
}
@media only screen and (max-width: 641px) {
.content ul .icon {
.content ul.am-gallery-bordered .icon {
width: 65px;
height: 65px;
}
.content ul li .base {
.content ul.am-gallery-bordered li .base {
left: 85px;
width: calc(100% - 97px);
}
.content ul li .base h3 {
.content ul.am-gallery-bordered li .base h3 {
margin: 0px;
}
.content ul li .base p {
.content ul.am-gallery-bordered li .base p {
line-height: 16px;
}
}
......@@ -101,5 +101,5 @@
/**
* 安装
*/
input[name="plugins"] { width: 105px !important; height: 32px; }
input[name="file"] { width: 105px !important; height: 32px; }
input.file-event { margin-top: 0 !important; }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册