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 2637-2643 $star-selected: #EDB867; Link Here
2637
        height: 28px;
2637
        height: 28px;
2638
        white-space: nowrap;
2638
        white-space: nowrap;
2639
2639
2640
        a {
2640
        span,a {
2641
            font: normal normal normal 20px/1 "Font Awesome 6 Free";
2641
            font: normal normal normal 20px/1 "Font Awesome 6 Free";
2642
            -webkit-font-smoothing: antialiased;
2642
            -webkit-font-smoothing: antialiased;
2643
            margin-right: 2px;
2643
            margin-right: 2px;
Lines 2668-2674 $star-selected: #EDB867; Link Here
2668
    }
2668
    }
2669
2669
2670
    .br-readonly {
2670
    .br-readonly {
2671
        a {
2671
        span, a {
2672
            cursor: default;
2672
            cursor: default;
2673
        }
2673
        }
2674
    }
2674
    }
Lines 2683-2689 $star-selected: #EDB867; Link Here
2683
@media print {
2683
@media print {
2684
    .br-theme-fontawesome-stars {
2684
    .br-theme-fontawesome-stars {
2685
        .br-widget {
2685
        .br-widget {
2686
            a {
2686
            span,a {
2687
                &::after {
2687
                &::after {
2688
                    color: #000000;
2688
                    color: #000000;
2689
                    content: "\f006";
2689
                    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 390-395 Link Here
390
                                                    [% INCLUDE "openlibrary-readapi.inc" bib = SEARCH_RESULT %]
390
                                                    [% INCLUDE "openlibrary-readapi.inc" bib = SEARCH_RESULT %]
391
391
392
                                                    [% IF ( OpacStarRatings == 'all' ) %]
392
                                                    [% IF ( OpacStarRatings == 'all' ) %]
393
                                                        <span class="sr-only"> star rating </span>
393
                                                        <div class="results_summary ratings">
394
                                                        <div class="results_summary ratings">
394
                                                            [% SET rating_avg = SEARCH_RESULT.ratings.get_avg_rating() %]
395
                                                            [% SET rating_avg = SEARCH_RESULT.ratings.get_avg_rating() %]
395
                                                            [% rating_avg_int = BLOCK %][% rating_avg | format("%.0f") %][% END %]
396
                                                            [% rating_avg_int = BLOCK %][% rating_avg | format("%.0f") %][% END %]
Lines 397-412 Link Here
397
                                                                <div class="br-widget br-readonly">
398
                                                                <div class="br-widget br-readonly">
398
                                                                    [% FOREACH i IN [ 1 2 3 4 5  ] %]
399
                                                                    [% FOREACH i IN [ 1 2 3 4 5  ] %]
399
                                                                        [% IF rating_avg_int == i %]
400
                                                                        [% IF rating_avg_int == i %]
400
                                                                            <a href="#" class="br-selected br-current"></a>
401
                                                                            <span class="br-selected br-current"></span>
401
                                                                        [% ELSIF rating_avg_int > i %]
402
                                                                        [% ELSIF rating_avg_int > i %]
402
                                                                            <a href="#" class="br-selected"></a>
403
                                                                            <span class="br-selected"></span>
403
                                                                        [% ELSE %]
404
                                                                        [% ELSE %]
404
                                                                            <a href="#"></a>
405
                                                                            <span></span>
405
                                                                        [% END %]
406
                                                                        [% END %]
406
                                                                    [% END %]
407
                                                                    [% END %]
407
                                                                </div>
408
                                                                </div>
408
                                                            </div>
409
                                                            </div>
409
410
                                                            <span class="sr-only"> Average : [% rating_avg | html %] out of 5 stars</span>
410
                                                            [% IF SEARCH_RESULT.ratings.count > 0 %]
411
                                                            [% IF SEARCH_RESULT.ratings.count > 0 %]
411
                                                                <span id="rating_total_[% SEARCH_RESULT.biblionumber | html %]">&nbsp;&nbsp;([% SEARCH_RESULT.ratings.count | html %] votes)</span>
412
                                                                <span id="rating_total_[% SEARCH_RESULT.biblionumber | html %]">&nbsp;&nbsp;([% SEARCH_RESULT.ratings.count | html %] votes)</span>
412
                                                            [% ELSE %]
413
                                                            [% ELSE %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/ratings.js (-1 / +15 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
                if (this.name != "href") {
67
                    span.attr(this.name, this.value);
68
                }
69
            });
70
            $(this).replaceWith(span);
71
        } else {
72
            var data_rating = $(this).attr("data-rating-value");
73
            $(this).append('<span class="sr-only">' + data_rating + "</span>");
74
        }
75
    });
61
});
76
});
62
- 

Return to bug 39706