multi-line tag editing, better paging format

This commit is contained in:
Tangent 2019-06-13 09:42:23 -07:00
parent 3bb648786f
commit 5149d15c04
2 changed files with 32 additions and 15 deletions

View File

@ -7,11 +7,18 @@ import Tracks from require "models"
class extends Widget
menu: =>
div ->
if @previous
a href: @url_for("track", id: @previous.id), "<"
raw "&nbsp;"
if @next
a href: @url_for("track", id: @next.id), ">"
element "table", ->
tr ->
td ->
if @previous
a href: @url_for("track", id: @previous.id), "<"
else
text "<"
td ->
if @next
a href: @url_for("track", id: @next.id), ">"
else
text ">"
content: =>
@menu!
@ -58,7 +65,8 @@ class extends Widget
br!
text "Tags: "
input type: "text", name: "tags", value: trim(@track.tags), placeholder: "untagged"
-- input type: "text", name: "tags", value: trim(@track.tags), placeholder: "untagged"
textarea rows: 8, name: "tags", placeholder: "untagged", trim(@track.tags)
br!
input type: "submit", value: "Update"
@menu!

View File

@ -5,15 +5,24 @@ import Tracks from require "models"
class extends Widget
menu: =>
div ->
if @page != 1
a href: @url_for("tracks", order: @order, asc_desc: @asc_desc, page: 1), "<<"
raw "&nbsp;"
a href: @url_for("tracks", order: @order, asc_desc: @asc_desc, page: @page - 1), "<"
raw "&nbsp;"
if @page != @last_page
a href: @url_for("tracks", order: @order, asc_desc: @asc_desc, page: @page + 1), ">"
raw "&nbsp;"
a href: @url_for("tracks", order: @order, asc_desc: @asc_desc, page: @last_page), ">>"
element "table", ->
tr ->
if @page != 1
td ->
a href: @url_for("tracks", order: @order, asc_desc: @asc_desc, page: 1), "<<"
td ->
a href: @url_for("tracks", order: @order, asc_desc: @asc_desc, page: @page - 1), "<"
else
td "<<"
td "<"
if @page != @last_page
td ->
a href: @url_for("tracks", order: @order, asc_desc: @asc_desc, page: @page + 1), ">"
td ->
a href: @url_for("tracks", order: @order, asc_desc: @asc_desc, page: @last_page), ">>"
else
td ">"
td ">>"
content: =>
@menu!