Merge branch 'develop' of git://github.com/vivo-project/Vitro into develop
# By Graham Triggs # Via grahamtriggs (2) and Graham Triggs (1) * 'develop' of git://github.com/vivo-project/Vitro: [VIVO-1224] Suppress default "synthetic" model from the lists on the ingest pages [VIVO-1230] Make contact form compatible with SMTP relays [VIVO-1233] Wrap large buttons on ontology edit page Fix error message (change erroneous UPDATE to SELECT)
This commit is contained in:
commit
0709ca504e
4 changed files with 99 additions and 72 deletions
|
@ -12,6 +12,7 @@ import java.util.Date;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.mail.Address;
|
||||
import javax.mail.Message;
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.SendFailedException;
|
||||
|
@ -256,13 +257,13 @@ public class ContactMailController extends FreemarkerHttpServlet {
|
|||
MimeMessage msg = new MimeMessage( s );
|
||||
//System.out.println("trying to send message from servlet");
|
||||
|
||||
// Set the from address
|
||||
// Set the reply address
|
||||
try {
|
||||
msg.setFrom( new InternetAddress( webuseremail, webusername ));
|
||||
msg.setReplyTo( new Address[] { new InternetAddress( webuseremail, webusername ) } );
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
log.error("Can't set message sender with personal name " + webusername +
|
||||
log.error("Can't set message reply with personal name " + webusername +
|
||||
" due to UnsupportedEncodingException");
|
||||
msg.setFrom( new InternetAddress( webuseremail ) );
|
||||
// msg.setFrom( new InternetAddress( webuseremail ) );
|
||||
}
|
||||
|
||||
// Set the recipient address
|
||||
|
@ -272,6 +273,13 @@ public class ContactMailController extends FreemarkerHttpServlet {
|
|||
}
|
||||
msg.setRecipients( Message.RecipientType.TO, address );
|
||||
|
||||
// Set the from address
|
||||
if (address != null && address.length > 0) {
|
||||
msg.setFrom(address[0]);
|
||||
} else {
|
||||
msg.setFrom( new InternetAddress( webuseremail ) );
|
||||
}
|
||||
|
||||
// Set the subject and text
|
||||
msg.setSubject( deliveryfrom );
|
||||
|
||||
|
|
|
@ -188,8 +188,15 @@ public class JenaIngestController extends BaseEditController {
|
|||
request.setAttribute("bodyJsp",INGEST_MENU_JSP);
|
||||
}
|
||||
|
||||
maker = getModelMaker(vreq);
|
||||
request.setAttribute("modelNames", maker.listModels().toList());
|
||||
maker = getModelMaker(vreq);
|
||||
List<String> modelNames = maker.listModels().toList();
|
||||
for (int mnIdx = modelNames.size() - 1; mnIdx > -1; mnIdx--) {
|
||||
if (!modelNames.get(mnIdx).startsWith("http")) {
|
||||
modelNames.remove(mnIdx);
|
||||
}
|
||||
}
|
||||
|
||||
request.setAttribute("modelNames", modelNames);
|
||||
|
||||
RequestDispatcher rd = request.getRequestDispatcher(
|
||||
Controllers.BASIC_JSP);
|
||||
|
|
|
@ -304,7 +304,7 @@ public class RDFServiceSparql extends RDFServiceImpl implements RDFService {
|
|||
if (statusCode > 399) {
|
||||
log.error("response " + statusCode + " to query. \n");
|
||||
log.debug("update string: \n" + queryStr);
|
||||
throw new RDFServiceException("Unable to perform SPARQL UPDATE");
|
||||
throw new RDFServiceException("Unable to perform SPARQL SELECT");
|
||||
}
|
||||
|
||||
try (InputStream in = response.getEntity().getContent()) {
|
||||
|
|
|
@ -2,77 +2,89 @@
|
|||
|
||||
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
|
||||
xmlns:c="http://java.sun.com/jsp/jstl/core"
|
||||
xmlns:form="http://vitro.mannlib.cornell.edu/edit/tags"
|
||||
version="2.0">
|
||||
<jsp:directive.page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers"/>
|
||||
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
|
||||
xmlns:c="http://java.sun.com/jsp/jstl/core"
|
||||
xmlns:form="http://vitro.mannlib.cornell.edu/edit/tags"
|
||||
version="2.0">
|
||||
<jsp:directive.page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers"/>
|
||||
|
||||
|
||||
<div class="editingForm">
|
||||
<div class="editingForm">
|
||||
<style>
|
||||
.editingForm .form-button {
|
||||
white-space: normal;
|
||||
}
|
||||
</style>
|
||||
|
||||
<jsp:include page="/templates/edit/fetch/vertical.jsp"/>
|
||||
<jsp:include page="/templates/edit/fetch/vertical.jsp"/>
|
||||
|
||||
<div align="center">
|
||||
<table class="form-background" border="0" cellpadding="2" cellspacing="2">
|
||||
<tr valign="bottom" align="center">
|
||||
<td>
|
||||
<form action="listOntologies" method="get">
|
||||
<input type="submit" class="form-button" value="All Ontologies"/>
|
||||
</form>
|
||||
<form action="showClassHierarchy" method="get">
|
||||
<input type="submit" class="form-button" value="Hierarchy of Classes Defined in This Namespace" />
|
||||
<input type="hidden" name="ontologyUri" value="${Ontology.URI}" />
|
||||
</form>
|
||||
<form action="listPropertyWebapps" method="get">
|
||||
<input type="submit" class="form-button" value="Object Properties Defined in This Namespace" />
|
||||
<input type="hidden" name="ontologyUri" value="${Ontology.URI}" />
|
||||
</form>
|
||||
<form action="listDatatypeProperties" method="get">
|
||||
<input type="submit" class="form-button" value="Datatype Properties Defined in This Namespace" />
|
||||
<input type="hidden" name="ontologyUri" value="${Ontology.URI}" />
|
||||
</form>
|
||||
</td>
|
||||
<td valign="bottom" align="center">
|
||||
<form action="editForm" method="get">
|
||||
<input type="submit" class="form-button" value="Edit ${Ontology.name}"/>
|
||||
<input name="uri" type = "hidden" value="${Ontology.URI}" />
|
||||
<input type="hidden" name="controller" value="Ontology"/>
|
||||
</form>
|
||||
</td>
|
||||
<td valign="bottom">
|
||||
<form action="editForm" method="get">
|
||||
<input type="submit" class="form-button" value="Add New Ontology"/>
|
||||
<input type="hidden" name="controller" value="Ontology"/>
|
||||
</form>
|
||||
<form action="editForm" method="get">
|
||||
<input type="submit" class="form-button" value="Change URI"/>
|
||||
<input type="hidden" name="oldURI" value="${realURI}"/>
|
||||
<input type="hidden" name="mode" value="renameResource"/>
|
||||
<input type="hidden" name="controller" value="Refactor"/>
|
||||
</form>
|
||||
<div align="center">
|
||||
<table class="form-background" border="0" cellpadding="2" cellspacing="2">
|
||||
<tr valign="bottom" align="center">
|
||||
<td width="46%">
|
||||
<form action="listOntologies" method="get">
|
||||
<input type="submit" class="form-button" value="All Ontologies"/>
|
||||
</form>
|
||||
<form action="showClassHierarchy" method="get">
|
||||
<input type="submit" class="form-button" value="Hierarchy of Classes Defined in This Namespace" />
|
||||
<input type="hidden" name="ontologyUri" value="${Ontology.URI}" />
|
||||
</form>
|
||||
<form action="listPropertyWebapps" method="get">
|
||||
<input type="submit" class="form-button" value="Object Properties Defined in This Namespace" />
|
||||
<input type="hidden" name="ontologyUri" value="${Ontology.URI}" />
|
||||
</form>
|
||||
<form action="listDatatypeProperties" method="get">
|
||||
<input type="submit" class="form-button" value="Datatype Properties Defined in This Namespace" />
|
||||
<input type="hidden" name="ontologyUri" value="${Ontology.URI}" />
|
||||
</form>
|
||||
</td>
|
||||
<td valign="bottom" align="center" width="27%">
|
||||
<form action="editForm" method="get">
|
||||
<input type="submit" class="form-button" value="Edit ${Ontology.name}"/>
|
||||
<input name="uri" type = "hidden" value="${Ontology.URI}" />
|
||||
<input type="hidden" name="controller" value="Ontology"/>
|
||||
</form>
|
||||
</td>
|
||||
<td valign="bottom" width="27%">
|
||||
<form action="editForm" method="get">
|
||||
<input type="submit" class="form-button" value="Add New Ontology"/>
|
||||
<input type="hidden" name="controller" value="Ontology"/>
|
||||
</form>
|
||||
<form action="editForm" method="get">
|
||||
<input type="submit" class="form-button" value="Change URI"/>
|
||||
<input type="hidden" name="oldURI" value="${realURI}"/>
|
||||
<input type="hidden" name="mode" value="renameResource"/>
|
||||
<input type="hidden" name="controller" value="Refactor"/>
|
||||
</form>
|
||||
|
||||
<div style="margin-left:-0.5em;margin-top:0.5em;padding:0.5em;border-style:solid;border-width:1px;">
|
||||
<form action="${exportURL}" method="get">
|
||||
<input type="hidden" name="subgraph" value="tbox"/>
|
||||
<input type="hidden" name="assertedOrInferred" value="asserted"/>
|
||||
<input type="hidden" name="ontologyURI" value="${Ontology.URI}"/>
|
||||
<input type="submit" class="form-button" name="submit" value="Export Ontology Entities Defined in This Namespace to RDF"/>
|
||||
<div style="padding:0;margin-top:0.3em;white-space:nowrap;">
|
||||
<input type="radio" name="format" value="RDF/XML-ABBREV" checked="checked" selected="selected"/> RDF/XML abbreviated
|
||||
<input type="radio" name="format" value="RDF/XML"/> RDF/XML
|
||||
<input type="radio" name="format" value="N3"/> N3
|
||||
<input type="radio" name="format" value="N-TRIPLE"/> N-Triples
|
||||
<input type="radio" name="format" value="TURTLE"/> Turtle
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="3"><hr></hr></td></tr>
|
||||
</table>
|
||||
<table class="form-background" border="0" cellpadding="2" cellspacing="2">
|
||||
<tr valign="bottom" align="center">
|
||||
<td>
|
||||
<div style="margin-left:-0.5em;margin-top:0.5em;padding:0.5em;border-style:solid;border-width:1px;float:right">
|
||||
<form action="${exportURL}" method="get">
|
||||
<input type="hidden" name="subgraph" value="tbox"/>
|
||||
<input type="hidden" name="assertedOrInferred" value="asserted"/>
|
||||
<input type="hidden" name="ontologyURI" value="${Ontology.URI}"/>
|
||||
<input type="submit" class="form-button" name="submit" value="Export Ontology Entities Defined in This Namespace to RDF"/>
|
||||
<div style="padding:0;margin-top:0.3em;white-space:nowrap;">
|
||||
<input type="radio" name="format" value="RDF/XML-ABBREV" checked="checked" selected="selected"/> RDF/XML abbreviated
|
||||
<input type="radio" name="format" value="RDF/XML"/> RDF/XML
|
||||
<input type="radio" name="format" value="N3"/> N3
|
||||
<input type="radio" name="format" value="N-TRIPLE"/> N-Triples
|
||||
<input type="radio" name="format" value="TURTLE"/> Turtle
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</jsp:root>
|
||||
|
|
Loading…
Add table
Reference in a new issue