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 4436-4441 div .suggestion_note { Link Here
4436
    }
4436
    }
4437
}
4437
}
4438
4438
4439
.ac-library {
4440
    background-color: #EEE;
4441
    border-radius: 4px;
4442
    color: #000;
4443
    display: inline-block;
4444
    font-size: 80%;
4445
    padding: 1px 4px;
4446
}
4447
4448
.ac-currentlibrary {
4449
    .ac-library {
4450
        background-color: #E6FCB7;
4451
        font-weight: bold;
4452
4453
    }
4454
}
4455
4456
.currentlibrary {
4457
    background-color: #E6FCB7;
4458
    display: inline-block;
4459
    padding: 2px 4px;
4460
}
4461
4439
@media (min-width: 200px) {
4462
@media (min-width: 200px) {
4440
4463
4441
}
4464
}
(-)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 data-order="[% borrower.dateofbirth | html %]">[% INCLUDE 'patron-age.inc' patron = borrower %]</td>
29
                <td data-order="[% borrower.dateofbirth | html %]">[% 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 465-471 Link Here
465
                    { 'mDataProp': 'dt_name' },
465
                    { 'mDataProp': 'dt_name' },
466
                    { 'mDataProp': 'dt_dateofbirth' },
466
                    { 'mDataProp': 'dt_dateofbirth' },
467
                    { 'mDataProp': 'dt_category' },
467
                    { 'mDataProp': 'dt_category' },
468
                    { 'mDataProp': 'dt_branch' },
468
                    {
469
                        'mDataProp': function ( oObj ) {
470
                            if( oObj.dt_branch == "[% Branches.GetLoggedInBranchname | html %]" ){
471
                                return "<span class=\"currentlibrary\">" + oObj.dt_branch + "</span>";
472
                            } else {
473
                                return oObj.dt_branch;
474
                            }
475
                        }
476
                    },
469
                    { 'mDataProp': 'dt_dateexpiry' },
477
                    { 'mDataProp': 'dt_dateexpiry' },
470
                    { 'mDataProp': 'dt_od_checkouts', 'bSortable': false },
478
                    { 'mDataProp': 'dt_od_checkouts', 'bSortable': false },
471
                    { 'mDataProp': 'dt_fines', 'bSortable': false },
479
                    { 'mDataProp': 'dt_fines', 'bSortable': false },
472
- 

Return to bug 10902