|
22 | 22 | </md-card-title-text> |
23 | 23 | </md-card-title> |
24 | 24 | <md-card-content> |
25 | | - <div ng-repeat="line in $ctrl.holdings"> |
26 | | - <span ng-if="$ctrl.isAvailabilityLine(line)"> |
27 | | - <div class="margin-bottom-medium"> |
28 | | - This item is physically bound with another item. |
29 | | - </div> |
30 | | - <span class="bold-text">For availability see:</span> |
31 | | - <a |
32 | | - ng-if="$ctrl.hasValidLink(line)" |
33 | | - ng-href="{{$ctrl.getAvailabilityLink(line)}}" |
| 25 | + <div ng-init="$ctrl.hasAvailabilityLine = false"> |
| 26 | + <div ng-repeat="line in $ctrl.holdings"> |
| 27 | + <span |
| 28 | + ng-if="$ctrl.isAvailabilityLine(line)" |
| 29 | + ng-init="$ctrl.hasAvailabilityLine = true" |
34 | 30 | > |
35 | | - {{$ctrl.getLinkText(line)}} |
36 | | - </a> |
37 | | - </span> |
38 | | - </div> |
| 31 | + <div class="margin-bottom-medium"> |
| 32 | + This item is physically bound with another item. |
| 33 | + </div> |
| 34 | + <span class="bold-text">For availability see:</span> |
| 35 | + <a |
| 36 | + ng-if="$ctrl.hasValidLink(line)" |
| 37 | + ng-href="{{$ctrl.getAvailabilityLink(line)}}" |
| 38 | + > |
| 39 | + {{$ctrl.getLinkText(line)}} |
| 40 | + </a> |
| 41 | + </span> |
| 42 | + </div> |
39 | 43 |
|
40 | | - <div |
41 | | - ng-if="$ctrl.shouldShowBaseSummary()" |
42 | | - class="display-block" |
43 | | - layout="row" |
44 | | - layout-align="start start" |
45 | | - > |
46 | | - <div layout="column"> |
| 44 | + <div ng-if="!$ctrl.hasAvailabilityLine"> |
47 | 45 | <div |
48 | | - ng-repeat="summaryLine in $ctrl.getBaseSummaryLines() track by $index" |
| 46 | + ng-if="!$ctrl.parentCtrl.summaryLinesVisible" |
| 47 | + class="display-block" |
49 | 48 | layout="row" |
| 49 | + layout-align="start start" |
50 | 50 | > |
51 | | - <div |
52 | | - translate="{{summaryLine.key}}" |
53 | | - class="margin-right-small summary-brief-header" |
54 | | - ng-class="{'margin-right-medium': $ctrl.parentCtrl.mediaQueries.xs}" |
55 | | - ></div> |
56 | | - <span |
57 | | - class="summary-brief word-break-all" |
58 | | - ng-style="$ctrl.getStyle()" |
59 | | - > |
60 | | - <a |
61 | | - ng-if="$ctrl.isLink(summaryLine.value)" |
62 | | - ng-href="{{summaryLine.value}}" |
63 | | - >{{summaryLine.value}}</a |
| 51 | + <div layout="column"> |
| 52 | + <div |
| 53 | + ng-repeat="summaryLine in $ctrl.getBaseSummaryLines() track by $index" |
| 54 | + layout="row" |
64 | 55 | > |
65 | | - <span |
66 | | - ng-if="!$ctrl.isLink(summaryLine.value)" |
67 | | - ng-bind-html="summaryLine.value" |
68 | | - ></span> |
69 | | - </span> |
| 56 | + <div |
| 57 | + translate="{{summaryLine.key}}" |
| 58 | + class="margin-right-small summary-brief-header" |
| 59 | + ng-class="{'margin-right-medium': $ctrl.parentCtrl.mediaQueries.xs}" |
| 60 | + ></div> |
| 61 | + <span |
| 62 | + class="summary-brief word-break-all" |
| 63 | + ng-style="$ctrl.getStyle()" |
| 64 | + > |
| 65 | + <a |
| 66 | + ng-if="$ctrl.isLink(summaryLine.value)" |
| 67 | + ng-href="{{summaryLine.value}}" |
| 68 | + >{{summaryLine.value}}</a |
| 69 | + > |
| 70 | + <span |
| 71 | + ng-if="!$ctrl.isLink(summaryLine.value)" |
| 72 | + ng-bind-html="summaryLine.value" |
| 73 | + ></span> |
| 74 | + </span> |
| 75 | + </div> |
| 76 | + </div> |
70 | 77 | </div> |
71 | | - </div> |
72 | | - </div> |
73 | 78 |
|
74 | | - <div ng-init="$ctrl.hasAvailabilityLine = false"> |
75 | | - <div |
76 | | - ng-repeat="allLine in $ctrl.getAllLines() track by $index" |
77 | | - layout="row" |
78 | | - layout-align="start start" |
79 | | - class="display-block" |
80 | | - > |
81 | 79 | <div |
82 | | - layout="column" |
83 | | - ng-if="!$ctrl.isAvailabilityLine(allLine)" |
| 80 | + ng-if="$ctrl.parentCtrl.summaryLinesVisible" |
| 81 | + layout="row" |
| 82 | + layout-align="start start" |
| 83 | + class="display-block" |
84 | 84 | > |
85 | | - <div> |
86 | | - <span |
87 | | - class="bold-text" |
88 | | - translate="{{allLine.key}}" |
89 | | - ></span> |
90 | | - <span |
91 | | - ng-repeat="lineItem in allLine.value track by $index" |
| 85 | + <div layout="column"> |
| 86 | + <div |
| 87 | + ng-repeat="allLine in $ctrl.getAllLines() track by $index" |
92 | 88 | > |
93 | 89 | <div> |
94 | | - <a |
95 | | - ng-if="$ctrl.isLink(lineItem)" |
96 | | - ng-href="{{lineItem}}" |
97 | | - >{{lineItem}}</a |
98 | | - > |
99 | 90 | <span |
100 | | - ng-if="!$ctrl.isLink(lineItem)" |
101 | | - ng-bind-html="lineItem" |
| 91 | + class="bold-text" |
| 92 | + translate="{{allLine.key}}" |
102 | 93 | ></span> |
| 94 | + <span |
| 95 | + ng-repeat="lineItem in allLine.value track by $index" |
| 96 | + > |
| 97 | + <div> |
| 98 | + <a |
| 99 | + ng-if="$ctrl.isLink(lineItem)" |
| 100 | + ng-href="{{lineItem}}" |
| 101 | + >{{lineItem}}</a |
| 102 | + > |
| 103 | + <span |
| 104 | + ng-if="!$ctrl.isLink(lineItem)" |
| 105 | + ng-bind-html="lineItem" |
| 106 | + ></span> |
| 107 | + </div> |
| 108 | + </span> |
103 | 109 | </div> |
104 | | - </span> |
| 110 | + </div> |
105 | 111 | </div> |
106 | 112 | </div> |
107 | | - <div |
108 | | - ng-if="$ctrl.isAvailabilityLine(allLine)" |
109 | | - ng-init="$ctrl.hasAvailabilityLine = true" |
110 | | - ></div> |
| 113 | + |
| 114 | + <md-button |
| 115 | + class="button-as-link link-alt-color" |
| 116 | + ng-click="$ctrl.parentCtrl.viewMore(!$ctrl.parentCtrl.summaryLinesVisible, $event)" |
| 117 | + ng-if="!$ctrl.parentCtrl.summaryLinesVisible && $ctrl.parentCtrl.currLoc.summaryHoldings.baseSummaryShort.length > 0 && $ctrl.parentCtrl.currLoc.isHoldingExpandedData" |
| 118 | + aria-label="{{'nui.aria.locations.viewMore' | translate}}" |
| 119 | + > |
| 120 | + <span |
| 121 | + translate="nui.locations.viewMore" |
| 122 | + class="bold-text" |
| 123 | + ></span> |
| 124 | + </md-button> |
| 125 | + <md-button |
| 126 | + class="button-as-link link-alt-color" |
| 127 | + ng-click="$ctrl.parentCtrl.viewMore(!$ctrl.parentCtrl.summaryLinesVisible, $event)" |
| 128 | + ng-if="$ctrl.parentCtrl.summaryLinesVisible && $ctrl.parentCtrl.currLoc.summaryHoldings.baseSummaryShort.length > 0 && $ctrl.parentCtrl.currLoc.isHoldingExpandedData" |
| 129 | + aria-label="{{'nui.aria.locations.viewLess' | translate}}" |
| 130 | + > |
| 131 | + <span |
| 132 | + translate="nui.locations.viewLess" |
| 133 | + class="bold-text" |
| 134 | + ></span> |
| 135 | + </md-button> |
111 | 136 | </div> |
112 | 137 | </div> |
113 | | - |
114 | | - <md-button |
115 | | - class="button-as-link link-alt-color" |
116 | | - ng-click="$ctrl.parentCtrl.viewMore(!$ctrl.parentCtrl.summaryLinesVisible, $event)" |
117 | | - ng-if="!$ctrl.hasAvailabilityLine && ($ctrl.parentCtrl.currLoc.locationNoItems ? !$ctrl.parentCtrl.summaryLinesVisible : $ctrl.parentCtrl.summaryLinesVisible) && $ctrl.parentCtrl.currLoc.summaryHoldings.baseSummaryShort.length > 0 && $ctrl.parentCtrl.currLoc.isHoldingExpandedData" |
118 | | - aria-label="{{'nui.aria.locations.viewLess' | translate}}" |
119 | | - > |
120 | | - <span |
121 | | - translate="nui.locations.viewLess" |
122 | | - class="bold-text" |
123 | | - ></span> |
124 | | - </md-button> |
125 | | - <md-button |
126 | | - class="button-as-link link-alt-color" |
127 | | - ng-click="$ctrl.parentCtrl.viewMore(!$ctrl.parentCtrl.summaryLinesVisible, $event)" |
128 | | - ng-if="!$ctrl.hasAvailabilityLine && ($ctrl.parentCtrl.currLoc.locationNoItems ? $ctrl.parentCtrl.summaryLinesVisible : !$ctrl.parentCtrl.summaryLinesVisible) && $ctrl.parentCtrl.currLoc.summaryHoldings.baseSummaryShort.length > 0 && $ctrl.parentCtrl.currLoc.isHoldingExpandedData" |
129 | | - aria-label="{{'nui.aria.locations.viewMore' | translate}}" |
130 | | - > |
131 | | - <span |
132 | | - translate="nui.locations.viewMore" |
133 | | - class="bold-text" |
134 | | - ></span> |
135 | | - </md-button> |
136 | 138 | </md-card-content> |
137 | 139 | </md-card> |
138 | 140 | </div> |
0 commit comments