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 2624-2630 $star-selected: #EDB867; Link Here
2624
        height: 28px;
2624
        height: 28px;
2625
        white-space: nowrap;
2625
        white-space: nowrap;
2626
2626
2627
        a {
2627
        span,a {
2628
            font: normal normal normal 20px/1 "Font Awesome 6 Free";
2628
            font: normal normal normal 20px/1 "Font Awesome 6 Free";
2629
            -webkit-font-smoothing: antialiased;
2629
            -webkit-font-smoothing: antialiased;
2630
            margin-right: 2px;
2630
            margin-right: 2px;
Lines 2655-2661 $star-selected: #EDB867; Link Here
2655
    }
2655
    }
2656
2656
2657
    .br-readonly {
2657
    .br-readonly {
2658
        a {
2658
        span, a {
2659
            cursor: default;
2659
            cursor: default;
2660
        }
2660
        }
2661
    }
2661
    }
Lines 2670-2676 $star-selected: #EDB867; Link Here
2670
@media print {
2670
@media print {
2671
    .br-theme-fontawesome-stars {
2671
    .br-theme-fontawesome-stars {
2672
        .br-widget {
2672
        .br-widget {
2673
            a {
2673
            span,a {
2674
                &::after {
2674
                &::after {
2675
                    color: #000000;
2675
                    color: #000000;
2676
                    content: "\f006";
2676
                    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