- i18n (a lot of view overrides could be accomplished with i18n overrides)
- blacklight_config (Controller Configuration)
- Facets
- Fields
- Sorts
- Search fields (search type drop-down)
- Thumbnail by field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* If you've ever had the need to link directly to an open modal window with Bootstrap, here's a quick and easy way to do it: | |
Make sure your modal has an id and is classed with modal and permalink: | |
<div class="modal permalink" id="myModal" ... > | |
Then stick this bit of Javascript at at the end of your document: | |
*/ | |
$(document).ready(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_addl_item_info(bcode,building,document) | |
# we need to have ON-ORDER records dealt with even though they don't have a barcode | |
if doc_on_order?(document) | |
return {:request_status => true, :status => "unavailable"} | |
else | |
if document.respond_to?(:holdings_from_solr) | |
unless document["item_display"].nil? or bcode.strip.blank? | |
return mod_item(bcode,building,document,document.holdings_from_solr[bcode.strip.to_sym]) if document.holdings_from_solr.has_key?(bcode.strip.to_sym) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module FormExt | |
module FormHelper | |
def self.included(arg) | |
ActionView::Helpers::FormBuilder.send(:include, FormExt::FormBuilder) | |
end | |
def multi_valued_text_field_tag(object_name, method, options = {}) | |
output = '' | |
if options and options[:value] and options[:value].is_a?(Array) | |
options.merge!(:"data-multivalued" => true) | |
options[:value].each_with_index do |value, index| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/users/jvine-drupal HTTP/1.1" 403 7482 | |
/users/jvine-drupal HTTP/1.1" 403 7482 "http://libweb-test.stanford.edu/user" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36" | |
/sites/default/files/styles/large/public/tech%20desk%20banner.jpg HTTP/1.1" 403 7536 | |
/sites/default/files/styles/large/public/tech%20desk%20banner.jpg HTTP/1.1" 403 7536 "http://libweb-test.stanford.edu/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36" | |
/sites/default/files/styles/large/public/disc.png HTTP/1.1" 403 7525 | |
/sites/default/files/styles/large/public/disc.png HTTP/1.1" 403 7525 "http://libweb-test.stanford.edu/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36" | |
/sites/default/files/styles/large/public/computer_0.png HTTP/1.1" 403 6941 | |
/sites/default/files/styles/large/public/computer_0.png HTTP/1.1" 403 6941 "http://libweb-test.stanford.ed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="filmstrip-container"> | |
<div class="filmstrip-total"><%= link_to("View #{pluralize(document.total_collection_members, "item")} in this collection online", catalog_index_path(:f=>{:collection=>[document[:id]]}, :view=>"gallery")) %></div> | |
<div class="scroll-control disabled" data-direction="left"></div> | |
<div class="scroll-control" data-direction="right"></div> | |
<div class="filmstrip" data-preview-container='true'> | |
<ul> | |
<%- document.children.each do |doc| -%> | |
<%- unless doc.image_urls.blank? -%> | |
<li> | |
<div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configure_blacklight do |config| | |
config.default_solr_params = { | |
:qt => 'search', | |
:qf => 'id content url title anchor author', | |
:rows => 10, | |
:"hl.fl" => "content", | |
:"hl.simple.pre" => '<span class="label label-info">', | |
:"hl.simple.post" => "</span>", | |
:hl => true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def initialize(controller, response_docs) | |
@controller = controller | |
@response_docs = response_docs | |
end | |
def blacklight_maps_config | |
@controller.blacklight_config.view.maps | |
end | |
def type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
/* | |
jQuery plugin to render Google book covers for image elements | |
Usage: $(selector).renderGoogleBookCovers(); | |
This plugin : | |
- collects all 'img.cover-image' elements and batches them | |
- using ISBN, OCLC & LCCN value(s) of image elements inside each batch, | |
Google cover images are added using Google Books API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.libraries = { | |
'ARS' => 'Archive of Recorded Sound', | |
'ART' => 'Art & Architecture Library', | |
'BIOLOGY' => 'Biology Library (Falconer)', | |
'BUSINESS' => 'Business Library', | |
'CHEMCHMENG' => 'Chemistry & ChemEng Library (Swain)', | |
'CLASSICS' => 'Classics Library', | |
'EARTH-SCI' => 'Earth Sciences Library (Branner)', | |
'EAST-ASIA' => 'East Asia Library', | |
'EDUCATION' => 'Education Library (Cubberley)', |