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

(-)a/circ/ysearch.pl (+1 lines)
Lines 90-95 while ( my $b = $borrowers_rs->next ) { Link Here
90
        city           => $b->city       // '',
90
        city           => $b->city       // '',
91
        zipcode        => $b->zipcode    // '',
91
        zipcode        => $b->zipcode    // '',
92
        country        => $b->country    // '',
92
        country        => $b->country    // '',
93
        branchcode     => $b->branchcode // '',
93
      };
94
      };
94
}
95
}
95
96
(-)a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss (+23 lines)
Lines 4383-4388 div .suggestion_note { Link Here
4383
    }
4383
    }
4384
}
4384
}
4385
4385
4386
.ac-library {
4387
    background-color: #EEE;
4388
    border-radius: 4px;
4389
    color: #000;
4390
    display: inline-block;
4391
    font-size: 80%;
4392
    padding: 1px 4px;
4393
}
4394
4395
.ac-currentlibrary {
4396
    .ac-library {
4397
        background-color: #E6FCB7;
4398
        font-weight: bold;
4399
4400
    }
4401
}
4402
4403
.currentlibrary {
4404
    background-color: #E6FCB7;
4405
    display: inline-block;
4406
    padding: 2px 4px;
4407
}
4408
4386
@media (min-width: 200px) {
4409
@media (min-width: 200px) {
4387
4410
4388
}
4411
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc (-1 / +7 lines)
Lines 28-34 Link Here
28
                <td>[% borrower.cardnumber | html %]</td>
28
                <td>[% borrower.cardnumber | html %]</td>
29
                <td>[% INCLUDE 'patron-age.inc' patron = borrower %]</td>
29
                <td>[% INCLUDE 'patron-age.inc' patron = borrower %]</td>
30
                <td>[% Categories.GetName( borrower.categorycode ) | html %]</td>
30
                <td>[% Categories.GetName( borrower.categorycode ) | html %]</td>
31
                <td>[% Branches.GetName( borrower.branchcode ) | html %]</td>
31
                <td>
32
                    [% IF ( Branches.GetLoggedInBranchcode == borrower.branchcode ) %]
33
                        <span class="currentlibrary">[% Branches.GetName( borrower.branchcode ) | html %]</span>
34
                    [% ELSE %]
35
                        [% Branches.GetName( borrower.branchcode ) | html %]
36
                    [% END %]
37
                </td>
32
                <td>[% borrower.address | html %]</td>
38
                <td>[% borrower.address | html %]</td>
33
                <td>[% borrower.phone | html %]</td>
39
                <td>[% borrower.phone | html %]</td>
34
            </tr>
40
            </tr>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc (-1 / +24 lines)
Lines 1-6 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE AudioAlerts %]
3
[% USE AudioAlerts %]
4
[% USE Branches %]
4
[% USE To %]
5
[% USE To %]
5
[% USE Koha %]
6
[% USE Koha %]
6
[%# Prevent XFS attacks -%]
7
[%# Prevent XFS attacks -%]
Lines 69-74 Link Here
69
    [% IF ( PatronAutoComplete ) %]
70
    [% IF ( PatronAutoComplete ) %]
70
        <script>
71
        <script>
71
            // PatronAutoComplete && CAN_user_circulate_circulate_remaining_permissions
72
            // PatronAutoComplete && CAN_user_circulate_circulate_remaining_permissions
73
            var loggedInLibrary = '[% Branches.GetLoggedInBranchcode | html %]';
74
            var loggedInClass = "";
72
            $(document).ready(function(){
75
            $(document).ready(function(){
73
                var obj = $( "#findborrower" ).autocomplete({
76
                var obj = $( "#findborrower" ).autocomplete({
74
                    source: "/cgi-bin/koha/circ/ysearch.pl",
77
                    source: "/cgi-bin/koha/circ/ysearch.pl",
Lines 86-91 Link Here
86
                            cardnumber = " (" + item.cardnumber + ") ";
89
                            cardnumber = " (" + item.cardnumber + ") ";
87
                        }
90
                        }
88
                        var itemString = "<a href=\"" + item.link + "\">" + ( item.surname ? item.surname.escapeHtml() : "" ) + ", " + ( item.firstname ? item.firstname.escapeHtml() : "" ) + cardnumber.escapeHtml() + " <small>";
91
                        var itemString = "<a href=\"" + item.link + "\">" + ( item.surname ? item.surname.escapeHtml() : "" ) + ", " + ( item.firstname ? item.firstname.escapeHtml() : "" ) + cardnumber.escapeHtml() + " <small>";
92
93
                        if( item.branchcode == loggedInLibrary ){
94
                            loggedInClass = "ac-currentlibrary";
95
                        } else {
96
                            loggedInClass = "";
97
                        }
98
89
                        if( item.dateofbirth ) {
99
                        if( item.dateofbirth ) {
90
                            itemString += ( item.dateofbirth ? item.dateofbirth.escapeHtml() : "" )
100
                            itemString += ( item.dateofbirth ? item.dateofbirth.escapeHtml() : "" )
91
                                        + "<span class=\"age_years\"> (" + ( item.age ? item.age.escapeHtml() : "" ) + " " +  _("years") + ")</span>, ";
101
                                        + "<span class=\"age_years\"> (" + ( item.age ? item.age.escapeHtml() : "" ) + " " +  _("years") + ")</span>, ";
Lines 95-101 Link Here
95
                                    + ( item.zipcode ? item.zipcode.escapeHtml() : "" ) + " "
105
                                    + ( item.zipcode ? item.zipcode.escapeHtml() : "" ) + " "
96
                                    + ( item.country ? item.country.escapeHtml() : "" )
106
                                    + ( item.country ? item.country.escapeHtml() : "" )
97
                                    + "</small></a>";
107
                                    + "</small></a>";
108
                        itemString += " <span class=\"ac-library\">" + item.branchcode + "</span> " + "</a>";
98
                        return $( "<li></li>" )
109
                        return $( "<li></li>" )
110
                        .addClass( loggedInClass )
99
                        .data( "ui-autocomplete-item", item )
111
                        .data( "ui-autocomplete-item", item )
100
                        .append( itemString )
112
                        .append( itemString )
101
                        .appendTo( ul );
113
                        .appendTo( ul );
Lines 108-113 Link Here
108
[% IF ( PatronAutoComplete ) %]
120
[% IF ( PatronAutoComplete ) %]
109
    <script>
121
    <script>
110
    // PatronAutoComplete
122
    // PatronAutoComplete
123
    var loggedInLibrary = '[% Branches.GetLoggedInBranchcode | html %]';
124
    var loggedInClass = "";
111
    $(document).ready(function(){
125
    $(document).ready(function(){
112
        var obj = $( "#searchmember" ).autocomplete({
126
        var obj = $( "#searchmember" ).autocomplete({
113
            source: "/cgi-bin/koha/circ/ysearch.pl",
127
            source: "/cgi-bin/koha/circ/ysearch.pl",
Lines 124-130 Link Here
124
                    // Display card number in parentheses if it exists
138
                    // Display card number in parentheses if it exists
125
                    cardnumber = " (" + item.cardnumber + ") ";
139
                    cardnumber = " (" + item.cardnumber + ") ";
126
                }
140
                }
141
                if( item.branchcode == loggedInLibrary ){
142
                    loggedInClass = "ac-currentlibrary";
143
                } else {
144
                    loggedInClass = "";
145
                }
127
                return $( "<li></li>" )
146
                return $( "<li></li>" )
147
                .addClass( loggedInClass )
128
                .data( "ui-autocomplete-item", item )
148
                .data( "ui-autocomplete-item", item )
129
                .append(
149
                .append(
130
                    "<a href=\"" + item.link + "\">" + ( item.surname ? item.surname.escapeHtml() : "" ) + ", "
150
                    "<a href=\"" + item.link + "\">" + ( item.surname ? item.surname.escapeHtml() : "" ) + ", "
Lines 135-141 Link Here
135
                            + ( item.address     ? item.address.escapeHtml() : "" )     + " "
155
                            + ( item.address     ? item.address.escapeHtml() : "" )     + " "
136
                            + ( item.city        ? item.city.escapeHtml() : "" )        + " "
156
                            + ( item.city        ? item.city.escapeHtml() : "" )        + " "
137
                            + ( item.zipcode     ? item.zipcode.escapeHtml() : "" )     + " "
157
                            + ( item.zipcode     ? item.zipcode.escapeHtml() : "" )     + " "
138
                            + ( item.country     ? item.country.escapeHtml() : "" )
158
                            + ( item.country     ? item.country.escapeHtml() : "" ) + " "
159
                            + "<span class=\"ac-library\">"
160
                            + ( item.branchcode  ? item.branchcode.escapeHtml() : "" )
161
                            + "</span>"
139
                        + "</small>"
162
                        + "</small>"
140
                    + "</a>" )
163
                    + "</a>" )
141
                .appendTo( ul );
164
                .appendTo( ul );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt (-2 / +9 lines)
Lines 440-446 Link Here
440
                    { 'mDataProp': 'dt_name' },
440
                    { 'mDataProp': 'dt_name' },
441
                    { 'mDataProp': 'dt_dateofbirth' },
441
                    { 'mDataProp': 'dt_dateofbirth' },
442
                    { 'mDataProp': 'dt_category' },
442
                    { 'mDataProp': 'dt_category' },
443
                    { 'mDataProp': 'dt_branch' },
443
                    {
444
                        'mDataProp': function ( oObj ) {
445
                            if( oObj.dt_branch == "[% Branches.GetLoggedInBranchname | html %]" ){
446
                                return "<span class=\"currentlibrary\">" + oObj.dt_branch + "</span>";
447
                            } else {
448
                                return oObj.dt_branch;
449
                            }
450
                        }
451
                    },
444
                    { 'mDataProp': 'dt_dateexpiry' },
452
                    { 'mDataProp': 'dt_dateexpiry' },
445
                    { 'mDataProp': 'dt_od_checkouts', 'bSortable': false },
453
                    { 'mDataProp': 'dt_od_checkouts', 'bSortable': false },
446
                    { 'mDataProp': 'dt_fines', 'bSortable': false },
454
                    { 'mDataProp': 'dt_fines', 'bSortable': false },
447
- 

Return to bug 10902