Compare commits
2 Commits
202c845bee
...
667c3eba13
| Author | SHA1 | Date | |
|---|---|---|---|
|
667c3eba13
|
|||
|
e22cc0b243
|
@@ -456,7 +456,10 @@ func (rc *shopItemController) EditItemHandler(c *gin.Context) {
|
|||||||
newShopItem.Variants = shopItem.Variants
|
newShopItem.Variants = shopItem.Variants
|
||||||
newShopItem.BasePrice = shopItem.BasePrice
|
newShopItem.BasePrice = shopItem.BasePrice
|
||||||
newShopItem.IsPublic = shopItem.IsPublic
|
newShopItem.IsPublic = shopItem.IsPublic
|
||||||
newShopItem.Tags = shopItem.Tags
|
|
||||||
|
if len(shopItem.Tags) != 0 {
|
||||||
|
newShopItem.Tags = shopItem.Tags
|
||||||
|
}
|
||||||
|
|
||||||
if shopItem.Image != "static/img/zine.jpg" {
|
if shopItem.Image != "static/img/zine.jpg" {
|
||||||
newShopItem.Image = shopItem.Image
|
newShopItem.Image = shopItem.Image
|
||||||
|
|||||||
@@ -4,6 +4,10 @@
|
|||||||
<div class="sm:mx-auto sm:w-full sm:max-w-sm">
|
<div class="sm:mx-auto sm:w-full sm:max-w-sm">
|
||||||
<img class="mx-auto h-10 w-auto" src="/static/img/circlea.png" alt="Your Company">
|
<img class="mx-auto h-10 w-auto" src="/static/img/circlea.png" alt="Your Company">
|
||||||
<h2 class="mt-10 text-center text-2xl/9 font-bold tracking-tight text-gray-900">Edit Item</h2>
|
<h2 class="mt-10 text-center text-2xl/9 font-bold tracking-tight text-gray-900">Edit Item</h2>
|
||||||
|
|
||||||
|
<a href="/shopitems/{{ .data.shopItem.ID }}">
|
||||||
|
<img src="/{{ .data.shopItem.Image }}" alt="Product Image" class="aspect-4/5 mx-auto rounded-md bg-gray-200 object-cover group-hover:opacity-75 lg:aspect-auto lg:h-80">
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<div class="myClass group relative">
|
<div class="myClass group relative">
|
||||||
<a href="/shopitems/{{ .ID }}">
|
<a href="/shopitems/{{ .ID }}">
|
||||||
<img src="/{{ .Image }}" alt="Product Image" class="aspect-4/5 w-full rounded-md bg-gray-200 object-cover group-hover:opacity-75 lg:aspect-auto lg:h-80">
|
<img src="/{{ .Image }}" alt="Product Image" class="aspect-4/5 mx-auto rounded-md bg-gray-200 object-cover group-hover:opacity-75 lg:aspect-auto lg:h-80">
|
||||||
</a>
|
</a>
|
||||||
<div class="mt-4 flex justify-between">
|
<div class="mt-4 flex justify-between">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user