diff --git a/application/admin/command/Addon.php b/application/admin/command/Addon.php index 302ced6f..c82335d6 100644 --- a/application/admin/command/Addon.php +++ b/application/admin/command/Addon.php @@ -33,6 +33,9 @@ class Addon extends Command { $name = $input->getOption('name') ?: ''; $action = $input->getOption('action') ?: ''; + if(stripos($name, 'addons/')!==false){ + $name = explode('/', $name)[1]; + } //强制覆盖 $force = $input->getOption('force'); //版本 @@ -65,8 +68,8 @@ class Addon extends Command if (is_dir($addonDir)) { rmdirs($addonDir); } - mkdir($addonDir); - mkdir($addonDir . DS . 'controller'); + mkdir($addonDir, 0755, true); + mkdir($addonDir . DS . 'controller', 0755, true); $menuList = \app\common\library\Menu::export($name); $createMenu = $this->getCreateMenu($menuList); $prefix = Config::get('database.prefix'); diff --git a/application/admin/command/Api/template/index.html b/application/admin/command/Api/template/index.html index 1fc0b185..2bb4db90 100755 --- a/application/admin/command/Api/template/index.html +++ b/application/admin/command/Api/template/index.html @@ -437,8 +437,8 @@ $.ajax({ url: $('#apiUrl').val() + url, - data: $(form).attr('method') == 'get' ? $(form).serialize() : formData, - type: $(form).attr('method') + '', + data: $(form).prop('method').toLowerCase() == 'get' ? $(form).serialize() : formData, + type: $(form).prop('method') + '', dataType: 'json', contentType: false, processData: false, diff --git a/application/admin/command/Crud.php b/application/admin/command/Crud.php index 93e79471..5ef8cbdf 100755 --- a/application/admin/command/Crud.php +++ b/application/admin/command/Crud.php @@ -1137,7 +1137,7 @@ EOD; $langField = mb_ucfirst($field); return << - +
{$content}
@@ -1149,7 +1149,7 @@ EOD; * 获取图片模板数据 * @param string $field * @param string $content - * @return array + * @return string */ protected function getImageUpload($field, $content) { diff --git a/application/admin/command/Crud/stubs/controller.stub b/application/admin/command/Crud/stubs/controller.stub index 4c1b888a..e61ece25 100644 --- a/application/admin/command/Crud/stubs/controller.stub +++ b/application/admin/command/Crud/stubs/controller.stub @@ -14,6 +14,7 @@ class {%controllerName%} extends Backend /** * {%modelName%}模型对象 + * @var \{%modelNamespace%}\{%modelName%} */ protected $model = null; diff --git a/application/admin/command/Crud/stubs/controllerindex.stub b/application/admin/command/Crud/stubs/controllerindex.stub index 5294600c..2771aa63 100755 --- a/application/admin/command/Crud/stubs/controllerindex.stub +++ b/application/admin/command/Crud/stubs/controllerindex.stub @@ -10,6 +10,11 @@ $this->request->filter(['strip_tags']); if ($this->request->isAjax()) { + //如果发送的来源是Selectpage,则转发到Selectpage + if ($this->request->request('keyField')) + { + return $this->selectpage(); + } list($where, $sort, $order, $offset, $limit) = $this->buildparams(); $total = $this->model {%relationWithList%} diff --git a/application/admin/command/Install/fastadmin.sql b/application/admin/command/Install/fastadmin.sql index c80adfe2..e2b048e2 100755 --- a/application/admin/command/Install/fastadmin.sql +++ b/application/admin/command/Install/fastadmin.sql @@ -50,7 +50,7 @@ CREATE TABLE `fa_admin_log` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `admin_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '管理员ID', `username` varchar(30) NOT NULL DEFAULT '' COMMENT '管理员名字', - `url` varchar(255) NOT NULL DEFAULT '' COMMENT '操作页面', + `url` varchar(1500) NOT NULL DEFAULT '' COMMENT '操作页面', `title` varchar(100) NOT NULL DEFAULT '' COMMENT '日志标题', `content` text NOT NULL COMMENT '内容', `ip` varchar(50) NOT NULL DEFAULT '' COMMENT 'IP', @@ -66,6 +66,8 @@ CREATE TABLE `fa_admin_log` ( DROP TABLE IF EXISTS `fa_attachment`; CREATE TABLE `fa_attachment` ( `id` int(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `admin_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '管理员ID', + `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID', `url` varchar(255) NOT NULL DEFAULT '' COMMENT '物理路径', `imagewidth` varchar(30) NOT NULL DEFAULT '' COMMENT '宽度', `imageheight` varchar(30) NOT NULL DEFAULT '' COMMENT '高度', @@ -77,7 +79,7 @@ CREATE TABLE `fa_attachment` ( `createtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建日期', `updatetime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', `uploadtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上传时间', - `storage` enum('local','upyun','qiniu') NOT NULL DEFAULT 'local' COMMENT '存储位置', + `storage` varchar(100) NOT NULL DEFAULT 'local' COMMENT '存储位置', `sha1` varchar(40) NOT NULL DEFAULT '' COMMENT '文件 sha1编码', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='附件表'; @@ -86,7 +88,7 @@ CREATE TABLE `fa_attachment` ( -- Records of fa_attachment -- ---------------------------- BEGIN; -INSERT INTO `fa_attachment` VALUES (1, '/assets/img/qrcode.png', '150', '150', 'png', 0, 21859, 'image/png', '', 1499681848, 1499681848, 1499681848, 'local', '17163603d0263e4838b9387ff2cd4877e8b018f6'); +INSERT INTO `fa_attachment` VALUES (1, 1, 0, '/assets/img/qrcode.png', '150', '150', 'png', 0, 21859, 'image/png', '', 1499681848, 1499681848, 1499681848, 'local', '17163603d0263e4838b9387ff2cd4877e8b018f6'); COMMIT; -- ---------------------------- @@ -344,7 +346,7 @@ DROP TABLE IF EXISTS `fa_ems`; CREATE TABLE `fa_ems` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', `event` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '事件', - `email` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '邮箱', + `email` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '邮箱', `code` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '验证码', `times` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '验证次数', `ip` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'IP', diff --git a/application/admin/controller/Addon.php b/application/admin/controller/Addon.php index f3f5f249..4e3dd473 100644 --- a/application/admin/controller/Addon.php +++ b/application/admin/controller/Addon.php @@ -76,7 +76,7 @@ class Addon extends Backend Service::refresh(); $this->success(); } catch (Exception $e) { - $this->error($e->getMessage()); + $this->error(__($e->getMessage())); } } $this->error(__('Parameter %s can not be empty', '')); @@ -112,9 +112,9 @@ class Addon extends Backend $info['state'] = 1; $this->success(__('Install successful'), null, ['addon' => $info]); } catch (AddonException $e) { - $this->result($e->getData(), $e->getCode(), $e->getMessage()); + $this->result($e->getData(), $e->getCode(), __($e->getMessage())); } catch (Exception $e) { - $this->error($e->getMessage(), $e->getCode()); + $this->error(__($e->getMessage()), $e->getCode()); } } @@ -132,9 +132,9 @@ class Addon extends Backend Service::uninstall($name, $force); $this->success(__('Uninstall successful')); } catch (AddonException $e) { - $this->result($e->getData(), $e->getCode(), $e->getMessage()); + $this->result($e->getData(), $e->getCode(), __($e->getMessage())); } catch (Exception $e) { - $this->error($e->getMessage()); + $this->error(__($e->getMessage())); } } @@ -156,9 +156,9 @@ class Addon extends Backend Cache::rm('__menu__'); $this->success(__('Operate successful')); } catch (AddonException $e) { - $this->result($e->getData(), $e->getCode(), $e->getMessage()); + $this->result($e->getData(), $e->getCode(), __($e->getMessage())); } catch (Exception $e) { - $this->error($e->getMessage()); + $this->error(__($e->getMessage())); } } @@ -222,16 +222,16 @@ class Addon extends Backend $this->success(__('Offline installed tips'), null, ['addon' => $info]); } catch (Exception $e) { @rmdirs($newAddonDir); - throw new Exception($e->getMessage()); + throw new Exception(__($e->getMessage())); } } catch (Exception $e) { @unlink($tmpFile); @rmdirs($tmpAddonDir); - $this->error($e->getMessage()); + $this->error(__($e->getMessage())); } } else { // 上传失败获取错误信息 - $this->error($file->getError()); + $this->error(__($file->getError())); } } @@ -260,9 +260,9 @@ class Addon extends Backend Cache::rm('__menu__'); $this->success(__('Operate successful')); } catch (AddonException $e) { - $this->result($e->getData(), $e->getCode(), $e->getMessage()); + $this->result($e->getData(), $e->getCode(), __($e->getMessage())); } catch (Exception $e) { - $this->error($e->getMessage()); + $this->error(__($e->getMessage())); } } @@ -297,7 +297,7 @@ class Addon extends Backend continue; if (isset($onlineaddons[$v['name']])) { - $v = array_merge($onlineaddons[$v['name']], $v); + $v = array_merge($v, $onlineaddons[$v['name']]); } else { $v['category_id'] = 0; $v['flag'] = ''; @@ -306,6 +306,8 @@ class Addon extends Backend $v['donateimage'] = ''; $v['demourl'] = ''; $v['price'] = '0.00'; + $v['screenshots'] = []; + $v['releaselist'] = []; } $v['url'] = addon_url($v['name']); $v['createtime'] = filemtime(ADDON_PATH . $v['name']); diff --git a/application/admin/controller/Ajax.php b/application/admin/controller/Ajax.php index d7b4d005..d378e298 100644 --- a/application/admin/controller/Ajax.php +++ b/application/admin/controller/Ajax.php @@ -106,6 +106,8 @@ class Ajax extends Backend $imageheight = isset($imgInfo[1]) ? $imgInfo[1] : $imageheight; } $params = array( + 'admin_id' => (int)$this->auth->id, + 'user_id' => 0, 'filesize' => $fileInfo['size'], 'imagewidth' => $imagewidth, 'imageheight' => $imageheight, diff --git a/application/admin/controller/Index.php b/application/admin/controller/Index.php index 611f9fe6..cd05cf64 100644 --- a/application/admin/controller/Index.php +++ b/application/admin/controller/Index.php @@ -90,6 +90,7 @@ class Index extends Backend $result = $this->auth->login($username, $password, $keeplogin ? 86400 : 0); if ($result === true) { + Hook::listen("admin_login_after", $this->request); $this->success(__('Login successful'), $url, ['url' => $url, 'id' => $this->auth->id, 'username' => $username, 'avatar' => $this->auth->avatar]); } else @@ -109,7 +110,7 @@ class Index extends Backend $background = stripos($background, 'http')===0 ? $background : config('site.cdnurl') . $background; $this->view->assign('background', $background); $this->view->assign('title', __('Login')); - Hook::listen("login_init", $this->request); + Hook::listen("admin_login_init", $this->request); return $this->view->fetch(); } @@ -119,6 +120,7 @@ class Index extends Backend public function logout() { $this->auth->logout(); + Hook::listen("admin_logout_after", $this->request); $this->success(__('Logout successful'), 'index/login'); } diff --git a/application/admin/controller/general/Config.php b/application/admin/controller/general/Config.php index 573a04e3..2f4d1051 100644 --- a/application/admin/controller/general/Config.php +++ b/application/admin/controller/general/Config.php @@ -10,7 +10,7 @@ use think\Exception; /** * 系统配置 * - * @icon fa fa-circle-o + * @icon fa fa-cogs * @remark 可以在此增改系统的变量和分组,也可以自定义分组和变量,如果需要删除请从数据库中删除 */ class Config extends Backend @@ -32,31 +32,26 @@ class Config extends Backend { $siteList = []; $groupList = ConfigModel::getGroupList(); - foreach ($groupList as $k => $v) - { + foreach ($groupList as $k => $v) { $siteList[$k]['name'] = $k; $siteList[$k]['title'] = $v; $siteList[$k]['list'] = []; } - foreach ($this->model->all() as $k => $v) - { - if (!isset($siteList[$v['group']])) - { + foreach ($this->model->all() as $k => $v) { + if (!isset($siteList[$v['group']])) { continue; } $value = $v->toArray(); $value['title'] = __($value['title']); - if (in_array($value['type'], ['select', 'selects', 'checkbox', 'radio'])) - { + if (in_array($value['type'], ['select', 'selects', 'checkbox', 'radio'])) { $value['value'] = explode(',', $value['value']); } $value['content'] = json_decode($value['content'], TRUE); $siteList[$v['group']]['list'][] = $value; } $index = 0; - foreach ($siteList as $k => &$v) - { + foreach ($siteList as $k => &$v) { $v['active'] = !$index ? true : false; $index++; } @@ -71,45 +66,30 @@ class Config extends Backend */ public function add() { - if ($this->request->isPost()) - { + if ($this->request->isPost()) { $params = $this->request->post("row/a"); - if ($params) - { - foreach ($params as $k => &$v) - { + if ($params) { + foreach ($params as $k => &$v) { $v = is_array($v) ? implode(',', $v) : $v; } - try - { - if (in_array($params['type'], ['select', 'selects', 'checkbox', 'radio', 'array'])) - { + try { + if (in_array($params['type'], ['select', 'selects', 'checkbox', 'radio', 'array'])) { $params['content'] = json_encode(ConfigModel::decode($params['content']), JSON_UNESCAPED_UNICODE); - } - else - { + } else { $params['content'] = ''; } $result = $this->model->create($params); - if ($result !== false) - { - try - { + if ($result !== false) { + try { $this->refreshFile(); $this->success(); - } - catch (Exception $e) - { + } catch (Exception $e) { $this->error($e->getMessage()); } - } - else - { + } else { $this->error($this->model->getError()); } - } - catch (Exception $e) - { + } catch (Exception $e) { $this->error($e->getMessage()); } } @@ -124,23 +104,16 @@ class Config extends Backend */ public function edit($ids = NULL) { - if ($this->request->isPost()) - { + if ($this->request->isPost()) { $row = $this->request->post("row/a"); - if ($row) - { + if ($row) { $configList = []; - foreach ($this->model->all() as $v) - { - if (isset($row[$v['name']])) - { + foreach ($this->model->all() as $v) { + if (isset($row[$v['name']])) { $value = $row[$v['name']]; - if (is_array($value) && isset($value['field'])) - { + if (is_array($value) && isset($value['field'])) { $value = json_encode(ConfigModel::getArrayData($value), JSON_UNESCAPED_UNICODE); - } - else - { + } else { $value = is_array($value) ? implode(',', $value) : $value; } $v['value'] = $value; @@ -148,13 +121,10 @@ class Config extends Backend } } $this->model->allowField(true)->saveAll($configList); - try - { + try { $this->refreshFile(); $this->success(); - } - catch (Exception $e) - { + } catch (Exception $e) { $this->error($e->getMessage()); } } @@ -162,20 +132,20 @@ class Config extends Backend } } + /** + * 刷新配置文件 + */ protected function refreshFile() { $config = []; - foreach ($this->model->all() as $k => $v) - { + foreach ($this->model->all() as $k => $v) { $value = $v->toArray(); - if (in_array($value['type'], ['selects', 'checkbox', 'images', 'files'])) - { + if (in_array($value['type'], ['selects', 'checkbox', 'images', 'files'])) { $value['value'] = explode(',', $value['value']); } - if ($value['type'] == 'array') - { - $value['value'] = (array) json_decode($value['value'], TRUE); + if ($value['type'] == 'array') { + $value['value'] = (array)json_decode($value['value'], TRUE); } $config[$value['name']] = $value['value']; } @@ -183,26 +153,21 @@ class Config extends Backend } /** + * 检测配置项是否存在 * @internal */ public function check() { $params = $this->request->post("row/a"); - if ($params) - { + if ($params) { $config = $this->model->get($params); - if (!$config) - { + if (!$config) { return $this->success(); - } - else - { + } else { return $this->error(__('Name already exist')); } - } - else - { + } else { return $this->error(__('Invalid parameters')); } } @@ -213,19 +178,18 @@ class Config extends Backend */ public function emailtest() { + $row = $this->request->post('row/a'); + \think\Config::set('site', array_merge(\think\Config::get('site'), $row)); $receiver = $this->request->request("receiver"); $email = new Email; $result = $email - ->to($receiver) - ->subject(__("This is a test mail")) - ->message('
' . __('This is a test mail content') . '
') - ->send(); - if ($result) - { + ->to($receiver) + ->subject(__("This is a test mail")) + ->message('
' . __('This is a test mail content') . '
') + ->send(); + if ($result) { $this->success(); - } - else - { + } else { $this->error($email->getError()); } } diff --git a/application/admin/controller/user/User.php b/application/admin/controller/user/User.php index ffde4d1a..772a3abf 100644 --- a/application/admin/controller/user/User.php +++ b/application/admin/controller/user/User.php @@ -53,8 +53,7 @@ class User extends Backend ->select(); foreach ($list as $k => $v) { - $v->password = ''; - $v->salt = ''; + $v->hidden(['password', 'salt']); } $result = array("total" => $total, "rows" => $list); diff --git a/application/admin/lang/zh-cn.php b/application/admin/lang/zh-cn.php index 483fd47f..a1d02bae 100755 --- a/application/admin/lang/zh-cn.php +++ b/application/admin/lang/zh-cn.php @@ -34,7 +34,6 @@ return [ 'Cancel' => '取消', 'Clear' => '清空', 'Custom Range' => '自定义', - 'Cancel' => '取消', 'Today' => '今天', 'Yesterday' => '昨天', 'Last 7 days' => '最近7天', @@ -78,13 +77,9 @@ return [ 'Line' => '行号', 'File' => '文件', 'Menu' => '菜单', - 'Name' => '名称', - 'Weigh' => '权重', 'Type' => '类型', 'Title' => '标题', 'Content' => '内容', - 'Status' => '状态', - 'Operate' => '操作', 'Append' => '追加', 'Select' => '选择', 'Memo' => '备注', @@ -115,6 +110,7 @@ return [ //提示 'Go back' => '返回首页', 'Jump now' => '立即跳转', + 'Click to search %s' => '点击搜索 %s', 'Operation completed' => '操作成功!', 'Operation failed' => '操作失败!', 'Unknown data format' => '未知的数据格式!', @@ -147,7 +143,7 @@ return [ 'Admin' => '管理员管理', 'Admin log' => '管理员日志', 'Group' => '角色组', - 'Rule' => '规则管理', + 'Rule' => '菜单规则', 'User' => '会员管理', 'User group' => '会员分组', 'User rule' => '会员规则', diff --git a/application/admin/lang/zh-cn/addon.php b/application/admin/lang/zh-cn/addon.php index d3bce242..90f496ff 100755 --- a/application/admin/lang/zh-cn/addon.php +++ b/application/admin/lang/zh-cn/addon.php @@ -2,13 +2,14 @@ return [ 'Id' => 'ID', - 'Title' => '标题', + 'Title' => '插件名称', 'Value' => '配置值', 'Array key' => '键', 'Array value' => '值', 'File' => '文件', 'Donate' => '打赏作者', 'Warmtips' => '温馨提示', + 'Pay now' => '立即支付', 'Offline install' => '离线安装', 'Refresh addon cache' => '刷新插件缓存', 'Userinfo' => '会员信息', @@ -17,38 +18,47 @@ return [ 'Conflict tips' => '此插件中发现和现有系统中部分文件发现冲突!以下文件将会被影响,请备份好相关文件后再继续操作', 'Login tips' => '此处登录账号为FastAdmin官网账号', 'Logined tips' => '你好!%s
当前你已经登录,将同步保存你的购买记录', - 'Pay tips' => '支付完成后请稍等1~5分钟后再尝试安装,请不要重复支付,如果仍然无法安装,请加QQ群:636393962向管理员反馈', + 'Pay tips' => '扫码支付后如果仍然无法立即下载,请不要重复支付,请加QQ群:636393962向管理员反馈', 'Pay click tips' => '请点击这里在新窗口中进行支付!', 'Pay new window tips' => '请在新弹出的窗口中进行支付,支付完成后再重新点击安装按钮进行安装!', 'Uninstall tips' => '确认卸载插件?

卸载将会删除所有插件文件且不可找回!!! 插件如果有创建数据库表请手动删除!!!

如有重要数据请备份后再操作!', 'Upgrade tips' => '确认升级插件?

如果之前购买插件时未登录,此次升级可能出现购买后才可以下载的提示!!!
升级后可能出现部分冗余数据记录,请根据需要移除即可!!!

如有重要数据请备份后再操作!', - 'Offline installed tips' => '插件安装成功!清除插件缓存和框架缓存后生效!', - 'Online installed tips' => '插件安装成功!清除插件缓存和框架缓存后生效!', + 'Offline installed tips' => '插件安装成功!清除浏览器缓存和框架缓存后生效!', + 'Online installed tips' => '插件安装成功!清除浏览器缓存和框架缓存后生效!', 'Not login tips' => '你当前未登录FastAdmin,登录后将同步已购买的记录,下载时无需二次付费!', 'Not installed tips' => '请安装后再访问插件前台页面!', 'Not enabled tips' => '插件已经禁用,请启用后再访问插件前台页面!', 'Please disable addon first' => '请先禁用插件再进行升级', 'Login now' => '立即登录', 'Continue install' => '不登录,继续安装', + 'View addon home page' => '查看插件介绍和帮助', + 'View addon index page' => '查看插件前台首页', + 'View addon screenshots' => '点击查看插件截图', + 'Click to toggle status' => '点击切换插件状态', + 'Click to contact developer' => '点击与插件开发者取得联系', + 'Index' => '前台', 'All' => '全部', 'Uncategoried' => '未归类', 'Recommend' => '推荐', 'Hot' => '热门', 'New' => '新', + 'Paying' => '付费', 'Free' => '免费', 'Sale' => '折扣', 'No image' => '暂无缩略图', 'Price' => '价格', + 'Downloads' => '下载', 'Author' => '作者', 'Identify' => '标识', 'Homepage' => '主页', 'Intro' => '介绍', 'Version' => '版本', + 'New version' => '新版本', 'Createtime' => '添加时间', 'Releasetime' => '更新时间', 'Detail' => '插件详情', 'Document' => '文档', - 'Demo' => '在线演示', + 'Demo' => '演示', 'Feedback' => '反馈BUG', 'Install' => '安装', 'Uninstall' => '卸载', @@ -63,9 +73,7 @@ return [ 'Logout' => '退出登录', 'Register' => '注册账号', 'You\'re not login' => '当前未登录', - 'Pay now' => '立即支付', - 'Continue install' => '继续安装', - 'Continue uninstall' => '继续安装', + 'Continue uninstall' => '继续卸载', 'Continue operate' => '继续操作', 'Install successful' => '安装成功', 'Uninstall successful' => '卸载成功', @@ -73,4 +81,6 @@ return [ 'Addon info file was not found' => '插件配置文件未找到', 'Addon info file data incorrect' => '插件配置信息不正确', 'Addon already exists' => '上传的插件已经存在', + 'Unable to open the zip file' => '无法打开ZIP文件', + 'Unable to extract the file' => '无法解压ZIP文件', ]; diff --git a/application/admin/lang/zh-cn/auth/rule.php b/application/admin/lang/zh-cn/auth/rule.php index f08139cd..9edf8ac2 100644 --- a/application/admin/lang/zh-cn/auth/rule.php +++ b/application/admin/lang/zh-cn/auth/rule.php @@ -10,9 +10,10 @@ return [ 'Controller/Action' => '控制器名/方法名', 'Ismenu' => '菜单', 'Search icon' => '搜索图标', - 'Menu tips' => '规则任意,不可重复,仅做层级显示,无需匹配控制器和方法', - 'Node tips' => '控制器/方法名', + 'Toggle menu visible' => '点击切换菜单显示', + 'Toggle sub menu' => '点击切换子菜单', + 'Menu tips' => '父级菜单无需匹配控制器和方法,子级菜单请使用控制器名', + 'Node tips' => '控制器/方法名,如果有目录请使用 目录名/控制器名/方法名', 'The non-menu rule must have parent' => '非菜单规则节点必须有父级', - 'If not necessary, use the command line to build rule' => '非必要情况下请直接使用命令行php think menu来生成', 'Name only supports letters, numbers, underscore and slash' => 'URL规则只能是小写字母、数字、下划线和/组成', ]; diff --git a/application/admin/lang/zh-cn/general/attachment.php b/application/admin/lang/zh-cn/general/attachment.php index 3d0899fc..b713a4d0 100644 --- a/application/admin/lang/zh-cn/general/attachment.php +++ b/application/admin/lang/zh-cn/general/attachment.php @@ -1,9 +1,10 @@ 'ID', 'Url' => '物理路径', 'Imagewidth' => '宽度', - 'Imageheight' => '宽度', + 'Imageheight' => '高度', 'Imagetype' => '图片类型', 'Imageframes' => '图片帧数', 'Preview' => '预览', diff --git a/application/admin/lang/zh-cn/general/config.php b/application/admin/lang/zh-cn/general/config.php index 8754c1e4..1a5b10a9 100644 --- a/application/admin/lang/zh-cn/general/config.php +++ b/application/admin/lang/zh-cn/general/config.php @@ -53,6 +53,7 @@ return [ 'Mail from' => '发件人邮箱', 'Name already exist' => '变量名称已经存在', 'Send a test message' => '发送测试邮件', - 'This is a test mail content' => '这是一封测试邮件,用于测试邮件配置是否正常!', - 'This is a test mail' => '这是一封测试邮件', + 'This is a test mail content' => '这是一封来自FastAdmin校验邮件,用于校验邮件配置是否正常!', + 'This is a test mail' => '这是一封来自FastAdmin的邮件', + 'Please input your email' => '请输入测试接收者邮箱', ]; diff --git a/application/admin/view/addon/add.html b/application/admin/view/addon/add.html index 6900e4fb..e69de29b 100644 --- a/application/admin/view/addon/add.html +++ b/application/admin/view/addon/add.html @@ -1,22 +0,0 @@ -
- -
- -
- -
-
-
- -
- -
-
- -
diff --git a/application/admin/view/addon/index.html b/application/admin/view/addon/index.html index 639481bf..56b01a5f 100644 --- a/application/admin/view/addon/index.html +++ b/application/admin/view/addon/index.html @@ -1,38 +1,57 @@
@@ -51,16 +70,27 @@
- +
@@ -76,28 +106,28 @@
- + - +
- +
- +
- +
@@ -107,10 +137,10 @@
- +
- +
@@ -125,18 +155,20 @@
- {:__('Warning')}
{:__('Login tips')} + {:__('Warning')}
{:__('Login tips')}
- +
- +
@@ -149,57 +181,12 @@
- {:__('Warning')}
{:__('Logined tips', '<%=username%>')} + {:__('Warning')}
{:__('Logined tips', '<%=username%>')}
- - \ No newline at end of file diff --git a/application/admin/view/auth/admin/add.html b/application/admin/view/auth/admin/add.html index 3223a81d..99a39996 100644 --- a/application/admin/view/auth/admin/add.html +++ b/application/admin/view/auth/admin/add.html @@ -1,6 +1,6 @@
- +
{:build_select('group[]', $groupdata, null, ['class'=>'form-control selectpicker', 'multiple'=>'', 'data-rule'=>'required'])}
@@ -30,7 +30,7 @@
- +
{:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')])}
diff --git a/application/admin/view/auth/admin/edit.html b/application/admin/view/auth/admin/edit.html index 54ddb97f..428e9766 100644 --- a/application/admin/view/auth/admin/edit.html +++ b/application/admin/view/auth/admin/edit.html @@ -1,6 +1,6 @@
- +
{:build_select('group[]', $groupdata, $groupids, ['class'=>'form-control selectpicker', 'multiple'=>'', 'data-rule'=>'required'])}
@@ -36,7 +36,7 @@
- +
{:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
diff --git a/application/admin/view/auth/group/add.html b/application/admin/view/auth/group/add.html index 9879f2f5..d8d41650 100644 --- a/application/admin/view/auth/group/add.html +++ b/application/admin/view/auth/group/add.html @@ -1,19 +1,19 @@
- +
{:build_select('row[pid]', $groupdata, null, ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}
- +
- +
@@ -22,7 +22,7 @@
- +
{:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')])}
diff --git a/application/admin/view/auth/group/edit.html b/application/admin/view/auth/group/edit.html index 20cfde02..22476056 100644 --- a/application/admin/view/auth/group/edit.html +++ b/application/admin/view/auth/group/edit.html @@ -1,19 +1,19 @@
- +
{:build_select('row[pid]', $groupdata, $row['pid'], ['class'=>'form-control selectpicker', 'data-rule'=>'required', 'data-id'=>$row['id'], 'data-pid'=>$row['pid']])}
- +
- +
@@ -22,7 +22,7 @@
- +
{:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
diff --git a/application/admin/view/auth/rule/add.html b/application/admin/view/auth/rule/add.html index d4257158..f819cab3 100644 --- a/application/admin/view/auth/rule/add.html +++ b/application/admin/view/auth/rule/add.html @@ -1,16 +1,12 @@ -
-

{:__('Alert')}!

- {:__('If not necessary, use the command line to build rule')} -
- +
{:build_radios('row[ismenu]', ['1'=>__('Yes'), '0'=>__('No')])}
- +
{:build_select('row[pid]', $ruledata, null, ['class'=>'form-control', 'required'=>''])}
@@ -18,11 +14,12 @@
+ 测试
- +
@@ -55,7 +52,7 @@
- +
{:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')])}
diff --git a/application/admin/view/auth/rule/edit.html b/application/admin/view/auth/rule/edit.html index 9f507993..966d1463 100644 --- a/application/admin/view/auth/rule/edit.html +++ b/application/admin/view/auth/rule/edit.html @@ -1,12 +1,12 @@
- +
{:build_radios('row[ismenu]', ['1'=>__('Yes'), '0'=>__('No')], $row['ismenu'])}
- +
{:build_select('row[pid]', $ruledata, $row['pid'], ['class'=>'form-control', 'required'=>''])}
@@ -18,7 +18,7 @@
- +
@@ -51,7 +51,7 @@
- +
{:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
diff --git a/application/admin/view/auth/rule/tpl.html b/application/admin/view/auth/rule/tpl.html index 4e34afb2..4b91afbf 100644 --- a/application/admin/view/auth/rule/tpl.html +++ b/application/admin/view/auth/rule/tpl.html @@ -6,12 +6,13 @@ margin:5px 0 0 0; } #chooseicon ul li{ - width:30px;height:30px; - line-height:30px; - border:1px solid #ddd; + width:41px;height:42px; + line-height:42px; + border:1px solid #efefef; padding:1px; margin:1px; text-align: center; + font-size:18px; } #chooseicon ul li:hover{ border:1px solid #2c3e50; @@ -31,7 +32,7 @@
    <% for(var i=0; i -
  • +
  • <% } %> diff --git a/application/admin/view/category/add.html b/application/admin/view/category/add.html index 26a62eb6..a09d8f7a 100644 --- a/application/admin/view/category/add.html +++ b/application/admin/view/category/add.html @@ -81,7 +81,7 @@
- +
{:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')])}
diff --git a/application/admin/view/category/edit.html b/application/admin/view/category/edit.html index fd2893fe..b4c9ed37 100644 --- a/application/admin/view/category/edit.html +++ b/application/admin/view/category/edit.html @@ -81,7 +81,7 @@
- +
{:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
diff --git a/application/admin/view/common/header.html b/application/admin/view/common/header.html index 406bee76..912da7c3 100755 --- a/application/admin/view/common/header.html +++ b/application/admin/view/common/header.html @@ -54,6 +54,7 @@