Simplified the artists view

This commit is contained in:
emeric
2018-08-31 14:17:39 +02:00
parent 93f993c146
commit 65269904df
3 changed files with 7 additions and 37 deletions
+4 -3
View File
@@ -17,9 +17,10 @@
</message> </message>
<message id="Lms.Explore.Artists.template.entry"> <message id="Lms.Explore.Artists.template.entry">
<div class="Lms-explore-artists-entry Lms-vertical-align"> <div class="row">
<h4>${name}</h4> <div class="col-xs-12 Lms-explore-artists-entry Lms-vertical-align">
<span class="badge Lms-explore-artists-entry-nb-releases">${nb-release}</span> <h4>${name}</h4>
</div>
</div> </div>
</message> </message>
+3 -13
View File
@@ -99,21 +99,15 @@ a:hover {
box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.4); box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.4);
} }
.Lms-explore-release-entry { .Lms-explore-release-entry-name {
height: 28px; margin-top: 4px;
margin-bottom: 4px;
} }
.Lms-explore-release-entry:hover { .Lms-explore-release-entry:hover {
background-color: lightgrey; background-color: lightgrey;
} }
.Lms-explore-release-entry-name {
line-height: 28px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.Lms-explore-release-entry-controls { .Lms-explore-release-entry-controls {
text-align: center; text-align: center;
} }
@@ -126,10 +120,6 @@ a:hover {
background-color: lightgrey; background-color: lightgrey;
} }
.Lms-explore-artists-entry-nb-releases {
margin: 8px;
}
.Lms-explore-btn { .Lms-explore-btn {
font-size: 22px !important; font-size: 22px !important;
cursor: pointer; cursor: pointer;
-21
View File
@@ -87,28 +87,7 @@ Artists::addSome()
{ {
Wt::WTemplate* entry = _container->addNew<Wt::WTemplate>(Wt::WString::tr("Lms.Explore.Artists.template.entry")); Wt::WTemplate* entry = _container->addNew<Wt::WTemplate>(Wt::WString::tr("Lms.Explore.Artists.template.entry"));
entry->bindInt("nb-release", artist->getReleases(clusterIds).size());
entry->bindWidget("name", LmsApplication::createArtistAnchor(artist)); entry->bindWidget("name", LmsApplication::createArtistAnchor(artist));
Wt::WContainerWidget* clusterContainers = entry->bindNew<Wt::WContainerWidget>("clusters");
{
auto clusterTypes = ScanSettings::get(LmsApp->getDboSession())->getClusterTypes();
auto clusterGroups = artist->getClusterGroups(clusterTypes, 1);
for (auto clusters : clusterGroups)
{
for (auto cluster : clusters)
{
auto clusterId = cluster.id();
auto entry = clusterContainers->addWidget(LmsApp->createCluster(cluster));
entry->clicked().connect([=]
{
_filters->add(clusterId);
});
}
}
}
} }
_showMore->setHidden(!moreResults); _showMore->setHidden(!moreResults);