View | Details | Raw Unified | Return to bug 5436
Collapse All | Expand All

(-)a/C4/Members.pm (-1 / +45 lines)
Lines 26-37 use C4::Dates qw(format_date_in_iso); Link Here
26
use Digest::MD5 qw(md5_base64);
26
use Digest::MD5 qw(md5_base64);
27
use Date::Calc qw/Today Add_Delta_YM/;
27
use Date::Calc qw/Today Add_Delta_YM/;
28
use C4::Log; # logaction
28
use C4::Log; # logaction
29
use C4::Branch;
29
use C4::Overdues;
30
use C4::Overdues;
30
use C4::Reserves;
31
use C4::Reserves;
31
use C4::Accounts;
32
use C4::Accounts;
32
use C4::Biblio;
33
use C4::Biblio;
33
use C4::SQLHelper qw(InsertInTable UpdateInTable SearchInTable);
34
use C4::SQLHelper qw(InsertInTable UpdateInTable SearchInTable);
34
use C4::Members::Attributes qw(SearchIdMatchingAttribute);
35
use C4::Members::Attributes qw(SearchIdMatchingAttribute GetBorrowerAttributes);
35
36
36
our ($VERSION,@ISA,@EXPORT,@EXPORT_OK,$debug);
37
our ($VERSION,@ISA,@EXPORT,@EXPORT_OK,$debug);
37
38
Lines 91-96 BEGIN { Link Here
91
		&DeleteMessage
92
		&DeleteMessage
92
		&GetMessages
93
		&GetMessages
93
		&GetMessagesCount
94
		&GetMessagesCount
95
96
        &SetMemberInfosInTemplate
94
	);
97
	);
95
98
96
	#Modify data
99
	#Modify data
Lines 1725-1730 sub DelMember { Link Here
1725
    return $sth->rows;
1728
    return $sth->rows;
1726
}
1729
}
1727
1730
1731
=head2 SetMemberInfosInTemplate
1732
    &SetMemberInfosInTemplate($borrowernumber, $template)
1733
    
1734
    
1735
Settings borrower informations for template user
1736
1737
=cut
1738
1739
sub SetMemberInfosInTemplate {
1740
    my ($borrowernumber, $template) = @_;
1741
    
1742
    my $borrower = GetMemberDetails( $borrowernumber, 0 );
1743
    foreach my $key (keys %$borrower){
1744
        $template->param($key => $borrower->{$key});
1745
    }
1746
    
1747
    # Computes full borrower address
1748
    my (undef, $roadttype_hashref) = &GetRoadTypes();
1749
    my $address = $borrower->{'streetnumber'}.' '.$roadttype_hashref->{$borrower->{'streettype'}}.' '.$borrower->{'address'};
1750
    $template->param(is_child  => ($borrower->{'category_type'} eq 'C'),
1751
                    address    => $address,
1752
                    branchname => GetBranchName($borrower->{'branchcode'}),
1753
                    );
1754
                    
1755
    foreach (qw(dateenrolled dateexpiry dateofbirth)) {
1756
		my $userdate = $borrower->{$_};
1757
		unless ($userdate) {
1758
			$borrower->{$_} = '';
1759
			next;
1760
		}
1761
		$userdate = C4::Dates->new($userdate,'iso')->output('syspref');
1762
		$borrower->{$_} = $userdate || '';
1763
		$template->param( $_ => $userdate );
1764
    }
1765
    
1766
    my $attributes = GetBorrowerAttributes($borrowernumber);
1767
    $template->param(
1768
        extendedattributes => $attributes,
1769
    );
1770
}
1771
1728
=head2 ExtendMemberSubscriptionTo (OUEST-PROVENCE)
1772
=head2 ExtendMemberSubscriptionTo (OUEST-PROVENCE)
1729
1773
1730
    $date = ExtendMemberSubscriptionTo($borrowerid, $date);
1774
    $date = ExtendMemberSubscriptionTo($borrowerid, $date);
