New Messaging System.
This system is indended to replace the old opacnotes
and borrowernotes fields in the borrowers table.
This system allows an unlimited number of Libraran and OPAC notes to be
attached to a borrower. Each note has a message, a message type,
the data it was created, and which library created it.
Each message can only be deleted by the library that created it unless the syspref
AllowAllMessageDeletion has been set.
This system may be used simultaneously with the old notes system and does not affect it in any way.
A new database table (messages) was added for this feature.
The System also allows for pre-defined notes for Borrower records
To use these, just create authorised values with the category BOR_NOTES
where the Authorized Value is the short description shown in the pulldown,
and the description is the text that should be in the note.
Original Author: PTFS Contractor <dbavousett@ptfs.com>
This work co-sponsered by Middletown Township Public Library, Middletown, NJ, USA
and East Brunswick Public Library, East Brunswick, NJ, USA
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
This commit is contained in:
parent
3e248810b2
commit
6fb8ef0d79
142
C4/Members.pm
142
C4/Members.pm
|
|
@ -75,6 +75,11 @@ BEGIN {
|
|||
&GetBorrowersWithIssuesHistoryOlderThan
|
||||
|
||||
&GetExpiryDate
|
||||
|
||||
&AddMessage
|
||||
&DeleteMessage
|
||||
&GetMessages
|
||||
&GetMessagesCount
|
||||
);
|
||||
|
||||
#Modify data
|
||||
|
|
@ -93,7 +98,7 @@ BEGIN {
|
|||
&AddMember
|
||||
&add_member_orgs
|
||||
&MoveMemberToDeleted
|
||||
&ExtendMemberSubscriptionTo
|
||||
&ExtendMemberSubscriptionTo
|
||||
);
|
||||
|
||||
#Check data
|
||||
|
|
@ -2049,6 +2054,141 @@ sub DebarMember {
|
|||
|
||||
}
|
||||
|
||||
=head2 AddMessage
|
||||
|
||||
=over 4
|
||||
|
||||
AddMessage( $borrowernumber, $message_type, $message, $branchcode );
|
||||
|
||||
Adds a message to the messages table for the given borrower.
|
||||
|
||||
Returns:
|
||||
True on success
|
||||
False on failure
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub AddMessage {
|
||||
my ( $borrowernumber, $message_type, $message, $branchcode ) = @_;
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
|
||||
if ( ! ( $borrowernumber && $message_type && $message && $branchcode ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
my $query = "INSERT INTO messages ( borrowernumber, branchcode, message_type, message ) VALUES ( ?, ?, ?, ? )";
|
||||
my $sth = $dbh->prepare($query);
|
||||
$sth->execute( $borrowernumber, $branchcode, $message_type, $message );
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
=head2 GetMessages
|
||||
|
||||
=over 4
|
||||
|
||||
GetMessages( $borrowernumber, $type );
|
||||
|
||||
$type is message type, B for borrower, or L for Librarian.
|
||||
Empty type returns all messages of any type.
|
||||
|
||||
Returns all messages for the given borrowernumber
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub GetMessages {
|
||||
my ( $borrowernumber, $type, $branchcode ) = @_;
|
||||
|
||||
if ( ! $type ) {
|
||||
$type = '%';
|
||||
}
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
|
||||
my $query = "SELECT
|
||||
branches.branchname,
|
||||
messages.*,
|
||||
DATE_FORMAT( message_date, '%m/%d/%Y' ) AS message_date_formatted,
|
||||
messages.branchcode LIKE '$branchcode' AS can_delete
|
||||
FROM messages, branches
|
||||
WHERE borrowernumber = ?
|
||||
AND message_type LIKE ?
|
||||
AND messages.branchcode = branches.branchcode
|
||||
ORDER BY message_date DESC";
|
||||
my $sth = $dbh->prepare($query);
|
||||
$sth->execute( $borrowernumber, $type ) ;
|
||||
my @results;
|
||||
|
||||
while ( my $data = $sth->fetchrow_hashref ) {
|
||||
push @results, $data;
|
||||
}
|
||||
return \@results;
|
||||
|
||||
}
|
||||
|
||||
=head2 GetMessages
|
||||
|
||||
=over 4
|
||||
|
||||
GetMessagesCount( $borrowernumber, $type );
|
||||
|
||||
$type is message type, B for borrower, or L for Librarian.
|
||||
Empty type returns all messages of any type.
|
||||
|
||||
Returns the number of messages for the given borrowernumber
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub GetMessagesCount {
|
||||
my ( $borrowernumber, $type, $branchcode ) = @_;
|
||||
|
||||
if ( ! $type ) {
|
||||
$type = '%';
|
||||
}
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
|
||||
my $query = "SELECT COUNT(*) as MsgCount FROM messages WHERE borrowernumber = ? AND message_type LIKE ?";
|
||||
my $sth = $dbh->prepare($query);
|
||||
$sth->execute( $borrowernumber, $type ) ;
|
||||
my @results;
|
||||
|
||||
my $data = $sth->fetchrow_hashref;
|
||||
my $count = $data->{'MsgCount'};
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
||||
|
||||
=head2 DeleteMessage
|
||||
|
||||
=over 4
|
||||
|
||||
DeleteMessage( $message_id );
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub DeleteMessage {
|
||||
my ( $message_id ) = @_;
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
|
||||
my $query = "DELETE FROM messages WHERE message_id = ?";
|
||||
my $sth = $dbh->prepare($query);
|
||||
$sth->execute( $message_id );
|
||||
|
||||
}
|
||||
|
||||
END { } # module clean-up code here (global destructor)
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -170,6 +170,7 @@ $tabsysprefs{InProcessingToShelvingCart} = "Circulation";
|
|||
$tabsysprefs{NewItemsDefaultLocation} = "Circulation";
|
||||
$tabsysprefs{ReturnToShelvingCart} = "Circulation";
|
||||
$tabsysprefs{DisplayClearScreenButton} = "Circulation";
|
||||
$tabsysprefs{AllowAllMessageDeletion} = "Circulation";
|
||||
|
||||
# Staff Client
|
||||
$tabsysprefs{TemplateEncoding} = "StaffClient";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,55 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# Copyright 2009 PTFS Inc.
|
||||
#
|
||||
# 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., 59 Temple Place,
|
||||
# Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use CGI;
|
||||
|
||||
use C4::Context;
|
||||
use C4::Auth;
|
||||
use C4::Output;
|
||||
use C4::Members;
|
||||
use C4::Accounts;
|
||||
use C4::Stats;
|
||||
use C4::Koha;
|
||||
use C4::Overdues;
|
||||
use C4::Branch; # GetBranches
|
||||
|
||||
my $input = new CGI;
|
||||
|
||||
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{ template_name => "circ/circulation.tmpl",
|
||||
query => $input,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => { borrowers => 1 },
|
||||
debug => 1,
|
||||
}
|
||||
);
|
||||
|
||||
my $borrowernumber = $input->param('borrowernumber');
|
||||
my $branchcode = $input->param('branchcode');
|
||||
my $message_type = $input->param('message_type');
|
||||
my $borrower_message = $input->param('borrower_message');
|
||||
|
||||
AddMessage( $borrowernumber, $message_type, $borrower_message, $branchcode );
|
||||
|
||||
print $input->redirect(
|
||||
"/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrowernumber");
|
||||
|
|
@ -655,6 +655,9 @@ if ( C4::Context->preference("memberofinstitution") ) {
|
|||
|
||||
$template->param(
|
||||
issued_itemtypes_count_loop => \@issued_itemtypes_count_loop,
|
||||
lib_messages_loop => GetMessages( $borrowernumber, 'L', $branch ),
|
||||
bor_messages_loop => GetMessages( $borrowernumber, 'B', $branch ),
|
||||
all_messages_del => C4::Context->preference('AllowAllMessageDeletion'),
|
||||
findborrower => $findborrower,
|
||||
borrower => $borrower,
|
||||
borrowernumber => $borrowernumber,
|
||||
|
|
@ -707,6 +710,17 @@ if ($stickyduedate) {
|
|||
my ($picture, $dberror) = GetPatronImage($borrower->{'cardnumber'});
|
||||
$template->param( picture => 1 ) if $picture;
|
||||
|
||||
# get authorised values with type of BOR_NOTES
|
||||
my @canned_notes;
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $sth = $dbh->prepare('SELECT * FROM authorised_values WHERE category = "BOR_NOTES"');
|
||||
$sth->execute();
|
||||
while ( my $row = $sth->fetchrow_hashref() ) {
|
||||
push @canned_notes, $row;
|
||||
}
|
||||
if ( scalar( @canned_notes ) ) {
|
||||
$template->param( canned_bor_notes_loop => \@canned_notes );
|
||||
}
|
||||
|
||||
$template->param(
|
||||
debt_confirmed => $debt_confirmed,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,53 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# Copyright 2009 PTFS Inc.
|
||||
#
|
||||
# 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., 59 Temple Place,
|
||||
# Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use CGI;
|
||||
|
||||
use C4::Context;
|
||||
use C4::Auth;
|
||||
use C4::Output;
|
||||
use C4::Members;
|
||||
use C4::Accounts;
|
||||
use C4::Stats;
|
||||
use C4::Koha;
|
||||
use C4::Overdues;
|
||||
use C4::Branch; # GetBranches
|
||||
|
||||
my $input = new CGI;
|
||||
|
||||
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{ template_name => "circ/circulation.tmpl",
|
||||
query => $input,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => { borrowers => 1 },
|
||||
debug => 1,
|
||||
}
|
||||
);
|
||||
|
||||
my $borrowernumber = $input->param('borrowernumber');
|
||||
my $message_id = $input->param('message_id');
|
||||
|
||||
DeleteMessage($message_id);
|
||||
|
||||
print $input->redirect(
|
||||
"/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrowernumber");
|
||||
|
|
@ -260,3 +260,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
|
|||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACPatronDetails','1','If OFF the patron details tab in the OPAC is disabled.','','YesNo');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACFinesTab','1','If OFF the patron fines tab in the OPAC is disabled.','','YesNo');
|
||||
INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('DisplayOPACiconsXSLT', '1', '', 'If ON, displays the format, audience, type icons in XSLT MARC21 results and display pages.', 'YesNo');
|
||||
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowAllMessageDeletion','0','Allow any Library to delete any message','','YesNo');
|
||||
|
|
|
|||
|
|
@ -259,3 +259,4 @@ INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanatio
|
|||
INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ('DisplayClearScreenButton', '0', '', 'Cette option ajoute un bouton à la page de circulation pour effacer l\'écran', 'YesNo');
|
||||
INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('HidePatronName', '0', '', 'Active l''affichage du numéro des adhérents à la place de leur nom dans les pages de réservation et du catalogue.', 'YesNo');
|
||||
INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('DisplayOPACiconsXSLT', '1', '', 'Si activé, affiche le format, le type de public et les icônes de type en XSLT (MARC21)).', 'YesNo');
|
||||
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowAllMessageDeletion','0','Allow any Library to delete any message','','YesNo');
|
||||
|
|
|
|||
|
|
@ -2367,6 +2367,20 @@ CREATE TABLE `item_circulation_alert_preferences` (
|
|||
KEY `branchcode` (`branchcode`,`categorycode`,`item_type`, `notification`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Table structure for table `messages`
|
||||
--
|
||||
|
||||
CREATE TABLE `messages` (
|
||||
`message_id` int(11) NOT NULL auto_increment,
|
||||
`borrowernumber` int(11) NOT NULL,
|
||||
`branchcode` varchar(4) default NULL,
|
||||
`message_type` varchar(1) NOT NULL,
|
||||
`message` text NOT NULL,
|
||||
`message_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`message_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
|
|
|
|||
|
|
@ -2651,6 +2651,22 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
|||
print "Upgrade to $DBversion done (added DisplayOPACiconsXSLT sysprefs)\n";
|
||||
}
|
||||
|
||||
$DBversion = '3.01.00.060';
|
||||
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
||||
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowAllMessageDeletion','0','Allow any Library to delete any message','','YesNo');");
|
||||
$dbh->do('DROP TABLE messages');
|
||||
$dbh->do("CREATE TABLE messages ( `message_id` int(11) NOT NULL auto_increment,
|
||||
`borrowernumber` int(11) NOT NULL,
|
||||
`branchcode` varchar(4) default NULL,
|
||||
`message_type` varchar(1) NOT NULL,
|
||||
`message` text NOT NULL,
|
||||
`message_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`message_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8");
|
||||
|
||||
print "Upgrade to $DBversion done ( Added AllowAllMessageDeletion syspref and messages table )\n";
|
||||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
=item DropAllForeignKeys($table)
|
||||
|
||||
|
|
|
|||
|
|
@ -128,6 +128,20 @@ function refocus(calendar) {
|
|||
};
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function showhide(id){
|
||||
if (document.getElementById){
|
||||
obj = document.getElementById(id);
|
||||
if (obj.style.display == "none"){
|
||||
obj.style.display = "";
|
||||
} else {
|
||||
obj.style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- TMPL_INCLUDE NAME="calendar.inc" -->
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -137,6 +151,7 @@ function refocus(calendar) {
|
|||
|
||||
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> ›<!-- TMPL_IF NAME="borrowernumber" --> <a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> › <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --><!-- TMPL_ELSE --> <strong>Checkouts</strong><!-- /TMPL_IF --></div>
|
||||
|
||||
|
||||
<!-- TMPL_IF NAME="CGIselectborrower" -->
|
||||
<div id="doc" class="yui-t7">
|
||||
|
||||
|
|
@ -156,6 +171,41 @@ function refocus(calendar) {
|
|||
<!-- /TMPL_IF -->
|
||||
|
||||
<!-- INITIAL BLOC : PARAMETERS & BORROWER INFO -->
|
||||
<div style="display: none;" id="add_message">
|
||||
<form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
|
||||
<fieldset id="borrower_messages">
|
||||
<legend>Leave A Message</legend>
|
||||
<p>
|
||||
<label for="message_type">Add A Message For</label>
|
||||
<select name="message_type" id="message_type">
|
||||
<option value="L">Other Librarians</option>
|
||||
<option value="B"><!-- TMPL_VAR name="firstname" --></option>
|
||||
</select>
|
||||
</p>
|
||||
<!-- TMPL_IF NAME="canned_bor_notes_loop" -->
|
||||
<p>
|
||||
<label for="canned_notes">Canned Notes: </label>
|
||||
<select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;">
|
||||
<option value=''>Select Note</option>
|
||||
<!-- TMPL_LOOP NAME="canned_bor_notes_loop" -->
|
||||
<option value="<!-- TMPL_VAR NAME="lib" -->"><!--TMPL_VAR NAME="authorised_value" --></option>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select>
|
||||
</p>
|
||||
<!-- /TMPL_IF -->
|
||||
<p>
|
||||
<textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Save Message" />
|
||||
</p>
|
||||
|
||||
<input type="hidden" name="borrowernumber" id="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
|
||||
<input type="hidden" name="branchcode" value="<!-- TMPL_VAR NAME="branch" -->" />
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- TMPL_IF NAME="dateexpiry" --><div class="dialog message">Patron's account has been renewed until <!-- TMPL_VAR NAME="dateexpiry" --></div><!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="NEEDSCONFIRMATION" -->
|
||||
<div class="yui-g">
|
||||
|
|
@ -336,7 +386,12 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
|
|||
<!-- TMPL_IF NAME="flagged" -->
|
||||
<div class="yui-u first">
|
||||
<!-- TMPL_ELSE -->
|
||||
<div><!-- /TMPL_IF --><form method="post" action="/cgi-bin/koha/circ/circulation.pl" name="mainform">
|
||||
<div>
|
||||
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
|
||||
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" name="mainform">
|
||||
<fieldset id="circ_circulation_issue">
|
||||
<!-- TMPL_IF NAME="DisplayClearScreenButton" -->
|
||||
<input type=button value="Clear Screen" onClick="window.location = '/cgi-bin/koha/circ/circulation.pl'">
|
||||
|
|
@ -474,7 +529,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
|
|||
<div id="holdswaiting" class="circmessage">
|
||||
<h4>Holds waiting:</h4>
|
||||
<!-- TMPL_LOOP NAME="WaitingReserveLoop" -->
|
||||
<ul>
|
||||
<ul>
|
||||
<li> <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html" --></a> (<!-- TMPL_VAR NAME="itemtype"-->), <!-- TMPL_IF NAME="author" -->by <!-- TMPL_VAR NAME="author"--><!-- /TMPL_IF --> Hold placed on <!-- TMPL_VAR NAME="reservedate"-->.
|
||||
<!-- TMPL_IF NAME="waitingat" -->
|
||||
<br /><!-- TMPL_IF NAME="waitinghere" --><strong class="waitinghere"><!-- TMPL_ELSE --><strong><!-- /TMPL_IF -->Waiting at <!-- TMPL_VAR NAME="waitingat" --></strong>
|
||||
|
|
@ -489,9 +544,37 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
|
|||
<h4>Notes:</h4>
|
||||
<p><span class="circ-hlt"><!-- TMPL_VAR name="notesmsg" --></span></p>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- /If notes --><!-- /TMPL_IF -->
|
||||
<!-- /If flagged --><!-- /TMPL_IF -->
|
||||
|
||||
<div id="messages" class="circmessage">
|
||||
<h4>Messages:</h4>
|
||||
<ul>
|
||||
<!--TMPL_LOOP NAME="lib_messages_loop" -->
|
||||
<li>
|
||||
<span class="circ-hlt">
|
||||
<!--TMPL_VAR NAME="message_date_formatted"-->
|
||||
<!--TMPL_VAR NAME="branchcode"-->
|
||||
<i>"<!--TMPL_VAR NAME="message"-->"</i>
|
||||
</span>
|
||||
<!-- TMPL_IF NAME="can_delete" -->
|
||||
<a href='/cgi-bin/koha/circ/del_message.pl?message_id=<!--TMPL_VAR NAME="message_id" -->&borrowernumber=<!--TMPL_VAR NAME="borrowernumber" -->'>[Delete]</a>
|
||||
<!-- TMPL_ELSE -->
|
||||
<!-- TMPL_IF NAME="all_messages_del" -->
|
||||
<a href='/cgi-bin/koha/circ/del_message.pl?message_id=<!--TMPL_VAR NAME="message_id" -->&borrowernumber=<!--TMPL_VAR NAME="borrowernumber" -->'>[Delete]</a>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_IF -->
|
||||
</li>
|
||||
<!-- /TMPL_LOOP -->
|
||||
<!--TMPL_LOOP NAME="bor_messages_loop" -->
|
||||
<li><span class=""><!--TMPL_VAR NAME="message_date_formatted"--> <!--TMPL_VAR NAME="branchcode"--> <i>"<!--TMPL_VAR NAME="message"-->"</i></span> <!-- TMPL_IF NAME="can_delete" --><a href='/cgi-bin/koha/circ/del_message.pl?message_id=<!--TMPL_VAR NAME="message_id" -->&borrowernumber=<!--TMPL_VAR NAME="borrowernumber" -->'>[Delete]</a><!-- /TMPL_IF --></li>
|
||||
<!-- /TMPL_LOOP -->
|
||||
|
||||
<a href="#" onclick="showhide('add_message'); return(false);">Add A New Message</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -620,7 +703,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
|
|||
<!-- /TMPL_IF -->
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP --> <!-- /loop todayissues -->
|
||||
<!-- /if todayissues --><!-- /TMPL_IF -->
|
||||
<!-- /if todayissues --><!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="previssues" -->
|
||||
<!-- TMPL_IF NAME="todayissues" --><tr><th colspan="10"><a name="previous" id="previous"></a>Previous checkouts</th></tr><!-- TMPL_ELSE -->
|
||||
<tr><th class="{sorter: false}" colspan="10"><a name="previous" id="previous"></a>Previous checkouts</th></tr></thead>
|
||||
|
|
|
|||
|
|
@ -75,11 +75,23 @@ $.tablesorter.addParser({
|
|||
<div id="yui-main">
|
||||
<div class="yui-b"><div class="yui-g">
|
||||
<div id="userdetails" class="container">
|
||||
|
||||
<!-- TMPL_IF NAME="bor_messages" -->
|
||||
<div class="dialog message">
|
||||
<h3>Messages For You</h3>
|
||||
<ul>
|
||||
<!--TMPL_LOOP NAME="bor_messages_loop" -->
|
||||
<li>On <!--TMPL_VAR NAME="message_date_formatted"--> <!--TMPL_VAR NAME="branchname"--> wrote <i>"<!--TMPL_VAR NAME="message"-->"</i></li>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_LOOP NAME="BORROWER_INFO" -->
|
||||
<h2>Hello, <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> <span class="hint">(<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here</a> if you're not <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->)</span></h2>
|
||||
|
||||
<!-- TMPL_IF NAME="patronupdate" --><div class="dialog message"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div><!-- /TMPL_IF -->
|
||||
|
||||
|
||||
<!-- TMPL_IF NAME="opacnote"-->
|
||||
<div class="dialog message">
|
||||
<h3>Message from the library</h3>
|
||||
|
|
|
|||
|
|
@ -266,7 +266,12 @@ if (C4::Context->preference("OPACAmazonCoverImages") or
|
|||
$template->param(JacketImages=>1);
|
||||
}
|
||||
|
||||
if ( GetMessagesCount( $borrowernumber, 'B' ) ) {
|
||||
$template->param( bor_messages => 1 );
|
||||
}
|
||||
|
||||
$template->param(
|
||||
bor_messages_loop => GetMessages( $borrowernumber, 'B', 'NONE' ),
|
||||
waiting_count => $wcount,
|
||||
textmessaging => $borr->{textmessaging},
|
||||
patronupdate => $patronupdate,
|
||||
|
|
|
|||
Loading…
Reference in New Issue