anioop
This commit is contained in:
parent
7f54c2a63c
commit
a5b0912839
1 changed files with 63 additions and 62 deletions
|
@ -15,75 +15,76 @@ block content
|
||||||
th Delete
|
th Delete
|
||||||
tbody
|
tbody
|
||||||
each item, index in wishlist
|
each item, index in wishlist
|
||||||
tr
|
if req.user._id === item.addedBy || req.params.user !== req.user._id
|
||||||
if item.url
|
tr
|
||||||
td(data-label='Name')
|
if item.url
|
||||||
a(
|
td(data-label='Name')
|
||||||
href=item.url,
|
a(
|
||||||
rel='noopener noreferrer',
|
href=item.url,
|
||||||
target='_blank'
|
rel='noopener noreferrer',
|
||||||
)= (item.name ? item.name : item.url)
|
target='_blank'
|
||||||
else
|
)= (item.name ? item.name : item.url)
|
||||||
td(data-label='Name')= item.name
|
else
|
||||||
td(data-label='Note', style='white-space: pre-wrap;')= item.note
|
td(data-label='Name')= item.name
|
||||||
td(data-label='Edit Note')
|
td(data-label='Note', style='white-space: pre-wrap;')= item.note
|
||||||
form.inline(method='GET', action=`/wishlist/${req.params.user}/note/${item.id}`)
|
td(data-label='Edit Note')
|
||||||
input(type='hidden', name='current', value=item.note)
|
form.inline(method='GET', action=`/wishlist/${req.params.user}/note/${item.id}`)
|
||||||
.field.inline
|
input(type='hidden', name='current', value=item.note)
|
||||||
.control.inline
|
.field.inline
|
||||||
button.button.is-text(
|
.control.inline
|
||||||
type='submit',
|
button.button.is-text(
|
||||||
style='text-decoration: none;'
|
type='submit',
|
||||||
disabled=item.addedBy !== req.user._id
|
style='text-decoration: none;'
|
||||||
)
|
disabled=item.addedBy !== req.user._id
|
||||||
span.icon
|
)
|
||||||
i.far.fa-edit
|
span.icon
|
||||||
if req.params.user === req.user._id
|
i.far.fa-edit
|
||||||
td(data-label='Move Item Up')
|
if req.params.user === req.user._id
|
||||||
form.inline(method='POST', action=`/wishlist/${req.params.user}/move/up/${item.id}`)
|
td(data-label='Move Item Up')
|
||||||
|
form.inline(method='POST', action=`/wishlist/${req.params.user}/move/up/${item.id}`)
|
||||||
|
.field.inline
|
||||||
|
.control.inline
|
||||||
|
button.button.is-text(
|
||||||
|
type='submit',
|
||||||
|
style='text-decoration: none;',
|
||||||
|
disabled=index === firstCanSee
|
||||||
|
)
|
||||||
|
span.icon
|
||||||
|
i.fas.fa-arrow-up
|
||||||
|
td(data-label='Move Item Down')
|
||||||
|
form.inline(method='POST', action=`/wishlist/${req.params.user}/move/down/${item.id}`)
|
||||||
|
.field.inline
|
||||||
|
.control.inline
|
||||||
|
button.button.is-text(
|
||||||
|
type='submit',
|
||||||
|
style='text-decoration: none;',
|
||||||
|
disabled=index === lastCanSee
|
||||||
|
)
|
||||||
|
span.icon
|
||||||
|
i.fas.fa-arrow-down
|
||||||
|
else
|
||||||
|
td(data-label='Pledge')
|
||||||
|
if req.params.user !== req.user._id && !item.pledgedBy
|
||||||
|
form.inline(method='POST', action=`/wishlist/${req.params.user}/pledge/${item.id}`)
|
||||||
|
.field.inline
|
||||||
|
.control.inline
|
||||||
|
input.inline.button.is-primary(type='submit' value='Pledge')
|
||||||
|
if item.pledgedBy === req.user._id
|
||||||
|
form.inline(method='POST', action=`/wishlist/${req.params.user}/unpledge/${item.id}`)
|
||||||
|
.field.inline
|
||||||
|
.control.inline
|
||||||
|
input.inline.button(type='submit' value='Unpledge')
|
||||||
|
td(data-label='Delete Item')
|
||||||
|
form.inline(method='POST', action=`/wishlist/${req.params.user}/remove/${item.id}`)
|
||||||
.field.inline
|
.field.inline
|
||||||
.control.inline
|
.control.inline
|
||||||
button.button.is-text(
|
button.button.is-text(
|
||||||
type='submit',
|
type='submit',
|
||||||
style='text-decoration: none;',
|
style='text-decoration: none;',
|
||||||
disabled=index === firstCanSee
|
disabled=item.addedBy !== req.user._id
|
||||||
)
|
)
|
||||||
span.icon
|
span.icon
|
||||||
i.fas.fa-arrow-up
|
i.fas.fa-trash
|
||||||
td(data-label='Move Item Down')
|
|
||||||
form.inline(method='POST', action=`/wishlist/${req.params.user}/move/down/${item.id}`)
|
|
||||||
.field.inline
|
|
||||||
.control.inline
|
|
||||||
button.button.is-text(
|
|
||||||
type='submit',
|
|
||||||
style='text-decoration: none;',
|
|
||||||
disabled=index === lastCanSee
|
|
||||||
)
|
|
||||||
span.icon
|
|
||||||
i.fas.fa-arrow-down
|
|
||||||
else
|
|
||||||
td(data-label='Pledge')
|
|
||||||
if req.params.user !== req.user._id && !item.pledgedBy
|
|
||||||
form.inline(method='POST', action=`/wishlist/${req.params.user}/pledge/${item.id}`)
|
|
||||||
.field.inline
|
|
||||||
.control.inline
|
|
||||||
input.inline.button.is-primary(type='submit' value='Pledge')
|
|
||||||
if item.pledgedBy === req.user._id
|
|
||||||
form.inline(method='POST', action=`/wishlist/${req.params.user}/unpledge/${item.id}`)
|
|
||||||
.field.inline
|
|
||||||
.control.inline
|
|
||||||
input.inline.button(type='submit' value='Unpledge')
|
|
||||||
td(data-label='Delete Item')
|
|
||||||
form.inline(method='POST', action=`/wishlist/${req.params.user}/remove/${item.id}`)
|
|
||||||
.field.inline
|
|
||||||
.control.inline
|
|
||||||
button.button.is-text(
|
|
||||||
type='submit',
|
|
||||||
style='text-decoration: none;',
|
|
||||||
disabled=item.addedBy !== req.user._id
|
|
||||||
)
|
|
||||||
span.icon
|
|
||||||
i.fas.fa-trash
|
|
||||||
|
|
||||||
else
|
else
|
||||||
each item, index in wishlist
|
each item, index in wishlist
|
||||||
|
|
Loading…
Reference in a new issue