Index: web/conf/searches.ini =================================================================== --- web/conf/searches.ini (revision 3801) +++ web/conf/searches.ini (working copy) @@ -8,6 +8,10 @@ ; below. default_sort = relevance +; This setting controls the default view for search results; the selected option +; should be one of the options present in the [Views] section below. +default_view = list + ; If this setting is true, boolean operators in searches (AND/OR/NOT) will only ; be recognized if they are ALL UPPERCASE. If set to false, they will be ; recognized regardless of case. @@ -305,3 +309,11 @@ ; Put in the fields to strip here in the following format: ; shard name = fieldname,another fieldname,... [StripFields] + +; This section defines the view options available on standard search results. +; If only one view is required, set default_view under [General] above, and +; leave this section commented out. +[Views] +list = List +grid = Grid + Index: web/interface/themes/blueprint/css/styles.css =================================================================== --- web/interface/themes/blueprint/css/styles.css (revision 3801) +++ web/interface/themes/blueprint/css/styles.css (working copy) @@ -336,9 +336,9 @@ font-size: 90%; } .resulthead { - padding:.4em; - margin-bottom:.5em; + padding:.4em .4em 0em .4em; border-bottom: 1px #eee solid; + position: relative; } .savedLists { margin-top: .4em; @@ -1150,3 +1150,56 @@ text-align:right; text-decoration:none; } + +/* Grid View */ + +.hitCount { + position: absolute; + bottom: 0px; +} + +.viewButtons { + text-align: right; +} + +.gridImageBox { + text-align:center; + width:155px; + height:130px; + overflow:hidden; + display:block; +} + +.gridImage{ + height:130px; +} + +.gridTitleBox { + height:55px; + display:block; + text-align:center; + font-size:86%; + width:155px; +} + +.gridTitle { + display:block; + height:40px; + overflow:hidden; + line-height:1.2em; +} + +td.gridCell { + width: 25%; +} + +tr:nth-child(even) td.gridCell {background-color:white;} + +/* These two separate styles cannot be combined; they are both needed for + cross-browser support. */ +tr:nth-child(even) td.gridMouseOver { + background-color:#f5f5f5; +} +.gridMouseOver { + background-color:#f5f5f5; +} Index: web/interface/themes/blueprint/js/common.js =================================================================== --- web/interface/themes/blueprint/js/common.js (revision 3801) +++ web/interface/themes/blueprint/js/common.js (working copy) @@ -53,6 +53,16 @@ $('input[type="checkbox"].selectAllCheckboxes').change(function(){ $(this.form).find('input[type="checkbox"]').attr('checked', $(this).attr('checked')); }); + + // attach mouseover event to grid view records + $('.gridCellHover').mouseover(function() { + $(this).addClass('gridMouseOver') + }); + + // attach mouseout event to grid view records + $('.gridCellHover').mouseout(function() { + $(this).removeClass('gridMouseOver') + }); }); function toggleMenu(elemId) { Index: web/interface/themes/blueprint/RecordDrivers/Index/result-grid.tpl =================================================================== --- web/interface/themes/blueprint/RecordDrivers/Index/result-grid.tpl (revision 0) +++ web/interface/themes/blueprint/RecordDrivers/Index/result-grid.tpl (revision 0) @@ -0,0 +1,32 @@ +
+ + + {if $summThumbLarge} + {translate text='Cover Image'} + {elseif $summThumb} + {translate text='Cover Image'} + {else} + {translate text='No Cover Image'} + {/if} + + +
+ + {if !$summTitle}{translate text='Title not available'}{elseif !empty($summHighlightedTitle)}{$summHighlightedTitle|addEllipsis:$summTitle|highlight}{else}{$summTitle|truncate:80:"..."|escape}{/if} + + {if $summOpenUrl || !empty($summURLs)} + {if $summOpenUrl} + {include file="Search/openurl.tpl" openUrl=$summOpenUrl} + {/if} + {foreach from=$summURLs key=recordurl item=urldesc} + {if $recordurl == $urldesc}{translate text='Get full text'}{else}{$urldesc|escape}{/if}
+ {/foreach} + {else} +
+ {translate text='Loading'}... +
+ {/if} +
+
+ +{if $summCOinS}{/if} Index: web/interface/themes/blueprint/RecordDrivers/Index/result-list.tpl =================================================================== --- web/interface/themes/blueprint/RecordDrivers/Index/result-list.tpl (revision 0) +++ web/interface/themes/blueprint/RecordDrivers/Index/result-list.tpl (revision 0) @@ -0,0 +1,99 @@ +
+ {* hide until complete + + + *} +
+ {if $summThumb} + {translate text='Cover Image'} + {else} + {translate text='No Cover Image'} + {/if} +
+
+ + +
+ {if !empty($summAuthor)} + {translate text='by'} + {if !empty($summHighlightedAuthor)}{$summHighlightedAuthor|highlight}{else}{$summAuthor|escape}{/if} + {/if} + + {if $summDate}{translate text='Published'} {$summDate.0|escape}{/if} +
+ +
+ {if !empty($summSnippetCaption)}{translate text=$summSnippetCaption}:{/if} + {if !empty($summSnippet)}...{$summSnippet|highlight}...
{/if} + {if $summAjaxStatus} + {translate text='Call Number'}: {translate text='Loading'}...
+ {translate text='Located'}: {translate text='Loading'}... + {elseif !empty($summCallNo)} + {translate text='Call Number'}: {$summCallNo|escape} + {/if} + + {if $summOpenUrl || !empty($summURLs)} + {if $summOpenUrl} +
+ {include file="Search/openurl.tpl" openUrl=$summOpenUrl} + {/if} + {foreach from=$summURLs key=recordurl item=urldesc} +
{if $recordurl == $urldesc}{translate text='Get full text'}{else}{$urldesc|escape}{/if} + {/foreach} + {/if} + +
+ {foreach from=$summFormats item=format} + {translate text=$format} + {/foreach} + + {if !$summOpenUrl && empty($summURLs)} + {translate text='Loading'}... + {/if} +
+ + {if $showPreviews} + {if (!empty($summLCCN)|!empty($summISBN)|!empty($summOCLC))} +
+ {if $showGBSPreviews} +
+ + {translate text='Preview'} + +
+ {/if} + {if $showOLPreviews} +
+ + {translate text='Preview'} + +
+ {/if} + {if $showHTPreviews} +
+ + {translate text='Preview'} + +
+ {/if} + +
+ {/if} + {/if} +
+ +
+ {translate text='Add to favorites'} + + {* Display the lists that this record is saved to *} +
+ {translate text="Saved in"}: +
+
+ +
+
+ +{if $summCOinS}{/if} Index: web/interface/themes/blueprint/Search/list-grid.tpl =================================================================== --- web/interface/themes/blueprint/Search/list-grid.tpl (revision 0) +++ web/interface/themes/blueprint/Search/list-grid.tpl (revision 0) @@ -0,0 +1,33 @@ +{js filename="check_item_statuses.js"} +{js filename="check_save_statuses.js"} +{js filename="jquery.cookie.js"} +{js filename="cart.js"} +{js filename="openurl.js"} +{if $showPreviews} +{js filename="preview.js"} +{/if} + +
+ {* hide until complete +
+ + +
+
+ *} + + + {foreach from=$recordSet item=record name="recordLoop"} + + {if (($smarty.foreach.recordLoop.iteration % 4) == 0) && (!$smarty.foreach.recordLoop.last)}{/if} + {/foreach} + +
+ {$recordStart+$smarty.foreach.recordLoop.iteration-1} + {* This is raw HTML -- do not escape it: *}{$record} +
+
Index: web/interface/themes/blueprint/Search/list.tpl =================================================================== --- web/interface/themes/blueprint/Search/list.tpl (revision 3801) +++ web/interface/themes/blueprint/Search/list.tpl (working copy) @@ -9,7 +9,7 @@ {* Listing Options *}
-
+
{if $recordCount} {translate text="Showing"} {$recordStart} - {$recordEnd} @@ -28,6 +28,12 @@
+
+ {if $viewList|@count gt 1} + {foreach from=$viewList item=viewData key=viewLabel} + {if !$viewData.selected}{/if}{if !$viewData.selected}{/if} + {/foreach} + {/if}
Index: web/interface/themes/default/css/styles.css =================================================================== --- web/interface/themes/default/css/styles.css (revision 3801) +++ web/interface/themes/default/css/styles.css (working copy) @@ -282,10 +282,15 @@ background-color:#fff; } .toggle { + position: absolute; + bottom: 0px; + right: 5px; + margin-bottom: 1px; text-align:right; } .toggle img { vertical-align:text-bottom; + margin: 0px 0px 3px 2px; } .authorbox { padding:0 0 1em 1em; @@ -301,9 +306,10 @@ } .resulthead { - padding:0px 10px 0 10px; + padding:25px 10px 0 10px; margin-bottom:.5em; border-bottom: 1px #eee solid; + position: relative; } .searchtools { @@ -1300,3 +1306,44 @@ text-align:right; text-decoration:none; } + +/* Grid View */ +.gridRecordBox { + margin: 0px 3px 3px 3px; + padding: 5px 1px 3px 15px; +} + +.gridImageBox { + text-align:center; + width:155px; + height:130px; + overflow:hidden; + display:block; +} + +.gridImage{ + height:130px; +} + +.gridTitleBox { + height:55px; + display:block; + text-align:center; + font-size:86%; + width:155px; +} + +.gridTitle { + display:block; + height:40px; + overflow:hidden; + line-height:1.1em; +} + +.gridMouseOver { + background-color:#f5f5f5; +} + +.gridline { + border-bottom: 1px solid #EEEEEE; +} Index: web/interface/themes/default/RecordDrivers/Index/result-grid.tpl =================================================================== --- web/interface/themes/default/RecordDrivers/Index/result-grid.tpl (revision 0) +++ web/interface/themes/default/RecordDrivers/Index/result-grid.tpl (revision 0) @@ -0,0 +1,50 @@ +
+ + + {if $summThumbLarge} + {translate text='Cover Image'} + {elseif $summThumb} + {translate text='Cover Image'} + {else} + {translate text='No Cover Image'} + {/if} + + +
+ + {if !$summTitle}{translate text='Title not available'}{elseif !empty($summHighlightedTitle)}{$summHighlightedTitle|addEllipsis:$summTitle|highlight}{else}{$summTitle|truncate:80:"..."|escape}{/if} + + {if $summOpenUrl || !empty($summURLs)} + {if $summOpenUrl} + {include file="Search/openurl.tpl" openUrl=$summOpenUrl} + {/if} + {foreach from=$summURLs key=recordurl item=urldesc} + + {/foreach} + {else} +
+ {translate text='Loading'}... +
+ {/if} +
+
+ +{if $summCOinS}{/if} + +{if $summAjaxStatus} + +{/if} +{if $showPreviews} + +{/if} Index: web/interface/themes/default/RecordDrivers/Index/result-list.tpl =================================================================== --- web/interface/themes/default/RecordDrivers/Index/result-list.tpl (revision 0) +++ web/interface/themes/default/RecordDrivers/Index/result-list.tpl (revision 0) @@ -0,0 +1,104 @@ +
+
+ {if $summThumb} + {translate text='Cover Image'} + {else} + {translate text='No Cover Image'} + {/if} +
+ + +
+ {if !empty($summAuthor)} + {translate text='by'} + {if !empty($summHighlightedAuthor)}{$summHighlightedAuthor|highlight}{else}{$summAuthor|escape}{/if} + {/if} + + {if $summDate}{translate text='Published'} {$summDate.0|escape}{/if} +
+ +
+ {if !empty($summSnippetCaption)}{translate text=$summSnippetCaption}:{/if} + {if !empty($summSnippet)}...{$summSnippet|highlight}...
{/if} + {if $summAjaxStatus} + {translate text='Call Number'}: {translate text='Loading'}
+ {translate text='Located'}: {translate text='Loading'} + {elseif !empty($summCallNo)} + {translate text='Call Number'}: {$summCallNo|escape} + {/if} + + {if $summOpenUrl || !empty($summURLs)} + {if $summOpenUrl} +
+ {include file="Search/openurl.tpl" openUrl=$summOpenUrl} + {/if} + {foreach from=$summURLs key=recordurl item=urldesc} +
{if $recordurl == $urldesc}{translate text='Get full text'}{else}{$urldesc|escape}{/if} + {/foreach} + {elseif $summAjaxStatus} +
+ {translate text='Loading'}... +
+ {/if} +
+ {foreach from=$summFormats item=format} + {translate text=$format} + {/foreach} +
+
+ +
+
+ {translate text='Add to favorites'} +
    + +
    + {if $showPreviews} + {if (!empty($summLCCN)|!empty($summISBN)|!empty($summOCLC))} + {if $showGBSPreviews} +
    + +
    + {/if} + {if $showOLPreviews} +
    + +
    + {/if} + {if $showHTPreviews} +
    + +
    + {/if} + {/if} + {/if} +
    +
    + +{if $summCOinS}{/if} + +{if $summAjaxStatus} + +{/if} +{if $showPreviews} + +{/if} Index: web/interface/themes/default/Search/list-grid.tpl =================================================================== --- web/interface/themes/default/Search/list-grid.tpl (revision 0) +++ web/interface/themes/default/Search/list-grid.tpl (revision 0) @@ -0,0 +1,22 @@ + + + + {foreach from=$recordSet item=record name="recordLoop"} + + {if (($smarty.foreach.recordLoop.iteration % 4) == 0) && (!$smarty.foreach.recordLoop.last)}{/if} + {/foreach} + +
    {* This is raw HTML -- do not escape it: *}{$record}
    +
    + + Index: web/interface/themes/default/Search/list-list.tpl =================================================================== --- web/interface/themes/default/Search/list-list.tpl (revision 3801) +++ web/interface/themes/default/Search/list-list.tpl (working copy) @@ -4,6 +4,7 @@ {* This is raw HTML -- do not escape it: *} {$record}
    + {if $smarty.foreach.recordLoop.last}
    {/if} {/foreach} Index: web/interface/themes/default/Search/list.tpl =================================================================== --- web/interface/themes/default/Search/list.tpl (revision 3801) +++ web/interface/themes/default/Search/list.tpl (working copy) @@ -34,6 +34,13 @@
    + {if $viewList|@count gt 1} + {foreach from=$viewList item=viewData key=viewLabel} + {if !$viewData.selected}{/if} + + {if !$viewData.selected}{/if} + {/foreach} + {/if}