Skip to content

Commit

Permalink
Merge branch 'master' of github.com:calacademy-research/antweb
Browse files Browse the repository at this point in the history
  • Loading branch information
remarq committed Sep 29, 2024
2 parents 091bdbb + 3aeedd1 commit 02cff30
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 29 deletions.
66 changes: 38 additions & 28 deletions web/curate/curate-body.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Need Help? Check out the <a href="<%= domainApp %>/documentation.do" target="new
<!-- Universal Specimen Upload -->
<!-- Antweb, TaxonWorks, or GBIF Specimen (file or Zip File) Upload -->

<html:form method="POST" action="upload.do" enctype="multipart/form-data">
<html:form method="POST" action="upload.do" enctype="multipart/form-data">

<div class="admin_action_item">
<br>
Expand All @@ -155,47 +155,57 @@ Need Help? Check out the <a href="<%= domainApp %>/documentation.do" target="new
<%
if (LoginMgr.isAdmin(accessLogin)) { %>

<div class="align_left">
&nbsp;&nbsp;Upload Type:
<select name="action">
<option value="specimenUpload" selected>Antweb
<option value="taxonWorksUpload">TaxonWorks
<option value="GBIFUpload">GBIF
</select>
</div>

<div class="align_left">
&nbsp;&nbsp;Upload as:
<select name="uploadAs">
<option value="<%= accessLogin.getId() %>" selected><%= accessLogin.getName() %>

<div class="align_left">
&nbsp;&nbsp;Upload Type:
<select name="action">
<option value="specimenUpload" selected>Antweb
<option value="taxonWorksUpload">TaxonWorks
<option value="GBIFUpload">GBIF
</select>

&nbsp;&nbsp;Upload as:
<select name="uploadAs">
<option value="<%= accessLogin.getId() %>" selected><%= accessLogin.getName() %>
<%
String uploadAs = accessLogin.getUploadAs();
if (uploadAs != null) {
if (uploadAs != null && !"".equals(uploadAs)) {
List<String> curatorList = new ArrayList<String>(Arrays.asList(uploadAs.split(",")));
for (String curatorIdStr : curatorList) {
try {
int curatorId = Integer.parseInt((curatorIdStr.trim()));
Login curator = LoginMgr.getCurator(curatorId);
%>
<option value="<%= curator.getId() %>"><%= curator.getName() %>
<% } %>
</select>
</div>

<option value="<%= curator.getId() %>"><%= curator.getName() %>
<%
} catch (NumberFormatException e) {
AntwebUtil.log("NumberFormatException for curatorID:" + curatorIdStr);
}
} %>
<% } %>

</select>
</div>
<div class="clear"></div>

<% } else { %>
<input type="hidden" name="action" value="specimenUpload" />
<input type="hidden" name="specimenUploadLoginId" value="<%= accessLogin.getId() %>" />

<input type="hidden" name="specimenUploadLoginId" value="<%= accessLogin.getId() %>" />
<% } %>

<div class="align_right"><input border="0" type="image" src="<%= domainApp %>/image/grey_submit.png" width="77" height="23" value="Submit" <%= active %>></div>
<div class="clear">
<div class="clear"></div>

<div class="align_right">
<input border="0" type="image" src="<%= domainApp %>/image/grey_submit.png" width="77" height="23" value="Submit" <%= active %>>
</div>

<div class="clear"></div>

To calculate the taxon children counts run the <a href='<%= domainApp %>/utilData.do?action=runCountCrawls' title="If taxon children counts are not calculated subsequent to the upload, it will happen nightly.">Count Crawls<img src=<%= domainApp%>/image/new1.png width=20></a>
<br>If not returned an upload report, find it in the <a href='<%= domainApp %>/listSpecimenUploads.do?groupId=<%= accessGroup.getId() %>'>Specimen Upload Reports</a>. <br><br>
</div>
</div>
</html:form>

</div>
<div class="clear"></div>
</html:form>

<!-- End Specimen file or Zip File Upload -->

Expand Down
2 changes: 1 addition & 1 deletion web/curate/viewLogin-body.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ NOTE: These will not be modified unless "Changed Password" button is selected.
</h3>

<% if (LoginMgr.isAdmin(accessLogin)) { %>
<br>
<br>
<H3>Upload As (comma separated list of curator IDs):
<input type="text" name="uploadAs" <%= (LoginMgr.isAdmin(accessLogin)) ? "" : " disabled" %> value="<%= thisLogin.getUploadAs() %>">
</h3>
Expand Down

0 comments on commit 02cff30

Please sign in to comment.