From: miker Date: Thu, 2 Nov 2006 20:23:25 +0000 (+0000) Subject: slimpac. yay! X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5bb101fad23c1c32a3b5810f3b9c58393344b297;p=Evergreen.git slimpac. yay! git-svn-id: svn://svn.open-ils.org/ILS/trunk@6550 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/Makefile b/Open-ILS/src/Makefile index 3bb8bf30ee..cf1ff891be 100644 --- a/Open-ILS/src/Makefile +++ b/Open-ILS/src/Makefile @@ -64,6 +64,7 @@ webcore-install: echo "Copying web into $(WEBDIR)" mkdir -p $(WEBDIR) mkdir -p $(WEBDIR)/opac/extras/xsl/ + mkdir -p $(WEBDIR)/opac/extras/slimpac/ cp -r ../web/* $(WEBDIR) ln -sf $(WEBDIR)/opac/skin/default/xml/index.xml $(WEBDIR)/opac/skin/default/xml/mresult.xml ln -sf $(WEBDIR)/opac/skin/default/xml/index.xml $(WEBDIR)/opac/skin/default/xml/rresult.xml @@ -73,6 +74,7 @@ webcore-install: ln -sf $(WEBDIR)/opac/skin/default/xml/index.xml $(WEBDIR)/opac/skin/default/xml/cnbrowse.xml cp ../xul/staff_client/chrome//content//util/date.js $(WEBDIR)/opac/common/js/ cp ../xsl/*.xsl $(WEBDIR)/opac/extras/xsl/ + cp ../slimpac/*.html $(WEBDIR)/opac/extras/slimpac/ ln -sf $(ETCDIR)/fm_IDL.xml $(WEBDIR)/reports/ cp ../xul/staff_client/server/admin/adminlib.js $(WEBDIR)/reports/ @@ -97,6 +99,7 @@ autojs-install: @echo $@ cp extras/fieldmapper.pl $(BINDIR) cp extras/org_tree_js.pl $(BINDIR) + cp extras/org_tree_html_options.pl $(BINDIR) cp extras/autogen.sh $(BINDIR) cp support-scripts/offline-blocked-list.pl $(BINDIR) # this should probably be somewhere else # ----------------------------------------------------------------------------------- diff --git a/Open-ILS/src/extras/autogen.sh b/Open-ILS/src/extras/autogen.sh index 42c8d7432d..eb18dd326a 100755 --- a/Open-ILS/src/extras/autogen.sh +++ b/Open-ILS/src/extras/autogen.sh @@ -5,6 +5,7 @@ CONFIG="$1"; [ -z "$CONFIG" ] && echo "usage: $0 " && exit; JSDIR="/openils/var/web/opac/common/js/"; +SLIMPACDIR="/openils/var/web/opac/extras/slimpac/"; echo "Updating fieldmapper"; perl fieldmapper.pl "$CONFIG" > "$JSDIR/fmall.js"; @@ -15,5 +16,8 @@ perl fieldmapper.pl "$CONFIG" "web_core" > "$JSDIR/fmcore.js"; echo "Updating OrgTree"; perl org_tree_js.pl "$CONFIG" > "$JSDIR/OrgTree.js"; +echo "Updating OrgTree HTML"; +perl org_tree_html_options.pl "$CONFIG" "$SLIMPACDIR/lib_list.inc"; + echo "Done"; diff --git a/Open-ILS/src/extras/org_tree_html_options.pl b/Open-ILS/src/extras/org_tree_html_options.pl new file mode 100644 index 0000000000..ce15a71214 --- /dev/null +++ b/Open-ILS/src/extras/org_tree_html_options.pl @@ -0,0 +1,35 @@ +#!/usr/bin/perl +# turns the orgTree and orgTypes into js files + +use OpenSRF::AppSession; +use OpenSRF::System; +use OpenILS::Utils::Fieldmapper; +use OpenSRF::Utils::SettingsClient; + +die "usage: perl org_tree_js.pl " unless $ARGV[1]; +OpenSRF::System->bootstrap_client(config_file => $ARGV[0]); + +open FILE, ">$ARGV[1]"; + +Fieldmapper->import(IDL => OpenSRF::Utils::SettingsClient->new->config_value("IDL")); + +my $ses = OpenSRF::AppSession->create("open-ils.storage"); +my $tree = $ses->request("open-ils.actor.org_tree.retrieve")->gather(1); + +print_option($tree); + +$ses->disconnect(); +close FILE; + + + +sub print_option { + my $node = shift; + my $depth = $node->ou_type - 1; + my $sname = $node->shortname; + my $name = $node->name; + my $kids = $node->children; + print FILE "\n"; + print_option($_) for (@$kids); +} + diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm index 680e5b8edd..d43e5f841e 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm @@ -907,13 +907,20 @@ sub opensearch_feed { my ($version,$org,$type,$class,$terms,$sort,$sortdir,$lang); (undef,$version,$org,$type,$class,$terms,$sort,$sortdir,$lang) = split '/', $path; - $lang ||= $cgi->param('searchLang'); - $sort ||= $cgi->param('searchSort'); - $sortdir ||= $cgi->param('searchSortDir'); - $terms ||= $cgi->param('searchTerms'); - $class ||= $cgi->param('searchClass') || '-'; - $type ||= $cgi->param('responseType') || '-'; - $org ||= $cgi->param('searchOrg') || '-'; + $lang = $cgi->param('searchLang') if $cgi->param('searchLang'); + $sort = $cgi->param('searchSort') if $cgi->param('searchSort'); + $sortdir = $cgi->param('searchSortDir') if $cgi->param('searchSortDir'); + $terms .= " " . $cgi->param('searchTerms') if $cgi->param('searchTerms'); + + $class = $cgi->param('searchClass') if $cgi->param('searchClass'); + $class ||= '-'; + + $type = $cgi->param('responseType') if $cgi->param('responseType'); + $type ||= '-'; + + $org = $cgi->param('searchOrg') if $cgi->param('searchOrg'); + $org ||= '-'; + my $kwt = $cgi->param('kw'); my $tit = $cgi->param('ti'); @@ -994,7 +1001,7 @@ sub opensearch_feed { )->gather(1); } - $cache_key .= $org.$sort.$sortdir.$lang; + { no warnings; $cache_key .= $org.$sort.$sortdir.$lang; } my $rs_name = $cgi->cookie('os_session'); my $cached_res = OpenSRF::Utils::Cache->new->get_cache( "os_session:$rs_name" ) if ($rs_name); diff --git a/Open-ILS/web/opac/extras/slimpac/advanced.html b/Open-ILS/web/opac/extras/slimpac/advanced.html new file mode 100644 index 0000000000..c3f54e0537 --- /dev/null +++ b/Open-ILS/web/opac/extras/slimpac/advanced.html @@ -0,0 +1,185 @@ + + + Advanced Search + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Advanced Search
Now Searching: + +
Keywords:
Title:
Author:
Subject:
Series:
Item Language + +
Sort by: + +
+ +
+ +
+
+
+ + + Home + + + | + + + Find a Library Near Me + + + | + + + Help + + + | + + + About PINES + + + | + + + GALILEO + +
+
+ Copyright © 2006 Georgia Public Library Service +
+
+
+
+ +
+ + + + diff --git a/Open-ILS/web/opac/extras/slimpac/start.html b/Open-ILS/web/opac/extras/slimpac/start.html new file mode 100644 index 0000000000..5feaa9e63e --- /dev/null +++ b/Open-ILS/web/opac/extras/slimpac/start.html @@ -0,0 +1,139 @@ + + + Simple Search + + + +
+ +
+ + + + + + + + + + + + + + + + +
+
+ +
+
+
+ Now Searching: + +
+
+
+ + + + + + +
+
+ +
+ +
+
+
+ + + Advanced Search + + + | + + + Find a Library Near Me + + + | + + + Help + + + | + + + About PINES + + + | + + + GALILEO + +
+
+ Copyright © 2006 Georgia Public Library Service +
+
+
+
+ +
+ + + +