Skip to content

Commit

Permalink
Boundwiths updates
Browse files Browse the repository at this point in the history
  • Loading branch information
little9 committed Jul 29, 2024
1 parent a67733d commit 05b3110
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 83 deletions.
35 changes: 35 additions & 0 deletions 01JHU_INST-JHU/css/prm-location-items-after.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
prm-location-items>* {
visibility: hidden;
height: 0;
width: 0;
margin: 0;
padding: 0;
}

prm-location-items-after {
visibility: visible;
}

prm-location-holdings {
margin-bottom: 1em;
}

/* Divs not hidden by default */
prm-location-items>div.tab-content-header.margin-bottom-small.margin-left-medium.layout-row.layout-align-space-between-end {
margin: 0;
}

prm-location-items-after .skewed-divider {
display: none;
}


prm-service-button prm-icon md-icon.md-primoExplore-theme {
margin-left: .25em;
color: #fff !important;
}

prm-location-items-after>md-list>md-list-item>div.layout-row.flex>div>div.layout-wrap.layout-align-end-center.layout-row.flex-xs-100.flex-sm-30 {
flex-direction: column !important;
align-items: flex-start !important;
}
147 changes: 66 additions & 81 deletions 01JHU_INST-JHU/html/prm-location-holdings-after.html
Original file line number Diff line number Diff line change
@@ -1,84 +1,69 @@
<div>
<style>
prm-location-holdings>* {
visibility: hidden;
height: 0;
width: 0;
margin: 0;
padding: 0;
}

prm-location-holdings-after {
visibility: visible;
}

.jh-boundswith-card {
margin: 15px 0 0 0 !important;
}
prm-location-holdings>* {
visibility: hidden;
height: 0;
width: 0;
margin: 0;
padding: 0;
}
prm-location-holdings-after {
visibility: visible;
}
.jh-boundswith-card {
margin: 15px 0 0 0 !important;
}
</style>
<div ng-repeat="line in $ctrl.holdings">
<span ng-if="line.key === 'For availability see:'">
<md-card class="jh-boundswith-card" md-theme-watch>
<md-card-title>
<md-card-title-text>
<span class="md-headline">Holdings Information</span>

</md-card-title-text>
</md-card-title>
<md-card-content>
<div class="margin-bottom-medium">
This item is physically bound with another item.
</div>

<span class="bold-text">For availability see:</span>

<a
href="https://jhu-psb.primo.exlibrisgroup.com/discovery/fulldisplay?docid=alma{{line.value[1]}}&context=L&vid=01JHU_INST:JHU">
{{line.value[0]}}
</a>
<div ng-if="$ctrl.parentCtrl.currLoc.locationNoItems ? $ctrl.parentCtrl.summaryLinesVisible : !$ctrl.parentCtrl.summaryLinesVisible"
class="display-block" layout="row" layout-align="start start">
<div layout="column">
<div ng-repeat="summaryLine in $ctrl.parentCtrl.currLoc.summaryHoldings.baseSummaryShort track by $index"
layout="row">
<div translate="{{summaryLine.key}}" class="margin-right-small summary-brief-header"
ng-class="{'margin-right-medium': $ctrl.parentCtrl.mediaQueries.xs}"></div>
<span class="summary-brief word-break-all"
ng-style="::(($ctrl.parentCtrl.isIE && $ctrl.parentCtrl.mediaQueries.xs) && {'width':'14em'})">
<a ng-if="summaryLine.value.startsWith('http:') || summaryLine.value.startsWith('https:')"
href="{{summaryLine.value}}">{{summaryLine.value}}</a>
<span
ng-if="!summaryLine.value.startsWith('http:') && !summaryLine.value.startsWith('https:')"
ng-bind-html="summaryLine.value"></span>
</span>
</div>
</div>
</div>
<div ng-if="$ctrl.parentCtrl.currLoc.locationNoItems ? !$ctrl.parentCtrl.summaryLinesVisible : $ctrl.parentCtrl.summaryLinesVisible"
layout="row" layout-align="start start" class="display-block">
<div layout="column">
<div
ng-repeat="allLine in $ctrl.parentCtrl.currLoc.summaryHoldings.allLines track by $index">
<div ng-if="allLine.key !== 'For availability see:'">
<div>
<span class="bold-text" translate="{{allLine.key}}"></span>
<span ng-repeat="lineItem in allLine.value track by $index">
<span>
<a ng-if="lineItem.startsWith('http:') || lineItem.startsWith('https:')"
href="{{lineItem}}">{{lineItem}}</a>
<span
ng-if="!lineItem.startsWith('http:') && !lineItem.startsWith('https:')"
ng-bind-html="lineItem"></span>
</span>
</span>
</div>
</div>
</div>
</div>
</div>
</md-card-content>
</md-card>
</span>
</div>
</div>
<br />
<md-card class="jh-boundswith-card" md-theme-watch>
<md-card-title>
<md-card-title-text>
<span class="md-headline">Holdings Information</span>
</md-card-title-text>
</md-card-title>
<md-card-content>
<div ng-repeat="line in $ctrl.holdings">
<span ng-if="$ctrl.isAvailabilityLine(line)">
<div class="margin-bottom-medium">
This item is physically bound with another item.
</div>
<span class="bold-text">For availability see:</span>
<a ng-if="$ctrl.hasValidLink(line)" ng-href="{{$ctrl.getAvailabilityLink(line)}}">
{{$ctrl.getLinkText(line)}}
</a>
</span>
</div>

