Skip to content

Commit

Permalink
Merge branch 'master' into LIBSEARCH-801-implement-clear-active-filte…
Browse files Browse the repository at this point in the history
…rs-designs-for-advanced-search
  • Loading branch information
erinesullivan committed Sep 10, 2024
2 parents 5db3737 + 2e09126 commit 8d2cd8b
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ const ChooseAffiliation = () => {
affiliation: alternativeAffiliation
};
document.location.href
= `${document.location.pathname
}?${
stringifySearch(withAffiliation)}`;
= `${document.location.pathname}?${stringifySearch(withAffiliation)}`;
};

const [isDialogOpen, setDialogOpen] = useState(false);
Expand Down
9 changes: 2 additions & 7 deletions src/modules/profile/components/Authentication/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@ import PropTypes from 'prop-types';
import React from 'react';

const Authentication = ({ button, children, logout }) => {
const { pathname, search } = document.location;
return (
<Anchor
href={
`${process.env.REACT_APP_LOGIN_BASE_URL || window.location.origin
}/${
logout ? 'logout' : 'login'
}?dest=${
encodeURIComponent(document.location.pathname + document.location.search)}`
}
href={`${process.env.REACT_APP_LOGIN_BASE_URL || window.location.origin}/log${logout ? 'out' : 'in'}?dest=${encodeURIComponent(pathname + search)}`}
className={button && 'button'}
>
{children || `Log ${logout ? 'out' : 'in'}`}
Expand Down
4 changes: 4 additions & 0 deletions src/modules/records/components/BentoboxList/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Anchor, Icon } from '../../../reusable';
import { getMultiSearchRecords } from '../../../pride';
import ILLRequestMessage from '../ILLRequestMessage';
import KeywordSwitch from '../KeywordSwitch';
import PropTypes from 'prop-types';
import React from 'react';
Expand Down Expand Up @@ -34,6 +35,9 @@ const BentoResults = ({ bentobox, search, searchQuery }) => {
{['databases', 'onlinejournals'].includes(bentobox.uid) && (
<p className='u-margin-bottom-none'>Try our <Anchor to={`/${bentobox.slug}/browse`}>Browse {bentobox.name} page</Anchor> to view all titles alphabetically or by academic discipline.</p>
)}
{bentobox.uid === 'mirlyn' && (
<p className='u-margin-bottom-none'><ILLRequestMessage /></p>
)}
</div>
</>
);
Expand Down
12 changes: 12 additions & 0 deletions src/modules/records/components/ILLRequestMessage/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Anchor } from '../../../reusable';
import React from 'react';

const ILLRequestMessage = () => {
return (
<>
Place an <Anchor href='https://ill.lib.umich.edu/' utmSource='library-search-no-items'>Interlibrary Loan request</Anchor> if you need something we don&apos;t have. We&apos;ll get it from another institution.
</>
);
};

export default ILLRequestMessage;
3 changes: 2 additions & 1 deletion src/modules/records/components/RecordList/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Anchor } from '../../../reusable';
import { GoToList } from '../../../lists';
import ILLRequestMessage from '../ILLRequestMessage';
import KeywordSwitch from '../KeywordSwitch';
import React from 'react';
import Record from '../Record';
Expand Down Expand Up @@ -58,7 +59,7 @@ const RecordList = () => {
<h2 className='heading-small margin-top__none'>Other suggestions</h2>
<ul className='margin-bottom__none'>
<li>Try looking at the other search categories linked below the search box.</li>
<li>Place an <Anchor href='https://ill.lib.umich.edu/' utmSource='library-search-no-items'>Interlibrary Loan request</Anchor> if you need something we don't have. We'll get it from another institution.</li>
<li><ILLRequestMessage /></li>
<li>Check your spelling.</li>
<li>Try more general keywords.</li>
<li>Try different keywords that mean the same thing.</li>
Expand Down
2 changes: 2 additions & 0 deletions src/modules/records/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
import BentoboxList from './components/BentoboxList';
import Bookplate from './components/Bookplate';
import FullRecordPlaceholder from './components/FullRecordPlaceholder';
import ILLRequestMessage from './components/ILLRequestMessage';
import KeywordSwitch from './components/KeywordSwitch';
import MARCTable from './components/MARCTable';
import Pagination from './components/Pagination';
Expand All @@ -35,6 +36,7 @@ export {
clearRecord,
clearRecords,
FullRecordPlaceholder,
ILLRequestMessage,
KeywordSwitch,
loadingHoldings,
loadingRecords,
Expand Down

0 comments on commit 8d2cd8b

Please sign in to comment.