Browse Source

Table action icons

Vova Tkach 6 years ago
parent
commit
0e76e1141f

+ 2 - 2
engine/backend/modules/module_users.go

@@ -67,9 +67,9 @@ func (this *Module) Module_users_content() string {
 			{"first_name", "", nil},
 			{"first_name", "", nil},
 			{"last_name", "", nil},
 			{"last_name", "", nil},
 		}, func(values *[]string) string {
 		}, func(values *[]string) string {
-			return `<a href="/cp/users/modify/` + (*values)[0] + `/">` +
+			return `<a class="ico" href="/cp/users/modify/` + (*values)[0] + `/">` +
 				others.File_assets_sys_svg_edit + `</a>` +
 				others.File_assets_sys_svg_edit + `</a>` +
-				`<a href="#">` + others.File_assets_sys_svg_remove + `</a>`
+				`<a class="ico" href="#">` + others.File_assets_sys_svg_remove + `</a>`
 		}, "/cp/users/default/")
 		}, "/cp/users/default/")
 		return breadcrumb + data_table
 		return breadcrumb + data_table
 	} else if this.smod == "modify" {
 	} else if this.smod == "modify" {

+ 1 - 1
engine/backend/modules/modules.go

@@ -189,7 +189,7 @@ func (this *Module) data_table(table string, order_by string, order_way string,
 	}
 	}
 	sql += " FROM `" + table + "` ORDER BY `" + order_by + "` " + order_way + " LIMIT ?, ?;"
 	sql += " FROM `" + table + "` ORDER BY `" + order_by + "` " + order_way + " LIMIT ?, ?;"
 	if action != nil {
 	if action != nil {
-		result += `<th scope="col" class="col_action">Action</th>`
+		result += `<th scope="col" class="col_action">&nbsp;</th>`
 	}
 	}
 	result += `</tr>`
 	result += `</tr>`
 	result += `</thead>`
 	result += `</thead>`

+ 17 - 0
engine/wrapper/resources/styles/assets.cp.styles.css

@@ -234,3 +234,20 @@ body.cp .wrap .sidebar.sidebar-left ul.nav li.nav-item svg.sicon {
 .data-table a:hover svg {
 .data-table a:hover svg {
 	color: #0056b3;
 	color: #0056b3;
 }
 }
+
+.data-table td.col_action a.ico {
+	display: inline-block;
+	width: 16px;
+	height: 16px;
+	margin-right: 10px;
+}
+
+.data-table td.col_action a.ico:last-child {
+	margin-right: 0px;
+}
+
+/* Admin table: table_users */
+.data-table.table_users .col_action {
+	width: 90px;
+	text-align: right;
+}

+ 17 - 1
engine/wrapper/resources/styles/assets.cp.styles.css.go

@@ -237,4 +237,20 @@ body.cp .wrap .sidebar.sidebar-left ul.nav li.nav-item svg.sicon {
 .data-table a:hover svg {
 .data-table a:hover svg {
 	color: #0056b3;
 	color: #0056b3;
 }
 }
-`)
+
+.data-table td.col_action a.ico {
+	display: inline-block;
+	width: 16px;
+	height: 16px;
+	margin-right: 10px;
+}
+
+.data-table td.col_action a.ico:last-child {
+	margin-right: 0px;
+}
+
+/* Admin table: table_users */
+.data-table.table_users .col_action {
+	width: 90px;
+	text-align: right;
+}`)