(-)a/C4/Members/AttributeTypes.pm (-4 / +27 lines)
Lines 118-123 sub new { Link Here
118
    $self->{'opac_display'} = 0;
118
    $self->{'opac_display'} = 0;
119
    $self->{'password_allowed'} = 0;
119
    $self->{'password_allowed'} = 0;
120
    $self->{'staff_searchable'} = 0;
120
    $self->{'staff_searchable'} = 0;
121
    $self->{'display_checkout'} = 0;
121
    $self->{'authorised_value_category'} = '';
122
    $self->{'authorised_value_category'} = '';
122
123
123
    bless $self, $class;
124
    bless $self, $class;
Lines 152-157 sub fetch { Link Here
152
    $self->{'opac_display'}              = $row->{'opac_display'};
153
    $self->{'opac_display'}              = $row->{'opac_display'};
153
    $self->{'password_allowed'}          = $row->{'password_allowed'};
154
    $self->{'password_allowed'}          = $row->{'password_allowed'};
154
    $self->{'staff_searchable'}          = $row->{'staff_searchable'};
155
    $self->{'staff_searchable'}          = $row->{'staff_searchable'};
156
    $self->{'display_checkout'}          = $row->{'display_checkout'};
155
    $self->{'authorised_value_category'} = $row->{'authorised_value_category'};
157
    $self->{'authorised_value_category'} = $row->{'authorised_value_category'};
156
158
157
    bless $self, $class;
159
    bless $self, $class;
Lines 182-195 sub store { Link Here
182
                                         opac_display = ?,
184
                                         opac_display = ?,
183
                                         password_allowed = ?,
185
                                         password_allowed = ?,
184
                                         staff_searchable = ?,
186
                                         staff_searchable = ?,
185
                                         authorised_value_category = ?
187
                                         authorised_value_category = ?,
188
                                         display_checkout = ?
186
                                     WHERE code = ?");
189
                                     WHERE code = ?");
187
    } else {
190
    } else {
188
        $sth = $dbh->prepare_cached("INSERT INTO borrower_attribute_types 
191
        $sth = $dbh->prepare_cached("INSERT INTO borrower_attribute_types 
189
                                        (description, repeatable, unique_id, opac_display, password_allowed,
192
                                        (description, repeatable, unique_id, opac_display, password_allowed,
190
                                         staff_searchable, authorised_value_category, code)
193
                                         staff_searchable, authorised_value_category, display_checkout, code)
191
                                        VALUES (?, ?, ?, ?, ?,
194
                                        VALUES (?, ?, ?, ?, ?,
192
                                                ?, ?, ?)");
195
                                                ?, ?, ?, ?)");
193
    }
196
    }
194
    $sth->bind_param(1, $self->{'description'});
197
    $sth->bind_param(1, $self->{'description'});
195
    $sth->bind_param(2, $self->{'repeatable'});
198
    $sth->bind_param(2, $self->{'repeatable'});
Lines 198-204 sub store { Link Here
198
    $sth->bind_param(5, $self->{'password_allowed'});
201
    $sth->bind_param(5, $self->{'password_allowed'});
199
    $sth->bind_param(6, $self->{'staff_searchable'});
202
    $sth->bind_param(6, $self->{'staff_searchable'});
200
    $sth->bind_param(7, $self->{'authorised_value_category'});
203
    $sth->bind_param(7, $self->{'authorised_value_category'});
201
    $sth->bind_param(8, $self->{'code'});
204
    $sth->bind_param(8, $self->{'display_checkout'});
205
    $sth->bind_param(9, $self->{'code'});
202
    $sth->execute;
206
    $sth->execute;
203
207
204
}
208
}
Lines 304-309 sub staff_searchable { Link Here
304
    @_ ? $self->{'staff_searchable'} = ((shift) ? 1 : 0) : $self->{'staff_searchable'};
308
    @_ ? $self->{'staff_searchable'} = ((shift) ? 1 : 0) : $self->{'staff_searchable'};
305
}
309
}
306
310
311
=head2 display_checkout
312
313
=over 4
314
315
my $display_checkout = $attr_type->display_checkout();
316
$attr_type->display_checkout($display_checkout);
317
318
=back
319
320
Accessor.  The C<$display_checkout> argument
321
is interpreted as a Perl boolean.
322
323
=cut
324
325
sub display_checkout {
326
    my $self = shift;
327
    @_ ? $self->{'display_checkout'} = ((shift) ? 1 : 0) : $self->{'display_checkout'};
328
}
329
307
=head2 authorised_value_category
330
=head2 authorised_value_category
308
331
309
  my $authorised_value_category = $attr_type->authorised_value_category();
332
  my $authorised_value_category = $attr_type->authorised_value_category();
(-)a/C4/Members/Attributes.pm (-1 / +2 lines)
Lines 72-78 sub GetBorrowerAttributes { Link Here
72
    my $opac_only = @_ ? shift : 0;
72
    my $opac_only = @_ ? shift : 0;
73
73
74
    my $dbh = C4::Context->dbh();
74
    my $dbh = C4::Context->dbh();
75
    my $query = "SELECT code, description, attribute, lib, password
75
    my $query = "SELECT code, description, attribute, lib, password, display_checkout
76
                 FROM borrower_attributes
76
                 FROM borrower_attributes
77
                 JOIN borrower_attribute_types USING (code)
77
                 JOIN borrower_attribute_types USING (code)
78
                 LEFT JOIN authorised_values ON (category = authorised_value_category AND attribute = authorised_value)
78
                 LEFT JOIN authorised_values ON (category = authorised_value_category AND attribute = authorised_value)
Lines 89-94 sub GetBorrowerAttributes { Link Here
89
            value             => $row->{'attribute'},  
89
            value             => $row->{'attribute'},  
90
            value_description => $row->{'lib'},  
90
            value_description => $row->{'lib'},  
91
            password          => $row->{'password'},
91
            password          => $row->{'password'},
92
            display_checkout  => $row->{'display_checkout'},
92
        }
93
        }
93
    }
94
    }
94
    return \@results;
95
    return \@results;
