+
{/**/}
{renderItemsGrid()}
{renderPagination()}
diff --git a/frontend/src/views/PublisherEntity.js b/frontend/src/views/PublisherEntity.js
index 589685b2..994261e9 100644
--- a/frontend/src/views/PublisherEntity.js
+++ b/frontend/src/views/PublisherEntity.js
@@ -196,7 +196,7 @@ function PublisherEntity() {
>
diff --git a/frontend/src/views/admin/AdminMarketplaceEntity.js b/frontend/src/views/admin/AdminMarketplaceEntity.js
index b54d16a1..3af3a649 100644
--- a/frontend/src/views/admin/AdminMarketplaceEntity.js
+++ b/frontend/src/views/admin/AdminMarketplaceEntity.js
@@ -46,7 +46,7 @@ function AdminMarketplaceEntity() {
const [_isValid, setIsValid] = useState({
name: true, nameFormat: true, displayName: true, abstract: true, description: true,
status: true, type: true, publisher: true, publishDate: true,
- images: { imagePortrait: true, imageSquare: true, imageLandscape: true },
+ images: { imagePortrait: true, imageBanner: true, imageLandscape: true },
relatedItems: true, relatedProfiles: true, actionLinks: true
});
const [_deleteModal, setDeleteModal] = useState({ show: false, items: null });
@@ -343,7 +343,7 @@ function AdminMarketplaceEntity() {
setIsValid({
..._isValid, images: {
"imagePortrait": e.target.id === "imagePortrait" ? isValid : _isValid.images.imagePortrait,
- "imageSquare": true, //e.target.id === "imageSquare" ? isValid : _isValid.images.imageSquare,
+ "imageBanner": true, //e.target.id === "imageBanner" ? isValid : _isValid.images.imageBanner,
"imageLandscape": e.target.id === "imageLandscape" ? isValid : _isValid.images.imageLandscape
}
});
@@ -379,7 +379,7 @@ function AdminMarketplaceEntity() {
_isValid.publisher = item.publisher != null && item.publisher.id.toString() !== "-1";
_isValid.publishDate = item.publishDate != null && item.publishDate.trim().length > 0;
_isValid.images.imagePortrait = item.imagePortrait != null && item.imagePortrait.id.toString() !== "-1";
- _isValid.images.imageSquare = true; //item.imageSquare != null && item.imageSquare.id.toString() !== "-1";
+ _isValid.images.imageBanner = true; //item.imageBanner != null && item.imageBanner.id.toString() !== "-1";
_isValid.images.imageLandscape = item.imageLandscape != null && item.imageLandscape.id.toString() !== "-1";
_isValid.relatedItems = validateForm_relatedItems();
_isValid.relatedProfiles = validateForm_relatedProfiles();
@@ -388,7 +388,7 @@ function AdminMarketplaceEntity() {
setIsValid(JSON.parse(JSON.stringify(_isValid)));
return (_isValid.name && _isValid.nameFormat && _isValid.displayName && _isValid.abstract && _isValid.description &&
_isValid.status && _isValid.publisher && _isValid.publishDate &&
- _isValid.images.imagePortrait && _isValid.images.imageSquare && _isValid.images.imageLandscape &&
+ _isValid.images.imagePortrait && _isValid.images.imageBanner && _isValid.images.imageLandscape &&
_isValid.relatedItems && _isValid.relatedProfiles && _isValid.type && _isValid.actionLinks);
}
@@ -567,7 +567,7 @@ function AdminMarketplaceEntity() {
//note you must update the state value for the input to be read only. It is not enough to simply have the onChange handler.
switch (e.target.id) {
case "imagePortrait":
- case "imageSquare":
+ case "imageBanner":
case "imageLandscape":
if (e.target.value.toString() === "-1") item[e.target.id] = null;
else {
@@ -1175,9 +1175,9 @@ function AdminMarketplaceEntity() {
{renderImageSelection("imagePortrait", "Portrait Image", "Recommended aspect ratio 3:4. Used by: Home page ('Featured Solution' banner image, 'Popular' items tiles), Library page (result tiles)")}
- {/*
*/}
- {/* {renderImageSelection("imageSquare", "Square Image (Deprecated)", "Recommended aspect ratio 1:1. Deprecated.")}*/}
- {/*
*/}
+
+ {renderImageSelection("imageBanner", "Banner Image", "Recommended aspect ratio 1:3.5. Used when displaying marketplace item image on small screens. Suggest minimum size of 150px x 350px.")}
+
{renderImageSelection("imageLandscape", "Landscape Image", "Recommended: 320px w by 180px h (16:9) Used by: Home page ('New' items tiles), Marketplace item page (banner image, 'Related' items tiles)")}
diff --git a/frontend/src/views/shared/MarketplaceItemEntityHeader.js b/frontend/src/views/shared/MarketplaceItemEntityHeader.js
index ec96141d..9dd56069 100644
--- a/frontend/src/views/shared/MarketplaceItemEntityHeader.js
+++ b/frontend/src/views/shared/MarketplaceItemEntityHeader.js
@@ -4,6 +4,7 @@ import color from '../../components/Constants';
import { useLoadingContext } from '../../components/contexts/LoadingContext';
import DownloadNodesetModal from '../../components/DownloadNodesetModal';
+import { RenderImageBg } from '../../services/MarketplaceService';
import { AppSettings } from '../../utils/appsettings';
import { formatItemPublishDate, generateLogMessageString, getImageUrl, renderMenuColorIcon, renderMenuColorMaterialIcon } from '../../utils/UtilityService';
import { MarketplaceItemJobLauncher } from './MarketplaceItemJobLauncher';
@@ -54,28 +55,14 @@ function MarketplaceItemEntityHeader(props) { //props are item, showActions
//-------------------------------------------------------------------
// Region: Render helpers
//-------------------------------------------------------------------
- const renderImageBg = () => {
-
- const bgImageStyle = props.item.imageLandscape == null ? {} :
- {
- backgroundImage: `url(${getImageUrl(props.item.imageLandscape)})`
- };
-
- return (
-
- );
- };
-
const renderMarketplaceHeader = () => {
return (
<>
-
- {renderImageBg()}
+
+
-
+
{/*
{props.item.name}
*/}
{props.item.abstract != null &&
@@ -102,10 +89,10 @@ function MarketplaceItemEntityHeader(props) { //props are item, showActions
return (
<>
-
- {renderImageBg()}
+
+
-
+
{props.item.abstract != null &&
}
diff --git a/frontend/src/views/shared/MarketplaceItemRow.js b/frontend/src/views/shared/MarketplaceItemRow.js
index 49e969c4..a58fb2a0 100644
--- a/frontend/src/views/shared/MarketplaceItemRow.js
+++ b/frontend/src/views/shared/MarketplaceItemRow.js
@@ -2,13 +2,13 @@ import React from 'react'
import { useHistory } from 'react-router-dom'
import { Button } from 'react-bootstrap'
-import { formatItemPublishDate, generateLogMessageString, getImageUrl, getRandomArrayIndexes } from '../../utils/UtilityService';
-import { clearSearchCriteria, generateSearchQueryString, toggleSearchFilterSelected } from '../../services/MarketplaceService'
+import { formatItemPublishDate, getImageUrl, getRandomArrayIndexes } from '../../utils/UtilityService';
+import { clearSearchCriteria, generateSearchQueryString, RenderImageBg, toggleSearchFilterSelected } from '../../services/MarketplaceService'
import { useLoadingContext } from '../../components/contexts/LoadingContext'
import { SvgVisibilityIcon } from '../../components/SVGIcon'
import color from '../../components/Constants'
-const CLASS_NAME = "MarketplaceItemRow";
+//const CLASS_NAME = "MarketplaceItemRow";
function MarketplaceItemRow(props) { //props are item, showActions
@@ -121,30 +121,6 @@ function MarketplaceItemRow(props) { //props are item, showActions
return renderCategoryTagsRandom(item.industryVerticals, 3);
}
- const renderImageBg = () => {
-
- /*
- var imgSrc = props.item.imagePortrait == null ? "" : getImageUrl(props.item.imagePortrait);
- return (
-
-
-
-
-
- );
- */
- const bgImageStyle = props.item.imagePortrait == null ? {} :
- {
- backgroundImage: `url(${getImageUrl(props.item.imagePortrait)})`
- };
-
- return (
-
- );
- };
-
//build the row
//-------------------------------------------------------------------
// Region: Render final output
@@ -156,8 +132,8 @@ function MarketplaceItemRow(props) { //props are item, showActions
return (
<>
-
- {renderImageBg()}
+
+
diff --git a/frontend/src/views/shared/MarketplaceTileList.js b/frontend/src/views/shared/MarketplaceTileList.js
index 76730e74..fd49a7d9 100644
--- a/frontend/src/views/shared/MarketplaceTileList.js
+++ b/frontend/src/views/shared/MarketplaceTileList.js
@@ -3,6 +3,7 @@ import { Card } from 'react-bootstrap';
import stockTilePhoto from '../../components/img/icon-molecule-landscape.svg'
import iconMolecule from '../../components/img/icon-molecule-portrait.svg'
+import { RenderImageBg } from '../../services/MarketplaceService';
import { AppSettings } from '../../utils/appsettings';
import { getImageAlt, getImageUrl } from '../../utils/UtilityService';
import '../styles/MarketplaceTileList.scss';
@@ -95,10 +96,10 @@ function MarketplaceTileList(props) {
return (
-
- {renderImageBg(item)}
+
+
-
+
{renderDisplayName(item)}
@@ -107,7 +108,7 @@ function MarketplaceTileList(props) {
);
}
- const renderImageBg = (item) => {
+ const renderImageBg = (item, transpose = false) => {
const imgSrc = item.imagePortrait == null ? iconMolecule : getImageUrl(item.imagePortrait);
const bgImageStyle =
{
@@ -115,7 +116,7 @@ function MarketplaceTileList(props) {
};
return (
-
+
);
@@ -130,7 +131,7 @@ function MarketplaceTileList(props) {
)
}
- const colCountCss = props.colCount == null ? 'col-sm-4' : `col-sm-${(12 / props.colCount).toString()}`;
+ const colCssClass = props.colCssClass == null ? 'col-sm-6' : props.colCssClass;
const mainBody = props.items.map((itm, counter) => {
const isFirst = counter === 0;
@@ -149,7 +150,7 @@ function MarketplaceTileList(props) {
`/library/${itm.name}`;
return (
-
+
{tile}
diff --git a/frontend/src/views/shared/ProfileItemRow.js b/frontend/src/views/shared/ProfileItemRow.js
index 7432143a..11ef4324 100644
--- a/frontend/src/views/shared/ProfileItemRow.js
+++ b/frontend/src/views/shared/ProfileItemRow.js
@@ -3,6 +3,8 @@ import { useHistory } from 'react-router-dom'
import { Button } from 'react-bootstrap'
import { formatItemPublishDate, getImageUrl, getRandomArrayIndexes } from '../../utils/UtilityService';
+import { RenderImageBg } from '../../services/MarketplaceService';
+import { AppSettings } from '../../utils/appsettings';
//const CLASS_NAME = "ProfileItemRow";
@@ -72,20 +74,6 @@ function ProfileItemRow(props) { //props are item, showActions
return renderCategoryTagsRandom(item.industryVerticals, 3);
}
- const renderImageBg = () => {
-
- var bgImageStyle = props.item.imagePortrait == null ? {} :
- {
- backgroundImage: `url(${getImageUrl(props.item.imagePortrait)})`
- };
-
- return (
-
- );
- };
-
const renderImageCompact = () => {
const style =
@@ -104,10 +92,10 @@ function ProfileItemRow(props) { //props are item, showActions
const renderRow = () => {
return (
-
- {renderImageBg()}
+
+
-
+
SM Profile: {props.item.displayName}