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

(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss (-3 / +3 lines)
Lines 2629-2635 $star-selected: #EDB867; Link Here
2629
        height: 28px;
2629
        height: 28px;
2630
        white-space: nowrap;
2630
        white-space: nowrap;
2631
2631
2632
        a {
2632
        span,a {
2633
            font: normal normal normal 20px/1 "Font Awesome 6 Free";
2633
            font: normal normal normal 20px/1 "Font Awesome 6 Free";
2634
            -webkit-font-smoothing: antialiased;
2634
            -webkit-font-smoothing: antialiased;
2635
            margin-right: 2px;
2635
            margin-right: 2px;
Lines 2660-2666 $star-selected: #EDB867; Link Here
2660
    }
2660
    }
2661
2661
2662
    .br-readonly {
2662
    .br-readonly {
2663
        a {
2663
        span, a {
2664
            cursor: default;
2664
            cursor: default;
2665
        }
2665
        }
2666
    }
2666
    }
Lines 2675-2681 $star-selected: #EDB867; Link Here
2675
@media print {
2675
@media print {
2676
    .br-theme-fontawesome-stars {
2676
    .br-theme-fontawesome-stars {
2677
        .br-widget {
2677
        .br-widget {
2678
            a {
2678
            span,a {
2679
                &::after {
2679
                &::after {
2680
                    color: #000000;
2680
                    color: #000000;
2681
                    content: "\f006";
2681
                    content: "\f006";
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/user-star-ratings.inc (+1 lines)
Lines 16-21 Link Here
16
        </div>
16
        </div>
17
    </div>
17
    </div>
18
18
19
    <label class="sr-only" for="star_rating-[% item.itemnumber | html %]">star rating</label>
19
    <select class="star_rating" id="star_rating-[% item.itemnumber | html %]" name="rating" autocomplete="off" data-biblionumber="[% item.biblionumber | html %]" data-context="rating-[% item.itemnumber | html %]">
20
    <select class="star_rating" id="star_rating-[% item.itemnumber | html %]" name="rating" autocomplete="off" data-biblionumber="[% item.biblionumber | html %]" data-context="rating-[% item.itemnumber | html %]">
20
        [% IF ( rating_avg_int == 0 ) %]
21
        [% IF ( rating_avg_int == 0 ) %]
21
            <option value="" selected="selected"></option>
22
            <option value="" selected="selected"></option>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-4 / +5 lines)
Lines 386-391 Link Here
386
                                                    [% INCLUDE "openlibrary-readapi.inc" bib = SEARCH_RESULT %]
386
                                                    [% INCLUDE "openlibrary-readapi.inc" bib = SEARCH_RESULT %]
387
387
388
                                                    [% IF ( OpacStarRatings == 'all' ) %]
388
                                                    [% IF ( OpacStarRatings == 'all' ) %]
389
                                                        <span class="sr-only"> star rating </span>
389
                                                        <div class="results_summary ratings">
390
                                                        <div class="results_summary ratings">
390
                                                            [% SET rating_avg = SEARCH_RESULT.ratings.get_avg_rating() %]
391
                                                            [% SET rating_avg = SEARCH_RESULT.ratings.get_avg_rating() %]
391
                                                            [% rating_avg_int = BLOCK %][% rating_avg | format("%.0f") %][% END %]
392
                                                            [% rating_avg_int = BLOCK %][% rating_avg | format("%.0f") %][% END %]
Lines 393-408 Link Here
393
                                                                <div class="br-widget br-readonly">
394
                                                                <div class="br-widget br-readonly">
394
                                                                    [% FOREACH i IN [ 1 2 3 4 5  ] %]
395
                                                                    [% FOREACH i IN [ 1 2 3 4 5  ] %]
395
                                                                        [% IF rating_avg_int == i %]
396
                                                                        [% IF rating_avg_int == i %]
396
                                                                            <a href="#" class="br-selected br-current"></a>
397
                                                                            <span href="#" class="br-selected br-current"></span>
397
                                                                        [% ELSIF rating_avg_int > i %]
398
                                                                        [% ELSIF rating_avg_int > i %]
398
                                                                            <a href="#" class="br-selected"></a>
399
                                                                            <span href="#" class="br-selected"></span>
399
                                                                        [% ELSE %]
400
                                                                        [% ELSE %]
400
                                                                            <a href="#"></a>
401
                                                                            <span href="#"></span>
401
                                                                        [% END %]
402
                                                                        [% END %]
402
                                                                    [% END %]
403
                                                                    [% END %]
403
                                                                </div>
404
                                                                </div>
404
                                                            </div>
405
                                                            </div>
405
406
                                                            <span class="sr-only"> Average : [% rating_avg | html %] out of 5 stars</span>
406
                                                            [% IF SEARCH_RESULT.ratings.count > 0 %]
407
                                                            [% IF SEARCH_RESULT.ratings.count > 0 %]
407
                                                                <span id="rating_total_[% SEARCH_RESULT.biblionumber | html %]">&nbsp;&nbsp;([% SEARCH_RESULT.ratings.count | html %] votes)</span>
408
                                                                <span id="rating_total_[% SEARCH_RESULT.biblionumber | html %]">&nbsp;&nbsp;([% SEARCH_RESULT.ratings.count | html %] votes)</span>
408
                                                            [% ELSE %]
409
                                                            [% ELSE %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/ratings.js (-1 / +13 lines)
Lines 58-61 $(document).ready(function () { Link Here
58
        var context = "#" + $(this).data("context");
58
        var context = "#" + $(this).data("context");
59
        $(context).barrating("set", "");
59
        $(context).barrating("set", "");
60
    });
60
    });
61
62
    $(".br-widget a").each(function () {
63
        if (!is_logged_in) {
64
            var span = $("<span></span>");
65
            $.each(this.attributes, function () {
66
                span.attr(this.name, this.value);
67
            });
68
            $(this).replaceWith(span);
69
        } else {
70
            var data_rating = $(this).attr("data-rating-value");
71
            $(this).append('<span class="sr-only">' + data_rating + "</span>");
72
        }
73
    });
61
});
74
});
62
- 

Return to bug 39706