Displaying all release artists instead of just 'Various Artists' in the release view, ref #154
This commit is contained in:
+6
-2
@@ -14,7 +14,7 @@
|
|||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="Lms-header">
|
<div class="Lms-header">
|
||||||
<h3><div class="Lms-releasename text-primary">${name}</div></h3>
|
<h3><div class="Lms-releasename text-primary">${name}</div></h3>
|
||||||
${<if-has-artist>}<h4>${artist class="Lms-btn Lms-artistname text-muted"}</h4>${</if-has-artist>}
|
${<if-has-release-artists>}${artists}${</if-has-release-artists>}
|
||||||
<div class="text-muted"><small>${<if-has-year>}${year}${</if-has-year>}${<if-has-orig-year>} (${orig-year})${</if-has-orig-year>}</small></div>
|
<div class="text-muted"><small>${<if-has-year>}${year}${</if-has-year>}${<if-has-orig-year>} (${orig-year})${</if-has-orig-year>}</small></div>
|
||||||
${clusters}
|
${clusters}
|
||||||
${play-btn class="Lms-explore-btn Lms-btn"}${more-btn class="Lms-explore-btn Lms-btn"}
|
${play-btn class="Lms-explore-btn Lms-btn"}${more-btn class="Lms-explore-btn Lms-btn"}
|
||||||
@@ -52,7 +52,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
<message id="Lms.Explore.Release.template.disc-entry">
|
<message id="Lms.Explore.Release.template.entry-release-artist">
|
||||||
|
<h4>${artist class="Lms-btn Lms-artistname text-muted"}</h4>
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<message id="Lms.Explore.Release.template.entry-disc">
|
||||||
<h4>${disc-title}</h4>
|
<h4>${disc-title}</h4>
|
||||||
${tracks}
|
${tracks}
|
||||||
</message>
|
</message>
|
||||||
|
|||||||
@@ -114,15 +114,16 @@ Release::refreshView()
|
|||||||
if (artists.empty())
|
if (artists.empty())
|
||||||
artists = release->getArtists();
|
artists = release->getArtists();
|
||||||
|
|
||||||
if (artists.size() > 1)
|
if (!artists.empty())
|
||||||
{
|
{
|
||||||
setCondition("if-has-artist", true);
|
setCondition("if-has-release-artists", true);
|
||||||
bindNew<Wt::WText>("artist", Wt::WString::tr("Lms.Explore.various-artists"));
|
|
||||||
}
|
Wt::WContainerWidget* artistsContainer {bindNew<Wt::WContainerWidget>("artists")};
|
||||||
else if (artists.size() == 1)
|
for (const auto& artist : artists)
|
||||||
{
|
{
|
||||||
setCondition("if-has-artist", true);
|
Wt::WTemplate* artistTemplate {artistsContainer->addNew<Wt::WTemplate>(Wt::WString::tr("Lms.Explore.Release.template.entry-release-artist"))};
|
||||||
bindWidget("artist", LmsApplication::createArtistAnchor(artists.front()));
|
artistTemplate->bindWidget("artist", LmsApplication::createArtistAnchor(artist));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,8 +184,7 @@ Release::refreshView()
|
|||||||
return it->second;
|
return it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
Wt::WTemplate* disc {rootContainer->addNew<Wt::WTemplate>(Wt::WString::tr("Lms.Explore.Release.template.disc-entry"))};
|
Wt::WTemplate* disc {rootContainer->addNew<Wt::WTemplate>(Wt::WString::tr("Lms.Explore.Release.template.entry-disc"))};
|
||||||
disc->addFunction("tr", &Wt::WTemplate::Functions::tr);
|
|
||||||
|
|
||||||
if (discSubtitle.empty())
|
if (discSubtitle.empty())
|
||||||
disc->bindNew<Wt::WText>("disc-title", Wt::WString::tr("Lms.Explore.Release.disc").arg(discNumber));
|
disc->bindNew<Wt::WText>("disc-title", Wt::WString::tr("Lms.Explore.Release.disc").arg(discNumber));
|
||||||
|
|||||||
Reference in New Issue
Block a user