Browse Source

Duplicate product button and icon

Vova Tkach 5 years ago
parent
commit
ca31d3c339
4 changed files with 21 additions and 0 deletions
  1. 19 0
      assets/cp.styles.css
  2. 0 0
      assets/cp.styles.css.go
  3. 1 0
      assets/sys.svg.icon.go
  4. 1 0
      modules/module_shop.go

+ 19 - 0
assets/cp.styles.css

@@ -959,6 +959,25 @@ ul.pagination {
 	right: 0px;
 }
 
+/* Duplicate product */
+.product-copy {
+	position: relative;
+}
+
+.product-copy a {
+	position: absolute;
+	right: 0px;
+	padding: 12px 18px;
+}
+
+.product-copy a:hover {
+	color: #417cb9;
+}
+
+.product-copy a:hover svg {
+	fill: currentColor;
+}
+
 /* Product images */
 #list-images {
 	display: block;

File diff suppressed because it is too large
+ 0 - 0
assets/cp.styles.css.go


+ 1 - 0
assets/sys.svg.icon.go

@@ -13,3 +13,4 @@ var SysSvgIconAlert = `<svg viewBox="0 0 16 16" width="16" height="16" class="si
 var SysSvgIconError = `<svg viewBox="0 0 16 16" width="16" height="16" class="sicon" version="1.1"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"></path></svg>`
 var SysSvgIconView = `<svg viewBox="0 0 16 16" width="16" height="16" class="sicon" version="1.1"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"></path></svg>`
 var SysSvgIconBug = `<svg viewBox="4 4 18 18" width="16" height="16" class="sicon" version="1.1"><path fill-rule="evenodd" d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"></path></svg>`
+var SysSvgIconCopy = `<svg viewBox="0 0 24 24" width="16" height="16" class="sicon" version="1.1"><path fill="none" d="M0 0h24v24H0z"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z" /></svg>`

+ 1 - 0
modules/module_shop.go

@@ -760,6 +760,7 @@ func (this *Modules) RegisterModule_Shop() *Module {
 					{Name: "Add new product"},
 				})
 			} else {
+				content += `<div class="product-copy"><a title="Duplicate product" href="#">` + assets.SysSvgIconCopy + `</a></div>`
 				content += this.getBreadCrumbs(wrap, &[]consts.BreadCrumb{
 					{Name: "Modify product"},
 				})

Some files were not shown because too many files changed in this diff