Browse Source

Update shop template files

Vova Tkach 5 years ago
parent
commit
d4edb7dcec

+ 3 - 2
assets/template/shop_category_html_file.go

@@ -4,7 +4,7 @@ var VarShopCategoryHtmlFile = []byte(`{{template "header.html" .}}
 <div class="card mb-4">
 	<div class="post">
 		<div class="card-body">
-			<b>Category author:</b> {{$.Data.Shop.Category.User.FirstName}} {{$.Data.Shop.Category.User.LastName}}
+			<b>Category:</b> {{$.Data.Shop.Category.Name}}
 		</div>
 	</div>
 </div>
@@ -22,6 +22,7 @@ var VarShopCategoryHtmlFile = []byte(`{{template "header.html" .}}
 						{{.Briefly}}
 					</div>
 					<div class="post-date">
+						<div><small>Price: {{.PriceFormat "%.2f"}} {{.Currency.Code}}</small></div>
 						<div><small>Published on {{.DateTimeFormat "02/01/2006, 15:04:05"}}</small></div>
 						<div>Author: {{.User.FirstName}} {{.User.LastName}}</div>
 					</div>
@@ -30,7 +31,7 @@ var VarShopCategoryHtmlFile = []byte(`{{template "header.html" .}}
 		{{end}}
 	{{else}}
 		<div class="card-body">
-			Sorry, no posts matched your criteria
+			Sorry, no products matched your criteria
 		</div>
 	{{end}}
 </div>

+ 2 - 1
assets/template/shop_html_file.go

@@ -15,6 +15,7 @@ var VarShopHtmlFile = []byte(`{{template "header.html" .}}
 						{{.Briefly}}
 					</div>
 					<div class="post-date">
+						<div><small>Price: {{.PriceFormat "%.2f"}} {{.Currency.Code}}</small></div>
 						<div><small>Published on {{.DateTimeFormat "02/01/2006, 15:04:05"}}</small></div>
 						<div>Author: {{.User.FirstName}} {{.User.LastName}}</div>
 					</div>
@@ -23,7 +24,7 @@ var VarShopHtmlFile = []byte(`{{template "header.html" .}}
 		{{end}}
 	{{else}}
 		<div class="card-body">
-			Sorry, no posts matched your criteria
+			Sorry, no products matched your criteria
 		</div>
 	{{end}}
 </div>

+ 1 - 1
assets/template/shop_product_html_file.go

@@ -10,7 +10,7 @@ var VarShopProductHtmlFile = []byte(`{{template "header.html" .}}
 		</div>
 	</div>
 	<div class="card-footer text-muted">
-		<div>Price: {{$.Data.Shop.Product.PriceFormat "%.2f"}}</div>
+		<div>Price: {{$.Data.Shop.Product.PriceFormat "%.2f"}} {{$.Data.Shop.Product.Currency.Code}}</div>
 		<div>Published on {{$.Data.Shop.Product.DateTimeFormat "02/01/2006, 15:04:05"}}</div>
 		<div>Author: {{$.Data.Shop.Product.User.FirstName}} {{$.Data.Shop.Product.User.LastName}}</div>
 	</div>