Browse Source
This patch removes code related to stopwords usage. The following methods are removed: C4::Search->remove_stopwords C4::Context->stopwords C4::Context->_new_stopwords And the buildQuery API was changed (removed the \@removed_stopwords return value). A follow-up is provided for database changes, to make rebasing easier. To test: - Apply this patch - Do some searches in both intranet and opac interfaces - Nothing should break Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>new_12478_elasticsearch
29 changed files with 57 additions and 1084 deletions
@ -1,96 +0,0 @@ |
|||
#!/usr/bin/perl |
|||
|
|||
#script to administer the stopwords table |
|||
#written 20/02/2002 by paul.poulain@free.fr |
|||
# This software is placed under the gnu General Public License, v2 (http://www.gnu.org/licenses/gpl.html) |
|||
|
|||
# Copyright 2000-2002 Katipo Communications |
|||
# |
|||
# This file is part of Koha. |
|||
# |
|||
# Koha is free software; you can redistribute it and/or modify it |
|||
# under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation; either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# Koha is distributed in the hope that it will be useful, but |
|||
# WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU General Public License |
|||
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
|||
|
|||
use strict; |
|||
use warnings; |
|||
use CGI qw ( -utf8 ); |
|||
use C4::Context; |
|||
use C4::Output; |
|||
use C4::Auth; |
|||
|
|||
sub StringSearch { |
|||
my $sth = C4::Context->dbh->prepare(" |
|||
SELECT word FROM stopwords WHERE (word LIKE ?) ORDER BY word |
|||
"); |
|||
$sth->execute((shift || '') . "%"); |
|||
return $sth->fetchall_arrayref({}); |
|||
} |
|||
|
|||
my $input = new CGI; |
|||
my $searchfield = $input->param('searchfield'); |
|||
my $offset = $input->param('offset') || 0; |
|||
my $script_name = "/cgi-bin/koha/admin/stopwords.pl"; |
|||
|
|||
my $pagesize = 20; |
|||
my $op = $input->param('op') || ''; |
|||
|
|||
my ($template, $loggedinuser, $cookie) |
|||
= get_template_and_user({template_name => "admin/stopwords.tt", |
|||
query => $input, |
|||
type => "intranet", |
|||
flagsrequired => {parameters => 'parameters_remaining_permissions'}, |
|||
authnotrequired => 0, |
|||
debug => 1, |
|||
}); |
|||
|
|||
$template->param(script_name => $script_name, |
|||
searchfield => $searchfield); |
|||
|
|||
my $dbh = C4::Context->dbh; |
|||
if ($op eq 'add_form') { |
|||
$template->param(add_form => 1); |
|||
} elsif ($op eq 'add_validate') { |
|||
$template->param(add_validate => 1); |
|||
my @tab = split / |,/, $input->param('word'); |
|||
my $sth=$dbh->prepare("INSERT INTO stopwords (word) VALUES (?)"); |
|||
foreach my $insert_value (@tab) { |
|||
$sth->execute($insert_value); |
|||
} |
|||
} elsif ($op eq 'delete_confirm') { |
|||
$template->param(delete_confirm => 1); |
|||
} elsif ($op eq 'delete_confirmed') { |
|||
$template->param(delete_confirmed => 1); |
|||
my $sth=$dbh->prepare("delete from stopwords where word=?"); |
|||
$sth->execute($searchfield); |
|||
} else { # DEFAULT |
|||
$template->param(else => 1); |
|||
my $results = StringSearch($searchfield); |
|||
my $count = scalar(@$results); |
|||
my @loop; |
|||
# FIXME: limit and offset should get to the SQL query |
|||
for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ |
|||
push @loop, {word => $results->[$i]{'word'}}; |
|||
} |
|||
$template->param(loop => \@loop); |
|||
if ($offset > 0) { |
|||
$template->param(offsetgtzero => 1, |
|||
prevpage => $offset-$pagesize); |
|||
} |
|||
if ($offset+$pagesize < scalar(@$results)) { |
|||
$template->param(ltcount => 1, |
|||
nextpage => $offset+$pagesize); |
|||
} |
|||
} |
|||
|
|||
output_html_with_http_headers $input, $cookie, $template->output; |
|||
|
@ -1,99 +0,0 @@ |
|||
INSERT INTO stopwords VALUES |
|||
('a'), |
|||
('about'), |
|||
('also'), |
|||
('an'), |
|||
('and'), |
|||
('another'), |
|||
('any'), |
|||
('are'), |
|||
('as'), |
|||
('at'), |
|||
('back'), |
|||
('be'), |
|||
('because'), |
|||
('been'), |
|||
('being'), |
|||
('but'), |
|||
('by'), |
|||
('can'), |
|||
('could'), |
|||
('did'), |
|||
('do'), |
|||
('each'), |
|||
('end'), |
|||
('even'), |
|||
('for'), |
|||
('from'), |
|||
('get'), |
|||
('go'), |
|||
('had'), |
|||
('have'), |
|||
('he'), |
|||
('her'), |
|||
('here'), |
|||
('his'), |
|||
('how'), |
|||
('i'), |
|||
('if'), |
|||
('in'), |
|||
('into'), |
|||
('is'), |
|||
('it'), |
|||
('just'), |
|||
('may'), |
|||
('me'), |
|||
('might'), |
|||
('much'), |
|||
('must'), |
|||
('my'), |
|||
('no'), |
|||
('not'), |
|||
('of'), |
|||
('off'), |
|||
('on'), |
|||
('only'), |
|||
('or'), |
|||
('other'), |
|||
('our'), |
|||
('out'), |
|||
('should'), |
|||
('so'), |
|||
('some'), |
|||
('still'), |
|||
('such'), |
|||
('than'), |
|||
('that'), |
|||
('the'), |
|||
('their'), |
|||
('them'), |
|||
('then'), |
|||
('there'), |
|||
('these'), |
|||
('they'), |
|||
('this'), |
|||
('those'), |
|||
('to'), |
|||
('too'), |
|||
('try'), |
|||
('two'), |
|||
('under'), |
|||
('up'), |
|||
('us'), |
|||
('was'), |
|||
('we'), |
|||
('were'), |
|||
('what'), |
|||
('when'), |
|||
('where'), |
|||
('which'), |
|||
('while'), |
|||
('who'), |
|||
('why'), |
|||
('will'), |
|||
('with'), |
|||
('within'), |
|||
('without'), |
|||
('would'), |
|||
('you'), |
|||
('your'); |
@ -1 +0,0 @@ |
|||
Englische Stoppwortliste. Sie können diese nach der Installation ändern. |
@ -1,99 +0,0 @@ |
|||
INSERT INTO stopwords VALUES |
|||
('a'), |
|||
('about'), |
|||
('also'), |
|||
('an'), |
|||
('and'), |
|||
('another'), |
|||
('any'), |
|||
('are'), |
|||
('as'), |
|||
('at'), |
|||
('back'), |
|||
('be'), |
|||
('because'), |
|||
('been'), |
|||
('being'), |
|||
('but'), |
|||
('by'), |
|||
('can'), |
|||
('could'), |
|||
('did'), |
|||
('do'), |
|||
('each'), |
|||
('end'), |
|||
('even'), |
|||
('for'), |
|||
('from'), |
|||
('get'), |
|||
('go'), |
|||
('had'), |
|||
('have'), |
|||
('he'), |
|||
('her'), |
|||
('here'), |
|||
('his'), |
|||
('how'), |
|||
('i'), |
|||
('if'), |
|||
('in'), |
|||
('into'), |
|||
('is'), |
|||
('it'), |
|||
('just'), |
|||
('may'), |
|||
('me'), |
|||
('might'), |
|||
('much'), |
|||
('must'), |
|||
('my'), |
|||
('no'), |
|||
('not'), |
|||
('of'), |
|||
('off'), |
|||
('on'), |
|||
('only'), |
|||
('or'), |
|||
('other'), |
|||
('our'), |
|||
('out'), |
|||
('should'), |
|||
('so'), |
|||
('some'), |
|||
('still'), |
|||
('such'), |
|||
('than'), |
|||
('that'), |
|||
('the'), |
|||
('their'), |
|||
('them'), |
|||
('then'), |
|||
('there'), |
|||
('these'), |
|||
('they'), |
|||
('this'), |
|||
('those'), |
|||
('to'), |
|||
('too'), |
|||
('try'), |
|||
('two'), |
|||
('under'), |
|||
('up'), |
|||
('us'), |
|||
('was'), |
|||
('we'), |
|||
('were'), |
|||
('what'), |
|||
('when'), |
|||
('where'), |
|||
('which'), |
|||
('while'), |
|||
('who'), |
|||
('why'), |
|||
('will'), |
|||
('with'), |
|||
('within'), |
|||
('without'), |
|||
('would'), |
|||
('you'), |
|||
('your'); |
@ -1 +0,0 @@ |
|||
English stop words. You can change this after installation. |
@ -1,71 +0,0 @@ |
|||
# phpMyAdmin MySQL-Dump |
|||
# version 2.2.6-rc1 |
|||
# http://phpwizard.net/phpMyAdmin/ |
|||
# http://phpmyadmin.sourceforge.net/ (download page) |
|||
# |
|||
# Host: localhost |
|||
# Generation Time: Nov 22, 2002 at 11:10 AM |
|||
# Server version: 3.23.52 |
|||
# PHP Version: 4.2.3 |
|||
# Database : `koha_fr` |
|||
|
|||
# |
|||
# Dumping data for table `stopwords` |
|||
# |
|||
|
|||
INSERT INTO stopwords VALUES ('AU'); |
|||
INSERT INTO stopwords VALUES ('ÇA'); |
|||
INSERT INTO stopwords VALUES ('CAR'); |
|||
INSERT INTO stopwords VALUES ('CE'); |
|||
INSERT INTO stopwords VALUES ('CELA'); |
|||
INSERT INTO stopwords VALUES ('CES'); |
|||
INSERT INTO stopwords VALUES ('CEUX'); |
|||
INSERT INTO stopwords VALUES ('CI'); |
|||
INSERT INTO stopwords VALUES ('DANS'); |
|||
INSERT INTO stopwords VALUES ('DE'); |
|||
INSERT INTO stopwords VALUES ('DES'); |
|||
INSERT INTO stopwords VALUES ('DU'); |
|||
INSERT INTO stopwords VALUES ('ELLE'); |
|||
INSERT INTO stopwords VALUES ('ELLES'); |
|||
INSERT INTO stopwords VALUES ('EN'); |
|||
INSERT INTO stopwords VALUES ('EST'); |
|||
INSERT INTO stopwords VALUES ('ET'); |
|||
INSERT INTO stopwords VALUES ('EU'); |
|||
INSERT INTO stopwords VALUES ('IL'); |
|||
INSERT INTO stopwords VALUES ('ILS'); |
|||
INSERT INTO stopwords VALUES ('JE'); |
|||
INSERT INTO stopwords VALUES ('LA'); |
|||
INSERT INTO stopwords VALUES ('LE'); |
|||
INSERT INTO stopwords VALUES ('LES'); |
|||
INSERT INTO stopwords VALUES ('LEUR'); |
|||
INSERT INTO stopwords VALUES ('MA'); |
|||
INSERT INTO stopwords VALUES ('MAIS'); |
|||
INSERT INTO stopwords VALUES ('MES'); |
|||
INSERT INTO stopwords VALUES ('MON'); |
|||
INSERT INTO stopwords VALUES ('NI'); |
|||
INSERT INTO stopwords VALUES ('NOTRE'); |
|||
INSERT INTO stopwords VALUES ('NOUS'); |
|||
INSERT INTO stopwords VALUES ('OU'); |
|||
INSERT INTO stopwords VALUES ('PAR'); |
|||
INSERT INTO stopwords VALUES ('PAS'); |
|||
INSERT INTO stopwords VALUES ('PEU'); |
|||
INSERT INTO stopwords VALUES ('PEUT'); |
|||
INSERT INTO stopwords VALUES ('POUR'); |
|||
INSERT INTO stopwords VALUES ('QUE'); |
|||
INSERT INTO stopwords VALUES ('QUI'); |
|||
INSERT INTO stopwords VALUES ('SA'); |
|||
INSERT INTO stopwords VALUES ('SES'); |
|||
INSERT INTO stopwords VALUES ('SI'); |
|||
INSERT INTO stopwords VALUES ('SIEN'); |
|||
INSERT INTO stopwords VALUES ('SON'); |
|||
INSERT INTO stopwords VALUES ('SOUS'); |
|||
INSERT INTO stopwords VALUES ('SUR'); |
|||
INSERT INTO stopwords VALUES ('TA'); |
|||
INSERT INTO stopwords VALUES ('TELS'); |
|||
INSERT INTO stopwords VALUES ('TES'); |
|||
INSERT INTO stopwords VALUES ('TON'); |
|||
INSERT INTO stopwords VALUES ('TU'); |
|||
INSERT INTO stopwords VALUES ('VOTRE'); |
|||
INSERT INTO stopwords VALUES ('VOUS'); |
|||
INSERT INTO stopwords VALUES ('VU'); |
|||
|
@ -1 +0,0 @@ |
|||
Mots vides de la langue française. |
@ -1,194 +0,0 @@ |
|||
SET FOREIGN_KEY_CHECKS=0; |
|||
|
|||
INSERT INTO `stopwords` (`word`) VALUES |
|||
('a'), |
|||
('about'), |
|||
('ad'), |
|||
('after'), |
|||
('ai'), |
|||
('al'), |
|||
('all'), |
|||
('alla'), |
|||
('alle'), |
|||
('allo'), |
|||
('also'), |
|||
('an'), |
|||
('and'), |
|||
('another'), |
|||
('any'), |
|||
('are'), |
|||
('as'), |
|||
('at'), |
|||
('b'), |
|||
('back'), |
|||
('be'), |
|||
('because'), |
|||
('been'), |
|||
('being'), |
|||
('but'), |
|||
('by'), |
|||
('c'), |
|||
('can'), |
|||
('ci'), |
|||
('col'), |
|||
('con'), |
|||
('could'), |
|||
('d'), |
|||
('da'), |
|||
('dagli'), |
|||
('dai'), |
|||
('dal'), |
|||
('dall'), |
|||
('dalla'), |
|||
('dalle'), |
|||
('dallo'), |
|||
('de'), |
|||
('degli'), |
|||
('dei'), |
|||
('del'), |
|||
('dell'), |
|||
('della'), |
|||
('delle'), |
|||
('dello'), |
|||
('di'), |
|||
('did'), |
|||
('do'), |
|||
('e'), |
|||
('each'), |
|||
('ed'), |
|||
('end'), |
|||
('et'), |
|||
('even'), |
|||
('f'), |
|||
('for'), |
|||
('fra'), |
|||
('from'), |
|||
('g'), |
|||
('get'), |
|||
('gli'), |
|||
('go'), |
|||
('h'), |
|||
('had'), |
|||
('have'), |
|||
('he'), |
|||
('her'), |
|||
('here'), |
|||
('his'), |
|||
('how'), |
|||
('however'), |
|||
('i'), |
|||
('if'), |
|||
('il'), |
|||
('in'), |
|||
('into'), |
|||
('is'), |
|||
('it'), |
|||
('j'), |
|||
('just'), |
|||
('k'), |
|||
('l'), |
|||
('la'), |
|||
('le'), |
|||
('lo'), |
|||
('m'), |
|||
('may'), |
|||
('me'), |
|||
('mi'), |
|||
('might'), |
|||
('more'), |
|||
('much'), |
|||
('must'), |
|||
('my'), |
|||
('n'), |
|||
('ne'), |
|||
('negli'), |
|||
('nel'), |
|||
('nell'), |
|||
('nella'), |
|||
('nello'), |
|||
('no'), |
|||
('non'), |
|||
('not'), |
|||
('o'), |
|||
('of'), |
|||
('off'), |
|||
('on'), |
|||
('only'), |
|||
('oppure'), |
|||
('or'), |
|||
('other'), |
|||
('our'), |
|||
('out'), |
|||
('over'), |
|||
('p'), |
|||
('per'), |
|||
('q'), |
|||
('r'), |
|||
('s'), |
|||
('saw'), |
|||
('si'), |
|||
('since'), |
|||
('should'), |
|||
('so'), |
|||
('some'), |
|||
('still'), |
|||
('su'), |
|||
('such'), |
|||
('sugli'), |
|||
('sui'), |
|||
('sul'), |
|||
('sull'), |
|||
('sulla'), |
|||
('sulle'), |
|||
('t'), |
|||
('te'), |
|||
('than'), |
|||
('that'), |
|||
('the'), |
|||
('their'), |
|||
('them'), |
|||
('then'), |
|||
('there'), |
|||
('these'), |
|||
('they'), |
|||
('this'), |
|||
('those'), |
|||
('ti'), |
|||
('to'), |
|||
('too'), |
|||
('tra'), |
|||
('try'), |
|||
('two'), |
|||
('u'), |
|||
('un'), |
|||
('una'), |
|||
('under'), |
|||
('uno'), |
|||
('up'), |
|||
('upon'), |
|||
('us'), |
|||
('v'), |
|||
('vi'), |
|||
('was'), |
|||
('we'), |
|||
('were'), |
|||
('what'), |
|||
('when'), |
|||
('where'), |
|||
('whether'), |
|||
('which'), |
|||
('while'), |
|||
('who'), |
|||
('why'), |
|||
('will'), |
|||
('with'), |
|||
('within'), |
|||
('without'), |
|||
('would'), |
|||
('x'), |
|||
('y'), |
|||
('you'), |
|||
('your'), |
|||
('z'); |
|||
|
|||
SET FOREIGN_KEY_CHECKS=1; |
@ -1 +0,0 @@ |
|||
Stopword. Possono essere modificate dopo l'installazione. |
@ -1,26 +0,0 @@ |
|||
-- |
|||
-- Default classification sources and filing rules |
|||
-- for Koha. |
|||
-- |
|||
-- Copyright (C) 2011 Magnus Enger Libriotech |
|||
-- |
|||
-- This file is part of Koha. |
|||
-- |
|||
-- Koha is free software; you can redistribute it and/or modify it under the |
|||
-- terms of the GNU General Public License as published by the Free Software |
|||
-- Foundation; either version 2 of the License, or (at your option) any later |
|||
-- version. |
|||
-- |
|||
-- Koha is distributed in the hope that it will be useful, but WITHOUT ANY |
|||
-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
|||
-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
|||
-- |
|||
-- You should have received a copy of the GNU General Public License along |
|||
-- with Koha; if not, write to the Free Software Foundation, Inc., |
|||
-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
|||
|
|||
INSERT INTO stopwords VALUES |
|||
('eller'), |
|||
('en'), |
|||
('og'), |
|||
('som'); |
@ -1 +0,0 @@ |
|||
Norske stoppord. Du kan endre disse etter at installasjonen er fullført. (NB! Vil ikke bli benyttet dersom du velger Zebra for indeksering.) |
@ -1,99 +0,0 @@ |
|||
INSERT INTO stopwords VALUES |
|||
('a'), |
|||
('about'), |
|||
('also'), |
|||
('an'), |
|||
('and'), |
|||
('another'), |
|||
('any'), |
|||
('are'), |
|||
('as'), |
|||
('at'), |
|||
('back'), |
|||
('be'), |
|||
('because'), |
|||
('been'), |
|||
('being'), |
|||
('but'), |
|||
('by'), |
|||
('can'), |
|||
('could'), |
|||
('did'), |
|||
('do'), |
|||
('each'), |
|||
('end'), |
|||
('even'), |
|||
('for'), |
|||
('from'), |
|||
('get'), |
|||
('go'), |
|||
('had'), |
|||
('have'), |
|||
('he'), |
|||
('her'), |
|||
('here'), |
|||
('his'), |
|||
('how'), |
|||
('i'), |
|||
('if'), |
|||
('in'), |
|||
('into'), |
|||
('is'), |
|||
('it'), |
|||
('just'), |
|||
('may'), |
|||
('me'), |
|||
('might'), |
|||
('much'), |
|||
('must'), |
|||
('my'), |
|||
('no'), |
|||
('not'), |
|||
('of'), |
|||
('off'), |
|||
('on'), |
|||
('only'), |
|||
('or'), |
|||
('other'), |
|||
('our'), |
|||
('out'), |
|||
('should'), |
|||
('so'), |
|||
('some'), |
|||
('still'), |
|||
('such'), |
|||
('than'), |
|||
('that'), |
|||
('the'), |
|||
('their'), |
|||
('them'), |
|||
('then'), |
|||
('there'), |
|||
('these'), |
|||
('they'), |
|||
('this'), |
|||
('those'), |
|||
('to'), |
|||
('too'), |
|||
('try'), |
|||
('two'), |
|||
('under'), |
|||
('up'), |
|||
('us'), |
|||
('was'), |
|||
('we'), |
|||
('were'), |
|||
('what'), |
|||
('when'), |
|||
('where'), |
|||
('which'), |
|||
('while'), |
|||
('who'), |
|||
('why'), |
|||
('will'), |
|||
('with'), |
|||
('within'), |
|||
('without'), |
|||
('would'), |
|||
('you'), |
|||
('your'); |
@ -1 +0,0 @@ |
|||
Angielskie stop words. Możesz je zmienić po intalacji. |
@ -1,21 +0,0 @@ |
|||
TRUNCATE stopwords; |
|||
|
|||
INSERT INTO stopwords VALUES |
|||
( 'к'), |
|||
( 'и'), |
|||
( 'в'), |
|||
( 'на'), |
|||
( 'да'), |
|||
( 'то'), |
|||
( 'где'), |
|||
( 'еле'), |
|||
( 'это'), |
|||
( 'что'), |
|||
( 'ведь'), |
|||
( 'даже'), |
|||
( 'почти'), |
|||
( 'такой'), |
|||
( 'также'), |
|||
( 'значит'), |
|||
( 'немного'), |
|||
( 'который'); |
@ -1 +0,0 @@ |
|||
Несущественные для поиска русские слова. Вы можете корректировать их после установки. |
@ -1,29 +0,0 @@ |
|||
TRUNCATE stopwords; |
|||
|
|||
INSERT INTO stopwords VALUES |
|||
('адже'), |
|||
('авжеж'), |
|||
('в'), |
|||
('де'), |
|||
('дещо'), |
|||
('до'), |
|||
('й'), |
|||
('ледве'), |
|||
('майже'), |
|||
('на'), |
|||
('навіть'), |
|||
('отже'), |
|||
('отож'), |
|||
('під'), |
|||
('так'), |
|||
('такий'), |
|||
('також'), |
|||
('те'), |
|||
('тобто'), |
|||
('тож'), |
|||
('тощо'), |
|||
('у'), |
|||
('це'), |
|||
('що'), |
|||
('як'), |
|||
('який'); |
@ -1,28 +0,0 @@ |
|||
<div class="gradient"> |
|||
<h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Stopwords Resident Search Box --> |
|||
<div id="header_search"> |
|||
<div id="stopword_search" class="residentsearch"> |
|||
<p class="tip">Stop word search:</p> |
|||
<form action="[% script_name %]" method="post"> |
|||
<input class="head-searchbox" type="text" size="40" name="searchfield" value="[% searchfield %]" /> |
|||
<input type="submit" name="ok" class="submit" value="Search" /> |
|||
</form> |
|||
</div> |
|||
[% INCLUDE 'patron-search-box.inc' %] |
|||
[% IF ( CAN_user_catalogue ) %] |
|||
<div id="catalog_search" class="residentsearch"> |
|||
<p class="tip">Enter search keywords:</p> |
|||
<form action="/cgi-bin/koha/catalogue/search.pl" method="get" id="cat-search-block"> |
|||
<input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="head-searchbox form-text" /> |
|||
<input type="submit" value="Submit" class="submit" /> |
|||
</form> |
|||
</div> |
|||
[% END %] |
|||
<ul> |
|||
<li><a onclick="keep_text(0)" href="#stopword_search">Search stop words</a></li> |
|||
[% IF ( CAN_user_circulate ) %]<li><a onclick="keep_text(1)" href="#circ_search">Check out</a></li>[% END %] |
|||
[% IF ( CAN_user_catalogue ) %]<li><a onclick="keep_text(2)" href="#catalog_search">Search the catalog</a></li>[% END %] |
|||
</ul> |
|||
</div> |
|||
</div><!-- /gradient --> |
|||
<!-- End Stopwords Resident Search Box --> |
@ -1,146 +0,0 @@ |
|||
[% INCLUDE 'doc-head-open.inc' %] |
|||
<title>Koha › System administration › Stop words |
|||
[% IF ( add_form ) %]› [% IF ( searchfield ) %]Modify[% ELSE %]New[% END %] stop word |
|||
[% ELSIF ( add_validate ) %]› Data recorded |
|||
[% ELSIF ( delete_confirm ) %]› Delete stop word '[% searchfield %]' ? |
|||
[% ELSIF ( delete_confirmed ) %]› Data deleted |
|||
[% END %] |
|||
</title> |
|||
[% INCLUDE 'doc-head-close.inc' %] |
|||
<script type="text/javascript"> |
|||
//<![CDATA[ |
|||
$(document).ready(function() { |
|||
new YAHOO.widget.Button("newstopword"); |
|||
}); |
|||
function Check(f) { |
|||
if (f.word.value.length==0) { |
|||
alert(_("Form not submitted: word missing")); |
|||
} else { |
|||
document.Aform.submit(); |
|||
} |
|||
} |
|||
//]]> |
|||
</script> |
|||
</head> |
|||
<body id="admin_stopwords" class="admin"> |
|||
[% INCLUDE 'header.inc' %] |
|||
[% INCLUDE 'stopwords-admin-search.inc' %] |
|||
|
|||
<div id="breadcrumbs"> |
|||
<a href="/cgi-bin/koha/mainpage.pl">Home</a> |
|||
› <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> |
|||
› <a href="/cgi-bin/koha/admin/stopwords.pl">Stop words</a> |
|||
[% IF ( add_form ) %] |
|||
› [% IF ( searchfield ) %]Modify[% ELSE %]New[% END %] Stop word |
|||
[% ELSIF ( add_validate ) %] |
|||
› Data recorded |
|||
[% ELSIF ( delete_confirm ) %] |
|||
› Delete stop word '[% searchfield %]' ? |
|||
[% ELSIF ( delete_confirmed ) %] |
|||
› Data deleted |
|||
[% END %] |
|||
</div> |
|||
|
|||
<div id="doc3" class="yui-t2"> |
|||
|
|||
<div id="bd"> |
|||
<div id="yui-main"> |
|||
<div class="yui-b"> |
|||
|
|||
[% IF ( add_form ) %] |
|||
[% IF ( searchfield ) %] |
|||
<h1>Modify word</h1> |
|||
[% ELSE %] |
|||
<h1>New word</h1> |
|||
[% END %] |
|||
<form action="[% script_name %]" name="Aform" method="post"> |
|||
<input type="hidden" name="op" value="add_validate" /> |
|||
<fieldset class="rows"> |
|||
<ol><li> |
|||
[% IF ( searchfield ) %] |
|||
<span class="label">Word</span> |
|||
<input type="hidden" name="word" value="[% searchfield %]" />[% searchfield %] |
|||
[% ELSE %] |
|||
<label for="word">Word</label> |
|||
<input type="text" name="word" id="word" size="50" maxlength="250" onblur="toUC(this)" /> |
|||
[% END %] |
|||
</li> |
|||
</ol> |
|||
</fieldset> |
|||
<fieldset class="action"> |
|||
<input type="button" value="Save" onclick="Check(this.form)" /> |
|||
<a class="cancel" href="/cgi-bin/koha/admin/stopwords.pl">Cancel</a> |
|||
</fieldset> |
|||
</form> |
|||
[% END %] |
|||
|
|||
[% IF ( add_validate ) %] |
|||
<div class="dialog message"> <h3>Data recorded</h3> |
|||
<form action="[% script_name %]" method="post"> |
|||
<input type="submit" value="OK" class="approve" /> |
|||
</form></div> |
|||
[% END %] |
|||
|
|||
[% IF ( delete_confirm ) %] |
|||
<div class="dialog alert"> |
|||
<h3>Delete stop word <span class="ex">'[% searchfield %]'</span></h3> |
|||
<form action="[% script_name %]" method="post"> |
|||
<input type="hidden" name="op" value="delete_confirmed" /> |
|||
<input type="hidden" name="searchfield" value="[% searchfield %]" /> |
|||
<input type="submit" value="Yes, delete" class="approve" /> |
|||
</form> |
|||
<form action="[% script_name %]" method="get"> |
|||
<input type="submit" class="deny" value="No, do not delete" /> |
|||
</form></div> |
|||
[% END %] |
|||
|
|||
[% IF ( delete_confirmed ) %] |
|||
<div class="dialog message"> <h3>Data deleted</h3> |
|||
<form action="[% script_name %]" method="post"> |
|||
<input type="submit" value="OK" class="approve" /> |
|||
</form></div> |
|||
[% END %] |
|||
|
|||
[% IF ( else ) %] |
|||
|
|||
<div id="toolbar"> |
|||
<ul class="toolbar"> |
|||
<li><a id="newstopword" href="/cgi-bin/koha/admin/stopwords.pl?op=add_form">New stop word</a></li> |
|||
</ul></div> |
|||
|
|||
<h1>Stop words</h1> |
|||
<p class="message">NOTE : if you change something in this table, ask your administrator to run misc/batchRebuildBiblioTables.pl script.</p> |
|||
|
|||
[% IF ( searchfield ) %] |
|||
<p>You searched for <b>[% searchfield %]</b></p> |
|||
[% END %] |
|||
|
|||
<table> |
|||
<tr><th>Word</th> |
|||
<th></th> |
|||
</tr> |
|||
[% FOREACH loo IN loop %] |
|||
<tr> |
|||
<td>[% loo.word %]</td> |
|||
<td><a href="[% loo.script_name %]?op=delete_confirm&searchfield=[% loo.word %]">Delete</a></td> |
|||
</tr> |
|||
[% END %] |
|||
</table> |
|||
|
|||
<div class="pages"> |
|||
[% IF ( offsetgtzero ) %] |
|||
<a href="[% script_name %]?offset=[% prevpage %]"><< Previous</a> |
|||
[% END %] |
|||
[% IF ( ltcount ) %] |
|||
<a href="[% script_name %]?offset=[% nextpage %]">Next >></a> |
|||
[% END %] |
|||
</div> |
|||
[% END %] |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="yui-b"> |
|||
[% INCLUDE 'admin-menu.inc' %] |
|||
</div> |
|||
</div> |
|||
[% INCLUDE 'intranet-bottom.inc' %] |