Commit 06888131 authored by Matija Obreza's avatar Matija Obreza
Browse files

Crop blurb cleanup

parent 00ae3464
/**
* Copyright 2014 Global Crop Diversity Trust
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
package org.genesys2.server.model;
public enum Permissions {
CREATE("Create"), READ("Read"), UPDATE("Update"), DELETE("Delete");
String label;
Permissions(String label) {
this.label = label;
}
public String getLabel() {
return label;
}
public static Permissions getByLabel(String value) {
for (final Permissions permissions : values()) {
if (permissions.label.equals(value)) {
return permissions;
}
}
throw new IllegalArgumentException(value);
}
public String getName() {
return name();
}
}
......@@ -135,10 +135,9 @@ user.page.list.title=Registered user accounts
crop.croplist=Crop list
crop.all-crops=All crops
crop.page.profile.title={0} profile
crop.taxonomy-rules=Taxonomic rules
crop.view-descriptors=View crop descriptors...
crop.page.profile.title=Edit {0}
crop.page.edit.title=Edit {0}
crop.summary=Summary (HTML metadata)
activity.recent-activity=Recent activity
......@@ -221,12 +220,12 @@ accession.mlsStatus=MLS Status
accession.duplSite=Safety duplication institute
accession.inSvalbard=Safety duplicated in Svalbard
accession.inTrust.true=This accession is under Article 15 of the International Treaty on Plant Genetic Resources for Food and Agriculture.
accession.mlsStatus.true=This accession is in the Multilateral System of the ITPGRFA.
accession.mlsStatus.true=This accession is in the Multilateral System of the ITPGRFA.
accession.inSvalbard.true=Safety duplicated in Svalbard Global Seed Vault.
accession.not-available-for-distribution=The accession is NOT available for distribution.
accession.this-is-a-historic-entry=This is a historic record of an accession.
accession.historic=Historic entry
accession.available-for-distribution=The accession is available for distribution.
accession.available-for-distribution=The accession is available for distribution.
accession.elevation=Elevation
accession.geolocation=Geolocation (lat, long)
......@@ -327,7 +326,7 @@ accession.acceUrl=Additional accession URL
accession.page.profile.title=Accession profile: {0}
accession.page.resolve.title=Multiple accessions found
accession.resolve=Multiple accessions with the name ''{0}'' found in Genesys. Select one from the list.
accession.resolve=Multiple accessions with the name ''{0}'' found in Genesys. Select one from the list.
accession.page.data.title=Accession browser
accession.page.data.intro=Explore the accession data with Genesys. To refine your search, add filters such as country of origin, crop, species, or the latitude and longitude of the collecting site.
accession.taxonomy-at-institute=View {0} at {1}
......@@ -400,7 +399,7 @@ filter.apply=Apply
filter.close=Close
filter.remove=Remove filter
filter.autocomplete-placeholder=Type more than 3 characters...
filter.coll.collMissId=Collecting mission ID
filter.coll.collMissId=Collecting mission ID
filter.storage=Type of Germplasm storage
filter.string.equals=Equals
filter.string.like=Starts with
......@@ -470,7 +469,7 @@ oauth2.button-approve=Yes, allow access
oauth2.button-deny=No, deny access
oauth2.authorization-code=Authorization code
oauth2.authorization-code-instructions=Copy this authorization code:
oauth2.authorization-code-instructions=Copy this authorization code:
oauth2.access-denied=Access denied
oauth2.access-denied-text=You have denied access to your resources.
......@@ -669,7 +668,7 @@ accession.donorNumb=Donor institute code
accession.acqDate=Acquisition date
accession.svalbard-data.url=Svalbard database URL
accession.svalbard-data.url-title=Deposit information in SGSV database
accession.svalbard-data.url-title=Deposit information in SGSV database
accession.svalbard-data.url-text=View SGSV deposit information for {0}
filter.download-pdci=Download PDCI data
......@@ -700,3 +699,5 @@ charts.intro=Here you'll find some useful charts and maps for your next presenta
chart.collections.title=Size of genebank collections
chart.attribution-text=www.genesys-pgr.org
chart.collections.series=Number of accessions in genebanks
label.load-more-data=Load more...
......@@ -4,11 +4,10 @@
<html>
<head>
<title><spring:message code="crop.page.profile.title" arguments="${crop.name}" argumentSeparator="|" /></title>
<title><spring:message code="crop.page.edit.title" arguments="${crop.name}" argumentSeparator="|" /></title>
</head>
<body>
<h1>
<img class="country-flag bigger" src="<c:url value="${cdnFlagsUrl}" />/${faoInstitute.country.code3.toUpperCase()}.svg" />
<c:out value="${crop.name}" />
<small><c:out value="${crop.shortName}" /></small>
</h1>
......@@ -32,37 +31,6 @@
</div>
</div>
<%--<div class="form-group">--%>
<%--<label class="col-lg-3 control-label"><spring:message code="ga.tracker-code" /></label>--%>
<%--<div class="controls col-lg-9">--%>
<%--<input type="text" name="gaTracker" class="form-control required" value="${faoInstitute.settings['googleAnalytics.tracker'].value}" />--%>
<%--</div>--%>
<%--</div>--%>
<%--<div class="form-group">--%>
<%--<label class="col-lg-3 control-label"><spring:message code="faoInstitute.requests.mailto" /></label>--%>
<%--<div class="controls col-lg-9">--%>
<%--<input type="text" name="mailto" class="form-control required" value="${faoInstitute.settings['requests.mailto'].value}" />--%>
<%--</div>--%>
<%--</div>--%>
<%--<div class="form-group">--%>
<%--<label class="col-lg-3 control-label"><spring:message code="faoInstitute.sgsv" /></label>--%>
<%--<div class="controls col-lg-9">--%>
<%--<input type="text" name="codeSVGS" class="form-control required" value="${faoInstitute.codeSGSV}" />--%>
<%--</div>--%>
<%--</div>--%>
<%--<div class="form-group">--%>
<%--<div class="controls col-lg-offset-3 col-lg-9">--%>
<%--<label><input type="radio" name="uniqueAcceNumbs" class="" value="true" ${faoInstitute.uniqueAcceNumbs==true ? 'checked' : ''} /> <spring:message code="faoInstitute.uniqueAcceNumbs.true" /></label>--%>
<%--<label><input type="radio" name="uniqueAcceNumbs" class="" value="false" ${faoInstitute.uniqueAcceNumbs==false ? 'checked' : ''} /> <spring:message code="faoInstitute.uniqueAcceNumbs.false" /></label>--%>
<%--</div>--%>
<%--<div class="controls col-lg-offset-3 col-lg-9">--%>
<%--<label><input type="checkbox" name="allowMaterialRequests" class="" ${faoInstitute.allowMaterialRequests==true ? 'checked' : ''} /> <spring:message code="faoInstitute.allow.requests" /></label>--%>
<%--</div>--%>
<%--</div>--%>
<input type="submit" value="<spring:message code="save"/>" class="btn btn-primary" /> <a href="<c:url value="/c/${crop.shortName}" />" class="btn btn-default"> <spring:message code="cancel" />
</a>
<!-- CSRF protection -->
......
......@@ -4,8 +4,8 @@
<html>
<head>
<title><spring:message code="crop.page.profile.title"
arguments="${crop.getName(pageContext.response.locale)}"/></title>
<title><c:out value="${crop.getName(pageContext.response.locale)}" /></title>
<meta name="description" content="<c:out value="${jspHelper.htmlToText(blurp.summary)}" />" />
</head>
<body>
<c:if test="${crop eq null}">
......@@ -18,20 +18,20 @@
<c:out value="${crop.getName(pageContext.response.locale)}"/>
</h1>
<security:authorize access="hasRole('ADMINISTRATOR') or hasPermission(#faoInstitute, 'ADMINISTRATION')">
<a href="<c:url value="/acl/${crop.getClass().name}/${crop.id}/permissions"><c:param name="back">/wiews/${crop.shortName}</c:param></c:url>"
<security:authorize access="hasRole('ADMINISTRATOR') or hasPermission(#crop, 'ADMINISTRATION')">
<a href="<c:url value="/acl/${crop.getClass().name}/${crop.id}/permissions"><c:param name="back"><c:url value="/c/${crop.shortName}" /></c:param></c:url>"
class="close">
<spring:message code="edit-acl"/>
</a>
</security:authorize>
<security:authorize access="hasRole('ADMINISTRATOR') or hasRole('CONTENTMANAGER') or hasPermission(#crop, 'ADMINISTRATION')">
<a href="<c:url value="/c/${crop.shortName}/edit" />" class="close">
<spring:message code="edit"/>
</a>
</security:authorize>
<c:if test="${blurp ne null}">
<span property="schema:Organization#description">
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp" %>
</span>
<%@include file="/WEB-INF/jsp/content/include/blurp-display.jsp" %>
</c:if>
<div>
......@@ -50,13 +50,6 @@
</c:forEach>
</ul>
<%--
<div class="free-text">
<c:out value="${crop.language}" />
</div>
--%>
<h3><spring:message code="taxonomy-list"/></h3>
<ul class="funny-list">
......@@ -67,7 +60,7 @@
</c:forEach>
<c:if test="${cropTaxonomies.hasNext()}">
<li id="loadMoreTaxonomies">
<button class="btn">Load more...</button>
<button class="btn"><spring:message code="label.load-more-data" /></button>
</li>
</c:if>
</ul>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment