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

(-)a/catalogue/ISBDdetail.pl (+11 lines)
Lines 43-48 use CGI; Link Here
43
use C4::Koha;
43
use C4::Koha;
44
use C4::Biblio;
44
use C4::Biblio;
45
use C4::Items;
45
use C4::Items;
46
use C4::Members; # to use GetMember
46
use C4::Branch;     # GetBranchDetail
47
use C4::Branch;     # GetBranchDetail
47
use C4::Serials;    # CountSubscriptionFromBiblionumber
48
use C4::Serials;    # CountSubscriptionFromBiblionumber
48
use C4::Search;		# enabled_staff_search_views
49
use C4::Search;		# enabled_staff_search_views
Lines 66-71 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
66
    }
67
    }
67
);
68
);
68
69
70
if($query->cookie("holdfor")){ 
71
    my $holdfor_patron = GetMember('borrowernumber' => $query->cookie("holdfor"));
72
    $template->param(
73
        holdfor => $query->cookie("holdfor"),
74
        holdfor_surname => $holdfor_patron->{'surname'},
75
        holdfor_firstname => $holdfor_patron->{'firstname'},
76
        holdfor_cardnumber => $holdfor_patron->{'cardnumber'},
77
    );
78
}
79
69
# my @blocs = split /\@/,$ISBD;
80
# my @blocs = split /\@/,$ISBD;
70
# my @fields = $record->fields();
81
# my @fields = $record->fields();
71
my $res = GetISBDView($biblionumber, "intranet");
82
my $res = GetISBDView($biblionumber, "intranet");
(-)a/catalogue/MARCdetail.pl (+11 lines)
Lines 54-59 use MARC::Record; Link Here
54
use C4::Biblio;
54
use C4::Biblio;
55
use C4::Items;
55
use C4::Items;
56
use C4::Acquisition;
56
use C4::Acquisition;
57
use C4::Members; # to use GetMember
57
use C4::Serials;    #uses getsubscriptionsfrombiblionumber GetSubscriptionsFromBiblionumber
58
use C4::Serials;    #uses getsubscriptionsfrombiblionumber GetSubscriptionsFromBiblionumber
58
use C4::Search;		# enabled_staff_search_views
59
use C4::Search;		# enabled_staff_search_views
59
60
Lines 84-89 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
84
    }
85
    }
85
);
86
);
86
87
88
if($query->cookie("holdfor")){ 
89
    my $holdfor_patron = GetMember('borrowernumber' => $query->cookie("holdfor"));
90
    $template->param(
91
        holdfor => $query->cookie("holdfor"),
92
        holdfor_surname => $holdfor_patron->{'surname'},
93
        holdfor_firstname => $holdfor_patron->{'firstname'},
94
        holdfor_cardnumber => $holdfor_patron->{'cardnumber'},
95
    );
96
}
97
87
#count of item linked
98
#count of item linked
88
my $itemcount = GetItemsCount($biblionumber);
99
my $itemcount = GetItemsCount($biblionumber);
89
$template->param( count => $itemcount,
100
$template->param( count => $itemcount,
(-)a/catalogue/detail.pl (-1 / +11 lines)
Lines 30-36 use C4::Items; Link Here
30
use C4::Circulation;
30
use C4::Circulation;
31
use C4::Branch;
31
use C4::Branch;
32
use C4::Reserves;
32
use C4::Reserves;
33
use C4::Members;
33
use C4::Members; # to use GetMember
34
use C4::Serials;
34
use C4::Serials;
35
use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn);
35
use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn);
36
use C4::External::Amazon;
36
use C4::External::Amazon;
Lines 51-56 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
51
    }
51
    }
52
);
52
);
53
53
54
if($query->cookie("holdfor")){ 
55
    my $holdfor_patron = GetMember('borrowernumber' => $query->cookie("holdfor"));
56
    $template->param(
57
        holdfor => $query->cookie("holdfor"),
58
        holdfor_surname => $holdfor_patron->{'surname'},
59
        holdfor_firstname => $holdfor_patron->{'firstname'},
60
        holdfor_cardnumber => $holdfor_patron->{'cardnumber'},
61
    );
62
}
63
54
my $biblionumber = $query->param('biblionumber');
64
my $biblionumber = $query->param('biblionumber');
55
my $fw = GetFrameworkCode($biblionumber);
65
my $fw = GetFrameworkCode($biblionumber);
56
66
(-)a/catalogue/labeledMARCdetail.pl (+11 lines)
Lines 26-31 use C4::Context; Link Here
26
use C4::Output;
26
use C4::Output;
27
use C4::Biblio;
27
use C4::Biblio;
28
use C4::Items;
28
use C4::Items;
29
use C4::Members; # to use GetMember
29
use C4::Search;		# enabled_staff_search_views
30
use C4::Search;		# enabled_staff_search_views
30
31
31
my $query        = new CGI;
32
my $query        = new CGI;
Lines 52-57 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
52
    }
