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

(-)a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss (-10 / +43 lines)
Lines 1670-1695 dd { Link Here
1670
    & + #menu {
1670
    & + #menu {
1671
        margin-right: 0;
1671
        margin-right: 0;
1672
    }
1672
    }
1673
1674
    > div {
1675
        border-right: 1px solid #B9D8D9;
1676
        width: 100%;
1677
    }
1673
}
1678
}
1674
1679
1675
#patronbasics {
1680
/* Patron image */
1676
    div {
1681
1677
        background: transparent url("../img/patron-blank.min.svg") 10px 5px no-repeat;
1682
.patronimage-container {
1678
        border: 1px solid #CCCCCC;
1683
    padding: .2em;
1684
    position: relative;
1685
1686
    &:hover {
1687
        .patronimage {
1688
            opacity: .8;
1689
        }
1690
1691
        .patronimage-controls {
1692
            opacity: 1;
1693
        }
1694
    }
1695
}
1696
1697
.patronimage {
1698
    display: block;
1699
    max-width: 160px;
1700
    opacity: 1;
1701
    transition: .2s ease;
1702
1703
    .empty {
1704
        background: transparent url( "../img/patron-blank.min.svg" ) center 5px no-repeat;
1679
        height: 125px;
1705
        height: 125px;
1680
        margin: .3em 0 .3em .3em;
1706
        margin: .3em 0 .3em .3em;
1681
        padding: 0;
1707
        padding: 0;
1682
        width: 105px;
1708
        width: 80%;
1683
    }
1709
    }
1684
}
1710
}
1685
1711
1686
#patronimage {
1712
.patronimage-controls {
1687
    border: 1px solid #CCCCCC;
1713
    left: 50%;
1688
    margin: .3em 0 .3em .3em;
1714
    opacity: 0;
1689
    max-width: 140px;
1715
    position: absolute;
1690
    padding: .2em;
1716
    text-align: center;
1717
    top: 80%;
1718
    transform: translate( -50%, -50% );
1719
    transition: .5s ease;
1691
}
1720
}
1692
1721
1722
.patronimage-control {
1723
    padding: 1em 2em;
1724
 }
1725
1693
.patronviews {
1726
.patronviews {
1694
    border-right:  1px solid #000;
1727
    border-right:  1px solid #000;
1695
    border-top: 1px solid #000;
1728
    border-top: 1px solid #000;
(-)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('HidePersonalPatronDetailOnCirculation')) %]
24
    [% IF !(Koha.Preference('HidePersonalPatronDetailOnCirculation')) %]
21
        [% IF Koha.Preference( 'AddressFormat' ) %]
25
        [% IF Koha.Preference( 'AddressFormat' ) %]
22
            [% INCLUDE "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
26
            [% INCLUDE "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
Lines 124-127 Link Here
124
        <li><a href="/cgi-bin/koha/ill/ill-requests.pl?borrowernumber=[% patron.borrowernumber %]">Interlibrary loans</a></li>
128
        <li><a href="/cgi-bin/koha/ill/ill-requests.pl?borrowernumber=[% patron.borrowernumber %]">Interlibrary loans</a></li>
125
    [% END %]
129
    [% END %]
126
</ul></div>
130
</ul></div>
131
132
<!-- Modal -->
133
<div class="modal" id="patronImageEdit" tabindex="-1" role="dialog" aria-labelledby="patronImageEditLabel">
134
    <div class="modal-dialog" role="document">
135
        <div class="modal-content">
136
            <div class="modal-header">
137
                <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
138
                <h4 class="modal-title" id="patronImageEditLabel">Modal title</h4>
139
            </div>
140
            <div class="modal-body">
141
                <img src="[% interface %]/[% theme %]/img/spinner-small.gif" alt="" />
142
            </div>
143
            <div class="modal-footer">
144
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
145
            </div>
146
        </div>
147
    </div>
148
</div>
149
127
[% END %]
150
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js (-1 / +15 lines)
Lines 100-106 $(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
    });
103
});
117
});
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
    if (is_confirmed) {
121
    if (is_confirmed) {
107
- 

Return to bug 20809