Added anchors in the player

This commit is contained in:
emeric
2018-08-29 14:10:22 +02:00
parent 95f206a209
commit d51a0465cf
6 changed files with 50 additions and 26 deletions
+14 -2
View File
@@ -150,10 +150,16 @@ LmsApplication::finalize()
preQuit().emit();
}
Wt::WLink
LmsApplication::createArtistLink(Database::Artist::pointer artist)
{
return Wt::WLink(Wt::LinkType::InternalPath, "/artist/" + std::to_string(artist.id()));
}
std::unique_ptr<Wt::WAnchor>
LmsApplication::createArtistAnchor(Database::Artist::pointer artist, bool addText)
{
auto res = std::make_unique<Wt::WAnchor>(Wt::WLink(Wt::LinkType::InternalPath, "/artist/" + std::to_string(artist.id())));
auto res = std::make_unique<Wt::WAnchor>(createArtistLink(artist));
if (addText)
{
@@ -164,10 +170,16 @@ LmsApplication::createArtistAnchor(Database::Artist::pointer artist, bool addTex
return res;
}
Wt::WLink
LmsApplication::createReleaseLink(Database::Release::pointer release)
{
return Wt::WLink(Wt::LinkType::InternalPath, "/release/" + std::to_string(release.id()));
}
std::unique_ptr<Wt::WAnchor>
LmsApplication::createReleaseAnchor(Database::Release::pointer release, bool addText)
{
auto res = std::make_unique<Wt::WAnchor>(Wt::WLink(Wt::LinkType::InternalPath, "/release/" + std::to_string(release.id())));
auto res = std::make_unique<Wt::WAnchor>(createReleaseLink(release));
if (addText)
{