<div ng-if="$ctrl.shouldShowBaseSummary()" class="display-block" layout="row" layout-align="start start">
<div layout="column">
<div ng-repeat="summaryLine in $ctrl.getBaseSummaryLines() track by $index" layout="row">
<div translate="{{summaryLine.key}}" class="margin-right-small summary-brief-header"
ng-class="{'margin-right-medium': $ctrl.parentCtrl.mediaQueries.xs}"></div>
<span class="summary-brief word-break-all" ng-style="$ctrl.getStyle()">
<a ng-if="$ctrl.isLink(summaryLine.value)" ng-href="{{summaryLine.value}}">{{summaryLine.value}}</a>
<span ng-if="!$ctrl.isLink(summaryLine.value)" ng-bind-html="summaryLine.value"></span>
</span>
</div>
</div>
</div>

<div ng-if="$ctrl.shouldShowAllLines()" layout="row" layout-align="start start" class="display-block">
<div layout="column">
<div ng-repeat="allLine in $ctrl.getAllLines() track by $index">
<div ng-if="!$ctrl.isAvailabilityLine(allLine)">
<div>
<span class="bold-text" translate="{{allLine.key}}"></span>
<span ng-repeat="lineItem in allLine.value track by $index">
<span>
<a ng-if="$ctrl.isLink(lineItem)" ng-href="{{lineItem}}">{{lineItem}}</a>
<span ng-if="!$ctrl.isLink(lineItem)" ng-bind-html="lineItem"></span>
</span>
</span>
</div>
</div>
</div>
</div>
</div>
</md-card-content>
</md-card>
</div>

8 changes: 6 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import { prmTopBarBefore } from './components/prmTopBarBefore';
import { prmSearchResultThumbnailContainerAfter } from './components/prmSearchResultThumbnailContainerAfter';
import { prmSearchBookmarkFilterAfter } from './components/prmSearchBookmarkFilterAfter';
import { prmLocationAfter } from './components/prmLocationAfter';
// import { prmLocationHoldingsAfter } from './components/prmLocationHoldingsAfter';


// Custom holdings component for boundwiths
import { prmLocationHoldingsAfter } from './components/prmLocationHoldingsAfter';

import { prmAuthenticationAfter } from './components/prmAuthenticationAfter';
import { prmLocationItemsAfter } from './components/prmLocationItemsAfter';
import { prmRequestAfter } from './components/prmRequestAfter';
Expand Down Expand Up @@ -36,7 +40,7 @@ app.component('prmTopBarBefore', prmTopBarBefore);
app.component('prmSearchResultThumbnailContainerAfter', prmSearchResultThumbnailContainerAfter);
app.component('prmSearchBookmarkFilterAfter', prmSearchBookmarkFilterAfter);
app.component('prmLocationAfter', prmLocationAfter);
//app.component('prmLocationHoldingsAfter', prmLocationHoldingsAfter);
app.component('prmLocationHoldingsAfter', prmLocationHoldingsAfter);
app.component('prmAuthenticationAfter', prmAuthenticationAfter);
app.component('prmLocationItemsAfter', prmLocationItemsAfter);
app.component('prmRequestAfter', prmRequestAfter);
Expand Down

0 comments on commit 05b3110

Please sign in to comment.