瀏覽代碼

活动重建

lizhen_gitee 1 年之前
父節點
當前提交
aea6ead886

+ 2 - 1
application/admin/lang/zh-cn/active.php

@@ -11,5 +11,6 @@ return [
     'Is_show'         => '上架',
     'Is_show 1'       => '上架',
     'Is_show 0'       => '下架',
-    'Weigh'           => '排序'
+    'Weigh'           => '排序',
+    'Tags'            => '标签'
 ];

+ 6 - 0
application/admin/view/active/add.html

@@ -62,6 +62,12 @@
             <input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="1">
         </div>
     </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Tags')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-tags" class="form-control" data-role="tagsinput" name="row[tags]" type="text">
+        </div>
+    </div>
     <div class="form-group layer-footer">
         <label class="control-label col-xs-12 col-sm-2"></label>
         <div class="col-xs-12 col-sm-8">

+ 6 - 0
application/admin/view/active/edit.html

@@ -62,6 +62,12 @@
             <input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
         </div>
     </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Tags')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-tags" class="form-control" data-role="tagsinput" name="row[tags]" type="text" value="{$row.tags|htmlentities}">
+        </div>
+    </div>
     <div class="form-group layer-footer">
         <label class="control-label col-xs-12 col-sm-2"></label>
         <div class="col-xs-12 col-sm-8">

+ 1 - 0
public/assets/js/backend/active.js

@@ -34,6 +34,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'pay_fee', title: __('Pay_fee'), operate:'BETWEEN'},
                         {field: 'is_show', title: __('Is_show'), searchList: {"1":__('Is_show 1'),"0":__('Is_show 0')}, formatter: Table.api.formatter.normal},
                         {field: 'weigh', title: __('Weigh'), operate: false},
+                        {field: 'tags', title: __('Tags'), operate: 'LIKE', formatter: Table.api.formatter.flag},
                         {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
                     ]
                 ]