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

(-)a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css (-11 / +42 lines)
Lines 567-588 div.patroninfo ul li { Link Here
567
	list-style-type : none;
567
	list-style-type : none;
568
}
568
}
569
569
570
#patronbasics div {
570
/* Patron images */
571
    background: transparent url("../img/patron-blank.min.svg") 10px 5px no-repeat;
571
572
    border: 1px solid #CCCCCC;
572
.patroninfo > div {
573
    border-right: 1px solid #b9d8d9;
574
    width: 100%;
575
}
576
577
.patronimage-container {
578
    padding: .2em;
579
    position: relative;
580
}
581
582
.patronimage {
583
    opacity: 1;
584
    display: block;
585
    max-width: 160px;
586
    transition: .2s ease;
587
}
588
589
.patronimage.empty {
590
    background: transparent url("../img/patron-blank.min.svg") center 5px no-repeat;
573
    height: 125px;
591
    height: 125px;
574
    margin: .3em 0 .3em .3em;
592
    margin: .3em 0 .3em .3em;
575
    padding: 0;
593
    padding: 0;
576
    width: 105px;
594
    width: 80%;
577
}
595
}
578
596
579
#patronimage {
597
.patronimage-controls {
580
    border: 1px solid #CCCCCC;
598
    transition: .5s ease;
581
    max-width : 140px;
599
    opacity: 0;
582
    margin: .3em 0 .3em .3em;
600
    position: absolute;
583
    padding: .2em;
601
    top: 80%;
584
    width:auto !important;
602
    left: 50%;
585
    width:130px;
603
    transform: translate(-50%, -50%);
604
    text-align: center;
605
}
606
607
.patronimage-container:hover .patronimage {
608
    opacity: 0.8;
609
}
610
611
.patronimage-container:hover .patronimage-controls {
612
    opacity: 1;
613
}
614
615
.patronimage-control {
616
    padding: 1em 2em;
586
}
617
}
587
618
588
div.patronviews {
619
div.patronviews {
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc (-15 / +38 lines)
Lines 1-22 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% IF ( patron.borrowernumber ) %]
2
[% IF ( patron.borrowernumber ) %]
3
<div class="patroninfo"><h5>[% INCLUDE 'patron-title.inc' %]</h5>
3
<div class="patroninfo"><h5>[% INCLUDE 'patron-title.inc' %]</h5>
4
<!--[if IE 6]>
4
5
<style type="tex/css">img { width: expression(this.width > 140 ? 140: true);
5
[% IF ( patronimages ) %]
6
}</style>
6
    <div>
7
<![endif]-->
7
        <div class="patronimage-container">
8
            [% IF ( patron.image ) %]
9
                <img src="/cgi-bin/koha/members/patronimage.pl?borrowernumber=[% patron.borrowernumber | uri %]" class="patronimage" alt="[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])" />
10
                <div class="patronimage-controls">
11
                    <div class="patronimage-control"><a data-borrowernumber="[% patron.borrowernumber | uri %]" class="btn btn-default btn-sm edit-patronimage" title="Edit patron image" href="#"><i class="fa fa-pencil"></i> Edit</a></div>
12
                </div>
13
            [% ELSE %]
14
                <div class="patronimage empty"></div>
15
                <div class="patronimage-controls">
16
                    <div class="patronimage-control"><a data-borrowernumber="[% patron.borrowernumber | uri %]" class="btn btn-default btn-sm edit-patronimage" title="Add patron image" href="#"><i class="fa fa-plus"></i> Add</a></div>
17
                </div>
18
            [% END %]
19
        </div>
20
    </div>
21
[% END %]
22
8
<ul class="patronbriefinfo">
23
<ul class="patronbriefinfo">
9
    [% IF ( patronimages ) %]
10
        [% IF ( patron.image ) %]
11
            <li>
12
                <img src="/cgi-bin/koha/members/patronimage.pl?borrowernumber=[% patron.borrowernumber | uri %]" id="patronimage" alt="[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])" />
13
            </li>
14
        [% ELSE %]
15
            <li id="patronbasics">
16
                <div></div>
17
            </li>
18
        [% END %]
19
    [% END %]
20
    [% IF Koha.Preference( 'AddressFormat' ) %]
24
    [% IF Koha.Preference( 'AddressFormat' ) %]
21
        [% INCLUDE "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
25
        [% INCLUDE "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
22
    [% ELSE %]
26
    [% ELSE %]
Lines 122-125 Link Here
122
        <li><a href="/cgi-bin/koha/ill/ill-requests.pl?borrowernumber=[% patron.borrowernumber %]">Interlibrary loans</a></li>
126
        <li><a href="/cgi-bin/koha/ill/ill-requests.pl?borrowernumber=[% patron.borrowernumber %]">Interlibrary loans</a></li>
123
    [% END %]
127
    [% END %]
124
</ul></div>
128
</ul></div>
129
130
<!-- Modal -->
131
<div class="modal" id="patronImageEdit" tabindex="-1" role="dialog" aria-labelledby="patronImageEditLabel">
132
    <div class="modal-dialog" role="document">
133
        <div class="modal-content">
134
            <div class="modal-header">
135
                <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
136
                <h4 class="modal-title" id="patronImageEditLabel">Modal title</h4>
137
            </div>
138
            <div class="modal-body">
139
                <img src="[% interface %]/[% theme %]/img/spinner-small.gif" alt="" />
140
            </div>
141
            <div class="modal-footer">
142
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
143
            </div>
144
        </div>
145
    </div>
146
</div>
147
125
[% END %]
148
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js (-1 / +15 lines)
Lines 100-105 $(document).ready(function(){ Link Here
100
    $("#select_patron_messages").on("change",function(){
100
    $("#select_patron_messages").on("change",function(){
101
        $("#borrower_message").val( $(this).val() );
101
        $("#borrower_message").val( $(this).val() );
102
    });
102
    });
103
104
    $(".edit-patronimage").on("click", function(e){
105
        e.preventDefault();
106
        var borrowernumber = $(this).data("borrowernumber");
107
        var url = "/cgi-bin/koha/members/moremember.pl?borrowernumber=" + borrowernumber;
108
        $.get("/cgi-bin/koha/members/moremember.pl", { borrowernumber : borrowernumber }, function( data ){
109
            image_form = $(data).find("#picture-upload");
110
            image_form.show().find(".cancel").remove();
111
            $("#patronImageEdit .modal-body").html( image_form );
112
        });
113
        var modalTitle = $(this).attr("title");
114
        $("#patronImageEdit .modal-title").text(modalTitle);
115
        $("#patronImageEdit").modal("show");
116
    });
117
103
});
118
});
104
function confirm_local_deletion() {
119
function confirm_local_deletion() {
105
    var is_confirmed = window.confirm(_("Are you sure you want to delete this patron from the local database? This cannot be undone."));
120
    var is_confirmed = window.confirm(_("Are you sure you want to delete this patron from the local database? This cannot be undone."));
106
- 

Return to bug 20809