Added play/pause buttons
This commit is contained in:
@@ -2,9 +2,18 @@
|
||||
<messages xmlns:if="Wt.WTemplate.conditions">
|
||||
<!--FORMS message blocks-->
|
||||
|
||||
<message id="btn-artist-play-btn">
|
||||
<i class="fa fa-play"></i>
|
||||
</message>
|
||||
|
||||
<message id="btn-artist-add-btn">
|
||||
<i class="fa fa-plus"></i>
|
||||
</message>
|
||||
|
||||
<message id="template-artist">
|
||||
<div class="page-header">
|
||||
<h2>${name}</h2>
|
||||
${play-btn}${add-btn}
|
||||
</div>
|
||||
${releases class="list-group"}
|
||||
</message>
|
||||
@@ -19,6 +28,7 @@
|
||||
</div>
|
||||
${<if-has-various-artists>}${tr:msg-various-artists}${</if-has-various-artists>}
|
||||
<h4>${<if-has-year>}${year}${</if-has-year>}${<if-has-orig-year>} (${orig-year})${</if-has-orig-year>}</h4>
|
||||
${play-btn}${add-btn}
|
||||
</div>
|
||||
</message>
|
||||
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
<messages xmlns:if="Wt.WTemplate.conditions">
|
||||
<!--FORMS message blocks-->
|
||||
|
||||
<message id="btn-release-play-btn">
|
||||
<i class="fa fa-play"></i>
|
||||
</message>
|
||||
|
||||
<message id="btn-release-add-btn">
|
||||
<i class="fa fa-plus"></i>
|
||||
</message>
|
||||
|
||||
<message id="template-release">
|
||||
${cover}
|
||||
<div class="page-header">
|
||||
|
||||
@@ -16,6 +16,14 @@
|
||||
${tracks class="list-group"}
|
||||
</message>
|
||||
|
||||
<message id="btn-tracks-play-btn">
|
||||
<i class="fa fa-play"></i>
|
||||
</message>
|
||||
|
||||
<message id="btn-tracks-add-btn">
|
||||
<i class="fa fa-plus"></i>
|
||||
</message>
|
||||
|
||||
<message id="template-tracks-entry">
|
||||
<div class="media list-group-item">
|
||||
<div class="pull-left media-middle">
|
||||
|
||||
@@ -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