Moved the copyright information in the new release info view

This commit is contained in:
emeric
2019-03-08 17:17:56 +01:00
parent c1ffe8ab57
commit d5ead9193f
4 changed files with 48 additions and 40 deletions
+1 -23
View File
@@ -19,8 +19,8 @@
#include "ReleaseView.hpp"
#include <Wt/WApplication.h>
#include <Wt/WAnchor.h>
#include <Wt/WApplication.h>
#include <Wt/WImage.h>
#include <Wt/WTemplate.h>
#include <Wt/WText.h>
@@ -94,28 +94,6 @@ Release::refresh()
}
}
boost::optional<std::string> copyright = release->getCopyright();
boost::optional<std::string> copyrightURL = release->getCopyrightURL();
t->setCondition("if-has-copyright-or-copyright-url", copyright || copyrightURL);
if (copyrightURL)
{
t->setCondition("if-has-copyright-url", true);
Wt::WLink link(*copyrightURL);
link.setTarget(Wt::LinkTarget::NewWindow);
Wt::WAnchor* anchor = t->bindNew<Wt::WAnchor>("copyright-url", link);
anchor->setTextFormat(Wt::TextFormat::XHTML);
anchor->setText(Wt::WString::tr("Lms.Explore.Release.template.link-btn"));
}
if (copyright)
{
t->setCondition("if-has-copyright", true);
t->bindString("copyright", Wt::WString::fromUTF8(*copyright), Wt::TextFormat::Plain);
}
{
auto artists = release->getArtists();
if (artists.size() > 1)