[Koha-devel] Default search options in the OPAC

Magnus Enger magnus at enger.priv.no
Mon Oct 8 09:52:37 CEST 2012


On 18 September 2012 15:58, Owen Leonard <oleonard at myacpl.org> wrote:
> We've now got two patches pending which seek to add more options to
> the default OPAC search, the masthead search bar which currently
> includes options for Library catalog, title, author, subject, ISBN,
> series, and call number:
>
> Add "Phrase" Searching to OPAC Search
> http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8778
>
> Add accesssion [barcode] number to the drop down list in OPAC Search
> http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8302
>
> I'll say right out that I'm opposed to these changes, but I want to
> bring it up here on the list so we can discuss.

I agree that the simple search should be simple. But we could probably
spend a lot of time arguing about how simple is simple enough.

Seems to me that it would be better to find a way to make this easily
configurable. I'd like to suggest a simple solution:

In the template, we could have

<select id="masthead_search" class="left" name="idx">
[% OPACSearchOptions %]
</select>

Then we could have a syspref called OPACSearchOptions (or something),
with this initial content:

<option value="">Library catalog</option>
<option value="ti">Title</option>
<option value="au">Author</option>
<option value="su">Subject</option>
<option value="nb">ISBN</option>
<option value="se">Series</option>
<option value="callnum">Call number</option>

This would keep current behaviour, but make it easy to add or remove
or re-arrange the <option> elements. And we could explain in the docs
or on the wiki how the "value"s here relate to indexes defined in more
or less obscure config files.

Yes, it would require fiddling with HTML and Zebra (or Solr) indexes
to change it. No, it would not be GUI and pretty. But it would be so
simple, even I could submit a patch for it.

Thoughts?

Best regards,
Magnus
libriotech.no


More information about the Koha-devel mailing list