53
    }
53
);
54
);
54
55
56
if($query->cookie("holdfor")){ 
57
    my $holdfor_patron = GetMember('borrowernumber' => $query->cookie("holdfor"));
58
    $template->param(
59
        holdfor => $query->cookie("holdfor"),
60
        holdfor_surname => $holdfor_patron->{'surname'},
61
        holdfor_firstname => $holdfor_patron->{'firstname'},
62
        holdfor_cardnumber => $holdfor_patron->{'cardnumber'},
63
    );
64
}
65
55
#count of item linked
66
#count of item linked
56
my $itemcount = GetItemsCount($biblionumber);
67
my $itemcount = GetItemsCount($biblionumber);
57
$template->param( count => $itemcount,
68
$template->param( count => $itemcount,
(-)a/catalogue/moredetail.pl (+11 lines)
Lines 31-36 use C4::Auth; Link Here
31
use C4::Serials;
31
use C4::Serials;
32
use C4::Dates qw/format_date/;
32
use C4::Dates qw/format_date/;
33
use C4::Circulation;  # to use itemissues
33
use C4::Circulation;  # to use itemissues
34
use C4::Members; # to use GetMember
34
use C4::Search;		# enabled_staff_search_views
35
use C4::Search;		# enabled_staff_search_views
35
36
36
my $query=new CGI;
37
my $query=new CGI;
Lines 48-53 my ($template, $loggedinuser, $cookie) = get_template_and_user({ Link Here
48
    flagsrequired   => {catalogue => 1},
49
    flagsrequired   => {catalogue => 1},
49
    });
50
    });
50
51
52
if($query->cookie("holdfor")){ 
53
    my $holdfor_patron = GetMember('borrowernumber' => $query->cookie("holdfor"));
54
    $template->param(
55
        holdfor => $query->cookie("holdfor"),
56
        holdfor_surname => $holdfor_patron->{'surname'},
57
        holdfor_firstname => $holdfor_patron->{'firstname'},
58
        holdfor_cardnumber => $holdfor_patron->{'cardnumber'},
59
    );
60
}
61
51
# get variables
62
# get variables
52
63
53
my $biblionumber=$query->param('biblionumber');
64
my $biblionumber=$query->param('biblionumber');
(-)a/catalogue/search.pl (+11 lines)
Lines 145-150 use C4::Auth qw(:DEFAULT get_session); Link Here
145
use C4::Search;
145
use C4::Search;
146
use C4::Languages qw(getAllLanguages);
146
use C4::Languages qw(getAllLanguages);
147
use C4::Koha;
147
use C4::Koha;
148
use C4::Members qw(GetMember);
148
use C4::VirtualShelves qw(GetRecentShelves);
149
use C4::VirtualShelves qw(GetRecentShelves);
149
use POSIX qw(ceil floor);
150
use POSIX qw(ceil floor);
150
use C4::Branch; # GetBranches
151
use C4::Branch; # GetBranches
Lines 181-186 if (C4::Context->preference("marcflavour") eq "UNIMARC" ) { Link Here
181
    $template->param('UNIMARC' => 1);
182
    $template->param('UNIMARC' => 1);
182
}
183
}
183
184
185
if($cgi->cookie("holdfor")){ 
186
    my $holdfor_patron = GetMember('borrowernumber' => $cgi->cookie("holdfor"));
187
    $template->param(
188
        holdfor => $cgi->cookie("holdfor"),
189
        holdfor_surname => $holdfor_patron->{'surname'},
190
        holdfor_firstname => $holdfor_patron->{'firstname'},
191
        holdfor_cardnumber => $holdfor_patron->{'cardnumber'},
192
    );
193
}
194
184
## URI Re-Writing
195
## URI Re-Writing
185
# Deprecated, but preserved because it's interesting :-)
196
# Deprecated, but preserved because it's interesting :-)
186
# The same thing can be accomplished with mod_rewrite in
197
# The same thing can be accomplished with mod_rewrite in
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (-1 / +10 lines)
Lines 439-444 ul.toolbar { Link Here
439
439
440
ul.toolbar button {
440
ul.toolbar button {
441
	padding-bottom : 2px;
441
	padding-bottom : 2px;
442
	font-family: arial, verdana, helvetica, sans-serif;
442
}
443
}
443
.yui-menu-button  {
444
.yui-menu-button  {
444
	
445
	
Lines 927-939 fieldset.rows .inputnote { Link Here
927
}
928
}
928
929
929
#placehold a,
930
#placehold a,
930
#placehold button {
931
#placehold button,
932
#holdfor .first-child {
931
	padding-left : 34px;
933
	padding-left : 34px;
932
	background-image: url("../../img/toolbar-hold.gif");
934
	background-image: url("../../img/toolbar-hold.gif");
933
	background-position : center left;
935
	background-position : center left;
934
	background-repeat : no-repeat;
936
	background-repeat : no-repeat;
935
}
937
}
936
938
939
#holdfor .first-child { padding-left : 17px; }
940
937
#editmenuc .first-child, #deleteshelf .first-child,#newmenuc .first-child, #addbiblio .first-child, #z3950search .first-child, #printmenuc .first-child, #newsupplier .first-child, #savemenuc .first-child, #budgets_menuc .first-child, #periods_menuc .first-child {
941
#editmenuc .first-child, #deleteshelf .first-child,#newmenuc .first-child, #addbiblio .first-child, #z3950search .first-child, #printmenuc .first-child, #newsupplier .first-child, #savemenuc .first-child, #budgets_menuc .first-child, #periods_menuc .first-child {
938
	padding-left : 15px;
