diff --git a/domain/src/main/java/org/fao/geonet/domain/Group.java b/domain/src/main/java/org/fao/geonet/domain/Group.java index eab3579af9e..fc7f9170ff3 100644 --- a/domain/src/main/java/org/fao/geonet/domain/Group.java +++ b/domain/src/main/java/org/fao/geonet/domain/Group.java @@ -201,7 +201,7 @@ public void setReferrer(Integer referrer) { @ElementCollection(fetch = FetchType.LAZY, targetClass = String.class) @CollectionTable(joinColumns = @JoinColumn(name = "idDes"), name = "GroupsDes") @MapKeyColumn(name = "langId", length = 5) - @Column(name = "label", nullable = false, length = 96) + @Column(name = "label", nullable = false, length = 255) public Map getLabelTranslations() { return super.getLabelTranslations(); } diff --git a/domain/src/main/java/org/fao/geonet/domain/Localized.java b/domain/src/main/java/org/fao/geonet/domain/Localized.java index 43a4095dc5d..0918dbc4509 100644 --- a/domain/src/main/java/org/fao/geonet/domain/Localized.java +++ b/domain/src/main/java/org/fao/geonet/domain/Localized.java @@ -48,7 +48,7 @@ * @ElementCollection(fetch = FetchType.LAZY, targetClass = String.class) * @CollectionTable(joinColumns = @JoinColumn(name = "iddes"), name = "groupsdes") * @MapKeyColumn(name = "langid", length = 5) - * @Column(name = "label", nullable = false, length = 96) + * @Column(name = "label", nullable = false, length = 255) * public Map getLabelTranslations() { * return super.getLabelTranslations(); * } diff --git a/domain/src/main/java/org/fao/geonet/domain/Schematron.java b/domain/src/main/java/org/fao/geonet/domain/Schematron.java index d6a66329675..a625e9fb057 100644 --- a/domain/src/main/java/org/fao/geonet/domain/Schematron.java +++ b/domain/src/main/java/org/fao/geonet/domain/Schematron.java @@ -135,7 +135,7 @@ public void setFile(String file) { @ElementCollection(fetch = FetchType.LAZY, targetClass = String.class) @CollectionTable(joinColumns = @JoinColumn(name = "idDes"), name = "SchematronDes") @MapKeyColumn(name = "langId", length = 5) - @Column(name = "label", nullable = false, length = 96) + @Column(name = "label", nullable = false, length = 255) public Map getLabelTranslations() { return super.getLabelTranslations(); } diff --git a/domain/src/main/java/org/fao/geonet/domain/Source.java b/domain/src/main/java/org/fao/geonet/domain/Source.java index 574449aeb81..91936a7a530 100644 --- a/domain/src/main/java/org/fao/geonet/domain/Source.java +++ b/domain/src/main/java/org/fao/geonet/domain/Source.java @@ -147,7 +147,7 @@ public Source setName(String name) { @ElementCollection(fetch = FetchType.LAZY, targetClass = String.class) @CollectionTable(joinColumns = @JoinColumn(name = "idDes"), name = "SourcesDes") @MapKeyColumn(name = "langId", length = 5) - @Column(name = "label", nullable = false, length = 96) + @Column(name = "label", nullable = false, length = 255) public Map getLabelTranslations() { return super.getLabelTranslations(); } diff --git a/services/src/main/java/org/fao/geonet/api/sources/SourcesApi.java b/services/src/main/java/org/fao/geonet/api/sources/SourcesApi.java index 0bf0a0b42d5..6d7d3ee9cd2 100644 --- a/services/src/main/java/org/fao/geonet/api/sources/SourcesApi.java +++ b/services/src/main/java/org/fao/geonet/api/sources/SourcesApi.java @@ -29,8 +29,6 @@ import org.fao.geonet.api.ApiParams; import org.fao.geonet.api.ApiUtils; import org.fao.geonet.api.exception.ResourceNotFoundException; -import org.fao.geonet.constants.Geonet; -import org.fao.geonet.constants.Params; import org.fao.geonet.domain.GeonetEntity; import org.fao.geonet.domain.Language; import org.fao.geonet.domain.Source; @@ -40,7 +38,6 @@ import org.fao.geonet.repository.SortUtils; import org.fao.geonet.repository.SourceRepository; import org.fao.geonet.resources.Resources; -import org.fao.geonet.utils.Log; import org.jdom.Element; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; @@ -50,7 +47,6 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; @@ -59,7 +55,6 @@ import java.io.File; import java.io.IOException; -import java.nio.file.Files; import java.nio.file.Path; import java.util.List; import java.util.Map; @@ -136,7 +131,7 @@ public void getSubPortal( sources.stream().map(GeonetEntity::asXml).forEach(sourcesList::addContent); response.setContentType(MediaType.TEXT_HTML_VALUE); response.getWriter().write( - new XsltResponseWriter() + new XsltResponseWriter("portal") .withJson("catalog/locales/en-core.json") .withJson("catalog/locales/en-search.json") .withXml(sourcesList) diff --git a/services/src/main/java/org/fao/geonet/guiapi/search/SearchApi.java b/services/src/main/java/org/fao/geonet/guiapi/search/SearchApi.java index 206e4059065..0d34262bfb6 100644 --- a/services/src/main/java/org/fao/geonet/guiapi/search/SearchApi.java +++ b/services/src/main/java/org/fao/geonet/guiapi/search/SearchApi.java @@ -109,7 +109,7 @@ public void getFieldInfo( response.getWriter().write(Xml.getJSON(results)); } else { response.getWriter().write( - new XsltResponseWriter() + new XsltResponseWriter("search") .withJson("catalog/locales/en-core.json") .withJson("catalog/locales/en-search.json") .withXml(results) diff --git a/services/src/main/java/org/fao/geonet/guiapi/search/XsltResponseWriter.java b/services/src/main/java/org/fao/geonet/guiapi/search/XsltResponseWriter.java index 9903369fa37..61302a46e48 100644 --- a/services/src/main/java/org/fao/geonet/guiapi/search/XsltResponseWriter.java +++ b/services/src/main/java/org/fao/geonet/guiapi/search/XsltResponseWriter.java @@ -46,7 +46,7 @@ public class XsltResponseWriter { public static final String TRANSLATIONS = "translations"; Element xml; - public XsltResponseWriter() { + public XsltResponseWriter(String serviceName) { SettingManager settingManager = ApplicationContextHolder.get().getBean(SettingManager.class); String url = settingManager.getBaseURL(); Element gui = new Element("gui"); @@ -63,7 +63,7 @@ public XsltResponseWriter() { Element settings = settingManager.getAllAsXML(true); settings.setName("systemConfig"); gui.addContent(settings); - gui.addContent(new Element("reqService").setText("search")); + gui.addContent(new Element("reqService").setText(serviceName)); Element translations = new Element(TRANSLATIONS); diff --git a/web-ui/src/main/resources/catalog/templates/top-toolbar.html b/web-ui/src/main/resources/catalog/templates/top-toolbar.html index e3c4ad4a551..782d9d16dd4 100644 --- a/web-ui/src/main/resources/catalog/templates/top-toolbar.html +++ b/web-ui/src/main/resources/catalog/templates/top-toolbar.html @@ -38,7 +38,8 @@ data-gn-active-tb-item="{{gnCfg.mods.home.appUrl}}"> {{info['node/name'] || info['system/site/name']}} + title="{{info['node/name'] || info['system/site/name']}}"> + {{info['node/name'].split('|')[0] || info['system/site/name']}}
  • diff --git a/web-ui/src/main/resources/catalog/views/default/less/gn_layout_default.less b/web-ui/src/main/resources/catalog/views/default/less/gn_layout_default.less index c97780433b3..173731228f3 100644 --- a/web-ui/src/main/resources/catalog/views/default/less/gn_layout_default.less +++ b/web-ui/src/main/resources/catalog/views/default/less/gn_layout_default.less @@ -18,12 +18,12 @@ html, body { } // background image and color -[ng-app^="gn_search_"] body, [ng-app="gn_login"] body { +[ng-app^="gn_search_"] body, [ng-app="gn_login"] body, .gn-background { background-color: @gn-background-color; background-position: center top; background-size: cover; background-repeat: no-repeat; - background-attachment: fixed; + //background-attachment: fixed; &.gn-header-fixed { padding-top: @gn-menubar-height; &.gn-logo-in-header { @@ -46,6 +46,9 @@ html, body { [ng-app^="gn_search_"] body when (isstring(@gn-background-image)) { background-image: url(@gn-background-image); } +.gn-background when (isstring(@gn-background-image)) { + background-image: url(@gn-background-image); +} [ng-app^="gn_login"] body when (isstring(@gn-background-image)) { background-image: url(@gn-background-image); } @@ -83,4 +86,4 @@ html, body { .cookie-warning { .alert; .alert-info; -} \ No newline at end of file +} diff --git a/web-ui/src/main/resources/catalog/views/default/less/gn_portal_default.less b/web-ui/src/main/resources/catalog/views/default/less/gn_portal_default.less new file mode 100644 index 00000000000..ac2a9190d2b --- /dev/null +++ b/web-ui/src/main/resources/catalog/views/default/less/gn_portal_default.less @@ -0,0 +1,39 @@ +@import "../../../style/gn_search.less"; +@import "gn_layout_default.less"; +@import "gn_navbar_default.less"; +@import "gn_footer_default.less"; +@import "gn_infolist_default.less"; +@import "gn_variables_default.less"; // must be last + + +div.gn-full > div.container { + width: 100%; + padding: 0px; + background-color: #9e9e9e; + + .gn-background { + padding-top: 20px; + padding-bottom: 20px; + h1, h2 { + //color: white; + } + h1 { + font-weight: bold; + } + } + .title { + color: white; + h1 { + font-size: 20px; + font-weight: bold; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + margin-top: 0px; + margin-bottom: 0px; + } + p { + display: block; + } + } +} diff --git a/web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v3110/migrate-default.sql b/web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v3110/migrate-default.sql index bffb114422d..77f3db30a3d 100644 --- a/web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v3110/migrate-default.sql +++ b/web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v3110/migrate-default.sql @@ -1,3 +1,8 @@ + +ALTER TABLE groupsdes ALTER COLUMN label TYPE varchar(255); +ALTER TABLE sourcesdes ALTER COLUMN label TYPE varchar(255); +ALTER TABLE schematrondes ALTER COLUMN label TYPE varchar(255); + UPDATE Settings SET value='3.11.0' WHERE name='system/platform/version'; UPDATE Settings SET value='SNAPSHOT' WHERE name='system/platform/subVersion'; @@ -6,4 +11,3 @@ ALTER TABLE Validation ALTER COLUMN valType TYPE varchar(128); -- New setting for server timezone INSERT INTO Settings (name, value, datatype, position, internal) VALUES ('system/server/timeZone', '', 0, 260, 'n'); - diff --git a/web/src/main/webapp/xslt/common/base-variables.xsl b/web/src/main/webapp/xslt/common/base-variables.xsl index b23a239cdd0..a191f15943a 100644 --- a/web/src/main/webapp/xslt/common/base-variables.xsl +++ b/web/src/main/webapp/xslt/common/base-variables.xsl @@ -67,7 +67,7 @@ - + @@ -87,6 +87,7 @@ or $service = 'search' or $service = 'md.format.html') then 'gn_search' else if ($service = 'display') then 'gn_formatter_viewer' + else if ($service = 'portal') then 'gn_portal' else 'gn'"/> diff --git a/web/src/main/webapp/xslt/ui-search/portal-list.xsl b/web/src/main/webapp/xslt/ui-search/portal-list.xsl index d12f88a460b..d13cf9a6518 100644 --- a/web/src/main/webapp/xslt/ui-search/portal-list.xsl +++ b/web/src/main/webapp/xslt/ui-search/portal-list.xsl @@ -23,13 +23,16 @@ --> -
  • - - -
    + + + + +