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

(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (-1 / +1 lines)
Lines 2415-2421 a.btn:visited{ Link Here
2415
.dropdown-menu li {
2415
.dropdown-menu li {
2416
    list-style: none outside none;
2416
    list-style: none outside none;
2417
}
2417
}
2418
[class^="icon-"],[class*=" icon-"]{background-image:url("../../img/glyphicons-halflings.png");}
2418
[class^="icon-"],[class*=" icon-"]{background-image:url("../../../lib/bootstrap/img/glyphicons-halflings.png");}
2419
.icon-white,.nav-tabs>.active>a>[class^="icon-"],.nav-tabs>.active>a>[class*=" icon-"],.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"]{background-image:url("../../img/glyphicons-halflings-white.png");}
2419
.icon-white,.nav-tabs>.active>a>[class^="icon-"],.nav-tabs>.active>a>[class*=" icon-"],.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"]{background-image:url("../../img/glyphicons-halflings-white.png");}
2420
a.disabled {
2420
a.disabled {
2421
    color : #999999;
2421
    color : #999999;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc (-94 / +103 lines)
Lines 1-7 Link Here
1
<div id="toolbar">
1
<script type="text/javascript">
2
    <script type="text/javascript">
2
//<![CDATA[
3
    //<![CDATA[
3
$(document).ready(function(){
4
[% IF ( CAN_user_borrowers ) %]
4
    [% IF ( CAN_user_borrowers ) %]$("#deletepatron").click(function(){
5
            confirm_deletion();
6
            return false;
7
        });
8
    $("#renewpatron").click(function(){
9
        confirm_reregistration();
10
        return false;
11
    });
12
    [% IF ( is_child ) %]$("#updatechild").click(function(){
13
        confirm_updatechild();
14
        return false;
15
    });[% END %][% END %]
16
    $("#exportcheckins").click(function(){
17
        export_barcodes();
18
        return false;
19
    });
20
    $("#printsummary").click(function(){
21
        printx_window("page")
22
        return false;
23
    });
24
    $("#printslip").click(function(){
25
        printx_window("slip")
26
        return false;
27
    });
28
    $("#printquickslip").click(function(){
29
        printx_window("qslip")
30
        return false;
31
    });
32
    $("#searchtohold").click(function(){
33
        searchToHold();
34
        return false;
35
    })
36
});
5
function confirm_deletion() {
37
function confirm_deletion() {
6
    var is_confirmed = window.confirm(_('Are you sure you want to delete this patron? This cannot be undone.'));
38
    var is_confirmed = window.confirm(_('Are you sure you want to delete this patron? This cannot be undone.'));
7
    if (is_confirmed) {
39
    if (is_confirmed) {
Lines 22-136 function update_child() { Link Here
22
[% ELSE %]
54
[% ELSE %]
23
 confirm_updatechild();
55
 confirm_updatechild();
24
[% END %]
56
[% END %]
25
}[% ELSE %][% END %]
57
}[% END %]
26
58
27
function confirm_reregistration() {
59
function confirm_reregistration() {
28
    var is_confirmed = window.confirm(_("Are you sure you want to renew this patron's registration?"));
60
    var is_confirmed = window.confirm(_("Are you sure you want to renew this patron's registration?"));
29
    if (is_confirmed) {
61
    if (is_confirmed) {
30
       window.location = '/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&amp;cardnumber=[% cardnumber %]&amp;destination=[% destination %]&amp;reregistration=y';
62
    window.location = '/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&amp;cardnumber=[% cardnumber %]&amp;desintation=[% destination %]&amp;reregistration=y';
31
    }
63
    }
32
}
64
}
33
function export_barcodes() {
65
function export_barcodes() {
34
    window.open('/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% borrowernumber %]&amp;op=export_barcodes');
66
    window.open('/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% borrowernumber %]&amp;op=export_barcodes');
35
}
67
}
36
[% END %]
68
var slip_re = /slip/;
37
69
function printx_window(print_type) {
38
    // prepare DOM for YUI Toolbar
70
    var handler = print_type.match(slip_re) ? "printslip" : "moremember";
39
71
    window.open("/cgi-bin/koha/members/" + handler + ".pl?borrowernumber=[% borrowernumber %]&amp;print=" + print_type, "printwindow");
40
     $(document).ready(function() {
72
    return false;
41
        $("#printslip,#patronflags,#deletepatron").parent().remove();
73
}
42
        $("#moremenuc,#printmenuc,#searchtoholdc").empty();
74
function searchToHold(){
43
        yuiToolbar();
75
    var date = new Date();
44
     });
76
    date.setTime(date.getTime() + (10 * 60 * 1000));
45
77
    $.cookie("holdfor", "[% borrowernumber %]", { path: "/", expires: date });
46
    // YUI Toolbar Functions
78
    location.href="/cgi-bin/koha/catalogue/search.pl";
47
    var slip_re = /slip/;
79
}
48
    function printx_window(print_type) {
80
//]]>
49
        var handler = print_type.match(slip_re) ? "printslip" : "moremember";
81
</script>
50
        window.open("/cgi-bin/koha/members/" + handler + ".pl?borrowernumber=[% borrowernumber %]&amp;print=" + print_type, "printwindow");
51
        return false;
52
    }
53
    function searchToHold(){
54
        var date = new Date();
55
        date.setTime(date.getTime() + (10 * 60 * 1000));
56
        $.cookie("holdfor", "[% borrowernumber %]", { path: "/", expires: date });
57
        location.href="/cgi-bin/koha/catalogue/search.pl";
58
    }
59
    function yuiToolbar() {
60
        var printmenu = [
61
            { text: _("Print summary"), onclick: {fn: function(){printx_window("page")}} },
62
            { text: _("Print slip"), onclick: {fn: function(){printx_window("slip")}} },
63
            { text: _("Print quick slip"), onclick: {fn: function(){printx_window("qslip")}} }
64
        ];
65
66
        var moremenu = [
67
            { text: _("Renew patron"), [% UNLESS CAN_user_borrowers %]disabled: true, [% END %] onclick: { fn: confirm_reregistration } },
68
            { text: _("Set permissions"), url: "/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]"[% UNLESS CAN_user_permissions %], disabled: true[% END %]},
69
            { text: _("Delete"), [% UNLESS CAN_user_borrowers %]disabled: true, [% END %] onclick: { fn: confirm_deletion } },
70
            { text: _("Update child to adult patron")[% IF is_child && CAN_user_borrowers %], onclick: { fn: update_child }[% ELSE %], disabled: true[% END %]},
71
            { text: _("Export today's checked in barcodes"), [% UNLESS CAN_user_borrowers %]disabled: true, [% END %] onclick: { fn: export_barcodes }}
72
        ];
73
74
        new YAHOO.widget.Button({
75
            type: "menu",
76
            label: _("Print"),
77
            name: "printmenubutton",
78
            menu: printmenu,
79
            container: "printmenuc"
80
        });
81
        new YAHOO.widget.Button({
82
            id: "searchtohold",
83
            type: "button",
84
            label: _("Search to hold"),
85
            container: "searchtoholdc",
86
            onclick: {fn: searchToHold }
87
        });
88
        new YAHOO.widget.Button({
89
            type: "menu",
90
            label: _("More"),
91
            name: "moremenubutton",
92
            menu: moremenu,
93
            container: "moremenuc"
94
        });
95
96
        [% IF ( CAN_user_borrowers ) %][% IF ( adultborrower ) %]new YAHOO.widget.Button("addchild");[% END %]
97
        new YAHOO.widget.Button("editpatron");
98
        new YAHOO.widget.Button("changepassword");
99
        new YAHOO.widget.Button("duplicate");[% END %]
100
        new YAHOO.widget.Button("printslip");
101
        new YAHOO.widget.Button("printpage");
102
    }
103
82
104
    //]]>
83
<div id="toolbar" class="btn-toolbar">
105
    </script>
106
    <ul class="toolbar">
107
    [% IF ( CAN_user_borrowers ) %]
84
    [% IF ( CAN_user_borrowers ) %]
108
        [% IF ( category_type ) %]
85
        [% IF ( category_type ) %]
109
            [% IF ( guarantor ) %]
86
            [% IF ( guarantor ) %]
110
                <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=[% destination %]&amp;borrowernumber=[% borrowernumber %]&amp;guarantorid=[% guarantorborrowernumber %]&amp;category_type=[% category_type %]">
87
                <a id="editpatron" class="btn btn-small" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;guarantorid=[% guarantorborrowernumber %]&amp;category_type=[% category_type %]">
111
            [% ELSE %]
88
            [% ELSE %]
112
            <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=[% destination %]&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">
89
                <a id="editpatron" class="btn btn-small" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">
113
            [% END %]Edit</a></li>
90
            [% END %]
91
                <i class="icon-pencil"></i> Edit</a>
114
        [% ELSE %] <!-- try with categorycode if no category_type -->
92
        [% ELSE %] <!-- try with categorycode if no category_type -->
115
            [% IF ( categorycode ) %]
93
            [% IF ( categorycode ) %]
116
            <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=[% destination %]&amp;borrowernumber=[% borrowernumber %]&amp;categorycode=[% categorycode %]">Edit</a></li>
94
                <a id="editpatron" class="btn btn-small" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;categorycode=[% categorycode %]"><i class="icon-pencil"></i> Edit</a>
117
            [% ELSE %] <!-- if no categorycode, set category_type to A by default -->
95
            [% ELSE %] <!-- if no categorycode, set category_type to A by default -->
118
                <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=[% destination %]&amp;borrowernumber=[% borrowernumber %]&amp;category_type=A">Edit</a></li>
96
                <a id="editpatron" class="btn btn-small" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;category_type=A"><i class="icon-pencil"></i> Edit</a>
119
            [% END %]
97
            [% END %]
120
        [% END %]
98
        [% END %]
121
        [% IF ( adultborrower AND activeBorrowerRelationship ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C">Add child</a></li>[% END %]
122
        <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change password</a></li>
123
        <li><a id="duplicate" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">Duplicate</a></li>
124
    [% END %]
99
    [% END %]
125
    <li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&amp;print=page">Print summary</a></li>
100
126
    <li><a id="printslip" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&amp;print=slip">Print slip</a></li>
101
    [% IF ( CAN_user_borrowers ) %]
127
    <li id="searchtoholdc"><a id="searchtohold" href="#">Search to hold</a></li>
102
        [% IF ( adultborrower AND activeBorrowerRelationship ) %]
128
    [% IF ( CAN_user_borrowers ) %]<li id="moremenuc"><a id="renewpatron" href="/cgi-bin/koha/members/moremember.pl?reregistration=y&amp;borrowernumber=[% borrowernumber %]">Renew account</a></li>[% END %]
103
            <a id="addchild" class="btn btn-small" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C">Add child</a>
129
    [% IF ( CAN_user_permissions ) %]
104
        [% END %]
130
        [% IF ( CAN_user_staffaccess ) %]
105
        [% IF ( CAN_user_borrowers ) %]
131
            <li><a id="patronflags" href="/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]">Set permissions</a></li>
106
            <a id="changepassword" class="btn btn-small" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]"><i class="icon-lock"></i> Change password</a>
132
        [% END %]
107
        [% END %]
133
    [% END %]
108
    [% END %]
134
    [% IF ( CAN_user_staffaccess ) %]<li><a id="deletepatron" href="#" onclick="confirm_deletion();">Delete</a></li>[% END %]
135
109
136
</ul></div>
110
    <a id="duplicate" class="btn btn-small" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">Duplicate</a>
111
    <div class="btn-group">
112
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-print"></i> Print <span class="caret"></span></button>
113
            <ul class="dropdown-menu">
114
                [% IF ( CAN_user_borrowers ) %]<li><a id="printsummary" href="#">Print summary</a></li>[% END %]
115
                <li><a id="printslip" href="#">Print slip</a></li>
116
                <li><a id="printquickslip" href="#">Print quick slip</a></li>
117
            </ul>
118
    </div>
119
    <a id="searchtohold" class="btn btn-small" href="#">Search to hold</a>
120
    <div class="btn-group">
121
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown">More <span class="caret"></span></button>
122
            <ul class="dropdown-menu">
123
                [% IF ( CAN_user_borrowers ) %]
124
                    <li><a id="renewpatron" href="/cgi-bin/koha/members/moremember.pl?reregistration=y&amp;borrowernumber=[% borrowernumber %]">Renew patron</a></li>
125
                [% ELSE %]
126
                    <li class="disabled"><a id="renewpatron" href="#">Renew patron</a></li>
127
                [% END %]
128
                [% IF ( CAN_user_permissions ) %]
129
                    <li><a id="patronflags" href="/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]">Set permissions</a></li>
130
                [% ELSE %]
131
                    <li class="disabled"><a id="patronflags" href="#">Set permissions</a></li>
132
                [% END %]
133
                [% IF ( CAN_user_borrowers ) %]
134
                    <li><a id="deletepatron" href="#">Delete</a></li>
135
                [% ELSE %]
136
                    <li class="disabled"><a id="deletepatron" href="#">Delete</a></li>
137
                [% END %]
138
                [% IF ( is_child ) %]
139
                    <li><a id="updatechild" href="#">Update child to adult patron</a></li>
140
                [% ELSE %]
141
                    <li class="disabled"><a id="updatechild" href="#">Update child to adult patron</a></li></li>
142
                [% END %]
143
                <li><a id="exportcheckins" href="#">Export today's checked in barcodes</a></li>
144
            </ul>
145
    </div>
146
</div>
137
- 

Return to bug 9420