Skip to content

Commit

Permalink
Merge branch 'ELTER-25_SITESlogo' into 'develop'
Browse files Browse the repository at this point in the history
Resolve ELTER-25 "Siteslogo"

Closes ELTER-25

See merge request eip/catalogue!537
  • Loading branch information
rodscott committed Aug 23, 2023
2 parents 8bd575a + 4e9e9e2 commit cc0d9eb
Show file tree
Hide file tree
Showing 43 changed files with 1,100 additions and 957 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class GeminiDocument extends AbstractMetadataDocument implements WellKnow
private Number version;
private List<String> alternateTitles, spatialRepresentationTypes, datasetLanguages,
securityConstraints;
private List<Keyword> topicCategories, dataAttributes;
private List<Keyword> topicCategories, observedProperties;
private List<Geometry> geometries;
private List<DistributionInfo> distributionFormats;
private List<DescriptiveKeywords> descriptiveKeywords;
Expand Down
6 changes: 3 additions & 3 deletions java/src/main/resources/codelist.properties
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ metadata.resourceType.sample = Sample
metadata.resourceType.sampleArchive = Sample Archive
metadata.resourceType.series = Series
metadata.resourceType.service = Service
metadata.resourceType.signpost = Signpost
metadata.resourceType.signpost = Dataset
metadata.resourceType.nercSignpost = Signpost
metadata.resourceType.software = Software
metadata.resourceType.thirdPartyDataset = Third-party dataset
Expand Down Expand Up @@ -99,8 +99,8 @@ metadata.recordType.sample = Sample
metadata.recordType.sampleArchive = Sample archive
metadata.recordType.series = Data series
metadata.recordType.service = Map (web service)
metadata.recordType.signpost = Dataset
metadata.recordType.nercSignpost = Signpost
metadata.recordType.signpost = Signpost
metadata.recordType.nercSignpost = Signpost
metadata.recordType.software = Software
metadata.recordType.thirdPartyDataset = Third-party dataset
metadata.recordType.tile = Tile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="https://example.com" class="navbar-brand"><img src="/static/img/logo/eidc.png" alt="Test Catalogue"/></a>
<a href="https://example.com" class="navbar-brand"><img src="/static/img/cataloguelogo/eidc.png" alt="Test Catalogue"/></a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
Expand Down
4 changes: 2 additions & 2 deletions templates/datacite/datacite.ftlx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<#assign subjectList = subjectList + descriptiveKeyword.keywords>
</#list>
</#if>
<#if doc.dataAttributes?has_content>
<#assign subjectList = subjectList + doc.dataAttributes>
<#if doc.observedProperties?has_content>
<#assign subjectList = subjectList + doc.observedProperties>
</#if>
<#if subjectList?has_content>
<#list subjectList as subject>
Expand Down
2 changes: 1 addition & 1 deletion templates/functions.ftlh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<#function recordTypeOrResourceType>
<#if metadata.catalogue == "eidc">
<#if metadata.catalogue == "eidc" || metadata.catalogue == "elter" >
<#return codes.lookup('metadata.recordType', resourceType.value)?lower_case>
<#else>
<#return codes.lookup('metadata.resourceType', resourceType.value)?lower_case>
Expand Down
2 changes: 1 addition & 1 deletion templates/html/blocks.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type from a code list. Also display a label if this document is currently in
draft or is pending publication
-->
<#macro title title type>
<div class="visible-print-block text-center"><img src="/static/img/CEHlogoSmall.png"></div>
<div class="visible-print-block text-center"><img src="/static/img/cataloguelogo/ukceh.png"></div>

<#if title?has_content>
<h1 id="document-title">
Expand Down
8 changes: 0 additions & 8 deletions templates/html/document/_distribution_signpost.ftlh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<div class="panel panel-default hidden-print" id="document-distribution">
<div class="panel-body">
<h2>Get the data</h2>
<div class="distribution-signpost">
<#if resourceType.value == 'nercSignpost' >
Expand All @@ -8,9 +6,3 @@
<#include "_signpost.ftlh">
</#if>
</div>
</div>
</div>




4 changes: 2 additions & 2 deletions templates/html/document/_elterSpecific.ftlh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<#if deimsSites?? && deimsSites?size gt 0>
<div>
<h2>DEIMS sites</h2>
<h2>DEIMS site<#if deimsSites?size gt 1>s</#if></h2>
<#list deimsSites as site>
<a href="${site.url}">${site.title}</a><#sep><br></#sep>
<a href="${site.url}" target="_blank" rel="noopener noreferrer">${site.title}</a><#sep><br></#sep>
</#list>
</div>
</#if>
Expand Down
15 changes: 3 additions & 12 deletions templates/html/document/_footer.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,15 @@
<p>View as
<span><a href="${uri}?format=json">json</a></span>
<#if resourceType??>
<#if catalogue.id == "eidc" && citation??>
<span><a href="${uri}/datacite.xml">Datacite xml</a></span>
</#if>
<span><a href="${uri}.xml?format=gemini">ISO 19115 (XML)</a></span>
<span><a href="${uri}?format=ttl">RDF (Turtle)</a></span>
</#if>
</p>
</div>

<div class="pull-right" role="contentinfo">
<#if catalogue.id == "eidc">
<#assign privacy="https://www.eidc.ac.uk/policies/privacy" />
<#else>
<#assign privacy="https://www.ceh.ac.uk/privacy-notice" />
</#if>

<span><a href="${privacy}" target="_blank" rel="noopener noreferrer">Privacy</a></span>
<span><a href="//www.ceh.ac.uk" target="_blank" rel="noopener noreferrer">Hosted by UKCEH</a></span>
<div class="pull-right" role="contentinfo">
<span><a href="https://www.ceh.ac.uk/privacy-notice" target="_blank" rel="noopener noreferrer">Privacy</a></span>
<span><a href="//www.ceh.ac.uk" target="_blank" rel="noopener noreferrer">Hosted by UKCEH</a></span>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion templates/html/document/_linked.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="alert--linked" role="alert">
<#if isEidc = "true">
<div class="alert--linked-eidc">
<img class="img-responsive" src="/static/img/logo/eidc.png">
<img class="img-responsive" src="/static/img/cataloguelogo/eidc.png">
<div>These data are held and managed by the Environmental Information Data Centre</div>
</div>
</#if>
Expand Down
26 changes: 14 additions & 12 deletions templates/html/document/_nercSignpost.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@
</#if>

<div>
This record describes NERC-funded data managed by
<#if signpostDistributor?has_content>
${signpostDistributor?first.organisationName}
<#else>
a third party
</#if>
</div>

<#if signpostURLs?has_content>
<div class="signpostURL">
To access the data visit <a href="${signpostURLs?first.url}">${signpostURLs?first.url}</a>
<div>
This record describes NERC-funded data managed by
<#if signpostDistributor?has_content>
${signpostDistributor?first.organisationName}
<#else>
a third party
</#if>
</div>
</#if>

<#if signpostURLs?has_content>
<div class="signpost-url">
To access the data visit <a href="${signpostURLs?first.url}">${signpostURLs?first.url}</a>
</div>
</#if>
</div>
5 changes: 1 addition & 4 deletions templates/html/document/_related.ftlh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<#if (rel_hasMember?has_content && rel_hasMember?size gt 0) || (rel_memberOf?has_content && rel_memberOf?size gt 0) || (rel_usedBy?has_content && rel_usedBy?size gt 0) || (rel_uses?has_content && rel_uses?size gt 0) || (rel_generatedBy?has_content && rel_generatedBy?size gt 0) || (rel_generates?has_content && rel_generates?size gt 0) || (rel_related?has_content && rel_related?size gt 0) >
<#if (rel_memberOf?has_content && rel_memberOf?size gt 0) || (rel_usedBy?has_content && rel_usedBy?size gt 0) || (rel_uses?has_content && rel_uses?size gt 0) || (rel_generatedBy?has_content && rel_generatedBy?size gt 0) || (rel_generates?has_content && rel_generates?size gt 0) || (rel_related?has_content && rel_related?size gt 0) >

<#macro displayRelatives id title array>
<#if array?has_content && array?size gt 0>
Expand Down Expand Up @@ -31,9 +31,6 @@
<#-- Data resources linked to this service -->
<@displayRelatives "datasets" "Datasets associated with this service" rel_uses />

<#-- CHILD records
<@displayRelatives "children" "This ${recordType} includes the following resources" rel_hasMember />-->

<#-- PARENT record(s) -->
<@displayRelatives "parents" "This ${recordType} is included in the following collections" rel_memberOf />

Expand Down
31 changes: 24 additions & 7 deletions templates/html/document/_signpost.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,29 @@
<#assign distributorName = "a third party" >
</#if>

<div>This record describes data managed by ${distributorName}</div>
<#-- If data came from SITES -->
<#if signpostURLs?has_content && signpostURLs?first.url?matches(".+fieldsites.se\\/.+", "i")>
<#assign logosrc ="/static/img/elter/sites_logo.png" >
<#assign logoalt ="SITES logo" >
<#assign distributorName = "the Swedish Infrastructure for Ecosystem Science (SITES)" >
</#if>

<#include "_licence.ftlh">

