Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Genesys Backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
21
Issues
21
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Backend
Commits
42d0186b
Commit
42d0186b
authored
Sep 16, 2013
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display accession's crop in details, removed hyperlinks in lists
parent
b12242b0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
7 deletions
+22
-7
src/main/java/org/crophub/rest/common/persistence/domain/CropTaxonomyRepository.java
...est/common/persistence/domain/CropTaxonomyRepository.java
+1
-1
src/main/java/org/crophub/rest/servlet/controller/AccessionController.java
.../crophub/rest/servlet/controller/AccessionController.java
+6
-0
src/main/resources/content/language.properties
src/main/resources/content/language.properties
+1
-0
src/main/webapp/WEB-INF/jsp/accession/data.jsp
src/main/webapp/WEB-INF/jsp/accession/data.jsp
+4
-2
src/main/webapp/WEB-INF/jsp/accession/details.jsp
src/main/webapp/WEB-INF/jsp/accession/details.jsp
+6
-0
src/main/webapp/WEB-INF/jsp/selection/index.jsp
src/main/webapp/WEB-INF/jsp/selection/index.jsp
+4
-4
No files found.
src/main/java/org/crophub/rest/common/persistence/domain/CropTaxonomyRepository.java
View file @
42d0186b
...
...
@@ -32,7 +32,7 @@ public interface CropTaxonomyRepository extends JpaRepository<CropTaxonomy, Long
@Query
(
"select distinct t from CropTaxonomy ct inner join ct.taxonomy t where ct.crop = ?1"
)
List
<
Taxonomy
>
findTaxonomiesByCrop
(
Crop
crop
);
@Query
(
"select ct from CropTaxonomy ct where ct.taxonomy= ?1 and ct.crop.language = ?2"
)
@Query
(
"select ct
.crop
from CropTaxonomy ct where ct.taxonomy= ?1 and ct.crop.language = ?2"
)
Crop
findByTaxonomyAndLanguage
(
Taxonomy
taxonomy
,
String
language
);
@Modifying
...
...
src/main/java/org/crophub/rest/servlet/controller/AccessionController.java
View file @
42d0186b
...
...
@@ -23,6 +23,7 @@ import java.util.List;
import
org.crophub.rest.common.model.genesys.Accession
;
import
org.crophub.rest.common.model.genesys.Taxonomy
;
import
org.crophub.rest.common.model.impl.FaoInstitute
;
import
org.crophub.rest.common.service.CropService
;
import
org.crophub.rest.common.service.GenesysService
;
import
org.crophub.rest.common.service.InstituteService
;
import
org.crophub.rest.common.service.TaxonomyService
;
...
...
@@ -55,6 +56,9 @@ public class AccessionController extends BaseController {
@Autowired
private
TaxonomyService
taxonomyService
;
@Autowired
private
CropService
cropService
;
@RequestMapping
(
"/id/{accessionId}"
)
public
String
view
(
ModelMap
model
,
@PathVariable
(
value
=
"accessionId"
)
long
accessionId
)
{
_logger
.
debug
(
"Viewing ACN "
+
accessionId
);
...
...
@@ -72,6 +76,8 @@ public class AccessionController extends BaseController {
model
.
addAttribute
(
"metadatas"
,
genesysService
.
listMetadata
(
accession
));
model
.
addAttribute
(
"methods"
,
genesysService
.
listMethods
(
accession
));
model
.
addAttribute
(
"methodValues"
,
genesysService
.
getAccessionTraitValues
(
accession
));
model
.
addAttribute
(
"crop"
,
cropService
.
getCrop
(
getLocale
(),
accession
.
getTaxonomy
()));
model
.
addAttribute
(
"selection"
,
selectionBean
);
...
...
src/main/resources/content/language.properties
View file @
42d0186b
...
...
@@ -142,6 +142,7 @@ accession.origin=Country of origin
accession.holdingInstitute
=
Holding institute
accession.holdingCountry
=
Location
accession.taxonomy
=
Taxonomy
accession.crop
=
Crop
accession.otherNames
=
Also known as
accession.inTrust
=
In Trust
accession.mlsStatus
=
MLS Status
...
...
src/main/webapp/WEB-INF/jsp/accession/data.jsp
View file @
42d0186b
...
...
@@ -77,8 +77,10 @@
<td
class=
"sel ${selection.containsId(accession.id) ? 'picked' : ''}"
x-aid=
"${accession.id}"
></td>
</c:if>
<td><a
href=
"
<c:url
value=
"/acn/id/${accession.id}"
/>
"
><b><c:out
value=
"
${
accession
.
accessionName
}
"
/></b></a></td>
<td><a
href=
"
<c:url
value=
"/acn/t/${accession.taxonomy.genus}/${accession.taxonomy.species}"
/>
"
><c:out
value=
"
${
accession
.
taxonomy
.
taxonName
}
"
/></a></td>
<td
class=
"notimportant"
><a
href=
"
<c:url
value=
"/geo/${accession.origin.toLowerCase()}"
/>
"
><c:out
value=
"
${
accession
.
countryOfOrigin
.
name
}
"
/></a></td>
<%-- <td><a href="<c:url value="/acn/t/${accession.taxonomy.genus}/${accession.taxonomy.species}" />"><c:out value="${accession.taxonomy.taxonName}" /></a></td> --%>
<td><c:out
value=
"
${
accession
.
taxonomy
.
taxonName
}
"
/></td>
<%-- <td class="notimportant"><a href="<c:url value="/geo/${accession.origin.toLowerCase()}" />"><c:out value="${accession.countryOfOrigin.name}" /></a></td> --%>
<td
class=
"notimportant"
><c:out
value=
"
${
accession
.
countryOfOrigin
.
name
}
"
/></td>
<td
class=
"notimportant"
><a
href=
"
<c:url
value=
"/wiews/${accession.institute.code.toLowerCase()}"
/>
"
><c:out
value=
"
${
accession
.
institute
.
code
}
"
/></a></td>
<%-- <td><a href="<c:url value="/geo/${accession.institute.country.code3.toLowerCase()}" />"><c:out value="${accession.institute.country.name}" /></a></td>
--%>
...
...
src/main/webapp/WEB-INF/jsp/accession/details.jsp
View file @
42d0186b
...
...
@@ -55,6 +55,12 @@
<td><c:out
value=
"
${
accession
.
accessionName
}
"
/></td>
</tr>
<c:if
test=
"
${
crop
ne
null
}
"
>
<tr>
<td><spring:message
code=
"accession.crop"
/></td>
<td><a
href=
"
<c:url
value=
"/c/${crop.shortName}"
/>
"
><c:out
value=
"
${
crop
.
name
}
"
/></a></td>
</tr>
</c:if>
<c:if
test=
"
${
accession
.
countryOfOrigin
ne
null
}
"
>
<tr>
...
...
src/main/webapp/WEB-INF/jsp/selection/index.jsp
View file @
42d0186b
...
...
@@ -34,10 +34,10 @@
<td
/>
</c:if>
<td><spring:message
code=
"accession.accessionName"
/></td>
<td
class=
"notimportant"
><spring:message
code=
"accession.origin"
/></td>
<td><spring:message
code=
"accession.taxonomy"
/></td>
<td
class=
"notimportant"
><spring:message
code=
"accession.origin"
/></td>
<td
class=
"notimportant"
><spring:message
code=
"accession.holdingInstitute"
/></td>
<
td
class=
"notimportant"
><spring:message
code=
"accession.holdingCountry"
/></td
>
<
%-- <td class="notimportant"><spring:message code="accession.holdingCountry" /></td> --%
>
</tr>
</thead>
<tbody>
...
...
@@ -48,10 +48,10 @@
<td
class=
"sel ${selection.containsId(accession.id) ? 'picked' : ''}"
x-aid=
"${accession.id}"
></td>
</c:if>
<td><a
href=
"
<c:url
value=
"/acn/id/${accession.id}"
/>
"
><b><c:out
value=
"
${
accession
.
accessionName
}
"
/></b></a></td>
<td
class=
"notimportant"
><c:out
value=
"
${
accession
.
countryOfOrigin
.
name
}
"
/></td>
<td><c:out
value=
"
${
accession
.
taxonomy
.
taxonName
}
"
/></td>
<td
class=
"notimportant"
><c:out
value=
"
${
accession
.
countryOfOrigin
.
name
}
"
/></td>
<td
class=
"notimportant"
><a
href=
"
<c:url
value=
"/wiews/${accession.institute.code.toLowerCase()}"
/>
"
><c:out
value=
"
${
accession
.
institute
.
code
}
"
/></a></td>
<
td
class=
"notimportant"
><a
href=
"
<c:url
value=
"/geo/${accession.institute.country.code3.toLowerCase()}"
/>
"
><c:out
value=
"
${
accession
.
institute
.
country
.
name
}
"
/></a></td
>
<
%-- <td class="notimportant"><a href="<c:url value="/geo/${accession.institute.country.code3.toLowerCase()}" />"><c:out value="${accession.institute.country.name}" /></a></td> --%
>
</tr>
</c:forEach>
</tbody>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment