improving the dumpac
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 12 Jun 2006 00:10:55 +0000 (00:10 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 12 Jun 2006 00:10:55 +0000 (00:10 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@4570 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm
Open-ILS/web/opac/extras/os.css
Open-ILS/xsl/ATOM2XHTML.xsl

index 07efd90..9536462 100644 (file)
@@ -672,6 +672,7 @@ sub opensearch_feed {
        $feed->root($root);
        $feed->lib($org);
        $feed->search($terms);
+       $feed->class($class);
 
        $feed->title("Search results for [$class => $terms] at ".$org_unit->[0]->name);
        $feed->creator($host);
index 255ee11..23d653d 100644 (file)
@@ -42,6 +42,13 @@ sub search {
        return $self->{search};
 }
 
+sub class {
+       my $self = shift;
+       my $search = shift;
+       $self->{class} = $search if ($search);
+       return $self->{class};
+}
+
 sub lib {
        my $self = shift;
        my $lib = shift;
@@ -436,6 +443,7 @@ sub toString {
        my $base = $self->base || '';
        my $root = $self->root || '';
        my $search = $self->search || '';
+       my $class = $self->class || '';
        my $lib = $self->lib || '-';
 
        $self->composeDoc;
@@ -457,6 +465,7 @@ sub toString {
                base_dir => "'$root'",
                lib => "'$lib'",
                searchTerms => "'$search'",
+               searchClass => "'$class'",
        );
 
        return $new_doc->toString(1); 
index e9e8708..4f29bb9 100644 (file)
@@ -21,7 +21,7 @@ div#searchdiv {
        position: absolute;
        top: 0;
        right: 0;
-       width:11em;
+       /*width:11em;*/
        background-color: lightgray;
        border:2px solid lightblue;
        border-right: 0px;
index 564543f..629cf1d 100644 (file)
@@ -178,46 +178,43 @@ To-do list:
                                </div>
 
                                <div id="searchdiv">
-                                       <b>Search:</b>
                                        <form method="GET">
-                                               <xsl:attribute name="action"><xsl:value-of select="concat($base_dir, 'opensearch/1.1/', $lib, '/html/keyword')" /></xsl:attribute>
-                                               <input class="searchbox"
-                                                       type="text" name="searchTerms"
-                                                       value="keywords"
-                                                       title="keywords"
-                                                       onfocus="if (this.value=='keywords') this.value='{$searchTerms}';"/>
-                                       </form>
-                                       <form method="GET">
-                                               <xsl:attribute name="action"><xsl:value-of select="concat($base_dir, 'opensearch/1.1/', $lib, '/html/title')" /></xsl:attribute>
-                                               <input class="searchbox"
-                                                       type="text" name="searchTerms"
-                                                       value="titles"
-                                                       title="titles"
-                                                       onfocus="if (this.value=='titles') this.value='{$searchTerms}';"/>
-                                       </form>
-                                       <form method="GET">
-                                               <xsl:attribute name="action"><xsl:value-of select="concat($base_dir, 'opensearch/1.1/', $lib, '/html/author')" /></xsl:attribute>
-                                               <input class="searchbox"
-                                                       type="text" name="searchTerms"
-                                                       value="authors"
-                                                       title="authors"
-                                                       onfocus="if (this.value=='authors') this.value='{$searchTerms}';"/>
-                                       </form>
-                                       <form method="GET">
-                                               <xsl:attribute name="action"><xsl:value-of select="concat($base_dir, 'opensearch/1.1/', $lib, '/html/subject')" /></xsl:attribute>
-                                               <input class="searchbox"
-                                                       type="text" name="searchTerms"
-                                                       value="subjects"
-                                                       title="subjects"
-                                                       onfocus="if (this.value=='subjects') this.value='{$searchTerms}';"/>
-                                       </form>
-                                       <form method="GET">
-                                               <xsl:attribute name="action"><xsl:value-of select="concat($base_dir, 'opensearch/1.1/', $lib, '/html/series')" /></xsl:attribute>
-                                               <input class="searchbox"
-                                                       type="text" name="searchTerms"
-                                                       value="series"
-                                                       title="series"
-                                                       onfocus="if (this.value=='series') this.value='{$searchTerms}';"/>
+                                               <xsl:attribute name="action"><xsl:value-of select="concat($base_dir, 'opensearch/1.1/', $lib, '/html')" /></xsl:attribute>
+                                               <b>Search:</b>
+                                               <input class="searchbox" type="text" name="searchTerms" value="{$searchTerms}"/>
+                                               <select name="searchClass">
+                                                       <option value="keyword">
+                                                               <xsl:if test="$searchClass = 'keyword'">
+                                                                       <xsl:attribute name="selected"><xsl:value-of select="1"/></xsl:attribute>
+                                                               </xsl:if>
+                                                               <xsl:text>Keyword</xsl:text>
+                                                       </option>
+                                                       <option value="title">
+                                                               <xsl:if test="$searchClass = 'title'">
+                                                                       <xsl:attribute name="selected"><xsl:value-of select="1"/></xsl:attribute>
+                                                               </xsl:if>
+                                                               <xsl:text>Title</xsl:text>
+                                                       </option>
+                                                       <option value="author">
+                                                               <xsl:if test="$searchClass = 'author'">
+                                                                       <xsl:attribute name="selected"><xsl:value-of select="1"/></xsl:attribute>
+                                                               </xsl:if>
+                                                               <xsl:text>Author</xsl:text>
+                                                       </option>
+                                                       <option value="subject">
+                                                               <xsl:if test="$searchClass = 'subject'">
+                                                                       <xsl:attribute name="selected"><xsl:value-of select="1"/></xsl:attribute>
+                                                               </xsl:if>
+                                                               <xsl:text>Subject</xsl:text>
+                                                       </option>
+                                                       <option value="series">
+                                                               <xsl:if test="$searchClass = 'series'">
+                                                                       <xsl:attribute name="selected"><xsl:value-of select="1"/></xsl:attribute>
+                                                               </xsl:if>
+                                                               <xsl:text>Series</xsl:text>
+                                                       </option>
+                                               </select>
+                                               <input type="submit" value="Go!"/>
                                        </form>
                                        <br/>
                                </div>