<#if signpostURLs?has_content>
<div class="signpostURL">
To access the data visit <a href="${signpostURLs?first.url}">${signpostURLs?first.url}</a>
</div>
</#if>
<div class="signpost-content">
<#if logosrc?has_content>
<div class="signpost-logo"><img src="${logosrc}" alt="${logoalt}"></div>
</#if>

<div class="signpost-text">This record describes data managed by ${distributorName}</div>

<#if signpostURLs?has_content>
<div class="signpost-url">
To access the data visit <a href="${signpostURLs?first.url}">${signpostURLs?first.url}</a>
</div>
</#if>

<div class="signpost-licence">
<#include "_licence.ftlh">
</div>
</div>

2 changes: 1 addition & 1 deletion templates/html/document/_status.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<p>If you need access to this archived version, please <a href="${catalogue.contactUrl}" target="_blank" rel="noopener noreferrer">contact the ${supersededContact}</a></p>
<#elseif resourceStatus == "Restricted">
<span>ACCESS TO THIS ${recordType?upper_case} IS RESTRICTED</span>
<br>${accessLimitation.description} If you need access, please <a href="${catalogue.contactUrl}" target="_blank" rel="noopener noreferrer">contact the ${supersededContact}</a>
<br>${accessLimitation.description} If you need access, please <a href="${catalogue.contactUrl}" target="_blank" rel="noopener noreferrer">contact ${supersededContact}</a>
<#elseif resourceStatus == "Embargoed">
<p>
<strong>This ${recordType} is under embargo</strong>
Expand Down
6 changes: 3 additions & 3 deletions templates/html/document/_tags.ftlh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<#macro keywordList list listTitle="Keywords" commaseparated=false>
<dt>${listTitle}</dt>
<dd class="autolist">
<dd>
<#list list as item>
<@displayLinkedKeyword item.value item.uri/>
<#sep><#if commaseparated=true>,<#else><br></#if></#sep>
Expand All @@ -16,8 +16,8 @@
</#if>
</#macro>

<#if dataAttributes?has_content>
<@keywordList dataAttributes "Data attributes" true/>
<#if observedProperties?has_content>
<@keywordList observedProperties "Observed properties" true/>
</#if>

<#if topicCategories?has_content>
Expand Down
2 changes: 1 addition & 1 deletion templates/html/document/_third_party.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<p class="panel-title"> <i class="fa-solid fa-circle-info"> </i> This is a dataset managed by ${distributor}</p>

<#if distributionURLs?has_content>
<div class="signpostURL">To access the data visit <a href="${distributionURLs?first.url}">${distributionURLs?first.url}</a></div>
<div class="signpost-url">To access the data visit <a href="${distributionURLs?first.url}">${distributionURLs?first.url}</a></div>
</#if>


Expand Down
23 changes: 8 additions & 15 deletions templates/html/document/_title.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,18 @@
</div>
</#if>

<#if resourceStatus?? && resourceStatus?has_content && resourceStatus != "Available" && resourceStatus != "Controlled" && resourceStatus != "Unknown" >
<#assign notificationIcon = "fa-circle-info">
<#if resourceStatus == "Restricted" >
<#assign notificationIcon = "fa-triangle-exclamation ">
</#if>
<div class="notification notification--${resourceStatus}" role="alert">
<div class="notification_icon"><i class="fas ${notificationIcon} fa-2x"></i></div>
<div><#include "_status.ftlh"></div>
<#if resourceType?? && (resourceType.value == 'nercSignpost' || resourceType.value == 'signpost')>
<div class="notice notice-signpost" role="alert">
<#if resourceType.value == 'signpost' ><#include "_signpost.ftlh"></#if>
<#if resourceType.value == 'nercSignpost'><#include "_nercSignpost.ftlh"></#if>
</div>
</#if>

<#if resourceType?? && (resourceType.value == 'nercSignpost' || resourceType.value == 'signpost')>
<div class="notice notice-signpost" role="alert">
<div><i class="fa-solid fa-circle-info fa-2x"></i></div>
<div>
<#if resourceType.value == 'signpost' ><#include "_signpost.ftlh"></#if>
<#if resourceType.value == 'nercSignpost'><#include "_nercSignpost.ftlh"></#if>
</div>
<#if resourceStatus?? && resourceStatus?has_content && resourceStatus != "Available" && resourceStatus != "Controlled" && resourceStatus != "Unknown" >
<div class="notice notice-${resourceStatus?lower_case}" role="alert">
<#include "_status.ftlh">
</div>
</#if>


</div>
1 change: 1 addition & 0 deletions templates/html/elter.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@