(-)a/admin/patron-attr-types.pl (-1 / +8 lines)
Lines 106-111 sub error_add_attribute_type_form { Link Here
106
    if ($input->param('staff_searchable')) {
106
    if ($input->param('staff_searchable')) {
107
        $template->param(staff_searchable_checked => 'checked="checked"');
107
        $template->param(staff_searchable_checked => 'checked="checked"');
108
    }
108
    }
109
    if ($input->param('display_checkout')) {
110
        $template->param(display_checkout_checked => 'checked="checked"');
111
    }
109
112
110
    $template->param(
113
    $template->param(
111
        attribute_type_form => 1,
114
        attribute_type_form => 1,
Lines 147-152 sub add_update_attribute_type { Link Here
147
    $attr_type->authorised_value_category($authorised_value_category);
150
    $attr_type->authorised_value_category($authorised_value_category);
148
    my $password_allowed = $input->param('password_allowed');
151
    my $password_allowed = $input->param('password_allowed');
149
    $attr_type->password_allowed($password_allowed);
152
    $attr_type->password_allowed($password_allowed);
153
    my $display_checkout = $input->param('display_checkout');
154
    $attr_type->display_checkout($display_checkout);
150
155
151
    if ($op eq 'edit') {
156
    if ($op eq 'edit') {
152
        $template->param(edited_attribute_type => $attr_type->code());
157
        $template->param(edited_attribute_type => $attr_type->code());
Lines 222-228 sub edit_attribute_type_form { Link Here
222
    if ($attr_type->staff_searchable()) {
227
    if ($attr_type->staff_searchable()) {
223
        $template->param(staff_searchable_checked => 'checked="checked"');
228
        $template->param(staff_searchable_checked => 'checked="checked"');
224
    }
229
    }
225
230
    if ($attr_type->display_checkout()) {
231
        $template->param(display_checkout_checked => 'checked="checked"');
232
    }
226
    authorised_value_category_list($template, $attr_type->authorised_value_category());
233
    authorised_value_category_list($template, $attr_type->authorised_value_category());
227
234
228
    $template->param(
235
    $template->param(
(-)a/circ/circulation.pl (-10 / +5 lines)
Lines 220-227 if ($borrowernumber) { Link Here
220
220
221
    # Warningdate is the date that the warning starts appearing
221
    # Warningdate is the date that the warning starts appearing
222
    my (  $today_year,   $today_month,   $today_day) = Today();
222
    my (  $today_year,   $today_month,   $today_day) = Today();
223
    my ($warning_year, $warning_month, $warning_day) = split /-/, $borrower->{'dateexpiry'};
223
    my ($warning_year, $warning_month, $warning_day) = split (/-/, $borrower->{'dateexpiry'});
224
    my (  $enrol_year,   $enrol_month,   $enrol_day) = split /-/, $borrower->{'dateenrolled'};
224
    my (  $enrol_year,   $enrol_month,   $enrol_day) = split (/-/, $borrower->{'dateenrolled'});
225
    # Renew day is calculated by adding the enrolment period to today
225
    # Renew day is calculated by adding the enrolment period to today
226
    my (  $renew_year,   $renew_month,   $renew_day);
226
    my (  $renew_year,   $renew_month,   $renew_day);
227
    if ($enrol_year*$enrol_month*$enrol_day>0) {
227
    if ($enrol_year*$enrol_month*$enrol_day>0) {
Lines 622-631 if($lib_messages_loop){ $template->param(flagged => 1 ); } Link Here
622
my $bor_messages_loop = GetMessages( $borrowernumber, 'B', $branch );
622
my $bor_messages_loop = GetMessages( $borrowernumber, 'B', $branch );
623
if($bor_messages_loop){ $template->param(flagged => 1 ); }
623
if($bor_messages_loop){ $template->param(flagged => 1 ); }
624
624
625
# Computes full borrower address
626
my (undef, $roadttype_hashref) = &GetRoadTypes();
627
my $address = $borrower->{'streetnumber'}.' '.$roadttype_hashref->{$borrower->{'streettype'}}.' '.$borrower->{'address'};
628
629
my $fast_cataloging = 0;
625
my $fast_cataloging = 0;
630
    if (defined getframeworkinfo('FA')) {
626
    if (defined getframeworkinfo('FA')) {
631
    $fast_cataloging = 1 
627
    $fast_cataloging = 1 
Lines 644-654 $template->param( Link Here
644
    printername       => $printer,
640
    printername       => $printer,
645
    firstname         => $borrower->{'firstname'},
641
    firstname         => $borrower->{'firstname'},
646
    surname           => $borrower->{'surname'},
642
    surname           => $borrower->{'surname'},
647
    dateexpiry        => format_date($newexpiry),
643
    newexpiry        => format_date($newexpiry),
648
    expiry            => format_date($borrower->{'dateexpiry'}),
644
    expiry            => format_date($borrower->{'dateexpiry'}),
649
    categorycode      => $borrower->{'categorycode'},
650
    categoryname      => $borrower->{description},
645
    categoryname      => $borrower->{description},
651
    address           => $address,
652
    address2          => $borrower->{'address2'},
646
    address2          => $borrower->{'address2'},
653
    email             => $borrower->{'email'},
647
    email             => $borrower->{'email'},
654
    emailpro          => $borrower->{'emailpro'},
648
    emailpro          => $borrower->{'emailpro'},
Lines 658-664 $template->param( Link Here
658
    zipcode           => $borrower->{'zipcode'},
652
    zipcode           => $borrower->{'zipcode'},
659
    country           => $borrower->{'country'},
653
    country           => $borrower->{'country'},
660
    phone             => $borrower->{'phone'} || $borrower->{'mobile'},
654
    phone             => $borrower->{'phone'} || $borrower->{'mobile'},
661
    cardnumber        => $borrower->{'cardnumber'},
662
    amountold         => $amountold,
655
    amountold         => $amountold,
663
    barcode           => $barcode,
656
    barcode           => $barcode,
664
    stickyduedate     => $stickyduedate,
657
    stickyduedate     => $stickyduedate,
Lines 681-686 $template->param( Link Here
681
    fast_cataloging   => $fast_cataloging,
674
    fast_cataloging   => $fast_cataloging,
682
);
675
);
683
676
677
SetMemberInfosInTemplate($borrowernumber, $template);
678
684
# save stickyduedate to session
679
# save stickyduedate to session
685
if ($stickyduedate) {
680
if ($stickyduedate) {
686
    $session->param( 'stickyduedate', $duedatespec );
681
    $session->param( 'stickyduedate', $duedatespec );
(-)a/installer/data/mysql/atomicupdate/0009-patron-attr-display-checkout.pl (+7 lines)
Line 0 Link Here
1
#! /usr/bin/perl
2
use strict;
3
use warnings;
4
use C4::Context;
5
my $dbh=C4::Context->dbh;
6
$dbh->do("ALTER TABLE borrower_attribute_types ADD COLUMN `display_checkout` TINYINT(1) NOT NULL DEFAULT '0';");
7
print "Upgrade done (Added a display_checkout field in borrower_attribute_types table)\n";
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 284-289 CREATE TABLE `borrower_attribute_types` ( Link Here
284
  `password_allowed` tinyint(1) NOT NULL default 0,
284
  `password_allowed` tinyint(1) NOT NULL default 0,
285
  `staff_searchable` tinyint(1) NOT NULL default 0,
285
  `staff_searchable` tinyint(1) NOT NULL default 0,
286
  `authorised_value_category` varchar(10) default NULL,
286
  `authorised_value_category` varchar(10) default NULL,
287
  `display_checkout` tinyint(1) NOT NULL default 0,
287
  PRIMARY KEY  (`code`),
288
  PRIMARY KEY  (`code`),
288
  KEY `auth_val_cat_idx` (`authorised_value_category`)
289
  KEY `auth_val_cat_idx` (`authorised_value_category`)
289
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
290
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (-1 / +34 lines)
Lines 1953-1958 ul.budget_hierarchy li:last-child:after { Link Here
1953
ul.budget_hierarchy li:first-child:after {
1953
ul.budget_hierarchy li:first-child:after {
1954
    content: "";
1954
    content: "";
1955
}
1955
}
1956
#cartmenulink img {
1957
	background-image : none;
1958
	display : inline;
1959
	padding : 3px 6px 0 0;
1960
}
1961
1962
* html #cartmenulink {
1963
	border : 1px solid #336600;
1964
}
1965
1966
* html #listsmenulink {
1967
	border : 1px solid #006699;
1968
}
1969
1970
#collapsedaddress {
1971
    border: solid 1px #eee;
1972
    margin-right: 10px;
1973
    overflow: hidden;
1974
}
1975
#toggleaddress {
1976
    display: block;
1977
    padding: 2px 2px 2px 12px;
1978
    margin-right: 10px;
1979
    cursor: pointer;
1980
}
1981
.toggleaddress {
1982
    background: #eee url(../../img/more-right-arrow.gif) 0 50% no-repeat;
1983
}
1984
.toggleaddress2 {
1985
    background: #eee url(../../img/more-up-arrow.gif) 0 50% no-repeat;
1986
}
1987
1956
.holdcount { font-size : 105%; line-height : 200%; }
1988
.holdcount { font-size : 105%; line-height : 200%; }
1957
.holdcount a { border : 1px solid #a4bedd; background-color : #e4ecf5; font-weight : bold; -moz-border-radius: 4px; padding : .1em .4em; text-decoration : none; }
1989
.holdcount a { border : 1px solid #a4bedd; background-color : #e4ecf5; font-weight : bold; -moz-border-radius: 4px; padding : .1em .4em; text-decoration : none; }
1958
.holdcount a:hover { background-color : #ebeff7; }
1990
.holdcount a:hover { background-color : #ebeff7; }
Lines 2048-2051 fieldset.rows+h3 {clear:both;padding-top:.5em;} Link Here
2048
	border : 1px solid #EEE;
2080
	border : 1px solid #EEE;
2049
	padding : 0.3em 0.4em;
2081
	padding : 0.3em 0.4em;
2050
}
2082
}
2051
</style>
2083
</style>
2084
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc (-38 / +70 lines)
Lines 4-9 Link Here
4
<style type="tex/css">img { width: expression(this.width > 140 ? 140: true);
4
<style type="tex/css">img { width: expression(this.width > 140 ? 140: true);
5
}</style>
5
}</style>
6
<![endif]-->
6
<![endif]-->
7
<script type="text/javascript">
8
$(document).ready(function()
9
{
10
  //hide the all of the element with class msg_body
11
  $("#collapsedaddress").hide();
12
  //toggle the componenet with class msg_body
13
  $("#toggleaddress").click(function()
14
  {
15
    $("#collapsedaddress").slideToggle("normal");
16
    $("#toggleaddress").toggleClass("toggleaddress2");
17
  });
18
});
19
</script>
7
<ul>
20
<ul>
8
[% IF ( patronimages ) %]
21
[% IF ( patronimages ) %]
9
[% IF ( picture ) %]
22
[% IF ( picture ) %]
Lines 12-56 Link Here
12
<li><img src="/intranet-tmpl/prog/img/patron-blank.png" alt="[% firstname %] [% surname %] ([% cardnumber %])" border="0" style="margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC;" /></li>
25
<li><img src="/intranet-tmpl/prog/img/patron-blank.png" alt="[% firstname %] [% surname %] ([% cardnumber %])" border="0" style="margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC;" /></li>
13
[% END %]
26
[% END %]
14
[% END %]
27
[% END %]
15
    <li>[% IF ( address ) %]
28
    <li>[% categoryname %] ([% categorycode %])</li>
16
            [% address %]
29
    <li>[% IF ( branchname ) %][% branchname %][% ELSE %][% branch %][% END %]</li>
17
    [% ELSE %]
30
    [% FOREACH extendedattribute IN extendedattributes %]
18
            <span class="empty">No address stored.</span>
31
    	[% IF ( extendedattribute.display_checkout ) %]
19
    [% END %]</li>
32
    		[% IF ( extendedattribute.value ) %]
20
    [% IF ( address2 ) %]
33
    			[% extendedattribute.description %] : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]
21
        <li>[% address2 %]</li>
34
    		[% END %]
22
    [% END %]<li> 
35
    	[% END %]
23
    [% IF ( city ) %]
24
            [% city %][% IF ( state ) %], [% state %][% END %]
25
	    [% zipcode %][% IF ( country ) %], [% country %][% END %]
26
    [% ELSE %]
27
        <span class="empty">No city stored.</span>
28
    [% END %]</li>
29
    <li>[% IF ( phone ) %]
30
        [% phone %]
31
    [% ELSE %]
32
        [% IF ( mobile ) %]
33
            [% mobile %]
34
        [% ELSE %]
35
            [% IF ( phonepro ) %]
36
                [% phonepro %]
37
            [% ELSE %]
38
                <span class="empty">No phone stored.</span>    
39
            [% END %]
40
        [% END %]
41
    [% END %]</li>
42
    [% IF ( email ) %]
43
        <li class="email"> <a href="mailto:[% email %]" title="[% email %]">[% email %]</a></li>
44
    [% ELSE %]
45
        [% IF ( emailpro ) %]
46
            <li class="email"> <a href="mailto:[% emailpro %]" title="[% emailpro %]">[% emailpro %]</a></li>
47
        [% ELSE %]
48
            <li> <span class="empty">No email stored.</span>    </li>
49
        [% END %]
50
    [% END %]
36
    [% END %]
51
    <li>Category: [% categoryname %] ([% categorycode %])</li>
37
    <li>
52
    <li>Home Library: [% IF ( branchname ) %][% branchname %][% ELSE %][% branch %][% END %]</li>
38
		<div id="collapsedaddress">
53
</ul></div>
39
			<p>
40
		    [% IF ( address ) %]
41
		            [% address %]
42
		    [% ELSE %]
43
		            <span class="empty">No address stored.</span>
44
		    [% END %]
45
		    [% IF ( address2 ) %]
46
		        [% address2 %]
47
		    [% END %]
48
		    [% IF ( city ) %]
49
		            [% city %]
50
			    [% zipcode %]
51
			    [% IF ( country ) %], [% country %][% END %]
52
		    [% ELSE %]
53
		        <span class="empty">No city stored.</span>
54
		    [% END %]
55
		    </p>
56
		    <p>
57
		    [% IF ( phone ) %]
58
		        [% phone %]
59
		    [% ELSE %]
60
		        [% IF ( mobile ) %]
61
		            [% mobile %]
62
		        [% ELSE %]
63
		            [% IF ( phonepro ) %]
64
		                [% phonepro %]
65
		            [% ELSE %]
66
		                <span class="empty">No phone stored.</span>    
67
		            [% END %]
68
		        [% END %]
69
		    [% END %]
70
		    </p><p>
71
		    [% IF ( email ) %]
72
		        <a href="mailto:[% email %]" title="[% email %]">[% email %]</a>
73
		    [% ELSE %]
74
		        [% IF ( emailpro ) %]
75
		            <a href="mailto:[% emailpro %]" title="[% emailpro %]">[% emailpro %]</a>
76
		        [% ELSE %]
77
		            <span class="empty">No email stored.</span>
78
		        [% END %]
79
		    [% END %]
80
		    </p>
81
		</div>
82
		<a id="toggleaddress" class="toggleaddress">View/Hide address</a>
83
    </li>
84
</ul>
85
</div>
54
<div id="menu">
86
<div id="menu">
55
<ul>
87
<ul>
56
	[% IF ( circview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]">Check Out</a></li>
88
	[% IF ( circview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]">Check Out</a></li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt (+5 lines)
Lines 122-127 function CheckAttributeTypeForm(f) { Link Here
122
            <input type="checkbox" id="staff_searchable" name="staff_searchable" [% staff_searchable_checked %] />
122
            <input type="checkbox" id="staff_searchable" name="staff_searchable" [% staff_searchable_checked %] />
123
            <span>Check to make this attribute staff_searchable in the staff patron search.</span>
123
            <span>Check to make this attribute staff_searchable in the staff patron search.</span>
124
       </li>
124
       </li>
125
       <li><label for="display_checkout">Display in check-out: </label>
126
            <input type="checkbox" id="display_checkout" name="display_checkout" [% display_checkout_checked %] />
127
            <span>Check to show this attribute in member check-out.</span>
128
       </li>
129
       
125
        <li><label for="authorised_value_category">Authorized value category: </label>
130
        <li><label for="authorised_value_category">Authorized value category: </label>
126
            <select name="authorised_value_category" id="authorised_value_category">
131
            <select name="authorised_value_category" id="authorised_value_category">
127
                <option value=""></option>
132
                <option value=""></option>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 / +1 lines)
Lines 226-232 function refocus(calendar) { Link Here
226
</form>
226
</form>
227
</div>
227
</div>
228
228
229
[% IF ( dateexpiry ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry %]</div>[% END %]
229
[% IF ( newexpiry ) %]<div class="dialog message">Patron's account has been renewed until [% newexpiry %]</div>[% END %]
230
[% IF ( NEEDSCONFIRMATION ) %]
230
[% IF ( NEEDSCONFIRMATION ) %]
231
<div class="yui-g">
231
<div class="yui-g">
232
232
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-4 / +3 lines)
Lines 80-86 function Dopop(link) { Link Here
80
</div>
80
</div>
81
[% END %]
81
[% END %]
82
<!-- case of a mistake in transfer loop -->
82
<!-- case of a mistake in transfer loop -->
83
[% IF ( WrongTransfer ) %]<div class="dialog message"><!-- WrongTransfer --><h3>Please return <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% title |html %]</a> to [% TransferWaitingAt %] or <a href="/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&amp;canceltransfer=1">Cancel Transfer</a></h3>
83
[% IF ( WrongTransfer ) %]<div class="dialog message"><!-- WrongTransfer --><h3>Please return <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% title |html %]</a> to [% TransferWaitingAt %]</h3>
84
[% IF ( wborcnum ) %]<h5>Hold for:</h5>
84
[% IF ( wborcnum ) %]<h5>Hold for:</h5>
85
        <ul><li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
85
        <ul><li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
86
            [% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
86
            [% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
Lines 396-402 function Dopop(link) { Link Here
396
[% IF ( riloop ) %]
396
[% IF ( riloop ) %]
397
    <h2>Checked-In items</h2>
397
    <h2>Checked-In items</h2>
398
    <table>
398
    <table>
399
	<tr><th>Due Date</th><th>Title</th>	<th>Author</th>	<th>Barcode</th><th>Shelving Location</th><th>Call Number</th><th>Type</th>	<th>Patron</th><th>Note</th></tr>
399
	<tr><th>Due Date</th><th>Title</th>	<th>Author</th>	<th>Barcode</th><th>Call Number</th><th>Type</th>	<th>Patron</th><th>Note</th></tr>
400
400
401
        [% FOREACH riloo IN riloop %]
401
        [% FOREACH riloo IN riloop %]
402
            <tr>
402
            <tr>
Lines 412-422 function Dopop(link) { Link Here
412
                    [% riloo.itemtitle |html %]</a></td>
412
                    [% riloo.itemtitle |html %]</a></td>
413
			<td>[% riloo.itemauthor %]</td>
413
			<td>[% riloo.itemauthor %]</td>
414
            <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% riloo.itembiblionumber %]&amp;itemnumber=[% riloo.itemnumber %]#item[% riloo.itemnumber %]">[% riloo.barcode %]</a></td>
414
            <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% riloo.itembiblionumber %]&amp;itemnumber=[% riloo.itemnumber %]#item[% riloo.itemnumber %]">[% riloo.barcode %]</a></td>
415
            <td>[% riloo.location %]</td>
416
            <td>[% riloo.itemcallnumber %]</td>
415
            <td>[% riloo.itemcallnumber %]</td>
417
            <td>[% riloo.itemtype %] [% riloo.ccode %]</td>
416
            <td>[% riloo.itemtype %] [% riloo.ccode %]</td>
418
			<td>[% IF ( riloo.duedate ) %]
417
			<td>[% IF ( riloo.duedate ) %]
419
                <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% riloo.borrowernumber %]">
418
                <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% riloo.borrowernumber %]">
420
                    [% riloo.borsurname %], [% riloo.borfirstname %] ([% riloo.borcategorycode %])
419
                    [% riloo.borsurname %], [% riloo.borfirstname %] ([% riloo.borcategorycode %])
421
                </a>
420
                </a>
422
            [% ELSE %]Not checked out[% END %]</td>
421
            [% ELSE %]Not checked out[% END %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-22 / +26 lines)
Lines 179-185 function validate1(date) { Link Here
179
179
180
     [% UNLESS ( I ) %][% IF ( othernames ) %]&ldquo;[% othernames %]&rdquo;[% END %]
180
     [% UNLESS ( I ) %][% IF ( othernames ) %]&ldquo;[% othernames %]&rdquo;[% END %]
181
181
182
<p class="address">[% streetnumber %]
182
<p class="address">
183
        [% IF ( roaddetails ) %]
183
        [% IF ( roaddetails ) %]
184
         [% roaddetails %],
184
         [% roaddetails %],
185
        [% END %]
185
        [% END %]
Lines 212-220 function validate1(date) { Link Here
212
    [% END %]
212
    [% END %]
213
    <li><span class="label">Initials: </span>[% initials %]</li>
213
    <li><span class="label">Initials: </span>[% initials %]</li>
214
    <li><span class="label">Date of birth:</span>[% dateofbirth %]</li>
214
    <li><span class="label">Date of birth:</span>[% dateofbirth %]</li>
215
    <li><span class="label">Gender:</span>
215
    <li><span class="label">Sex:</span>[% sex %]</li>[% END %]
216
    [% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %]
217
    </li>[% END %]
218
    [% IF ( printethnicityline ) %]
216
    [% IF ( printethnicityline ) %]
219
    <li><span class="label">Ethnicity:</span>[% ethnicity %]</li>
217
    <li><span class="label">Ethnicity:</span>[% ethnicity %]</li>
220
    <li><span class="label">Ethnicity notes: </span>[% ethnotes %]</li>
218
    <li><span class="label">Ethnicity notes: </span>[% ethnotes %]</li>
Lines 341-348 function validate1(date) { Link Here
341
    </li>[% END %]
339
    </li>[% END %]
342
    [% IF ( sort1 ) %]<li><span class="label">Sort field 1:</span>[% lib1 %]</li>[% END %]
340
    [% IF ( sort1 ) %]<li><span class="label">Sort field 1:</span>[% lib1 %]</li>[% END %]
343
    [% IF ( sort2 ) %]<li><span class="label">Sort field 2:</span>[% lib2 %]</li>[% END %]
341
    [% IF ( sort2 ) %]<li><span class="label">Sort field 2:</span>[% lib2 %]</li>[% END %]
344
    <li><span class="label">Username: </span>[% userid %]</li>
342
    <li><span class="label">OPAC login: </span>[% userid %]</li>
345
    <li><span class="label">Password: </span>
343
    <li><span class="label">OPAC password: </span>
346
    [% IF ( password ) %]
344
    [% IF ( password ) %]
347
        *******
345
        *******
348
    [% ELSE %]
346
    [% ELSE %]
Lines 399-405 function validate1(date) { Link Here
399
	<ul>
397
	<ul>
400
		<li><a href="/cgi-bin/koha/members/moremember.pl#checkedout">[% issuecount %] Checkout(s)</a></li>
398
		<li><a href="/cgi-bin/koha/members/moremember.pl#checkedout">[% issuecount %] Checkout(s)</a></li>
401
    [% IF ( relissuecount ) %]
399
    [% IF ( relissuecount ) %]
402
        <li><a href="/cgi-bin/koha/members/moremember.pl#relissues">Relatives' Checkouts</a></li>
400
        <li><a href="/cgi-bin/koha/members/moremember.pl#relissues">Relatives issues</a></li>
403
    [% END %]
401
    [% END %]
404
		<li><a href="/cgi-bin/koha/members/moremember.pl#finesandcharges">Fines &amp; Charges</a></li>
402
		<li><a href="/cgi-bin/koha/members/moremember.pl#finesandcharges">Fines &amp; Charges</a></li>
405
		<li>[% IF ( countreserv ) %]
403
		<li>[% IF ( countreserv ) %]
Lines 495-507 function validate1(date) { Link Here
495
      [% IF ( issueloo.return_failed ) %]
493
      [% IF ( issueloo.return_failed ) %]
496
            <td class="problem">Checkin Failed</td>
494
            <td class="problem">Checkin Failed</td>
497
      [% ELSE %]
495
      [% ELSE %]
498
        [% IF ( issueloo.norenew_reason_on_reserve ) %]
499
            <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% issueloo.biblionumber %]">On Hold</a></td>
500
        [% ELSE %]
501
            <td><input type="checkbox" name="barcodes[]"  value="[% issueloo.barcode %]" onclick="uncheck_sibling(this);" />
496
            <td><input type="checkbox" name="barcodes[]"  value="[% issueloo.barcode %]" onclick="uncheck_sibling(this);" />
502
                <input type="checkbox" name="all_barcodes[]" value="[% issueloo.barcode %]" checked="checked" style="display: none;" />
497
                <input type="checkbox" name="all_barcodes[]" value="[% issueloo.barcode %]" checked="checked" style="display: none;" />
503
            </td>
498
            </td>
504
        [% END %]
505
      [% END %]
499
      [% END %]
506
        </tr>
500
        </tr>
507
  [% END %]
501
  [% END %]
Lines 524-540 function validate1(date) { Link Here
524
518
525
[% IF ( relissuecount ) %]
519
[% IF ( relissuecount ) %]
526
<div id="relissues">
520
<div id="relissues">
521
	<h2>Relatives issues</h2>
527
 <table id="relissuest">
522
 <table id="relissuest">
528
    <thead>
523
    <thead>
529
	<tr>
524
	<tr>
530
            <th scope="col">Due date</th>
525
            <th scope="col">Due date</th>
531
            <th scope="col">Title</th>
526
            <th scope="col">Title</th>
527
            <th scope="col">Collection</th>
528
            <th scope="col">Stock number</th>
529
            <th scope="col">Barcode</th>
532
            <th scope="col">Item Type</th>
530
            <th scope="col">Item Type</th>
533
            <th scope="col">Checked out on</th> 
531
            <th scope="col">Checked out on</th> 
534
            <th scope="col">Call no</th>
532
            <th scope="col">Borrower</th>
533
	    <th scope="col">Call no</th>
535
            <th scope="col">Charge</th>
534
            <th scope="col">Charge</th>
536
            <th scope="col">Price</th>
535
            <th scope="col">Price</th>
537
            <th scope="col">Patron</th>
538
        </tr>
536
        </tr>
539
    </thead>
537
    </thead>
540
       <tbody>
538
       <tbody>
Lines 553-565 function validate1(date) { Link Here
553
                                        <span class="dmg">[% relissueloo.itemdamaged %]</span>
551
                                        <span class="dmg">[% relissueloo.itemdamaged %]</span>
554
                [% END %]
552
                [% END %]
555
</td>
553
</td>
556
            <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% relissueloo.biblionumber %]"><strong>[% relissueloo.title |html %]</strong></a>[% IF relissueloo.author %], by [% relissueloo.author %][% END %] [% IF relissueloo.publishercode %]; [% relissueloo.publishercode %] [% END %] [% IF relissueloo.publicationyear %], [% relissueloo.publicationyear %][% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% relissueloo.biblionumber %]&amp;itemnumber=[% relissueloo.itemnumber %]#item[% relissueloo.itemnumber %]">[% relissueloo.barcode %]</a></td>
554
            <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% relissueloo.biblionumber %]"><strong>[% relissueloo.title |html %]</strong></a>[% IF ( relissueloo.author ) %], by [% relissueloo.author %][% END %] [% IF ( relissueloo.publishercode ) %]; [% relissueloo.publishercode %] [% END %] [% IF ( relissueloo.publicationyear ) %], [% relissueloo.publicationyear %][% END %]</td>
555
            <td>[% relissueloo.collection %]</td>
556
            <td>[% relissueloo.stocknumber %]</td>
557
            <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% relissueloo.biblionumber %]&amp;itemnumber=[% relissueloo.itemnumber %]#item[% relissueloo.itemnumber %]">[% relissueloo.barcode %]</a></td>
557
<td>[% UNLESS ( noItemTypeImages ) %] [% IF ( relissueloo.itemtype_image ) %]<img src="[% relissueloo.itemtype_image %]" alt="" />[% END %][% END %][% relissueloo.itemtype_description %]</td>
558
<td>[% UNLESS ( noItemTypeImages ) %] [% IF ( relissueloo.itemtype_image ) %]<img src="[% relissueloo.itemtype_image %]" alt="" />[% END %][% END %][% relissueloo.itemtype_description %]</td>
558
            <td>[% relissueloo.issuedate %]</td>
559
            <td>[% relissueloo.issuedate %]</td>
559
        <td>[% relissueloo.itemcallnumber %]</td>
560
	    <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% relissueloo.borrowernumber %]">[% relissueloo.borrowername %]</a></td>
560
        <td>[% relissueloo.charge %]</td>
561
	    <td>[% relissueloo.itemcallnumber %]</td>
561
        <td>[% relissueloo.replacementprice %]</td>
562
            <td>[% relissueloo.charge %]</td>
562
	    <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% relissueloo.borrowernumber %]">[% relissueloo.borrowername %] ([% relissueloo.cardnumber %])</a></td>
563
            <td>[% relissueloo.replacementprice %]</td>
563
        </tr>
564
        </tr>
564
  [% END %]
565
  [% END %]
565
        </tbody>
566
        </tbody>
Lines 609-623 function validate1(date) { Link Here
609
                    <option value="del">Yes</option>
610
                    <option value="del">Yes</option>
610
                </select>
611
                </select>
611
                <input type="hidden" name="biblionumber" value="[% reservloo.biblionumber %]" />
612
                <input type="hidden" name="biblionumber" value="[% reservloo.biblionumber %]" />
612
                <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
613
                <input type="hidden" name="borrowernumber" value="[% reservloo.borrowernumber %]" />
613
            </td>
614
            </td>
614
        </tr>
615
        </tr>
615
		[% END %]</tbody>
616
		[% END %]</tbody>
616
    </table>
617
    </table>
617
618
618
        <fieldset class="action"><input type="submit" class="cancel" name="submit" value="Cancel Marked Requests" /></fieldset>
619
        <fieldset class="action">
619
    </form>
620
        <input type="submit" name="renew_checked" value="Renew or Return checked items" />
620
    [% ELSE %]<p>Patron has nothing on hold.</p>[% END %]
621
        <input type="submit" id="renew_all" name="renew_all" value="Renew all" />
622
        </fieldset>
623
    [% ELSE %]<p>Patron has nothing checked out.</p>[% END %]
624
</form>
621
	</div>
625
	</div>
622
626
623
</div>
627
</div>
(-)a/members/member.pl (+6 lines)
Lines 115-120 if ($results) { Link Here
115
	}
115
	}
116
    $count = scalar(@$results);
116
    $count = scalar(@$results);
117
}
117
}
118
119
if($count == 1){
120
    print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=" . @$results[0]->{borrowernumber});
121
    exit;
122
}
123
118
my @resultsdata;
124
my @resultsdata;
119
$to=($count>$to?$to:$count);
125
$to=($count>$to?$to:$count);
120
my $index=$from;
126
my $index=$from;
(-)a/members/moremember.pl (-3 / +2 lines)
Lines 146-152 foreach (qw(dateenrolled dateexpiry dateofbirth)) { Link Here
146
		$data->{$_} = $userdate || '';
146
		$data->{$_} = $userdate || '';
147
		$template->param( $_ => $userdate );
147
		$template->param( $_ => $userdate );
148
}
148
}
149
$data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' );
150
149
151
for (qw(debarred gonenoaddress lost borrowernotes)) {
150
for (qw(debarred gonenoaddress lost borrowernotes)) {
152
	 $data->{$_} and $template->param(flagged => 1) and last;
151
	 $data->{$_} and $template->param(flagged => 1) and last;
Lines 427-433 $template->param( picture => 1 ) if $picture; Link Here
427
426
428
my $branch=C4::Context->userenv->{'branch'};
427
my $branch=C4::Context->userenv->{'branch'};
429
428
430
$template->param(%$data);
429
SetMemberInfosInTemplate($borrowernumber, $template);
430
431
431
432
if (C4::Context->preference('ExtendedPatronAttributes')) {
432
if (C4::Context->preference('ExtendedPatronAttributes')) {
433
    $template->param(ExtendedPatronAttributes => 1);
433
    $template->param(ExtendedPatronAttributes => 1);
434
- 

Return to bug 5436