Fix no-url items on wishlists not having buttons
This commit is contained in:
parent
b69b043153
commit
cfdd1bf79f
1 changed files with 4 additions and 4 deletions
|
@ -4,9 +4,11 @@ block content
|
||||||
for item in wishlist
|
for item in wishlist
|
||||||
if req.user._id === item.addedBy || req.params.user !== req.user._id
|
if req.user._id === item.addedBy || req.params.user !== req.user._id
|
||||||
.box
|
.box
|
||||||
if item.url
|
|
||||||
span
|
span
|
||||||
a(href=item.url, rel='noopener noreferrer', target='_blank')= (item.name ? item.name : item.url)
|
if item.url
|
||||||
|
a(href=item.url, rel='noopener noreferrer', target='_blank')= (item.name ? item.name : item.url)
|
||||||
|
else
|
||||||
|
span= item.name
|
||||||
if req.params.user !== req.user._id && !item.pledgedBy
|
if req.params.user !== req.user._id && !item.pledgedBy
|
||||||
form(method='POST', action=`/wishlist/${req.params.user}/pledge/${item.id}`)
|
form(method='POST', action=`/wishlist/${req.params.user}/pledge/${item.id}`)
|
||||||
.field
|
.field
|
||||||
|
@ -22,8 +24,6 @@ block content
|
||||||
.field
|
.field
|
||||||
.control
|
.control
|
||||||
input.button.is-warning(type='submit' value='Remove')
|
input.button.is-warning(type='submit' value='Remove')
|
||||||
else
|
|
||||||
span= item.name
|
|
||||||
form(method='POST')
|
form(method='POST')
|
||||||
.field
|
.field
|
||||||
label.label Item URL or Name
|
label.label Item URL or Name
|
||||||
|
|
Loading…
Reference in a new issue