<@skeleton.master title=title catalogue=catalogue rdf="${uri}?format=ttl" schemaorg="${uri}?format=schema.org" canonical="${uri}" can_edit_restricted=permission.userCanEditRestrictedFields(metadata.catalogue)>
<#if resourceType?has_content && resourceType.value !=''>
<#assign recordType = func.recordTypeOrResourceType()>
<div id="metadata" class="${metadata.state?lower_case}">

<div class="section section-grey">
Expand Down
29 changes: 23 additions & 6 deletions templates/html/gemini.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,30 @@
</div>
</div>
</#if>

<#if resourceType.value != 'aggregate' && resourceType.value != 'collection'>
<div class="pull-right btn-group alternativeViews">
<span aria-expanded="false" aria-haspopup="true" data-toggle="dropdown" class="dropdown-toggle " type="button">
View record as <span class="caret"></span>
</span>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="${uri}?format=json">json</a></li>
<#if resourceType?? && (resourceType.value == 'dataset' || resourceType.value == 'application' || resourceType.value == 'service' )>
<#if citation??>
<li><a href="${uri}/datacite.xml">Datacite xml</a></li>
</#if>
<li><a href="${uri}.xml?format=gemini">ISO 19115 (XML)</a></li>
<li><a href="${uri}?format=schema.org">schema.org (json-LD)</a></li>
<li><a href="${uri}?format=ttl">RDF (Turtle)</a></li>
</#if>
</ul>
</div>
</#if>

</div>
</div>


<#if permission.userCanEditRestrictedFields(metadata.catalogue) && metadata.catalogue == "eidc">
<div class="section"><div class="container">
<#include "document/_metadataqualityAlert.ftlh">
Expand Down Expand Up @@ -166,8 +187,6 @@
</div>
</#if>



<#if permission.userCanEditRestrictedFields(metadata.catalogue) && metadata.catalogue == "eidc">
<div class="section">
<div class="container">
Expand All @@ -184,10 +203,8 @@
<a class="edit-control" data-document-type="${metadata.documentType}">Edit</a></p>
</div>
</#if>

<div>
<#include "document/_footer.ftlh">
</div>

<#include "document/_footer.ftlh">

<script type="application/ld+json">
<#include "../schema.org/schema.org.ftlh">
Expand Down
2 changes: 1 addition & 1 deletion templates/html/infrastructure/_footer.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="footergrid">
<div class="logo">
<a href="https://www.ceh.ac.uk/" aria-label="Go to Home page">
<img src="https://www.ceh.ac.uk/sites/default/files/images/theme/ukceh_logo_long_720x170_white.png" />
<img src="/static/img/ukceh_logo_mono.png" alt="UKCEH logo" />
</a><br>&copy; UK Centre for Ecology &amp; Hydrology
</div>
<div class="socials">
Expand Down
13 changes: 10 additions & 3 deletions templates/html/skeleton.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@
<script src="/static/scripts/main.bundle.js"></script>
</#assign>

<#assign catalogueid="">

<#macro master title catalogue="" rdf="" schemaorg="" canonical="" searching=false can_edit_restricted=false containerClass="container" scripts=defaultScripts>
<#assign catalogueid="">
<#if catalogue?has_content>
<#assign catalogueid= catalogue.id >
</#if>

<#compress>
<!DOCTYPE html>
<html lang="en-GB" <#if catalogue?has_content>data-catalogue=${catalogue.id}</#if>>
<html lang="en-GB" data-catalogue=${catalogueid}>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand Down Expand Up @@ -52,9 +59,9 @@
<span class="icon-bar"></span>
</button>
<#if catalogue?has_content>
<a href="${catalogue.url}" class="navbar-brand"><img src="/static/img/logo/${catalogue.logo}" alt="${catalogue.title}"/></a>
<a href="${catalogue.url}" class="navbar-brand"><img src="/static/img/cataloguelogo/${catalogue.logo}" alt="${catalogue.title}"/></a>
<#else>
<a href="" class="navbar-brand"><img src="/static/img/logo/ukceh.png" alt="UKCEH"/></a>
<a href="" class="navbar-brand"><img src="/static/img/cataloguelogo/ukceh.png" alt="UKCEH"/></a>
</#if>
</div>
<div class="navbar-collapse collapse">
Expand Down
2 changes: 1 addition & 1 deletion templates/rdf/ttl.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
</#if>


<#if type=='dataset' || type=='nonGeographicDataset'>
<#if type=='dataset' || type=='nonGeographicDataset' || type=='signpost'>
<#include "turtle/_dataset.ftlh">
<#elseif type=='aggregate'|| type=='collection'|| type=='series'>
<#include "turtle/_aggregation.ftlh">
Expand Down
Loading

0 comments on commit cc0d9eb

Please sign in to comment.