942
	padding-left : 15px;
939
}
943
}
Lines 1413-1418 li.email { Link Here
1413
	padding : .1em 0 .1em 1em;
1417
	padding : .1em 0 .1em 1em;
1414
}
1418
}
1415
1419
1420
/* Hack just for Firefox */
1421
html>/**/body #searchheader button, x:-moz-any-link, x:default {
1422
	padding-bottom : 3px;
1423
}
1424
1416
#searchheader h3 {
1425
#searchheader h3 {
1417
}
1426
}
1418
1427
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc (+26 lines)
Lines 148-154 function confirm_items_deletion() { Link Here
148
	        container: this,
148
	        container: this,
149
			onclick: {fn: printBiblio }
149
			onclick: {fn: printBiblio }
150
		});
150
		});
151
		<!-- TMPL_IF NAME="CAN_user_reserveforothers" --><!-- TMPL_UNLESS NAME="norequests" -->
152
		<!-- TMPL_IF NAME="holdfor" -->
153
		//	Create an array of YAHOO.widget.MenuItem configuration properties
154
		var onButtonClick = function () { 
155
			location.href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->";
156
		}
157
		var HoldForButtonMenu = [
158
			{ text: "Place hold", url: "/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" },
159
			{ text: "Place hold for <!-- TMPL_VAR NAME="holdfor_firstname" --> <!-- TMPL_VAR NAME="holdfor_surname" --> (<!-- TMPL_VAR NAME="holdfor_cardnumber" -->)", url: "/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&findborrower=<!-- TMPL_VAR NAME="holdfor_cardnumber" -->" }
160
		];
151
161
162
		//	Instantiate a Split Button using the array of YAHOO.widget.MenuItem 
163
		//	configuration properties as the value for the "menu" 
164
		//	configuration attribute.
165
166
		var HoldForButton = new YAHOO.widget.Button({
167
				id: "holdfor",
168
				type: "split",
169
				label: "Place hold",
170
				name: "holdfor",
171
				menu: HoldForButtonMenu,
172
				container: this,
173
				onclick: { fn: onButtonClick }
174
		});
175
	    <!-- TMPL_ELSE -->
