init
- 框架初始化 - 安装插件 - 修复PHP8.4报错
This commit is contained in:
62
application/admin/view/general/attachment/add.html
Normal file
62
application/admin/view/general/attachment/add.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
|
||||
{if $config.upload.cdnurl}
|
||||
<div class="form-group">
|
||||
<label for="c-third" class="control-label col-xs-12 col-sm-2">{:__('Upload to third')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" name="row[third]" id="c-third" class="form-control"/>
|
||||
<ul class="row list-inline faupload-preview" id="p-third"></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="c-third" class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div style="width:180px;display:inline-block;">
|
||||
<select name="category-third" id="category-third" class="form-control selectpicker">
|
||||
<option value="">{:__('Please select category')}</option>
|
||||
{foreach name="categoryList" id="item"}
|
||||
<option value="{$key|htmlentities}">{$item|htmlentities}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<button type="button" id="faupload-third" class="btn btn-danger faupload" data-multiple="true" data-input-id="c-third" data-preview-id="p-third"><i class="fa fa-upload"></i> {:__("Upload to third")}</button>
|
||||
{if $config.upload.chunking}
|
||||
<button type="button" id="faupload-third-chunking" class="btn btn-danger faupload" data-chunking="true" data-maxsize="1gb" data-multiple="true" data-input-id="c-third" data-preview-id="p-third"><i class="fa fa-upload"></i> {:__("Upload to third by chunk")}</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="form-group">
|
||||
<label for="c-local" class="control-label col-xs-12 col-sm-2">{:__('Upload to local')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" name="row[local]" id="c-local" class="form-control"/>
|
||||
<ul class="row list-inline faupload-preview" id="p-local"></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="c-local" class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div style="width:180px;display:inline-block;">
|
||||
<select name="category-local" id="category-local" class="form-control selectpicker">
|
||||
<option value="">{:__('Please select category')}</option>
|
||||
{foreach name="categoryList" id="item"}
|
||||
<option value="{$key|htmlentities}">{$item|htmlentities}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<button type="button" id="faupload-local" class="btn btn-primary faupload" data-input-id="c-local" data-multiple="true" data-preview-id="p-local" data-url="{:url('ajax/upload')}" data-cdnurl=""><i class="fa fa-upload"></i> {:__("Upload to local")}</button>
|
||||
{if $config.upload.chunking}
|
||||
<button type="button" id="faupload-local-chunking" class="btn btn-primary faupload" data-chunking="true" data-maxsize="1gb" data-input-id="c-local" data-multiple="true" data-preview-id="p-local" data-url="{:url('ajax/upload')}" data-cdnurl=""><i class="fa fa-upload"></i> {:__("Upload to local by chunk")}</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group hidden layer-footer">
|
||||
<div class="col-xs-2"></div>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
89
application/admin/view/general/attachment/edit.html
Normal file
89
application/admin/view/general/attachment/edit.html
Normal file
@@ -0,0 +1,89 @@
|
||||
|
||||
|
||||
<form id="edit-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="c-url" class="control-label col-xs-12 col-sm-2">{:__('Category')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<select name="row[category]" class="form-control">
|
||||
<option value="">{:__('Please select category')}</option>
|
||||
{foreach name="categoryList" id="item"}
|
||||
<option value="{$key|htmlentities}" {if $key==$row.category}selected{/if}>{$item|htmlentities}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-url" class="control-label col-xs-12 col-sm-2">{:__('Url')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" name="row[url]" value="{$row.url|htmlentities}" id="c-url" class="form-control" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-imagewidth" class="control-label col-xs-12 col-sm-2">{:__('Imagewidth')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" name="row[imagewidth]" value="{$row.imagewidth|htmlentities}" id="c-imagewidth" class="form-control" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-imageheight" class="control-label col-xs-12 col-sm-2">{:__('Imageheight')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" name="row[imageheight]" value="{$row.imageheight|htmlentities}" id="c-imageheight" class="form-control" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-imagetype" class="control-label col-xs-12 col-sm-2">{:__('Imagetype')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" name="row[imagetype]" value="{$row.imagetype|htmlentities}" id="c-imagetype" class="form-control" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-imageframes" class="control-label col-xs-12 col-sm-2">{:__('Imageframes')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="number" name="row[imageframes]" value="{$row.imageframes|htmlentities}" id="c-imageframes" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-filename" class="control-label col-xs-12 col-sm-2">{:__('Filename')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" name="row[filename]" value="{$row.filename|htmlentities}" id="c-filename" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-filesize" class="control-label col-xs-12 col-sm-2">{:__('Filesize')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="number" name="row[filesize]" value="{$row.filesize|htmlentities}" id="c-filesize" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-mimetype" class="control-label col-xs-12 col-sm-2">{:__('Mimetype')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" name="row[mimetype]" value="{$row.mimetype|htmlentities}" id="c-mimetype" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-extparam" class="control-label col-xs-12 col-sm-2">{:__('Extparam')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" name="row[extparam]" value="{$row.extparam|htmlentities}" id="c-extparam" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-uploadtime" class="control-label col-xs-12 col-sm-2">{:__('Uploadtime')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="datetime" name="row[uploadtime]" value="{$row.uploadtime|datetime}" id="c-uploadtime" class="form-control datetimepicker" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-storage" class="control-label col-xs-12 col-sm-2">{:__('Storage')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" name="row[storage]" value="{$row.storage|htmlentities}" id="c-storage" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group hide layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
53
application/admin/view/general/attachment/index.html
Normal file
53
application/admin/view/general/attachment/index.html
Normal file
@@ -0,0 +1,53 @@
|
||||
<div class="panel panel-default panel-intro">
|
||||
|
||||
<div class="panel-heading">
|
||||
{:build_heading(null,FALSE)}
|
||||
<ul class="nav nav-tabs" data-field="category">
|
||||
<li class="active"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
|
||||
{foreach name="categoryList" item="vo"}
|
||||
<li><a href="#t-{$key|htmlentities}" data-value="{$key|htmlentities}" data-toggle="tab">{$vo|htmlentities}</a></li>
|
||||
{/foreach}
|
||||
<li class="pull-right dropdown filter-type">
|
||||
<a href="javascript:" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-filter"></i> {:__('Filter Type')}</a>
|
||||
<ul class="dropdown-menu text-left" role="menu">
|
||||
<li class="active"><a href="javascript:" data-value="">{:__('All')}</a></li>
|
||||
{foreach name="mimetypeList" id="item"}
|
||||
<li><a href="javascript:" data-value="{$key|htmlentities}">{$item|htmlentities}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
{:build_toolbar('refresh,add,edit,del')}
|
||||
<a class="btn btn-info btn-classify dropdown-toggle btn-disabled disabled {:$auth->check('general/attachment/edit')?'':'hide'}"><i class="fa fa-arrow-right"></i> {:__('Classify')}</a>
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||
data-operate-edit="{:$auth->check('general/attachment/edit')}"
|
||||
data-operate-del="{:$auth->check('general/attachment/del')}"
|
||||
width="100%">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script id="typetpl" type="text/html">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<select name="category" class="form-control">
|
||||
<option value="">{:__('Please select category')}</option>
|
||||
{foreach name="categoryList" id="item"}
|
||||
<option value="{$key|htmlentities}">{$item|htmlentities}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
47
application/admin/view/general/attachment/select.html
Normal file
47
application/admin/view/general/attachment/select.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<style>
|
||||
#one .commonsearch-table{
|
||||
padding-top:15px!important;
|
||||
}
|
||||
</style>
|
||||
<div class="panel panel-default panel-intro">
|
||||
<div class="panel-heading">
|
||||
{:build_heading(null,FALSE)}
|
||||
<ul class="nav nav-tabs" data-field="category">
|
||||
<li class="active"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
|
||||
{foreach name="categoryList" item="vo"}
|
||||
<li><a href="#t-{$key|htmlentities}" data-value="{$key|htmlentities}" data-toggle="tab">{$vo|htmlentities}</a></li>
|
||||
{/foreach}
|
||||
{if stripos(request()->get('mimetype'),'image/')===false}
|
||||
<li class="pull-right dropdown filter-type">
|
||||
<a href="javascript:" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-filter"></i> {:__('Filter Type')}</a>
|
||||
<ul class="dropdown-menu text-left" role="menu">
|
||||
<li class="active"><a href="javascript:" data-value="">{:__('All')}</a></li>
|
||||
{foreach name="mimetypeList" id="item"}
|
||||
<li><a href="javascript:" data-value="{$key|htmlentities}">{$item|htmlentities}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel-body no-padding">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
{:build_toolbar('refresh')}
|
||||
<span><button type="button" id="faupload-image" class="btn btn-success faupload" data-mimetype="{$mimetype|default=''|htmlentities}" data-multiple="true"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||
{if request()->get('multiple') == 'true'}
|
||||
<a class="btn btn-danger btn-choose-multi"><i class="fa fa-check"></i> {:__('Choose')}</a>
|
||||
{/if}
|
||||
</div>
|
||||
<table id="table" class="table table-bordered table-hover table-nowrap" width="100%">
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
347
application/admin/view/general/config/index.html
Normal file
347
application/admin/view/general/config/index.html
Normal file
@@ -0,0 +1,347 @@
|
||||
<style type="text/css">
|
||||
@media (max-width: 375px) {
|
||||
.edit-form tr td input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.edit-form tr th:first-child, .edit-form tr td:first-child {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.edit-form tr th:nth-last-of-type(-n+2), .edit-form tr td:nth-last-of-type(-n+2) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.edit-form table > tbody > tr td a.btn-delcfg {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.edit-form table > tbody > tr:hover td a.btn-delcfg {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="panel panel-default panel-intro">
|
||||
<div class="panel-heading">
|
||||
{:build_heading(null, false)}
|
||||
<ul class="nav nav-tabs">
|
||||
{foreach $siteList as $index=>$vo}
|
||||
<li class="{$vo.active?'active':''}"><a href="#tab-{$vo.name|htmlentities}" data-toggle="tab">{:__(htmlentities($vo.title))}</a></li>
|
||||
{/foreach}
|
||||
{if $Think.config.app_debug}
|
||||
<li data-toggle="tooltip" title="{:__('Add new config')}">
|
||||
<a href="#addcfg" data-toggle="tab"><i class="fa fa-plus"></i></a>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<!--@formatter:off-->
|
||||
{foreach $siteList as $index=>$vo}
|
||||
<div class="tab-pane fade {$vo.active ? 'active in' : ''}" id="tab-{$vo.name|htmlentities}">
|
||||
<div class="widget-body no-padding">
|
||||
<form id="{$vo.name|htmlentities}-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('general.config/edit')}">
|
||||
{:token()}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="15%">{:__('Title')}</th>
|
||||
<th width="68%">{:__('Value')}</th>
|
||||
{if $Think.config.app_debug}
|
||||
<th width="15%">{:__('Name')}</th>
|
||||
<th width="2%"></th>
|
||||
{/if}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $vo.list as $item}
|
||||
<tr data-favisible="{$item.visible|default=''|htmlentities}" data-name="{$item.name|htmlentities}" class="{if $item.visible??''}hidden{/if}">
|
||||
<td>{$item.title|htmlentities}</td>
|
||||
<td>
|
||||
<div class="row">
|
||||
<div class="col-sm-8 col-xs-12">
|
||||
{switch $item.type}
|
||||
{case string}
|
||||
<input {$item.extend_html|htmlentities} type="text" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control" data-rule="{$item.rule|htmlentities}" data-tip="{$item.tip|htmlentities}"/>
|
||||
{/case}
|
||||
{case password}
|
||||
<input {$item.extend_html|htmlentities} type="password" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control" data-rule="{$item.rule|htmlentities}" data-tip="{$item.tip|htmlentities}"/>
|
||||
{/case}
|
||||
{case text}
|
||||
<textarea {$item.extend_html|htmlentities} name="row[{$item.name|htmlentities}]" class="form-control" data-rule="{$item.rule|htmlentities}" rows="5" data-tip="{$item.tip|htmlentities}">{$item.value|htmlentities}</textarea>
|
||||
{/case}
|
||||
{case editor}
|
||||
<textarea {$item.extend_html|htmlentities} name="row[{$item.name|htmlentities}]" id="editor-{$item.name|htmlentities}" class="form-control editor" data-rule="{$item.rule|htmlentities}" rows="5" data-tip="{$item.tip|htmlentities}">{$item.value|htmlentities}</textarea>
|
||||
{/case}
|
||||
{case array}
|
||||
<dl {$item.extend_html|htmlentities} class="fieldlist" data-name="row[{$item.name|htmlentities}]">
|
||||
<dd>
|
||||
<ins>{:isset($item["setting"]["key"])&&$item["setting"]["key"]?$item["setting"]["key"]:__('Array key')}</ins>
|
||||
<ins>{:isset($item["setting"]["value"])&&$item["setting"]["value"]?$item["setting"]["value"]:__('Array value')}</ins>
|
||||
</dd>
|
||||
<dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
|
||||
<textarea name="row[{$item.name|htmlentities}]" class="form-control hide" cols="30" rows="5">{$item.value|htmlentities}</textarea>
|
||||
</dl>
|
||||
{/case}
|
||||
{case date}
|
||||
<input {$item.extend_html|htmlentities} type="text" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}"/>
|
||||
{/case}
|
||||
{case time}
|
||||
<input {$item.extend_html|htmlentities} type="text" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="HH:mm:ss" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}"/>
|
||||
{/case}
|
||||
{case datetime}
|
||||
<input {$item.extend_html|htmlentities} type="text" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}"/>
|
||||
{/case}
|
||||
{case datetimerange}
|
||||
<input {$item.extend_html|htmlentities} type="text" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control datetimerange" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}"/>
|
||||
{/case}
|
||||
{case number}
|
||||
<input {$item.extend_html|htmlentities} type="number" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}"/>
|
||||
{/case}
|
||||
{case checkbox}
|
||||
<div class="checkbox">
|
||||
{foreach name="item.content" item="vo"}
|
||||
<label for="row[{$item.name|htmlentities}][]-{$key|htmlentities}"><input id="row[{$item.name|htmlentities}][]-{$key|htmlentities}" name="row[{$item.name|htmlentities}][]" type="checkbox" value="{$key|htmlentities}" data-tip="{$item.tip|htmlentities}" {in name="key" value="$item.value" }checked{/in} /> {$vo|htmlentities}</label>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/case}
|
||||
{case radio}
|
||||
<div class="radio">
|
||||
{foreach name="item.content" item="vo"}
|
||||
<label for="row[{$item.name|htmlentities}]-{$key|htmlentities}"><input id="row[{$item.name|htmlentities}]-{$key|htmlentities}" name="row[{$item.name|htmlentities}]" type="radio" value="{$key|htmlentities}" data-tip="{$item.tip|htmlentities}" {in name="key" value="$item.value" }checked{/in} /> {$vo|htmlentities}</label>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/case}
|
||||
{case value="select" break="0"}{/case}
|
||||
{case value="selects"}
|
||||
<select {$item.extend_html|htmlentities} name="row[{$item.name|htmlentities}]{$item.type=='selects'?'[]':''}" class="form-control selectpicker" data-tip="{$item.tip|htmlentities}" {$item.type=='selects'?'multiple':''}>
|
||||
{foreach name="item.content" item="vo"}
|
||||
<option value="{$key|htmlentities}" {in name="key" value="$item.value" }selected{/in}>{$vo|htmlentities}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{/case}
|
||||
{case value="image" break="0"}{/case}
|
||||
{case value="images"}
|
||||
<div class="form-inline">
|
||||
<input id="c-{$item.name|htmlentities}" class="form-control" size="50" name="row[{$item.name|htmlentities}]" type="text" value="{$item.value|htmlentities}" data-tip="{$item.tip|htmlentities}">
|
||||
<span><button type="button" id="faupload-{$item.name|htmlentities}" class="btn btn-danger faupload" data-input-id="c-{$item.name|htmlentities}" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="{$item.type=='image'?'false':'true'}" data-preview-id="p-{$item.name|htmlentities}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||
<span><button type="button" id="fachoose-{$item.name|htmlentities}" class="btn btn-primary fachoose" data-input-id="c-{$item.name|htmlentities}" data-mimetype="image/*" data-multiple="{$item.type=='image'?'false':'true'}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
||||
<span class="msg-box n-right" for="c-{$item.name|htmlentities}"></span>
|
||||
<ul class="row list-inline faupload-preview" id="p-{$item.name|htmlentities}"></ul>
|
||||
</div>
|
||||
{/case}
|
||||
{case value="file" break="0"}{/case}
|
||||
{case value="files"}
|
||||
<div class="form-inline">
|
||||
<input id="c-{$item.name|htmlentities}" class="form-control" size="50" name="row[{$item.name|htmlentities}]" type="text" value="{$item.value|htmlentities}" data-tip="{$item.tip|htmlentities}">
|
||||
<span><button type="button" id="faupload-{$item.name|htmlentities}" class="btn btn-danger faupload" data-input-id="c-{$item.name|htmlentities}" data-multiple="{$item.type=='file'?'false':'true'}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||
<span><button type="button" id="fachoose-{$item.name|htmlentities}" class="btn btn-primary fachoose" data-input-id="c-{$item.name|htmlentities}" data-multiple="{$item.type=='file'?'false':'true'}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
||||
<span class="msg-box n-right" for="c-{$item.name|htmlentities}"></span>
|
||||
</div>
|
||||
{/case}
|
||||
{case switch}
|
||||
<input id="c-{$item.name|htmlentities}" name="row[{$item.name|htmlentities}]" type="hidden" value="{:$item.value?1:0}">
|
||||
<a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-{$item.name|htmlentities}" data-yes="1" data-no="0">
|
||||
<i class="fa fa-toggle-on text-success {if !$item.value}fa-flip-horizontal text-gray{/if} fa-2x"></i>
|
||||
</a>
|
||||
{/case}
|
||||
{case bool}
|
||||
<label for="row[{$item.name|htmlentities}]-yes"><input id="row[{$item.name|htmlentities}]-yes" name="row[{$item.name|htmlentities}]" type="radio" value="1" {$item.value?'checked':''} data-tip="{$item.tip|htmlentities}" /> {:__('Yes')}</label>
|
||||
<label for="row[{$item.name|htmlentities}]-no"><input id="row[{$item.name|htmlentities}]-no" name="row[{$item.name|htmlentities}]" type="radio" value="0" {$item.value?'':'checked'} data-tip="{$item.tip|htmlentities}" /> {:__('No')}</label>
|
||||
{/case}
|
||||
{case city}
|
||||
<div style="position:relative">
|
||||
<input {$item.extend_html|htmlentities} type="text" name="row[{$item.name|htmlentities}]" id="c-{$item.name|htmlentities}" value="{$item.value|htmlentities}" class="form-control" data-toggle="city-picker" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}" />
|
||||
</div>
|
||||
{/case}
|
||||
{case value="selectpage" break="0"}{/case}
|
||||
{case value="selectpages"}
|
||||
<input {$item.extend_html|htmlentities} type="text" name="row[{$item.name|htmlentities}]" id="c-{$item.name|htmlentities}" value="{$item.value|htmlentities}" class="form-control selectpage" data-source="{:url('general.config/selectpage')}?id={$item.id|htmlentities}" data-primary-key="{$item.setting.primarykey|htmlentities}" data-field="{$item.setting.field|htmlentities}" data-multiple="{$item.type=='selectpage'?'false':'true'}" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}" />
|
||||
{/case}
|
||||
{case custom}
|
||||
{$item.extend_html|htmlentities}
|
||||
{/case}
|
||||
{/switch}
|
||||
</div>
|
||||
<div class="col-sm-4"></div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
{if $Think.config.app_debug}
|
||||
<td>{php}echo "{\$site.". $item['name'] . "}";{/php}</td>
|
||||
<td>{if $item['id']>18}<a href="javascript:;" class="btn-delcfg text-muted" data-name="{$item.name|htmlentities}"><i class="fa fa-times"></i></a>{/if}</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<div class="layer-footer">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
|
||||
</div>
|
||||
</td>
|
||||
{if $Think.config.app_debug}
|
||||
<td></td>
|
||||
<td></td>
|
||||
{/if}
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="tab-pane fade" id="addcfg">
|
||||
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('general.config/add')}">
|
||||
{:token()}
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<select name="row[group]" class="form-control selectpicker">
|
||||
{foreach name="groupList" item="vo"}
|
||||
<option value="{$key|htmlentities}" {in name="key" value="basic" }selected{/in}>{$vo|htmlentities}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<select name="row[type]" id="c-type" class="form-control selectpicker">
|
||||
{foreach name="typeList" item="vo"}
|
||||
<option value="{$key|htmlentities}" {in name="key" value="string" }selected{/in}>{$vo|htmlentities}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name" class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<input type="text" class="form-control" id="name" name="row[name]" value="" data-rule="required; length(3~30); remote(general/config/check)"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="title" class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<input type="text" class="form-control" id="title" name="row[title]" value="" data-rule="required"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group hidden tf tf-selectpage tf-selectpages">
|
||||
<label for="c-selectpage-table" class="control-label col-xs-12 col-sm-2">{:__('Selectpage table')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<select id="c-selectpage-table" name="row[setting][table]" class="form-control selectpicker" data-live-search="true">
|
||||
<option value="">{:__('Please select table')}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group hidden tf tf-selectpage tf-selectpages">
|
||||
<label for="c-selectpage-primarykey" class="control-label col-xs-12 col-sm-2">{:__('Selectpage primarykey')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<select name="row[setting][primarykey]" class="form-control selectpicker" id="c-selectpage-primarykey"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group hidden tf tf-selectpage tf-selectpages">
|
||||
<label for="c-selectpage-field" class="control-label col-xs-12 col-sm-2">{:__('Selectpage field')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<select name="row[setting][field]" class="form-control selectpicker" id="c-selectpage-field"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group hidden tf tf-selectpage tf-selectpages">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Selectpage conditions')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<dl class="fieldlist" data-name="row[setting][conditions]">
|
||||
<dd>
|
||||
<ins>{:__('Field title')}</ins>
|
||||
<ins>{:__('Field value')}</ins>
|
||||
</dd>
|
||||
|
||||
<dd><a href="javascript:;" class="append btn btn-sm btn-success"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
|
||||
<textarea name="row[setting][conditions]" class="form-control hide" cols="30" rows="5"></textarea>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group hidden tf tf-array">
|
||||
<label for="c-array-key" class="control-label col-xs-12 col-sm-2">{:__('Array key')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<input type="text" name="row[setting][key]" class="form-control" id="c-array-key">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group hidden tf tf-array">
|
||||
<label for="c-array-value" class="control-label col-xs-12 col-sm-2">{:__('Array value')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<input type="text" name="row[setting][value]" class="form-control" id="c-array-value">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="value" class="control-label col-xs-12 col-sm-2">{:__('Value')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<input type="text" class="form-control" id="value" name="row[value]" value="" data-rule=""/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group hide" id="add-content-container">
|
||||
<label for="content" class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<textarea name="row[content]" id="content" cols="30" rows="5" class="form-control" data-rule="required(content)">value1|title1
|
||||
value2|title2</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tip" class="control-label col-xs-12 col-sm-2">{:__('Tip')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<input type="text" class="form-control" id="tip" name="row[tip]" value="" data-rule=""/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="rule" class="control-label col-xs-12 col-sm-2">{:__('Rule')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<div class="input-group pull-left">
|
||||
<input type="text" class="form-control" id="rule" name="row[rule]" value="" data-tip="{:__('Rule tips')}"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown" type="button">{:__('Choose')}</button>
|
||||
<ul class="dropdown-menu pull-right rulelist">
|
||||
{volist name="ruleList" id="item"}
|
||||
<li><a href="javascript:;" data-value="{$key|htmlentities}">{$item|htmlentities}<span class="text-muted">({$key|htmlentities})</span></a></li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</span>
|
||||
</div>
|
||||
<span class="msg-box n-right" for="rule"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="visible" class="control-label col-xs-12 col-sm-2">{:__('Visible condition')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<input type="text" class="form-control" id="visible" name="row[visible]" value="" data-rule=""/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="extend" class="control-label col-xs-12 col-sm-2">{:__('Extend')}:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<textarea name="row[extend]" id="extend" cols="30" rows="5" class="form-control" data-tip="{:__('Extend tips')}" data-rule="required(extend)" data-msg-extend="当类型为自定义时,扩展属性不能为空"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
{if !$Think.config.app_debug}
|
||||
<button type="button" class="btn btn-primary disabled">{:__('Only work at development environment')}</button>
|
||||
{else/}
|
||||
<button type="submit" class="btn btn-primary btn-embossed">{:__('OK')}</button>
|
||||
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!--@formatter:on-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
118
application/admin/view/general/profile/index.html
Normal file
118
application/admin/view/general/profile/index.html
Normal file
@@ -0,0 +1,118 @@
|
||||
<style>
|
||||
.profile-avatar-container {
|
||||
position: relative;
|
||||
width: 100px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.profile-avatar-container .profile-user-img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.profile-avatar-container .profile-avatar-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.profile-avatar-container:hover .profile-avatar-text {
|
||||
display: block;
|
||||
position: absolute;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
background: #444;
|
||||
opacity: .6;
|
||||
color: #fff;
|
||||
top: 0;
|
||||
left: 0;
|
||||
line-height: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.profile-avatar-container button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
<div class="row animated fadeInRight">
|
||||
<div class="col-md-4">
|
||||
<div class="box box-primary">
|
||||
<div class="panel-heading">
|
||||
{:__('Profile')}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<form id="update-form" role="form" data-toggle="validator" method="POST" action="{:url('general.profile/update')}">
|
||||
{:token()}
|
||||
<input type="hidden" id="c-avatar" name="row[avatar]" value="{$admin.avatar|htmlentities}"/>
|
||||
<div class="box-body box-profile">
|
||||
|
||||
<div class="profile-avatar-container">
|
||||
<img class="profile-user-img img-responsive img-circle" src="{$admin.avatar|cdnurl|htmlentities}" alt="">
|
||||
<div class="profile-avatar-text img-circle">{:__('Click to edit')}</div>
|
||||
<button type="button" id="faupload-avatar" class="faupload" data-input-id="c-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button>
|
||||
</div>
|
||||
|
||||
<h3 class="profile-username text-center">{$admin.nickname|htmlentities}</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="username" class="control-label">{:__('Username')}:</label>
|
||||
<input type="text" class="form-control" id="username" name="row[username]" value="{$admin.username|htmlentities}" disabled/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mobile" class="control-label">{:__('Mobile')}:</label>
|
||||
<input type="text" class="form-control" id="mobile" name="row[mobile]" value="{$admin.mobile|htmlentities}" disabled/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="control-label">{:__('Email')}:</label>
|
||||
<input type="text" class="form-control" id="email" name="row[email]" value="{$admin.email|htmlentities}" data-rule="required;email"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nickname" class="control-label">{:__('Nickname')}:</label>
|
||||
<input type="text" class="form-control" id="nickname" name="row[nickname]" value="{$admin.nickname|htmlentities}" data-rule="required"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password" class="control-label">{:__('Password')}:</label>
|
||||
<input type="password" class="form-control" id="password" placeholder="{:__('Leave password blank if dont want to change')}" autocomplete="new-password" name="row[password]" value="" data-rule="password"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">{:__('Submit')}</button>
|
||||
<button type="reset" class="btn btn-default">{:__('Reset')}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="panel panel-default panel-intro panel-nav">
|
||||
<div class="panel-heading">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#one" data-toggle="tab"><i class="fa fa-list"></i> {:__('Admin log')}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
{:build_toolbar('refresh')}
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover table-nowrap" width="100%">
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user