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 558-579 div.patroninfo ul li { Link Here
558
	list-style-type : none;
558
	list-style-type : none;
559
}
559
}
560
560
561
#patronbasics div {
561
/* Patron images */
562
    background: transparent url("../img/patron-blank.min.svg") 10px 5px no-repeat;
562
563
    border: 1px solid #CCCCCC;
563
.patroninfo > div {
564
    border-right: 1px solid #b9d8d9;
565
    width: 100%;
566
}
567
568
.patronimage-container {
569
    padding: .2em;
570
    position: relative;
571
}
572
573
.patronimage {
574
    opacity: 1;
575
    display: block;
576
    max-width: 160px;
577
    transition: .2s ease;
578
}
579
580
.patronimage.empty {
581
    background: transparent url("../img/patron-blank.min.svg") center 5px no-repeat;
564
    height: 125px;
582
    height: 125px;
565
    margin: .3em 0 .3em .3em;
583
    margin: .3em 0 .3em .3em;
566
    padding: 0;
584
    padding: 0;
567
    width: 105px;
585
    width: 80%;
568
}
586
}
569
587
570
#patronimage {
588
.patronimage-controls {
571
    border: 1px solid #CCCCCC;
589
    transition: .5s ease;
572
    max-width : 140px;
590
    opacity: 0;
573
    margin: .3em 0 .3em .3em;
591
    position: absolute;
574
    padding: .2em;
592
    top: 80%;
575
    width:auto !important;
593
    left: 50%;
576
    width:130px;
594
    transform: translate(-50%, -50%);
595
    text-align: center;
596
}
597
598
.patronimage-container:hover .patronimage {
599
    opacity: 0.8;
600
}
601
602
.patronimage-container:hover .patronimage-controls {
603
    opacity: 1;
604
}
605
606
.patronimage-control {
607
    padding: 1em 2em;
577
}
608
}
578
609
579
div.patronviews {
610
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