# 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., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
+# 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.
use strict;
+#use warnings; FIXME - Bug 2505
use CGI;
use C4::Output;
use C4::Koha;
use MARC::Record;
use C4::Branch; # GetBranches
+use C4::ItemType;
sub plugin_parameters {
my ( $dbh, $record, $tagslib, $i, $tabloop ) = @_;
function Clic$function_name(i) {
defaultvalue=document.getElementById(\"$field_number\").value;
- window.open(\"/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_4XX.pl&index=$field_number&result=\"+defaultvalue,\"unimarc field 4\"+i+\"\",'width=900,height=700,toolbar=false,scrollbars=yes');
+ window.open(\"/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_4XX.pl&index=\" + i + \"&result=\"+defaultvalue,\"unimarc field 4\"+i+\"\",'width=900,height=700,toolbar=false,scrollbars=yes');
}
</script>
query => $query,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { editcatalogue => 1 },
+ flagsrequired => { editcatalogue => '*' },
debug => 1,
}
);
}
elsif ( $op eq "do_search" ) {
my $search = $query->param('search');
+ my $itype = $query->param('itype');
my $startfrom = $query->param('startfrom');
my $resultsperpage = $query->param('resultsperpage') || 20;
my $orderby;
+ $search = 'kw,wrdl='.$search.' and mc-itemtype='.$itype if $itype;
my ( $errors, $results, $total_hits ) = SimpleSearch($search, $startfrom * $resultsperpage, $resultsperpage );
my $total = scalar(@$results);
# }
# $sth->finish;
+ my @itemtypes = C4::ItemType->all;
+
$template->param( #classlist => $classlist,
CGIitemtype => $CGIitemtype,
CGIbranch => $CGIbranch,
CGIPublisher => $CGIpublisher,
+ itypeloop => \@itemtypes,
index => $query->param('index'),
Search => 1,
);