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.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.mail.Address;
|
||||||
import javax.mail.Message;
|
import javax.mail.Message;
|
||||||
import javax.mail.MessagingException;
|
import javax.mail.MessagingException;
|
||||||
import javax.mail.SendFailedException;
|
import javax.mail.SendFailedException;
|
||||||
|
@ -256,13 +257,13 @@ public class ContactMailController extends FreemarkerHttpServlet {
|
||||||
MimeMessage msg = new MimeMessage( s );
|
MimeMessage msg = new MimeMessage( s );
|
||||||
//System.out.println("trying to send message from servlet");
|
//System.out.println("trying to send message from servlet");
|
||||||
|
|
||||||
// Set the from address
|
// Set the reply address
|
||||||
try {
|
try {
|
||||||
msg.setFrom( new InternetAddress( webuseremail, webusername ));
|
msg.setReplyTo( new Address[] { new InternetAddress( webuseremail, webusername ) } );
|
||||||
} catch (UnsupportedEncodingException e) {
|
} 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");
|
" due to UnsupportedEncodingException");
|
||||||
msg.setFrom( new InternetAddress( webuseremail ) );
|
// msg.setFrom( new InternetAddress( webuseremail ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the recipient address
|
// Set the recipient address
|
||||||
|
@ -272,6 +273,13 @@ public class ContactMailController extends FreemarkerHttpServlet {
|
||||||
}
|
}
|
||||||
msg.setRecipients( Message.RecipientType.TO, address );
|
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
|
// Set the subject and text
|
||||||
msg.setSubject( deliveryfrom );
|
msg.setSubject( deliveryfrom );
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,14 @@ public class JenaIngestController extends BaseEditController {
|
||||||
}
|
}
|
||||||
|
|
||||||
maker = getModelMaker(vreq);
|
maker = getModelMaker(vreq);
|
||||||
request.setAttribute("modelNames", maker.listModels().toList());
|
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(
|
RequestDispatcher rd = request.getRequestDispatcher(
|
||||||
Controllers.BASIC_JSP);
|
Controllers.BASIC_JSP);
|
||||||
|
|
|
@ -304,7 +304,7 @@ public class RDFServiceSparql extends RDFServiceImpl implements RDFService {
|
||||||
if (statusCode > 399) {
|
if (statusCode > 399) {
|
||||||
log.error("response " + statusCode + " to query. \n");
|
log.error("response " + statusCode + " to query. \n");
|
||||||
log.debug("update string: \n" + queryStr);
|
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()) {
|
try (InputStream in = response.getEntity().getContent()) {
|
||||||
|
|
|
@ -10,13 +10,18 @@
|
||||||
|
|
||||||
|
|
||||||
<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">
|
<div align="center">
|
||||||
<table class="form-background" border="0" cellpadding="2" cellspacing="2">
|
<table class="form-background" border="0" cellpadding="2" cellspacing="2">
|
||||||
<tr valign="bottom" align="center">
|
<tr valign="bottom" align="center">
|
||||||
<td>
|
<td width="46%">
|
||||||
<form action="listOntologies" method="get">
|
<form action="listOntologies" method="get">
|
||||||
<input type="submit" class="form-button" value="All Ontologies"/>
|
<input type="submit" class="form-button" value="All Ontologies"/>
|
||||||
</form>
|
</form>
|
||||||
|
@ -33,14 +38,14 @@
|
||||||
<input type="hidden" name="ontologyUri" value="${Ontology.URI}" />
|
<input type="hidden" name="ontologyUri" value="${Ontology.URI}" />
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
<td valign="bottom" align="center">
|
<td valign="bottom" align="center" width="27%">
|
||||||
<form action="editForm" method="get">
|
<form action="editForm" method="get">
|
||||||
<input type="submit" class="form-button" value="Edit ${Ontology.name}"/>
|
<input type="submit" class="form-button" value="Edit ${Ontology.name}"/>
|
||||||
<input name="uri" type = "hidden" value="${Ontology.URI}" />
|
<input name="uri" type = "hidden" value="${Ontology.URI}" />
|
||||||
<input type="hidden" name="controller" value="Ontology"/>
|
<input type="hidden" name="controller" value="Ontology"/>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
<td valign="bottom">
|
<td valign="bottom" width="27%">
|
||||||
<form action="editForm" method="get">
|
<form action="editForm" method="get">
|
||||||
<input type="submit" class="form-button" value="Add New Ontology"/>
|
<input type="submit" class="form-button" value="Add New Ontology"/>
|
||||||
<input type="hidden" name="controller" value="Ontology"/>
|
<input type="hidden" name="controller" value="Ontology"/>
|
||||||
|
@ -52,7 +57,14 @@
|
||||||
<input type="hidden" name="controller" value="Refactor"/>
|
<input type="hidden" name="controller" value="Refactor"/>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div style="margin-left:-0.5em;margin-top:0.5em;padding:0.5em;border-style:solid;border-width:1px;">
|
</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">
|
<form action="${exportURL}" method="get">
|
||||||
<input type="hidden" name="subgraph" value="tbox"/>
|
<input type="hidden" name="subgraph" value="tbox"/>
|
||||||
<input type="hidden" name="assertedOrInferred" value="asserted"/>
|
<input type="hidden" name="assertedOrInferred" value="asserted"/>
|
||||||
|
|
Loading…
Add table
Reference in a new issue