Skip to content

Commit

Permalink
Fix #10552 various enhancements (#10554)
Browse files Browse the repository at this point in the history
  • Loading branch information
MV88 committed Sep 20, 2024
1 parent fe9f97f commit e385b59
Show file tree
Hide file tree
Showing 16 changed files with 615 additions and 574 deletions.
7 changes: 5 additions & 2 deletions project/standard/templates/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ npm run lint
if [ $# -eq 0 ]
then
mvn clean install -Dmapstore2.version=$VERSION
else
mvn clean install -Dmapstore2.version=$1
elif [ $# -eq 1 ]
then
mvn clean install -Dmapstore2.version=$1
else
mvn clean install -Dmapstore2.version=$1 -P$2
fi
14 changes: 11 additions & 3 deletions web/client/product/plugins/Attribution.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,25 @@
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';

import assign from 'object-assign';
import PropTypes from 'prop-types';

import src from '../assets/img/mapstorelogo.png';
import assign from 'object-assign';

class Attribution extends React.Component {
static propTypes = {
src: PropTypes.string,
href: PropTypes.string,
label: PropTypes.string,
height: PropTypes.number,
style: PropTypes.object
};

static defaultProps = {
src: src,
height: 30,
href: 'https://www.geosolutionsgroup.com/',
label: 'GeoSolutions',
style: {
position: "absolute",
width: "124px",
Expand All @@ -40,6 +46,8 @@ class Attribution extends React.Component {
* @prop {string} [label='GeoSolutions'] the tooltip for the logo
* @prop {string} [href='https://www.geosolutionsgroup.com/'] the URL to redirect on click
* @prop {string} [src] URL of the logo image. By default the GeoSolutions logo.
* @prop {number} [height] the height of the img tag, default is 30
* @prop {object} [style] a style object to pass to the img
*/
export default {
AttributionPlugin: assign(Attribution, {
Expand All @@ -48,7 +56,7 @@ export default {
position: 0,
label: props.label || 'GeoSolutions',
href: props.href || 'https://www.geosolutionsgroup.com/',
img: props.src && <img className="customer-logo" src={props.src} height="30" alt={props.label || 'GeoSolutions'} /> || <img className="customer-logo" src={src} height="30" alt={props.label || 'GeoSolutions'} />,
img: <img className="customer-logo" src={props.src || src} height={props.height || "30"} style={props.style || {}}/>,
logo: true
})
}
Expand Down
5 changes: 4 additions & 1 deletion web/client/product/plugins/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {createPlugin} from "../../utils/PluginsUtils";
* Footer plugin, section of the homepage.
* description of footer can be overridden by
* `home.footerDescription` message id in the translations
* @prop {boolean} cfg.customFooter params that can be used to render a custom html to be used instead of the default one
* @prop {object} cfg.logo logo data to change image and href, set to null to hide the logo
* @prop {string} cfg.logo.src source of the logo
* @prop {number|string} cfg.logo.width width of the logo image
Expand All @@ -31,10 +32,12 @@ import {createPlugin} from "../../utils/PluginsUtils";
class Footer extends React.Component {

static propTypes = {
customFooter: PropTypes.bool,
logo: PropTypes.object
};

static defaultProps = {
customFooter: false,
logo: {
src,
width: 140,
Expand All @@ -55,7 +58,7 @@ class Footer extends React.Component {
title={logo.title || ''}
alt={logo.alt || ''} />
);
return (
return this.props.customFooter ? <HTML msgId="home.footerCustomHTML"/> : (
<Grid>
{logo && logo.src && <Row>
<Col xs={12} className="text-center">
Expand Down
Loading

0 comments on commit e385b59

Please sign in to comment.