*/
.carousel {
- width: 80%;
- margin: 0 auto;
+ width: 50%;
+ margin-left: 450px;
}
.carousel-title {
font-size: 150%;
margin: 0px 3px;
}
.carousel-entry {
- max-width: 150px;
+ max-width: 130px;
}
/* Truncate titles within carousel to 4 lines */
}
.carousel-entry-image {
- width: 100%;
- height: auto;
+ width: auto;
+ height: 160px;
+ border: 1px solid #999;
}
.carousel .glide__arrow {
color: [% css_colors.button_text %];
}
.carousel .glide__arrow--right {
right: -5em;
- margin-top: -100px;
}
.carousel .glide__arrow--left {
- left: -4em;
- margin-top: -100px;
+ left: -7em;
}
/* PINES Carousel customizations */
color: #006838;
}
-/* Other PINES customizations */
-
-select option:disabled {
- background-color: #ddd;
-}
-
-pre {
- overflow-x: auto;
- white-space: pre-wrap;
- white-space: -moz-pre-wrap;
- white-space: -pre-wrap;
- white-space: -o-pre-wrap;
- word-wrap: break-word;
-}
-
@media only screen and (max-width: 1200px) {
.carousel {
margin-left: 430px;
height: 80px;
width: 100%;
margin: auto;
- margin-top: -20px;
+ margin-top: -50px;
margin-bottom: 40px;
}
.pines_carousel_selector_image {
font-weight: bold;
color: #006838;
}
- .carousel .glide__arrow {
- display: none;
- }
- .carousel .glide__arrow--right {
- display: none;
- }
- .carousel .glide__arrow--left {
- display: none;
- }
-
->>>>>>> d9e3b208a9... PINES Bootstrap Customizations
}
.search-filter{
[%- BLOCK carousels;
config = {
animated => 1,
- animation_interval => 3,
+ animation_interval => 2,
width => 4,
sm_width => 3,
xs_width => 2,
IF carousel.bibs.size > 0;
%]
<div class="carousel">
-<h2 class="carousel-title">[% carousel.name %]</h2>
+<h2 class="carousel-title"><a href="[% mkurl(ctx.opac_root _ '/results?query=' _ '&fi:container=bre,carousel,' _ carousel.bucketid, {},
+ ['carousel_loc', 'fi:container', 'qtype', 'query']) %]" target="_top">
+ <i class="fas fa-list" style="color:#8DC641;font-size:.8em;" aria-hidden="true"></i>
+ [% carousel.name %]</a>
+</h2>
<div class="carousel-body glide" id="carousel-[% carousel.id %]">
<div class="glide__track" data-glide-el="track">
<ul class="glide__slides">
</select>
[%- END %]
+
+[% # PINES Customization for Carousels
+ # Build org selector that refreshes page with carousel_loc set to control which carousels display
+
+BLOCK build_org_selector_carousel;
+ node_stack = [{org => org_unit || ctx.aouct_tree || ctx.aou_tree}];
+ inherited_vis = ctx.get_cgf('opac.org_unit.non_inherited_visibility').enabled == 'f';
+
+ IF !name;
+ name = loc_name;
+ END;
+ IF !value;
+ value = loc_value;
+ END;
+
+ # if the selected org unit is out of hiding scope,
+ # disable the ou-hide scoping altogether.
+ hiding_disabled = ctx.org_hiding_disabled(value);
+
+ -%]
+
+ <select id='carousel_selector'
+ title='[% arialabel || l("Select Library") %]'
+ class="org_selector_dropdown"
+ onchange="location = '/eg/opac/home?carousel_loc=' +
+ this.options[this.selectedIndex].value">
+ <option value="" class="org_unit" disabled selected="selected">[% l("Choose a library to see newly purchased items") %]</option>
+ [%-
+ WHILE node_stack.size > 0;
+ node = node_stack.pop();
+ org_unit = node.org;
+ loc_grp = node.loc_grp;
+ ou_id = org_unit.id;
+ css_class = '';
+ disabled = '';
+ selected = '';
+ visible = org_unit.opac_visible == 't';
+
+ # org and all children are invisible.
+ NEXT IF !visible AND inherited_vis AND !ctx.is_staff;
+
+ IF !loc_grp; # processing an org unit
+
+ top_loc_groups = [];
+ IF show_loc_groups;
+ # add the location groups that sort below the child org units
+ FOR grp IN ctx.copy_location_groups.$ou_id.reverse;
+ IF grp.top == 't';
+ top_loc_groups.push(grp);
+ ELSE;
+ node_stack.push({org => org_unit, loc_grp => grp});
+ END;
+ END;
+ END;
+
+ # add the child org units
+ FOR child IN org_unit.children.reverse;
+ node_stack.push({org => child});
+ END;
+
+ # add the location groups that sort to the top
+ # above the child org units
+ FOR grp IN top_loc_groups;
+ node_stack.push({org => org_unit, loc_grp => grp});
+ END;
+
+ END;
+
+ # org is not publicly visible (though its children may be).
+ NEXT UNLESS ctx.is_staff OR visible;
+
+ # org is not within hiding scope (though its children may be).
+ NEXT UNLESS hiding_disabled OR ctx.org_within_hiding_scope(ou_id);
+
+ node_value = ou_id;
+ IF loc_grp;
+ node_value = node_value _ ':' _ loc_grp.id;
+ css_class = 'class="loc_grp"';
+ ELSE;
+ css_class = 'class="org_unit"';
+ END;
+
+ IF can_have_vols_only AND org_unit.ou_type.can_have_vols != 't';
+ disabled = 'disabled="disabled"';
+ ELSIF node_value == value;
+ selected = 'selected="selected"';
+ END;
+
+ IF can_have_users_only AND org_unit.ou_type.can_have_users != 't';
+ disabled = 'disabled="disabled"';
+ ELSIF node_value == value;
+ selected = 'selected="selected"';
+ END;
+
+ IF hold_pickup_lib AND ctx.get_org_setting(
+ org_unit.id, 'opac.holds.org_unit_not_pickup_lib');
+ disabled = 'disabled="disabled"';
+ END;
+
+ # caller provided a list of valid org units.
+ # all orgs not in the list are marked invalid.
+ IF valid_org_list AND
+ !valid_org_list.grep('^' _ org_unit.id _ '$').size;
+ disabled = 'disabled="disabled"';
+ selected = '';
+ END;
+
+ pad_depth = 0;
+
+ # copy loc groups appear as children of the owning org unit
+ SET pad_depth = pad_depth + 1 IF loc_grp;
+
+ # determine the depth by calculating the distance from the root
+ porg = ctx.get_aou(org_unit.parent_ou);
+ WHILE porg;
+ SET pad_depth = pad_depth + 1 IF porg.opac_visible == 't' OR ctx.is_staff;
+ porg = ctx.get_aou(porg.parent_ou);
+ END;
+
+ pad_depth = pad_depth * 5;
+ display_name = loc_grp ? loc_grp.name : org_unit.name %]
+ [% IF node_value == 1 %]
+ [% display_name = "All PINES Libraries" %]
+ [% END %]
+
+ <option value='[% org_unit.id %]' [% selected %] [% disabled %] [% css_class %]>
+ [% ' ' FOR [0..pad_depth]; display_name | html %]
+ </option>
+
+ [%- END %]
+ </select>
+[%- END %]
+