diff --git a/src/lib/components/backoffice/icons/Icons.js b/src/lib/components/backoffice/icons/Icons.js
index 7438d53d6..f86577a83 100644
--- a/src/lib/components/backoffice/icons/Icons.js
+++ b/src/lib/components/backoffice/icons/Icons.js
@@ -66,3 +66,15 @@ export class ILLLibraryIcon extends Component {
return ;
}
}
+
+export class InternalLocationIcon extends Component {
+ render() {
+ return ;
+ }
+}
+
+export class LibraryIcon extends Component {
+ render() {
+ return ;
+ }
+}
diff --git a/src/lib/forms/core/SelectorField.js b/src/lib/forms/core/SelectorField.js
index bc03ee493..fb20a5f44 100644
--- a/src/lib/forms/core/SelectorField.js
+++ b/src/lib/forms/core/SelectorField.js
@@ -73,6 +73,7 @@ export class SelectorField extends Component {
errorPath,
emptyHeader,
emptyDescription,
+ icon,
label,
required,
multiple,
@@ -121,6 +122,7 @@ export class SelectorField extends Component {
}
serializer={serializer}
placeholder={placeholderText}
+ icon={icon}
{...selectorProps}
/>
@@ -139,6 +141,7 @@ SelectorField.propTypes = {
emptyHeader: PropTypes.string,
errorPath: PropTypes.string.isRequired,
fieldPath: PropTypes.string.isRequired,
+ icon: PropTypes.any,
label: PropTypes.string,
optimized: PropTypes.bool,
serializer: PropTypes.func.isRequired,
@@ -161,4 +164,5 @@ SelectorField.defaultProps = {
renderSelection: null,
renderGroup: null,
label: '',
+ icon: null,
};
diff --git a/src/lib/modules/Document/DocumentCard/DocumentCard.js b/src/lib/modules/Document/DocumentCard/DocumentCard.js
index 0cbaa20cd..ed27d4b1d 100644
--- a/src/lib/modules/Document/DocumentCard/DocumentCard.js
+++ b/src/lib/modules/Document/DocumentCard/DocumentCard.js
@@ -37,13 +37,18 @@ class DocumentCard extends Component {
render() {
const { data } = this.props;
const { metadata } = data;
+ const url = FrontSiteRoutes.documentDetailsFor(metadata.pid);
return (
goTo(FrontSiteRoutes.documentDetailsFor(metadata.pid))}
+ href={url}
+ onClick={e => {
+ e.preventDefault();
+ goTo(url);
+ }}
data-test={metadata.pid}
>
{metadata.document_type}
diff --git a/src/lib/modules/Document/backoffice/DocumentList/DocumentListEntry.js b/src/lib/modules/Document/backoffice/DocumentList/DocumentListEntry.js
index 566a03a69..c790e5e4c 100644
--- a/src/lib/modules/Document/backoffice/DocumentList/DocumentListEntry.js
+++ b/src/lib/modules/Document/backoffice/DocumentList/DocumentListEntry.js
@@ -10,6 +10,7 @@ import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import { Grid, Header, Icon, Item, List } from 'semantic-ui-react';
import DocumentCirculation from './DocumentCirculation';
+import { EItemIcon } from '@components/backoffice/icons';
export default class DocumentListEntry extends Component {
renderMiddleColumn = document => {
@@ -70,7 +71,7 @@ export default class DocumentListEntry extends Component {
{document.metadata.eitems.total > 0 ? (
-
+
Has electronic items
diff --git a/src/lib/modules/ESSelector/ESSelector.js b/src/lib/modules/ESSelector/ESSelector.js
index 875db6b5b..b4d2b9468 100644
--- a/src/lib/modules/ESSelector/ESSelector.js
+++ b/src/lib/modules/ESSelector/ESSelector.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Overridable from 'react-overridable';
-import { List, Container, Icon } from 'semantic-ui-react';
+import { List, Container, Icon, Label, Popup } from 'semantic-ui-react';
import _isEmpty from 'lodash/isEmpty';
import { HitsSearch } from './HitsSearch';
import find from 'lodash/find';
@@ -74,19 +74,22 @@ class ESSelector extends Component {
};
renderSelection = (selection, removeSelection) => {
- const { renderSelection } = this.props;
+ const { renderSelection, icon } = this.props;
if (renderSelection) return renderSelection;
+ const label = (
+
+ );
+
return (
-
- removeSelection(selection)}>
-
- {selection.extra}
- {selection.title}
-
-
- {selection.description}
+
+
);
@@ -98,7 +101,7 @@ class ESSelector extends Component {
return (
-
+
{selections.map(selection =>
renderSelection(selection, removeSelection)
)}
@@ -186,6 +189,7 @@ ESSelector.propTypes = {
serializer: PropTypes.func,
id: PropTypes.string,
name: PropTypes.string,
+ icon: PropTypes.any,
selectionInfoText: PropTypes.string,
emptySelectionInfoText: PropTypes.string,
focus: PropTypes.bool,
@@ -195,6 +199,7 @@ ESSelector.defaultProps = {
delay: 250,
initialSelections: [],
minCharacters: 3,
+ icon: null,
onSelectionsUpdate: () => {},
emptySelectionInfoText: null,
selectionInfoText: null,
diff --git a/src/lib/modules/Literature/LiteratureTags.js b/src/lib/modules/Literature/LiteratureTags.js
index dff9e5293..36c18c245 100644
--- a/src/lib/modules/Literature/LiteratureTags.js
+++ b/src/lib/modules/Literature/LiteratureTags.js
@@ -40,11 +40,12 @@ class LiteratureTags extends Component {
LiteratureTags.propTypes = {
tags: PropTypes.array,
- isBackOffice: PropTypes.bool.isRequired,
+ isBackOffice: PropTypes.bool,
};
LiteratureTags.defaultProps = {
tags: [],
+ isBackOffice: true,
};
export default Overridable.component('LiteratureTags', LiteratureTags);
diff --git a/src/lib/modules/Relations/backoffice/components/RelationCard/DocumentCard.js b/src/lib/modules/Relations/backoffice/components/RelationCard/DocumentCard.js
index 9eb2b8fa3..a7c3b8535 100644
--- a/src/lib/modules/Relations/backoffice/components/RelationCard/DocumentCard.js
+++ b/src/lib/modules/Relations/backoffice/components/RelationCard/DocumentCard.js
@@ -8,7 +8,8 @@ import _isEmpty from 'lodash/isEmpty';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
-import { Card, Icon } from 'semantic-ui-react';
+import { Card } from 'semantic-ui-react';
+import { SeriesIcon } from '@components/backoffice/icons';
export class DocumentCard extends Component {
render() {
@@ -26,7 +27,7 @@ export class DocumentCard extends Component {
url={_get(data, 'metadata.cover_metadata.urls.medium')}
/>
) : (
-
+
)}
diff --git a/src/lib/modules/Relations/backoffice/components/RelationCard/SeriesCard.js b/src/lib/modules/Relations/backoffice/components/RelationCard/SeriesCard.js
index b4b3a1ac7..939877c16 100644
--- a/src/lib/modules/Relations/backoffice/components/RelationCard/SeriesCard.js
+++ b/src/lib/modules/Relations/backoffice/components/RelationCard/SeriesCard.js
@@ -3,8 +3,9 @@ import { BackOfficeRoutes } from '@routes/urls';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
-import { Card, Icon } from 'semantic-ui-react';
+import { Card } from 'semantic-ui-react';
import _isEmpty from 'lodash/isEmpty';
+import { SeriesIcon } from '@components/backoffice/icons';
export default class SeriesCard extends Component {
render() {
@@ -16,7 +17,7 @@ export default class SeriesCard extends Component {
{actions}
{data.metadata.document_type || data.metadata.mode_of_issuance}
-
+
{data.metadata.title}
diff --git a/src/lib/modules/Relations/backoffice/components/RelationListEntry.js b/src/lib/modules/Relations/backoffice/components/RelationListEntry.js
index b90fd5b7a..1a22d6ae9 100644
--- a/src/lib/modules/Relations/backoffice/components/RelationListEntry.js
+++ b/src/lib/modules/Relations/backoffice/components/RelationListEntry.js
@@ -9,7 +9,8 @@ import _get from 'lodash/get';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
-import { Grid, Icon, Item } from 'semantic-ui-react';
+import { Grid, Item } from 'semantic-ui-react';
+import { SeriesIcon } from '@components/backoffice/icons';
export class RelationListEntry extends Component {
render() {
@@ -29,7 +30,7 @@ export class RelationListEntry extends Component {
url={_get(record, 'metadata.cover_metadata.urls.medium')}
/>
) : (
-
+
);
return (
-
diff --git a/src/lib/pages/backoffice/Acquisition/Order/OrderEditor/OrderForm/OrderInfo.js b/src/lib/pages/backoffice/Acquisition/Order/OrderEditor/OrderForm/OrderInfo.js
index 0a2c90987..3de22b8a9 100644
--- a/src/lib/pages/backoffice/Acquisition/Order/OrderEditor/OrderForm/OrderInfo.js
+++ b/src/lib/pages/backoffice/Acquisition/Order/OrderEditor/OrderForm/OrderInfo.js
@@ -10,6 +10,7 @@ import { TextField } from '@forms/core/TextField';
import { serializeVendor } from '@modules/ESSelector/serializer';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
+import { AcquisitionVendorIcon } from '@components/backoffice/icons';
export class OrderInfo extends Component {
render() {
@@ -24,6 +25,7 @@ export class OrderInfo extends Component {
errorPath="vendor_pid"
label="Vendor"
placeholder="Search for a vendor..."
+ icon={}
query={vendorApi.list}
serializer={serializeVendor}
/>
diff --git a/src/lib/pages/backoffice/Acquisition/Order/OrderEditor/OrderForm/OrderLines.js b/src/lib/pages/backoffice/Acquisition/Order/OrderEditor/OrderForm/OrderLines.js
index 13922da33..e80ce91f3 100644
--- a/src/lib/pages/backoffice/Acquisition/Order/OrderEditor/OrderForm/OrderLines.js
+++ b/src/lib/pages/backoffice/Acquisition/Order/OrderEditor/OrderForm/OrderLines.js
@@ -17,6 +17,7 @@ import {
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Segment, Divider, Grid } from 'semantic-ui-react';
+import { DocumentIcon, PatronIcon } from '@components/backoffice/icons';
export class OrderLines extends Component {
renderArrayItem = ({ arrayPath, indexPath, ...arrayHelpers }) => {
@@ -44,6 +45,7 @@ export class OrderLines extends Component {
errorPath={`${arrayPath}.${indexPath}.document_pid`}
label="Document"
placeholder="Search for a document..."
+ icon={}
query={documentApi.list}
serializer={serializeDocument}
/>
@@ -117,6 +119,7 @@ export class OrderLines extends Component {
errorPath={`${arrayPath}.${indexPath}.patron_pid`}
label="Patron"
placeholder="Search for a patron..."
+ icon={}
query={patronApi.list}
serializer={serializePatron}
width={10}
diff --git a/src/lib/pages/backoffice/Document/DocumentForms/DocumentEditor/DocumentForm/DocumentBasicMetadata.js b/src/lib/pages/backoffice/Document/DocumentForms/DocumentEditor/DocumentForm/DocumentBasicMetadata.js
index c99e7aae7..7ac1c9bde 100644
--- a/src/lib/pages/backoffice/Document/DocumentForms/DocumentEditor/DocumentForm/DocumentBasicMetadata.js
+++ b/src/lib/pages/backoffice/Document/DocumentForms/DocumentEditor/DocumentForm/DocumentBasicMetadata.js
@@ -21,7 +21,7 @@ export class DocumentBasicMetadata extends Component {
-
+
{
@@ -74,6 +75,7 @@ export class EItemForm extends Component {
errorPath="document_pid"
label="Document"
placeholder="Search for a document..."
+ icon={}
query={documentApi.list}
serializer={serializeDocument}
/>
diff --git a/src/lib/pages/backoffice/ILL/BorrowingRequest/BorrowingRequestEditor/BorrowingRequestForm/OrderInfo.js b/src/lib/pages/backoffice/ILL/BorrowingRequest/BorrowingRequestEditor/BorrowingRequestForm/OrderInfo.js
index ed6a1e691..26fa30a53 100644
--- a/src/lib/pages/backoffice/ILL/BorrowingRequest/BorrowingRequestEditor/BorrowingRequestForm/OrderInfo.js
+++ b/src/lib/pages/backoffice/ILL/BorrowingRequest/BorrowingRequestEditor/BorrowingRequestForm/OrderInfo.js
@@ -17,6 +17,8 @@ import {
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Grid } from 'semantic-ui-react';
+import { DocumentIcon, PatronIcon } from '@components/backoffice/icons';
+import { LibraryIcon } from '@components/backoffice/icons/Icons';
export class OrderInfo extends Component {
render() {
@@ -33,6 +35,7 @@ export class OrderInfo extends Component {
errorPath="document_pid"
label="Document"
placeholder="Search for a document..."
+ icon={}
query={documentApi.list}
serializer={serializeDocument}
/>
@@ -46,6 +49,7 @@ export class OrderInfo extends Component {
errorPath="patron_pid"
label="Patron"
placeholder="Search for a patron..."
+ icon={}
query={patronApi.list}
serializer={serializePatron}
/>
@@ -59,6 +63,7 @@ export class OrderInfo extends Component {
errorPath="library_pid"
label="Library"
placeholder="Search for a library..."
+ icon={}
query={libraryApi.list}
serializer={serializeLibrary}
/>
diff --git a/src/lib/pages/backoffice/Item/ItemDetails/ItemCirculation/ItemCirculation.js b/src/lib/pages/backoffice/Item/ItemDetails/ItemCirculation/ItemCirculation.js
index 0f5cd9df4..2502f288f 100644
--- a/src/lib/pages/backoffice/Item/ItemDetails/ItemCirculation/ItemCirculation.js
+++ b/src/lib/pages/backoffice/Item/ItemDetails/ItemCirculation/ItemCirculation.js
@@ -15,6 +15,11 @@ import {
Message,
Segment,
} from 'semantic-ui-react';
+import {
+ InternalLocationIcon,
+ LibraryIcon,
+ PatronIcon,
+} from '@components/backoffice/icons/Icons';
class ItemStatusMessageOnLoan extends Component {
render() {
@@ -24,7 +29,7 @@ class ItemStatusMessageOnLoan extends Component {
{
name: (
<>
- Patron{' '}
+ Patron{' '}
>
),
value: (
@@ -189,7 +194,7 @@ export default class ItemCirculation extends Component {
to={BackOfficeRoutes.locationsList}
size="small"
>
-
+
{metadata.internal_location.name}
@@ -206,7 +211,7 @@ export default class ItemCirculation extends Component {
to={BackOfficeRoutes.locationsList}
size="small"
>
-
+
{metadata.internal_location.location.name}
Location
diff --git a/src/lib/pages/backoffice/Item/ItemForms/ItemEditor/ItemForm/ItemForm.js b/src/lib/pages/backoffice/Item/ItemForms/ItemEditor/ItemForm/ItemForm.js
index 987ff8723..3d261ddb1 100644
--- a/src/lib/pages/backoffice/Item/ItemForms/ItemEditor/ItemForm/ItemForm.js
+++ b/src/lib/pages/backoffice/Item/ItemForms/ItemEditor/ItemForm/ItemForm.js
@@ -24,6 +24,8 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react';
import itemSubmitSerializer from './itemSubmitSerializer';
import { Segment, Header } from 'semantic-ui-react';
+import { DocumentIcon } from '@components/backoffice/icons';
+import { InternalLocationIcon } from '@components/backoffice/icons/Icons';
export class ItemForm extends Component {
constructor(props) {
@@ -160,6 +162,7 @@ export class ItemForm extends Component {
errorPath="document_pid"
label="Document"
placeholder="Search for a document..."
+ icon={}
query={documentApi.list}
serializer={serializeDocument}
width={8}
@@ -182,6 +185,7 @@ export class ItemForm extends Component {
errorPath="internal_location_pid"
label="Internal location"
placeholder="Search for an internal location..."
+ icon={}
query={internalLocationApi.list}
serializer={serializeInternalLocation}
width={8}
diff --git a/src/lib/pages/backoffice/Location/LocationForms/InternalLocationEditor/components/InternalLocationForm/InternalLocationForm.js b/src/lib/pages/backoffice/Location/LocationForms/InternalLocationEditor/components/InternalLocationForm/InternalLocationForm.js
index 728883efc..89bd0fb21 100644
--- a/src/lib/pages/backoffice/Location/LocationForms/InternalLocationEditor/components/InternalLocationForm/InternalLocationForm.js
+++ b/src/lib/pages/backoffice/Location/LocationForms/InternalLocationEditor/components/InternalLocationForm/InternalLocationForm.js
@@ -14,6 +14,7 @@ import pick from 'lodash/pick';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Header, Segment } from 'semantic-ui-react';
+import { InternalLocationIcon } from '@components/backoffice/icons/Icons';
export class InternalLocationForm extends Component {
prepareData = data => {
@@ -81,6 +82,7 @@ export class InternalLocationForm extends Component {
errorPath="location_pid"
label="Location"
placeholder="Search for a location..."
+ icon={}
query={locationApi.list}
serializer={serializeLocation}
width={8}
diff --git a/src/lib/pages/frontsite/Home/Sections/SectionServices.js b/src/lib/pages/frontsite/Home/Sections/SectionServices.js
index dac57f61f..5627b7710 100644
--- a/src/lib/pages/frontsite/Home/Sections/SectionServices.js
+++ b/src/lib/pages/frontsite/Home/Sections/SectionServices.js
@@ -1,5 +1,6 @@
import React, { Component } from 'react';
import { Button, Card, Container, Header, Icon } from 'semantic-ui-react';
+import { ILLLibraryIcon } from '@components/backoffice/icons';
export class SectionServices extends Component {
render() {
@@ -32,7 +33,7 @@ export class SectionServices extends Component {
- Acquisition
+ Acquisition
If you think the library should buy literature, please let
diff --git a/src/semantic-ui/site/elements/container.overrides b/src/semantic-ui/site/elements/container.overrides
index ecf00fcbe..acae91da7 100644
--- a/src/semantic-ui/site/elements/container.overrides
+++ b/src/semantic-ui/site/elements/container.overrides
@@ -262,5 +262,9 @@ Container Overrides - REACT-INVENIO-APP-ILS
&.details-header {
padding-bottom: 1em;
}
+
+ &.result-selections {
+ margin-top: .5em;
+ }
}
}