OpacHighlightedWords => C4::Context->preference("OpacHighlightedWords"),
OPACItemHolds => C4::Context->preference("OPACItemHolds"),
OPACShelfBrowser => "". C4::Context->preference("OPACShelfBrowser"),
+ OpacShowRecentComments => C4::Context->preference("OpacShowRecentComments"),
OPACURLOpenInNewWindow => "" . C4::Context->preference("OPACURLOpenInNewWindow"),
OPACUserCSS => "". C4::Context->preference("OPACUserCSS"),
OPACViewOthersSuggestions => "" . C4::Context->preference("OPACViewOthersSuggestions"),
=over 4
-=item C<$borrower> hash with borrower informations (from GetMemberDetails)
+=item C<$borrower> hash with borrower informations (from GetMember or GetMemberDetails)
=item C<$barcode> is the bar code of the book being issued.
elsif ($issue->{borrowernumber}) {
# issued to someone else
- my $currborinfo = C4::Members::GetMemberDetails( $issue->{borrowernumber} );
+ my $currborinfo = C4::Members::GetMember( borrowernumber => $issue->{borrowernumber} );
# warn "=>.$currborinfo->{'firstname'} $currborinfo->{'surname'} ($currborinfo->{'cardnumber'})";
$needsconfirmation{ISSUED_TO_ANOTHER} = 1;
my ( $restype, $res ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} );
if ($restype) {
my $resbor = $res->{'borrowernumber'};
- my ( $resborrower ) = C4::Members::GetMemberDetails( $resbor, 0 );
+ my ( $resborrower ) = C4::Members::GetMember( borrowernumber => $resbor );
my $branches = GetBranches();
my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'};
if ( $resbor ne $borrower->{'borrowernumber'} && $restype eq "Waiting" )
=over 4
-=item C<$borrower> is a hash with borrower informations (from GetMemberDetails).
+=item C<$borrower> is a hash with borrower informations (from GetMember or GetMemberDetails).
=item C<$barcode> is the barcode of the item being issued.
my $issue = GetItemIssue($itemnumber);
# warn Dumper($iteminformation);
if ($issue and $issue->{borrowernumber}) {
- $borrower = C4::Members::GetMemberDetails($issue->{borrowernumber})
+ $borrower = C4::Members::GetMember( borrowernumber => $issue->{borrowernumber})
or die "Data inconsistency: barcode $barcode (itemnumber:$itemnumber) claims to be issued to non-existant borrowernumber '$issue->{borrowernumber}'\n"
. Dumper($issue) . "\n";
} else {
# based on the value of the RenewalPeriodBase syspref.
unless ($datedue) {
- my $borrower = C4::Members::GetMemberDetails( $borrowernumber, 0 ) or return undef;
+ my $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber ) or return undef;
my $itemtype = (C4::Context->preference('item-level_itypes')) ? $biblio->{'itype'} : $biblio->{'itemtype'};
$datedue = (C4::Context->preference('RenewalPeriodBase') eq 'date_due') ?
my $renewsallowed = 0;
my $renewsleft = 0;
- my $borrower = C4::Members::GetMemberDetails($bornum);
+ my $borrower = C4::Members::GetMember( borrowernumber => $bornum);
my $item = GetItem($itemno);
# Look in the issues table for this item, lent to this borrower,
sub CanBookBeReserved{
my ($borrowernumber, $biblionumber) = @_;
- my @items = GetItemsInfo($biblionumber);
-
- #get items linked via host records
- my $marcrecord= GetMarcBiblio($biblionumber);
- my @hostitemInfos = GetHostItemsInfo($marcrecord);
- if (@hostitemInfos){
- push (@items,@hostitemInfos);
- }
+ my @items = get_itemnumbers_of($biblionumber);
+ #get items linked via host records
+ my @hostitems = get_hostitemnumbers_of($biblionumber);
+ if (@hostitems){
+ push (@items,@hostitems);
+ }
foreach my $item (@items){
- return 1 if CanItemBeReserved($borrowernumber, $item->{itemnumber});
+ return 1 if CanItemBeReserved($borrowernumber, $item);
}
return 0;
}
} else {
# See if this item is more important than what we've got so far
if ( $res->{'priority'} && $res->{'priority'} < $priority ) {
- my $borrowerinfo=C4::Members::GetMemberDetails($res->{'borrowernumber'});
+ my $borrowerinfo=C4::Members::GetMember(borrowernumber => $res->{'borrowernumber'});
my $iteminfo=C4::Items::GetItem($itemnumber);
my $branch=C4::Circulation::_GetCircControlBranch($iteminfo,$borrowerinfo);
my $branchitemrule = C4::Circulation::GetBranchItemRule($branch,$iteminfo->{'itype'});
if (defined getframeworkinfo('FA')) {
$fast_cataloging = 1
}
-my $attributes = GetBorrowerAttributes($borrowernumber);
+
+if (C4::Context->preference('ExtendedPatronAttributes')) {
+ my $attributes = GetBorrowerAttributes($borrowernumber);
+ $template->param(
+ ExtendedPatronAttributes => 1,
+ extendedattributes => $attributes
+ );
+}
$template->param(
lib_messages_loop => $lib_messages_loop,
circview => 1,
soundon => C4::Context->preference("SoundOn"),
fast_cataloging => $fast_cataloging,
- extendedattributes => $attributes,
);
# save stickyduedate to session
-Definiert Standardtransport für Benachrichtigungen per Email und SMS.
-
+Definiert die unterstützten Transportarten für Benachrichtigungen (Email, SMS, ...)
I18N-Unterstützung in Koha
-
-Erweiterung für Bidirektionale Schriften, Arabisch und Hebräisch
-Standardmapping zwischen Schrift- und Sprachcodes
-Spracherweiterungen
+Erweiterung für bidirektionale Schriften, Arabisch und Hebräisch,
+Standardmappings zwischen Schrift- und Sprachcodes,
+weitere Spracherweiterungen
-Standard-Berechtigungen für Benutzer
+Modulbezogene Berechtigungen für Bibliotheksmitarbeiter
-Standard-MARC21-Frameworks für Normdaten::
-
- Personenname
- Körperschaftsname
- Kongressname
+Standard-MARC21-Frameworks für Normdaten:
+ Person
+ Körperschaft
+ Kongress
Einheitstitel
Zeitschlagwort
Sachschlagwort
-Abgleichregeln für bibliographische
-MARC21-Datensätze, einschließlich:
-
+Abgleichregeln für bibliographische MARC21-Datensätze, einschließlich:
ISBN
ISSN
-"FA", ein MARC21-Framework (Erfassungsmaske) gedacht für Schnellaufnahmen oder Fernleihtitel.
\ No newline at end of file
+"FA", ein MARC21-Framework (Erfassungsmaske) für Schnellaufnahmen oder Fernleihtitel
-Vereinfachte bibliographische MARC21-Frameworks (Erfassungsmasken) für einige typische Materialarten. Frameworks werden verwendet, um die Struktur eines MARC-Datensatzes und das Verhalten des integrierten MARC-Editors festzulegen. Sie können diese jederzeit nach der Installation ändern. Diese optionalen Standard-Frameworks beinhalten Vorschläge für:
-
+Vereinfachte bibliographische MARC21-Frameworks (Erfassungsmasken) für einige typische Materialarten. Frameworks werden verwendet, um die Struktur eines MARC-Datensatzes und das Verhalten des MARC-Editors in der Katalogisierung festzulegen. Sie können diese jederzeit nach der Installation ändern. Diese optionalen Frameworks enthalten Masken für:
BKS Monographien, Broschüren, Arbeitsbücher
CF CD-ROMs, DVD-ROMs, Online-Ressourcen
SR Audiokassetten, CDs
-Einige Beispielwerte für Bibliotheksbereiche, Verloren-Status, etc. Sie können diese jederzeit nach der Installation ändern.
\ No newline at end of file
+Beispiele für die Auswahllisten der verschiedenen normierten Werte (Verloren, Beschädigt, Sammlung, Standort etc.) Sie können diese nach der Installation jederzeit über die Oberfläche ändern oder ergänzen.
-Beispiele für Benutzertypen und -kategorien:
-
-Kategorie: Benutzertyp:
+Beispiele für Benutzerkategorien und -typen:
Erwachsener Benutzer - Standardkategorie
PT - Erwachsener
YA - Junger Erwachsener
Organisation - Benutzer ist eine Institution, keine Person
- ILL - Fernleihbibliothek
+ ILL - Fernleihbibliothek
SC - Schule
L - Bibliothek
-Professioneller - Mitglied einer Organisation, Organisation ist Bürge
+Professioneller - Mitglied einer Organisation mit der Orgsnisation als Bürgen
T - Lehrer
S - Vorstand
-Mitarbeiter - Benutzer ist Mitarbeiter der Bibliothek und hat entsprechende Berechtigungen
+Mitarbeiter - Benutzer ist Mitarbeiter der Bibliothek mit entsprechenden Berechtigungen
S - Mitarbeiter
-Die Benutzerkategorien sind fest codiert, aber Sie können Benutzertypen nach der Installation im Administrationsbereich ändern, löschen und hinzufügen.
+Die Benutzerkategorien sind fest codiert, Benutzertypen können aber jederzeit im Administrationsbereich neu angelegt, geändert oder gelöscht werden.
-Beispiele für Etiketten- und Benutzerausweisdruck
\ No newline at end of file
+Beispieltemplates und Layouts für den Etiketten- und Benutzerausweisdruck
-Beispiel-Nachrichten
+Beispiel-Nachrichten für OPAC und Dienstoberfläche
+Einige vorkonfigurierte Z39.50-Server
LIBRARY OF CONGRESS
NEW YORK UNIVERSITY LIBRARIES
COLUMBIA UNIVERSITY
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpenLibraryCovers',0,'If ON Openlibrary book covers will be show',NULL,'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL);
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');
SetVersion($DBversion);
}
-$DBversion = "3.05.00.XXX";
+$DBversion = "3.05.00.022";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("CREATE TABLE need_merge_authorities (id int NOT NULL auto_increment PRIMARY KEY, authid bigint NOT NULL, done tinyint DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=utf8");
print "Upgrade to $DBversion done (6094: Fixing ModAuthority problems, add a need_merge_authorities table)\n";
SetVersion($DBversion);
}
+$DBversion = "3.05.00.023";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');");
+ print "Upgrade to $DBversion done (Add syspref OpacShowRecentComments. When the preference is turned on a link to recent comments will appear in the OPAC masthead. )\n";
+ SetVersion($DBversion);
+}
+
+
=head1 FUNCTIONS
=head2 DropAllForeignKeys($table)
<li> <span class="empty">No email stored.</span> </li>
[% END %]
[% END %]
- [% FOREACH extendedattribute IN extendedattributes %]
+ [% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN extendedattributes %]
[% IF ( extendedattribute.display_checkout ) %]
[% IF ( extendedattribute.value ) %]
<li>[% extendedattribute.description %] : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]</li>
[% END %]
[% END %]
- [% END %]
+ [% END %][% END %]
<li>Category: [% categoryname %] ([% categorycode %])</li>
<li>Home Library: [% IF ( branchname ) %][% branchname %][% ELSE %][% branch %][% END %]</li>
</ul></div>
<li> <span class="empty">No email stored.</span> </li>
[% END %]
[% END %]
- [% FOREACH extendedattribute IN borrower.extendedattributes %]
+ [% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN borrower.extendedattributes %]
[% IF ( extendedattribute.display_checkout ) %]
[% IF ( extendedattribute.value ) %]
<li>[% extendedattribute.description %] : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]</li>
[% END %]
[% END %]
- [% END %]
+ [% END %][% END %]
<li>Category: [% borrower.description %] ([% borrower.categorycode %])</li>
<li>Home Library: [% IF ( borrower.branchname ) %][% borrower.branchname %][% ELSE %][% borrower.branch %][% END %]</li>
</ul></div>
[% FOREACH item IN items %]
<div id="outeritemblock">
<div id="itemblock">
- <ol>[% FOREACH iteminformatio IN item.iteminformation %]<li>
- <div class="subfield_line" style="[% iteminformatio.hidden %];" id="subfield[% iteminformatio.serialid %][% iteminformatio.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]">
+ <ol>[% FOREACH iteminformatio IN item.iteminformation %]<li style="[% iteminformatio.hidden %];">
+ <div class="subfield_line" id="subfield[% iteminformatio.serialid %][% iteminformatio.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]">
<label>[% iteminformatio.subfield %] - [% IF ( iteminformatio.mandatory ) %]<b>[% END %][% iteminformatio.marc_lib %][% IF ( iteminformatio.mandatory ) %] *</b>[% END %]</label>
[% iteminformatio.marc_value %]
yes: Show
no: "Don't show"
- "'Powered by Koha' text on OPAC footer."
+ -
+ - pref: OpacShowRecentComments
+ default: 0
+ choices:
+ yes: Show
+ no: "Don't show"
+ - a link to recent comments in the OPAC masthead.
-
- pref: OpacHighlightedWords
choices:
<th>Type</th>
<th>Value</th>
</tr>
- [% FOREACH patron_attribute IN patron_attributes %]
+ [% FOREACH extendedattribute IN extendedattributes %]
<tr>
- <td>[% patron_attribute.code %] ([% patron_attribute.description %])</td>
- <td>[% patron_attribute.value %]
- [% IF ( patron_attribute.value_description ) %]
- ([% patron_attribute.value_description %])
+ <td>[% extendedattribute.code %] ([% extendedattribute.description %])</td>
+ <td>[% extendedattribute.value %]
+ [% IF ( extendedattribute.value_description ) %]
+ ([% extendedattribute.value_description %])
[% END %]
</td>
</tr>
[% IF ( comment ) %]
[% comment %]
[% END %]
-[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %][% BIBLIO_RESULT.title %][% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle %][% END %][% IF ( BIBLIO_RESULT.MARCAUTHORS ) %]
-Author(s): [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %][% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %][% MARCAUTHOR_SUBFIELDS_LOO.value %][% END %][% UNLESS ( loop.last ) %]; [% ELSE %]
-[% END %][% END %][% END %][% IF ( BIBLIO_RESULT.ISBN ) %]
+[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %][% BIBLIO_RESULT.title %][% IF ( BIBLIO_RESULT.subtitle.size ) %] [% FOREACH subtitle IN BIBLIO_RESULT.subtitle %][% subtitle.subfield %][% END %][% END %][% IF ( BIBLIO_RESULT.author ) %]
+
+by [% BIBLIO_RESULT.author %][% END %]
+[% IF ( BIBLIO_RESULT.MARCAUTHORS.size ) %]
+Additional author(s): [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %][% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %] [% MARCAUTHOR_SUBFIELDS_LOO.value %][% END %][% UNLESS ( loop.last ) %];[% END %][% END %][% END %][% IF ( BIBLIO_RESULT.ISBN ) %]
ISBN: [% BIBLIO_RESULT.ISBN %][% END %]
[% IF ( BIBLIO_RESULT.publishercode ) %]Published by: [% BIBLIO_RESULT.publishercode %][% END %][% IF ( BIBLIO_RESULT.publicationyear ) %] in [% END %][% BIBLIO_RESULT.publicationyear %][% IF ( BIBLIO_RESULT.pages ) %], [% END %][% BIBLIO_RESULT.pages %][% IF ( BIBLIO_RESULT.size ) %], [% END %][% BIBLIO_RESULT.size %][% IF ( BIBLIO_RESULT.collection ) %]
Collection: [% BIBLIO_RESULT.seriestitle %][% END %][% IF ( BIBLIO_RESULT.subject ) %]
Dewey: [% BIBLIO_RESULT.dewey %][% END %][% IF ( BIBLIO_RESULT.classification ) %]
Classification: [% BIBLIO_RESULT.classification %][% END %][% IF ( BIBLIO_RESULT.lccn ) %]
LCCN: [% BIBLIO_RESULT.lccn %][% END %][% IF ( BIBLIO_RESULT.url ) %]
-url : [% BIBLIO_RESULT.url %][% END %]
+url : [% BIBLIO_RESULT.url %][% END %][% IF ( OPACBaseURL ) %]
In the online catalog:
-[% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber |url %]
+ http://[% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber |url %][% END %]
Items : [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
[% ITEM_RESULT.branchname %] [% ITEM_RESULT.location %] [% IF ( ITEM_RESULT.itemcallnumber ) %]([% ITEM_RESULT.itemcallnumber %])[% END %] [% ITEM_RESULT.barcode %][% END %]
<a href="/cgi-bin/koha/opac-search.pl">Advanced Search</a>
[% IF ( OpacBrowser ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-browser.pl">Browse by Hierarchy</a>[% END %]
[% IF ( OpacAuthorities ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-authorities-home.pl">Browse by author or subject</a>[% END %]
+[% IF ( OpacShowRecentComments ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-showreviews.pl">Recent Comments</a>[% END %]
[% IF ( TagsEnabled ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-tags.pl">Tag Cloud</a>[% END %]
[% IF ( OpacCloud ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-tags_subject.pl">Subject Cloud</a>[% END %]
[% IF ( OpacTopissue ) %]<span class="pipe"> | </span><a href="/cgi-bin/koha/opac-topissues.pl">Most Popular</a>[% END %]
[% IF ( comment ) %]
[% comment %]
[% END %]
-[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %][% BIBLIO_RESULT.title %][% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle %][% END %][% IF ( BIBLIO_RESULT.MARCAUTHORS ) %]
-Author(s): [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %][% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %][% MARCAUTHOR_SUBFIELDS_LOO.value %][% END %][% UNLESS ( loop.last ) %]; [% ELSE %]
+[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %][% BIBLIO_RESULT.title %][% IF ( BIBLIO_RESULT.subtitle.size ) %] [% FOREACH subtitle IN BIBLIO_RESULT.subtitle %][% subtitle.subfield %][% END %][% END %][% IF ( BIBLIO_RESULT.author ) %]
+
+by [% BIBLIO_RESULT.author %][% END %]
+[% IF ( BIBLIO_RESULT.MARCAUTHORS.size ) %]
+Additional author(s): [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %][% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %] [% MARCAUTHOR_SUBFIELDS_LOO.value %][% END %][% UNLESS ( loop.last ) %]; [% ELSE %]
[% END %][% END %][% END %][% IF ( BIBLIO_RESULT.ISBN ) %]
ISBN: [% BIBLIO_RESULT.ISBN %][% END %]
[% IF ( BIBLIO_RESULT.publishercode ) %]Published by: [% BIBLIO_RESULT.publishercode %][% END %][% IF ( BIBLIO_RESULT.publicationyear ) %] in [% END %][% BIBLIO_RESULT.publicationyear %][% IF ( BIBLIO_RESULT.pages ) %], [% END %][% BIBLIO_RESULT.pages %][% IF ( BIBLIO_RESULT.size ) %], [% END %][% BIBLIO_RESULT.size %][% IF ( BIBLIO_RESULT.collection ) %]
Dewey: [% BIBLIO_RESULT.dewey %][% END %][% IF ( BIBLIO_RESULT.classification ) %]
Classification: [% BIBLIO_RESULT.classification %][% END %][% IF ( BIBLIO_RESULT.lccn ) %]
LCCN: [% BIBLIO_RESULT.lccn %][% END %][% IF ( BIBLIO_RESULT.url ) %]
-url : [% BIBLIO_RESULT.url %][% END %]
+url : [% BIBLIO_RESULT.url %][% END %][% IF ( OPACBaseURL ) %]
In the online catalog:
-[% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber |url %]
+ http://[% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber |url %][% END %]
Items : [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
[% ITEM_RESULT.branchname %] [% ITEM_RESULT.location %] [% IF ( ITEM_RESULT.itemcallnumber ) %]([% ITEM_RESULT.itemcallnumber %])[% END %] [% ITEM_RESULT.barcode %][% END %]
use strict;
sub kohaversion {
- our $VERSION = '3.05.00.021';
+ our $VERSION = '3.05.00.023';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install
my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
$template->param( picture => 1 ) if $picture;
-my $attributes = GetBorrowerAttributes($borrowernumber);
+
+if (C4::Context->preference('ExtendedPatronAttributes')) {
+ my $attributes = GetBorrowerAttributes($borrowernumber);
+ $template->param(
+ ExtendedPatronAttributes => 1,
+ extendedattributes => $attributes
+ );
+}
$template->param(
finesview => 1,
is_child => ($data->{'category_type'} eq 'C'),
reverse_col => $reverse_col,
accounts => $accts,
- extendedattributes => $attributes,
);
output_html_with_http_headers $input, $cookie, $template->output;
$template->param( adultborrower => 1 ) if ( $data->{category_type} eq 'A' );
my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
$template->param( picture => 1 ) if $picture;
+
+if (C4::Context->preference('ExtendedPatronAttributes')) {
my $attributes = GetBorrowerAttributes($borrowernumber);
+ $template->param(
+ ExtendedPatronAttributes => 1,
+ extendedattributes => $attributes
+ );
+}
$template->param(
borrowernumber => $borrowernumber,
branchcode => $data->{'branchcode'},
branchname => GetBranchName($data->{'branchcode'}),
is_child => ($data->{'category_type'} eq 'C'),
- extendedattributes => $attributes,
);
output_html_with_http_headers $input, $cookie, $template->output;
}
$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' );
my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
$template->param( picture => 1 ) if $picture;
- my $attributes = GetBorrowerAttributes($borrowernumber);
+if (C4::Context->preference('ExtendedPatronAttributes')) {
+ my $attributes = GetBorrowerAttributes($borrowernumber);
+ $template->param(
+ ExtendedPatronAttributes => 1,
+ extendedattributes => $attributes
+ );
+}
$template->param(
borrowernumber => $borrowernumber,
firstname => $data->{'firstname'},
branchcode => $data->{'branchcode'},
branchname => GetBranchName($data->{'branchcode'}),
is_child => ($data->{'category_type'} eq 'C'),
- extendedattributes => $attributes,
);
output_html_with_http_headers $input, $cookie, $template->output;
}
$template->param( adultborrower => 1 ) if ( $bor->{'category_type'} eq 'A' );
my ($picture, $dberror) = GetPatronImage($bor->{'cardnumber'});
$template->param( picture => 1 ) if $picture;
-my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'});
+
+if (C4::Context->preference('ExtendedPatronAttributes')) {
+ my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'});
+ $template->param(
+ ExtendedPatronAttributes => 1,
+ extendedattributes => $attributes
+ );
+}
$template->param(
borrowernumber => $bor->{'borrowernumber'},
branchname => GetBranchName($bor->{'branchcode'}),
loop => \@loop,
is_child => ($bor->{'category_type'} eq 'C'),
- extendedattributes => $attributes,
);
output_html_with_http_headers $input, $cookie, $template->output;
$template->param( adultborrower => 1 ) if ( $bor->{'category_type'} eq 'A' );
my ($picture, $dberror) = GetPatronImage($bor->{'cardnumber'});
$template->param( picture => 1 ) if $picture;
-my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'});
+
+if (C4::Context->preference('ExtendedPatronAttributes')) {
+ my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'});
+ $template->param(
+ ExtendedPatronAttributes => 1,
+ extendedattributes => $attributes
+ );
+}
$template->param( othernames => $bor->{'othernames'},
surname => $bor->{'surname'},
destination => $destination,
is_child => ($bor->{'category_type'} eq 'C'),
defaultnewpassword => $defaultnewpassword,
- extendedattributes => $attributes,
);
$template->param(%$data);
if (C4::Context->preference('ExtendedPatronAttributes')) {
- $template->param(ExtendedPatronAttributes => 1);
- $template->param(patron_attributes => C4::Members::Attributes::GetBorrowerAttributes($borrowernumber));
+ my $attributes = GetBorrowerAttributes($borrowernumber);
+ $template->param(
+ ExtendedPatronAttributes => 1,
+ extendedattributes => $attributes
+ );
my @types = C4::Members::AttributeTypes::GetAttributeTypes();
if (scalar(@types) == 0) {
$template->param(no_patron_attribute_types => 1);
$template->param(SMSSendDriver => C4::Context->preference("SMSSendDriver"));
$template->param(SMSnumber => defined $data->{'smsalertnumber'} ? $data->{'smsalertnumber'} : $data->{'mobile'});
}
-my $attributes = GetBorrowerAttributes($borrowernumber);
$template->param(
detailview => 1,
"dateformat_" . (C4::Context->preference("dateformat") || '') => 1,
samebranch => $samebranch,
quickslip => $quickslip,
- extendedattributes => $attributes,
);
#Get the slip news items
# Getting the messages
my $queued_messages = C4::Letters::GetQueuedMessages({borrowernumber => $borrowernumber});
$template->param( %{$borrower} );
-my $attributes = GetBorrowerAttributes($borrowernumber);
+
+if (C4::Context->preference('ExtendedPatronAttributes')) {
+ my $attributes = GetBorrowerAttributes($borrowernumber);
+ $template->param(
+ ExtendedPatronAttributes => 1,
+ extendedattributes => $attributes
+ );
+}
$template->param(
QUEUED_MESSAGES => $queued_messages,
sentnotices => 1,
branchname => GetBranchName($borrower->{'branchcode'}),
categoryname => $borrower->{'description'},
- extendedattributes => $attributes,
);
output_html_with_http_headers $input, $cookie, $template->output;
if ($picture) {
$b_ref->{has_picture} = 1;
}
- $b_ref->{extendedattributes} = GetBorrowerAttributes($borrowernumber);
+
+ if (C4::Context->preference('ExtendedPatronAttributes')) {
+ $b_ref->{extendedattributes} = GetBorrowerAttributes($borrowernumber);
+ $template->param(
+ ExtendedPatronAttributes => 1,
+ );
+ }
$b_ref->{branchname} = GetBranchName( $b_ref->{branchcode} );
return;
my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
$template->param( picture => 1 ) if $picture;
-my $attributes = GetBorrowerAttributes($borrowernumber);
+
+if (C4::Context->preference('ExtendedPatronAttributes')) {
+ my $attributes = GetBorrowerAttributes($borrowernumber);
+ $template->param(
+ ExtendedPatronAttributes => 1,
+ extendedattributes => $attributes
+ );
+}
$template->param(
readingrecordview => 1,
branchname => GetBranchName($data->{'branchcode'}),
showfulllink => (scalar @loop_reading > 50),
loop_reading => \@loop_reading,
- extendedattributes => $attributes,
);
output_html_with_http_headers $input, $cookie, $template->output;
--- /dev/null
+#!/usr/bin/perl
+
+# Copyright 2011, ByWater Solutions.
+#
+# 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.
+
+use strict;
+use warnings;
+
+BEGIN {
+
+ # find Koha's Perl modules
+ # test carefully before changing this
+ use FindBin;
+ eval { require "$FindBin::Bin/../kohalib.pl" };
+}
+
+use C4::Context;
+use C4::Circulation;
+use C4::Dates;
+use Date::Calc qw(
+ Today
+ Add_Delta_Days
+);
+use Getopt::Long;
+
+sub usage {
+ print STDERR <<USAGE;
+Usage: $0 --days DAYS [-h|--help]
+ --days DAYS (MANDATORY) anonymise patron history that is older than DAYS days.
+ -v --verbose gives a little more information
+ -h --help prints this help message, and exits, ignoring all
+ other options
+USAGE
+ exit $_[0];
+}
+
+my ( $help, $days, $verbose );
+
+GetOptions(
+ 'h|help' => \$help,
+ 'days:i' => \$days,
+ 'v|verbose' => \$verbose,
+) || usage(1);
+
+if ($help) {
+ usage(0);
+}
+
+if ( !$days ) {
+ print "The days parameter is mandatory.\n\n";
+ usage(1);
+}
+
+my ($year,$month,$day) = Today();
+my ($newyear,$newmonth,$newday) = Add_Delta_Days ($year,$month,$day,(-1)*$days);
+my $formatdate = sprintf "%4d-%02d-%02d",$newyear,$newmonth,$newday;
+$verbose and print "Checkouts before $formatdate will be anonymised.\n";
+
+my $rows = AnonymiseIssueHistory($formatdate);
+$verbose and print "$rows checkouts anonymised.\n";
+
+exit(0);
# retrieve biblios from shelf
foreach my $biblio (@$items) {
my $biblionumber = $biblio->{biblionumber};
-
+ my $fw = GetFrameworkCode($biblionumber);
my $dat = GetBiblioData($biblionumber);
my $record = GetMarcBiblio($biblionumber);
my $marcnotesarray = GetMarcNotes( $record, $marcflavour );
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
+ my $subtitle = GetRecordValue('subtitle', $record, $fw);
my @items = GetItemsInfo( $biblionumber );
$dat->{MARCAUTHORS} = $marcauthorsarray;
$dat->{'biblionumber'} = $biblionumber;
$dat->{ITEM_RESULTS} = \@items;
+ $dat->{subtitle} = $subtitle;
$iso2709 .= $record->as_usmarc();
push( @results, $dat );
}
- my $user = GetMember(borrowernumber => $borrowernumber);
+ my $user = GetMember(borrowernumber => $borrowernumber);
+
+ if (C4::Context->preference('OPACBaseURL')){
+ $template2->param( OPACBaseURL => C4::Context->preference('OPACBaseURL') );
+ }
$template2->param(
BIBLIO_RESULTS => \@results,
url => "/cgi-bin/koha/opac-sendshelf.pl",
);
output_html_with_http_headers $query, $cookie, $template->output;
-}
\ No newline at end of file
+}
# If we have the borrowernumber because we've performed an action, then we
# don't want to try to place another reserve.
if ($borrowernumber_hold && !$action) {
- my $borrowerinfo = GetMemberDetails( $borrowernumber_hold );
+ my $borrowerinfo = GetMember( borrowernumber => $borrowernumber_hold );
my $diffbranch;
my @getreservloop;
my $count_reserv = 0;
);
}
-# FIXME launch another time GetMemberDetails perhaps until
-my $borrowerinfo = GetMemberDetails( $borrowernumber_hold );
+# FIXME launch another time GetMember perhaps until
+my $borrowerinfo = GetMember( borrowernumber => $borrowernumber_hold );
my @biblionumbers = ();
my $biblionumbers = $input->param('biblionumbers');
# checking reserve
my ($reservedate,$reservedfor,$expectedAt) = GetReservesFromItemnumber($itemnumber);
- my $ItemBorrowerReserveInfo = GetMemberDetails( $reservedfor, 0);
+ my $ItemBorrowerReserveInfo = GetMember( borrowernumber => $reservedfor );
if ( defined $reservedate ) {
$item->{backgroundcolor} = 'reserved';
}
# get borrowers reserve info
- my $reserveborrowerinfo = GetMemberDetails( $res->{'borrowernumber'}, 0);
+ my $reserveborrowerinfo = GetMember( borrowernumber => $res->{'borrowernumber'} );
if (C4::Context->preference('HidePatronName')){
$reserve{'hidename'} = 1;
$reserve{'cardnumber'} = $reserveborrowerinfo->{'cardnumber'};
# retrieve biblios from shelf
foreach my $biblio (@$items) {
- my $biblionumber = $biblio->{biblionumber};
-
+ my $biblionumber = $biblio->{biblionumber};
+ my $fw = GetFrameworkCode($biblionumber);
my $dat = GetBiblioData($biblionumber);
my $record = GetMarcBiblio($biblionumber);
my $marcnotesarray = GetMarcNotes( $record, $marcflavour );
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
+ my $subtitle = GetRecordValue('subtitle', $record, $fw);
my @items = GetItemsInfo( $biblionumber );
$dat->{MARCAUTHORS} = $marcauthorsarray;
$dat->{'biblionumber'} = $biblionumber;
$dat->{ITEM_RESULTS} = \@items;
+ $dat->{subtitle} = $subtitle;
$iso2709 .= $record->as_usmarc();
push( @results, $dat );
}
+ if (C4::Context->preference('OPACBaseURL')){
+ $template2->param( OPACBaseURL => C4::Context->preference('OPACBaseURL') );
+ }
+
$template2->param(
BIBLIO_RESULTS => \@results,
email_sender => $email_from,