Added play/pause buttons
This commit is contained in:
@@ -74,6 +74,15 @@ Artist::refresh()
|
||||
t->addFunction("tr", &Wt::WTemplate::Functions::tr);
|
||||
|
||||
t->bindString("name", Wt::WString::fromUTF8(artist->getName()), Wt::PlainText);
|
||||
{
|
||||
auto playBtn = new Wt::WText(Wt::WString::tr("btn-artist-play-btn"), Wt::XHTMLText);
|
||||
t->bindWidget("play-btn", playBtn);
|
||||
}
|
||||
|
||||
{
|
||||
auto addBtn = new Wt::WText(Wt::WString::tr("btn-artist-add-btn"), Wt::XHTMLText);
|
||||
t->bindWidget("add-btn", addBtn);
|
||||
}
|
||||
|
||||
auto releasesContainer = new Wt::WContainerWidget();
|
||||
t->bindWidget("releases", releasesContainer);
|
||||
@@ -116,6 +125,12 @@ Artist::refresh()
|
||||
entry->bindInt("orig-year", *originalYear);
|
||||
}
|
||||
}
|
||||
|
||||
auto playBtn = new Wt::WText(Wt::WString::tr("btn-artist-play-btn"), Wt::XHTMLText);
|
||||
entry->bindWidget("play-btn", playBtn);
|
||||
|
||||
auto addBtn = new Wt::WText(Wt::WString::tr("btn-artist-add-btn"), Wt::XHTMLText);
|
||||
entry->bindWidget("add-btn", addBtn);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+15
-1
@@ -105,7 +105,15 @@ Release::refresh()
|
||||
cover->setImageLink(Wt::WLink (SessionImageResource()->getReleaseUrl(release.id(), 512)));
|
||||
t->bindWidget("cover", cover);
|
||||
|
||||
// TODO play/add button
|
||||
{
|
||||
auto playBtn = new Wt::WText(Wt::WString::tr("btn-release-play-btn"), Wt::XHTMLText);
|
||||
t->bindWidget("play-btn", playBtn);
|
||||
}
|
||||
|
||||
{
|
||||
auto addBtn = new Wt::WText(Wt::WString::tr("btn-release-add-btn"), Wt::XHTMLText);
|
||||
t->bindWidget("add-btn", addBtn);
|
||||
}
|
||||
|
||||
auto tracksContainer = new Wt::WContainerWidget();
|
||||
t->bindWidget("tracks", tracksContainer);
|
||||
@@ -144,6 +152,12 @@ Release::refresh()
|
||||
entry->setCondition("if-has-disc-number", true);
|
||||
entry->bindInt("disc-number", *discNumber);
|
||||
}
|
||||
|
||||
auto playBtn = new Wt::WText(Wt::WString::tr("btn-release-play-btn"), Wt::XHTMLText);
|
||||
entry->bindWidget("play-btn", playBtn);
|
||||
|
||||
auto addBtn = new Wt::WText(Wt::WString::tr("btn-release-add-btn"), Wt::XHTMLText);
|
||||
entry->bindWidget("add-btn", addBtn);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -106,6 +106,12 @@ Tracks::refresh(std::vector<std::string> searchKeywords)
|
||||
// Some images may not be square
|
||||
cover->setWidth(64);
|
||||
entry->bindWidget("cover", cover);
|
||||
|
||||
auto playBtn = new Wt::WText(Wt::WString::tr("btn-tracks-play-btn"), Wt::XHTMLText);
|
||||
entry->bindWidget("play-btn", playBtn);
|
||||
|
||||
auto addBtn = new Wt::WText(Wt::WString::tr("btn-tracks-add-btn"), Wt::XHTMLText);
|
||||
entry->bindWidget("add-btn", addBtn);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user