VIVO-123 - handle malformed data more gracefully on manage pubs page

This commit is contained in:
tworrall 2013-06-06 15:44:16 -04:00
parent fe1b52ab49
commit 1dde11c581
2 changed files with 11 additions and 5 deletions

View file

@ -37,7 +37,8 @@ ${i18n().check_pubs_to_exclude}
<ul >
<#list pubs as pub>
<li>
<input type="checkbox" class="pubCheckbox" <#if pub.hideThis??>checked</#if> />${pub.title}
<input type="checkbox" class="pubCheckbox" <#if pub.hideThis??>checked</#if> />
<#if pub.title?has_content>${pub.title!}<#else>Title not found.</#if>
</li>
<script type="text/javascript">
publicationData.push({
@ -59,6 +60,10 @@ ${i18n().check_pubs_to_exclude}
var customFormData = {
processingUrl: '${urls.base}/edit/primitiveRdfEdit'
};
var i18nStrings = {
publicationSuccessfullyExcluded: '${i18n().publication_successfully_excluded}',
errorExcludingPublication: '${i18n().error_excluding_publication}'
};
</script>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/templates/freemarker/edit/forms/css/customForm.css" />',

View file

@ -82,10 +82,11 @@ public class ManagePublicationsForIndividualController extends FreemarkerHttpSer
+ "SELECT DISTINCT ?subclass ?authorship (str(?label) as ?title) ?pub ?hideThis WHERE { \n"
+ " ?subject core:authorInAuthorship ?authorship . \n"
+ " OPTIONAL { ?authorship core:linkedInformationResource ?pub . "
+ " ?pub rdfs:label ?label } \n"
+ " ?pub rdfs:label ?label \n"
+ " OPTIONAL { ?pub vitro:mostSpecificType ?subclass . \n"
+ " ?subclass rdfs:subClassOf core:InformationResource } \n"
+ " OPTIONAL { ?authorship core:hideFromDisplay ?hideThis } \n "
+ " } \n"
+ " OPTIONAL { ?authorship core:hideFromDisplay ?hideThis } \n"
+ "} ORDER BY ?subclass ?title";