152
	    new YAHOO.widget.Button({
176
	    new YAHOO.widget.Button({
153
			id: "placehold",
177
			id: "placehold",
154
			type: "link",
178
			type: "link",
Lines 156-161 function confirm_items_deletion() { Link Here
156
			container: this,
180
			container: this,
157
			href: "/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"
181
			href: "/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"
158
	     });
182
	     });
183
	    <!-- /TMPL_IF -->
184
	    <!-- /TMPL_IF --><!-- /TMPL_IF -->
159
	    <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
185
	    <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
160
		new YAHOO.widget.Button({
186
		new YAHOO.widget.Button({
161
			id: "z3950search",
187
			id: "z3950search",
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc (-11 / +19 lines)
Lines 36-46 function update_child() { Link Here
36
	// prepare DOM for YUI Toolbar
36
	// prepare DOM for YUI Toolbar
37
37
38
	 $(document).ready(function() {
38
	 $(document).ready(function() {
39
	    $("#printslip").parent().remove();
39
	    $("#printslip,#patronflags,#deletepatron").parent().remove();
40
		$("#patronflags").parent().remove();
40
		$("#moremenuc,#printmenuc,#searchtoholdc").empty();
41
		$("#deletepatron").parent().remove();
42
		$("#moremenuc").empty();
43
	    $("#printmenuc").empty();
44
	    yuiToolbar();
41
	    yuiToolbar();
45
	 });
42
	 });
46
43
Lines 49-55 function update_child() { Link Here
49
		window.open("/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=" + print_type, "printwindow");
46
		window.open("/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=" + print_type, "printwindow");
50
		return false;
47
		return false;
51
	}
48
	}
52
49
	function searchToHold(){
50
		var date = new Date();
51
		date.setTime(date.getTime() + (10 * 60 * 1000));
52
	    $.cookie("holdfor", "<!-- TMPL_VAR NAME="borrowernumber" -->", { path: "/", expires: date });
53
	    location.href="/cgi-bin/koha/catalogue/search.pl";
54
	}
53
	function yuiToolbar() {
55
	function yuiToolbar() {
54
	    var printmenu = [
56
	    var printmenu = [
55
            <!-- TMPL_IF NAME="CAN_user_borrowers" -->
57
            <!-- TMPL_IF NAME="CAN_user_borrowers" -->
Lines 76-83 function update_child() { Link Here
76
	        name: "printmenubutton",
78
	        name: "printmenubutton",
77
	        menu: printmenu,
79
	        menu: printmenu,
78
	        container: "printmenuc"
80
	        container: "printmenuc"
79
	    });   
81
	    });
80
	
82
	    new YAHOO.widget.Button({
83
	        id: "searchtohold",
84
	        type: "button",
85
	        label: _("Search to hold"),
86
	        container: "searchtoholdc",
87
			onclick: {fn: searchToHold }
88
		});
81
	    new YAHOO.widget.Button({
89
	    new YAHOO.widget.Button({
82
	        type: "menu",
90
	        type: "menu",
83
	        label: _("More"),
91
	        label: _("More"),
Lines 85-91 function update_child() { Link Here
85
	        menu: moremenu,
93
	        menu: moremenu,
86
	        container: "moremenuc"
94
	        container: "moremenuc"
87
	    });
95
	    });
88
	
96
89
	    <!-- TMPL_IF name="adultborrower" -->new YAHOO.widget.Button("addchild");<!-- /TMPL_IF -->
97
	    <!-- TMPL_IF name="adultborrower" -->new YAHOO.widget.Button("addchild");<!-- /TMPL_IF -->
90
	    new YAHOO.widget.Button("editpatron");
98
	    new YAHOO.widget.Button("editpatron");
91
	    new YAHOO.widget.Button("addnote");
99
	    new YAHOO.widget.Button("addnote");
Lines 93-99 function update_child() { Link Here
93
            <!-- TMPL_ELSE--> new YAHOO.widget.Button("changepassword"); <!-- /TMPL_IF -->
101
            <!-- TMPL_ELSE--> new YAHOO.widget.Button("changepassword"); <!-- /TMPL_IF -->
94
	    new YAHOO.widget.Button("printslip");
102
	    new YAHOO.widget.Button("printslip");
95
		new YAHOO.widget.Button("printpage");
103
		new YAHOO.widget.Button("printpage");
96
	    new YAHOO.widget.Button("renewpatron");		 
104
	    new YAHOO.widget.Button("renewpatron");
97
        <!-- TMPL_IF NAME="CAN_user_permissions" -->
105
        <!-- TMPL_IF NAME="CAN_user_permissions" -->
98
          <!-- TMPL_IF NAME="StaffMember" -->
106
          <!-- TMPL_IF NAME="StaffMember" -->
99
            <!-- TMPL_IF NAME="CAN_user_staffaccess" -->
107
            <!-- TMPL_IF NAME="CAN_user_staffaccess" -->
Lines 127-138 function update_child() { Link Here
127
	<!-- /TMPL_IF -->
135
	<!-- /TMPL_IF -->
128
	<!-- TMPL_IF NAME="CAN_user_borrowers" -->
136
	<!-- TMPL_IF NAME="CAN_user_borrowers" -->
129
	<!-- TMPL_IF name="adultborrower" --><li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;category_type=C">Add child</a></li><!-- /TMPL_IF -->
137
	<!-- TMPL_IF name="adultborrower" --><li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;category_type=C">Add child</a></li><!-- /TMPL_IF -->
130
<!--	<li><a id="addnote" href="/cgi-bin/koha/members/addnotes.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">Add Note</a></li> -->
131
<!-- TMPL_IF NAME="StaffMember" --><!-- TMPL_IF NAME="CAN_user_staffaccess" --> <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=<!-- TMPL_VAR NAME="borrowernumber" -->">Change Password</a></li><!-- /TMPL_IF-->
138
<!-- TMPL_IF NAME="StaffMember" --><!-- TMPL_IF NAME="CAN_user_staffaccess" --> <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=<!-- TMPL_VAR NAME="borrowernumber" -->">Change Password</a></li><!-- /TMPL_IF-->
132
          <!-- TMPL_ELSE--> <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=<!-- TMPL_VAR NAME="borrowernumber" -->">Change Password</a></li><!-- /TMPL_IF -->	
139
          <!-- TMPL_ELSE--> <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=<!-- TMPL_VAR NAME="borrowernumber" -->">Change Password</a></li><!-- /TMPL_IF -->	
133
	  <!-- /TMPL_IF -->
140
	  <!-- /TMPL_IF -->
134
	<li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=page">Print Page</a></li>
141
	<li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=page">Print Page</a></li>
135
	<li><a id="printslip" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=slip">Print Slip</a></li>
142
	<li><a id="printslip" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=slip">Print Slip</a></li>
143
	<li id="searchtoholdc"><a id="searchtohold" href="#">Search to hold</a></li>
136
	<li id="moremenuc"><a id="renewpatron" href="/cgi-bin/koha/members/moremember.pl?reregistration=y&amp;borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">Renew Account</a></li>
144
	<li id="moremenuc"><a id="renewpatron" href="/cgi-bin/koha/members/moremember.pl?reregistration=y&amp;borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">Renew Account</a></li>
137
    <!-- TMPL_IF NAME="CAN_user_permissions" -->
145
    <!-- TMPL_IF NAME="CAN_user_permissions" -->
138
        <!-- TMPL_IF NAME="StaffMember" -->
146
        <!-- TMPL_IF NAME="StaffMember" -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc (+1 lines)
Lines 30-35 Link Here
30
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/jquery.js"></script>
30
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/jquery.js"></script>
31
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/ui.tabs.js"></script>
31
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/ui.tabs.js"></script>
32
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.hotkeys.min.js"></script>
32
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.hotkeys.min.js"></script>
33
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.cookie.min.js"></script>
33
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.highlight-3.js"></script>
34
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.highlight-3.js"></script>
34
35
35
<!-- TMPL_IF NAME="js_libs" -->
36
<!-- TMPL_IF NAME="js_libs" -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc (-7 / +17 lines)
Lines 34-44 function update_child() { Link Here
34
	// prepare DOM for YUI Toolbar
34
	// prepare DOM for YUI Toolbar
35
35
36
	 $(document).ready(function() {
36
	 $(document).ready(function() {
37
	    $("#printslip").parent().remove();
37
	    $("#printslip,#patronflags,#deletepatron").parent().remove();
38
		$("#patronflags").parent().remove();
38
		$("#moremenuc,#printmenuc,#searchtoholdc").empty();
39
		$("#deletepatron").parent().remove();
40
		$("#moremenuc").empty();
41
	    $("#printmenuc").empty();
42
	    yuiToolbar();
39
	    yuiToolbar();
43
	 });
40
	 });
44
41
Lines 47-53 function update_child() { Link Here
47
		window.open("/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=" + print_type, "printwindow");
44
		window.open("/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=" + print_type, "printwindow");
48
		return false;
45
		return false;
49
	}
46
	}
50
47
	function searchToHold(){
48
		var date = new Date();
49
		date.setTime(date.getTime() + (10 * 60 * 1000));
50
	    $.cookie("holdfor", "<!-- TMPL_VAR NAME="borrowernumber" -->", { path: "/", expires: date });
51
	    location.href="/cgi-bin/koha/catalogue/search.pl";
52
	}
51
	function yuiToolbar() {
53
	function yuiToolbar() {
52
	    var printmenu = [
54
	    var printmenu = [
53
	        { text: _("Print Page"), onclick: {fn: function(){printx_window("page")}} },
55
	        { text: _("Print Page"), onclick: {fn: function(){printx_window("page")}} },
Lines 71-76 function update_child() { Link Here
71
	    });
73
	    });
72
74
73
	    new YAHOO.widget.Button({
75
	    new YAHOO.widget.Button({
76
	        id: "searchtohold",
77
	        type: "button",
78
	        label: _("Search to hold"),
79
	        container: "searchtoholdc",
80
			onclick: {fn: searchToHold }
81
		});
82
83
	    new YAHOO.widget.Button({
74
	        type: "menu",
84
	        type: "menu",
75
	        label: _("More"),
85
	        label: _("More"),
76
	        name: "moremenubutton",
86
	        name: "moremenubutton",
Lines 108-116 function update_child() { Link Here
108
            <!-- /TMPL_IF -->
118
            <!-- /TMPL_IF -->
109
        <!-- /TMPL_IF -->
119
        <!-- /TMPL_IF -->
110
	<!-- TMPL_IF name="adultborrower" --><li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;category_type=C">Add child</a></li><!-- /TMPL_IF -->
120
	<!-- TMPL_IF name="adultborrower" --><li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;category_type=C">Add child</a></li><!-- /TMPL_IF -->
111
<!--	<li><a id="addnote" href="/cgi-bin/koha/members/addnotes.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">Add Note</a></li> -->
112
	<li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=<!-- TMPL_VAR NAME="borrowernumber" -->">Change Password</a></li>
121
	<li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=<!-- TMPL_VAR NAME="borrowernumber" -->">Change Password</a></li>
113
	<li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=page">Print Page</a></li>
122
	<li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=page">Print Page</a></li>
114
	<li><a id="printslip" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=slip">Print Slip</a></li>
123
	<li><a id="printslip" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=slip">Print Slip</a></li>
124
	<li id="searchtoholdc"><a id="searchtohold" href="#">Search to hold</a></li>
115
	<li id="moremenuc"><a id="renewpatron" href="/cgi-bin/koha/members/moremember.pl?reregistration=y&amp;borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">Renew Account</a></li><!-- TMPL_IF NAME="CAN_user_permissions" --><li><a id="patronflags" href="/cgi-bin/koha/members/member-flags.pl?member=<!-- TMPL_VAR NAME="borrowernumber" -->">Set Permissions</a></li><!-- /TMPL_IF --><li><a id="deletepatron" href="javascript:confirm_deletion();">Delete</a></li>
125
	<li id="moremenuc"><a id="renewpatron" href="/cgi-bin/koha/members/moremember.pl?reregistration=y&amp;borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">Renew Account</a></li><!-- TMPL_IF NAME="CAN_user_permissions" --><li><a id="patronflags" href="/cgi-bin/koha/members/member-flags.pl?member=<!-- TMPL_VAR NAME="borrowernumber" -->">Set Permissions</a></li><!-- /TMPL_IF --><li><a id="deletepatron" href="javascript:confirm_deletion();">Delete</a></li>
116
</ul></div>
126
</ul></div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.cookie.min.js (+1 lines)
Line 0 Link Here
1
jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl (-30 / +64 lines)
Lines 5-11 Link Here
5
<script type="text/javascript">
5
<script type="text/javascript">
6
//<![CDATA[
6
//<![CDATA[
7
var MSG_NO_ITEM_SELECTED = _("Nothing is selected.");
7
var MSG_NO_ITEM_SELECTED = _("Nothing is selected.");
8
var MSG_NON_RESERVES_SELECTED = _("One or more selected items cannot be reserved.");
8
var MSG_NON_RESERVES_SELECTED = _("One or more selected items cannot be placed on hold.");
9
var q_array = new Array();  // will hold search terms, if present
9
<!-- TMPL_IF NAME="AmazonEnabled" -->
10
<!-- TMPL_IF NAME="AmazonEnabled" -->
10
// http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
11
// http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
11
function verify_images() {
12
function verify_images() {
Lines 21-27 function verify_images() { Link Here
21
        }
22
        }
22
    });
23
    });
23
}
24
}
24
var q_array = new Array();  // will hold search terms, if present
25
25
26
$(window).load(function() {
26
$(window).load(function() {
27
        verify_images();
27
        verify_images();
Lines 30-42 $(window).load(function() { Link Here
30
function Dopop(link) {
30
function Dopop(link) {
31
        newin=window.open(link,'popup','width=500,height=500,toolbar=false,scrollbars=yes,resizeable=yes');
31
        newin=window.open(link,'popup','width=500,height=500,toolbar=false,scrollbars=yes,resizeable=yes');
32
}
32
}
33
function cartList(){
34
    if($("#addto").find("option:selected").attr("value") == "addtolist"){
35
        var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s","");
36
        if (vShelfAdd()) {
37
             Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&' + vShelfAdd());
38
        }
39
        return false;
40
    } else if($("#addto").find("option:selected").attr("value") == "newlist"){
41
        if (vShelfAdd()) {
42
            Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
43
        }
44
        return false;
45
    }
46
    if($("#addto").find("option:selected").attr("value") == "addtocart"){
47
        addMultiple();
48
        return false;
49
    }
50
}
51
$(window).load(function() {
52
        new YAHOO.widget.Button("cartsubmit", { onclick: { fn: cartList }});
53
});
33
$(document).ready(function() {
54
$(document).ready(function() {
55
$("#placeholdc").empty();
34
$('#sortbyform').find("input:submit").hide();
56
$('#sortbyform').find("input:submit").hide();
35
$('#sort_by').change(function() {
57
$('#sort_by').change(function() {
36
        $('#sortbyform').submit();
58
        $('#sortbyform').submit();
37
    });
59
    });
38
39
40
$(".addtocart").show();
60
$(".addtocart").show();
41
        var param1 = "<label for=\"addto\">"+_("Add to:")+"<\/label><select name=\"addto\" id=\"addto\"><option value=\"\"><\/option>";
61
        var param1 = "<label for=\"addto\">"+_("Add to:")+"<\/label><select name=\"addto\" id=\"addto\"><option value=\"\"><\/option>";
42
        <!-- TMPL_IF name="intranetbookbag" -->     param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>"; <!-- /TMPL_IF -->
62
        <!-- TMPL_IF name="intranetbookbag" -->     param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>"; <!-- /TMPL_IF -->
Lines 48-54 $(".addtocart").show(); Link Here
48
        param1 +="<\/optgroup><option value=\"newlist\">"+_("[ New List ]")+"<\/option>"
68
        param1 +="<\/optgroup><option value=\"newlist\">"+_("[ New List ]")+"<\/option>"
49
<!-- /TMPL_IF -->
69
<!-- /TMPL_IF -->
50
        <!-- /TMPL_IF -->
70
        <!-- /TMPL_IF -->
51
        param1 += "<\/select> <input type=\"submit\" class=\"submit\" value=\""+_("Save")+"\" />";
71
        param1 += "<\/select> <input id=\"cartsubmit\" type=\"submit\" class=\"submit\" value=\""+_("Save")+"\" />";
52
 $('#sortsubmit').hide();
72
 $('#sortsubmit').hide();
53
        $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear All")+"<\/a>");
73
        $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear All")+"<\/a>");
54
        $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select All")+"<\/a>");
74
        $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select All")+"<\/a>");
Lines 63-88 $(".addtocart").show(); Link Here
63
83
64
 $("#tagsel_span").html("<input id=\"tagsel_tag\" class=\"submit\" type=\"submit\" value=\"Tag\"/>");
84
 $("#tagsel_span").html("<input id=\"tagsel_tag\" class=\"submit\" type=\"submit\" value=\"Tag\"/>");
65
85
66
        function cartList(){
67
                        if($("#addto").find("option:selected").attr("value") == "addtolist"){
68
                        var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s","");
69
                        if (vShelfAdd()) {
70
			    Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&' + vShelfAdd());
71
                        }
72
                        return false;
73
                } else if($("#addto").find("option:selected").attr("value") == "newlist"){
74
                        if (vShelfAdd()) {
75
			    Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
76
                        }
77
                        return false;
78
                }
79
		if($("#addto").find("option:selected").attr("value") == "addtocart"){
80
                        addMultiple();
81
                        return false;
82
                 }
83
84
        }
85
86
    $("#selection_ops").show();
86
    $("#selection_ops").show();
87
    $(".selection").show();
87
    $(".selection").show();
88
    <!-- TMPL_IF NAME="query_desc" -->
88
    <!-- TMPL_IF NAME="query_desc" -->
Lines 167-172 function GetZ3950Terms(){ Link Here
167
	<!-- /TMPL_LOOP -->
167
	<!-- /TMPL_LOOP -->
168
	return strQuery;
168
	return strQuery;
169
}
169
}
170
171
YAHOO.util.Event.onContentReady("searchheader", function () {
172
        new YAHOO.widget.Button( "z3950submit", { onclick: { fn: PopupZ3950 }});
173
        <!-- TMPL_IF NAME="holdfor" -->
174
        var onButtonClick = function () { 
175
            $("#holdFor").val("<!-- TMPL_VAR NAME="holdfor_cardnumber" -->");
176
            placeHold();
177
        }
178
        var HoldForButtonMenu = [
179
            { text: "Place hold", onclick: { fn: placeHold }},
180
            { text: "Place hold for <!-- TMPL_VAR NAME="holdfor_firstname" --> <!-- TMPL_VAR NAME="holdfor_surname" --> (<!-- TMPL_VAR NAME="holdfor_cardnumber" -->)", onclick: { fn: onButtonClick }}
181
        ];
182
183
        var HoldForButton = new YAHOO.widget.Button({
184
                type: "split",
185
                label: "Place hold",
186
                name: "holdfor",
187
                menu: HoldForButtonMenu,
188
                container: "placeholdc",
189
                onclick: { fn: placeHold }
190
        });
191
        <!-- TMPL_ELSE -->
192
        new YAHOO.widget.Button({
193
            id: "placehold",
194
            type: "link",
195
            label: _("Place hold"),
196
            container: "placeholdc",
197
            onclick: { fn: placeHold }
198
         });
199
        <!-- /TMPL_IF -->
200
}); // YAHOO onContentReady
170
//]]>
201
//]]>
171
</script>
202
</script>
172
</head>
203
</head>
Lines 231-244 function GetZ3950Terms(){ Link Here
231
                |
262
                |
232
                <a href="#" class="highlight_toggle" id="highlight_toggle_off">Unhighlight</a>
263
                <a href="#" class="highlight_toggle" id="highlight_toggle_off">Unhighlight</a>
233
                <a href="#" class="highlight_toggle" id="highlight_toggle_on">Highlight</a>
264
                <a href="#" class="highlight_toggle" id="highlight_toggle_on">Highlight</a>
265
                |
266
		<span class="addto"></span>
234
                <!-- TMPL_IF NAME="CAN_user_reserveforothers" -->
267
                <!-- TMPL_IF NAME="CAN_user_reserveforothers" -->
235
                	<!-- TMPL_IF NAME="DisplayMultiPlaceHold" -->
268
                    <!-- TMPL_IF NAME="DisplayMultiPlaceHold" -->
236
                  <input type="button" onclick="placeHold(); return false;" value="Place Hold"/>
269
                  | <span id="placeholdc"><input type="button" id="placehold" onclick="placeHold(); return false;" value="Place Hold"/></span>
237
                	<!-- /TMPL_IF -->
270
                    <!-- /TMPL_IF -->
238
                <!-- /TMPL_IF -->
271
                <!-- /TMPL_IF -->
239
		<span class="addto"></span>
240
272
241
				<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" --><input type="button" onclick="PopupZ3950(); return false;" value="Z39.50 Search"/><!-- /TMPL_IF -->
273
				<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" --> | <input type="button" id="z3950submit" onclick="PopupZ3950(); return false;" value="Z39.50 Search"/><!-- /TMPL_IF -->
242
            </div>
274
            </div>
243
        </div>
275
        </div>
244
    <!-- TMPL_IF NAME="stopwords_removed" --><div><p class="tip">Ignored the following common words: "<!-- TMPL_VAR NAME="stopwords_removed" -->"<p></div><!-- /TMPL_IF -->
276
    <!-- TMPL_IF NAME="stopwords_removed" --><div><p class="tip">Ignored the following common words: "<!-- TMPL_VAR NAME="stopwords_removed" -->"<p></div><!-- /TMPL_IF -->
Lines 451-456 function GetZ3950Terms(){ Link Here
451
                                  <span class="noholdstext">No holds allowed</span>
483
                                  <span class="noholdstext">No holds allowed</span>
452
                              <!-- TMPL_ELSE -->
484
                              <!-- TMPL_ELSE -->
453
                                  <a id="reserve_<!-- TMPL_VAR NAME="biblionumber" -->" href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Holds</a>
485
                                  <a id="reserve_<!-- TMPL_VAR NAME="biblionumber" -->" href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Holds</a>
486
                                  <!-- TMPL_IF NAME="holdfor" --> | <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;findborrower=<!-- TMPL_VAR NAME="holdfor_cardnumber" -->">Hold for <!-- TMPL_VAR NAME="holdfor_firstname" --> <!-- TMPL_VAR NAME="holdfor_surname" --> (<!-- TMPL_VAR NAME="holdfor_cardnumber" -->)</a><!-- /TMPL_IF -->
454
                              <!-- /TMPL_IF -->
487
                              <!-- /TMPL_IF -->
455
                          <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
488
                          <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
456
                          | <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Edit record</a>
489
                          | <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Edit record</a>
Lines 551-556 function GetZ3950Terms(){ Link Here
551
<form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
584
<form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
552
    <!-- Value will be set here by placeHold() -->
585
    <!-- Value will be set here by placeHold() -->
553
    <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
586
    <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
587
    <input type="text" name="findborrower" id="holdFor" value="" />
554
    <input type="hidden" name="multi_hold" value="1"/>
588
    <input type="hidden" name="multi_hold" value="1"/>
555
</form>
589
</form>
556
590
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl (-1 / +1 lines)
Lines 9-14 Link Here
9
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
9
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
10
<script type="text/javascript">
10
<script type="text/javascript">
11
//<![CDATA[
11
//<![CDATA[
12
if($.cookie("holdfor") != <!-- TMPL_VAR NAME="borrowernumber" -->){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }
12
<!-- TMPL_IF NAME="UseTablesortForCirc" -->$.tablesorter.addParser({
13
<!-- TMPL_IF NAME="UseTablesortForCirc" -->$.tablesorter.addParser({
13
    id: 'articles',
14
    id: 'articles',
14
    is: function(s) {return false;  },
15
    is: function(s) {return false;  },
15
- 

Return to bug 3659