2018-03-13 22:06:16 +00:00
|
|
|
component Quotes(quotes []*arn.Quote, nextIndex int, user *arn.User)
|
2017-12-03 21:33:24 +00:00
|
|
|
h1.page-title Quotes
|
|
|
|
|
2018-01-17 22:30:55 +00:00
|
|
|
QuotesTabs
|
|
|
|
|
2017-12-03 21:33:24 +00:00
|
|
|
.corner-buttons
|
|
|
|
if user != nil
|
|
|
|
if user.DraftIndex().QuoteID == ""
|
|
|
|
button.action(data-action="newObject", data-trigger="click", data-type="quote")
|
|
|
|
Icon("plus")
|
|
|
|
span Add quote
|
|
|
|
else
|
2018-03-23 20:33:19 +00:00
|
|
|
a.button(href="/quote/" + user.DraftIndex().QuoteID + "/edit")
|
2017-12-03 21:33:24 +00:00
|
|
|
Icon("pencil")
|
|
|
|
span Edit draft
|
|
|
|
|
2018-01-17 22:30:55 +00:00
|
|
|
#load-more-target.quotes
|
|
|
|
QuotesScrollable(quotes, user)
|
|
|
|
|
2018-03-13 22:06:16 +00:00
|
|
|
if nextIndex != -1
|
2018-01-17 22:30:55 +00:00
|
|
|
.buttons
|
2018-03-13 22:06:16 +00:00
|
|
|
LoadMore(nextIndex)
|
2018-01-17 22:30:55 +00:00
|
|
|
|
|
|
|
component QuotesScrollable(quotes []*arn.Quote, user *arn.User)
|
|
|
|
each quote in quotes
|
2018-04-22 14:12:00 +00:00
|
|
|
QuotePreview(quote, user)
|
2018-01-17 22:30:55 +00:00
|
|
|
|
|
|
|
component QuotesTabs
|
|
|
|
.tabs
|
|
|
|
Tab("Latest", "quote-left", "/quotes")
|
|
|
|
Tab("Best", "heart", "/quotes/best")
|