Fix merge conflict

This commit is contained in:
Artem Bazykin 2017-02-02 11:15:19 +02:00
commit 582c7fd1d4
1 changed files with 7 additions and 2 deletions

View File

@ -11,14 +11,19 @@ package - The package for which the rating belongs to
{% resource "rating_css/rating.css" %} {% resource "rating_css/rating.css" %}
{% resource "rating_js/rating.js" %} {% resource "rating_js/rating.js" %}
{% set action = 'submit_package_rating' %}
{% if package.type == 'showcase' %}
{% set action = 'submit_showcase_rating' %}
{% endif %}
{% set stars = h.get_user_rating(package.id) %} {% set stars = h.get_user_rating(package.id) %}
<span class="star-rating{% if stars == 0 %} no-stars{% endif %}"> <span class="star-rating{% if stars == 0 %} no-stars{% endif %}">
<span class="star-rating-stars"> <span class="star-rating-stars">
{%- for index in range(stars|int) -%} {%- for index in range(stars|int) -%}
<a class="rating-star" id="star-{{index}}" href="/rating/{{ package.type }}/{{ package.name }}/{{ index + 1 }}"><i class="user-rating-star icon icon-star" id="star-{{index}}"></i></a> <a class="icon icon-star rating-star" id="star-{{index}}" href="{{ h.url_for(controller='ckanext.rating.controller:RatingController', action=action, package=package.name, rating=index+1) }}"></a>
{%- endfor -%} {%- endfor -%}
{%- for index in range(stars|int, 5) -%} {%- for index in range(stars|int, 5) -%}
<a class="rating-star" id="star-{{index}}" href="/rating/{{ package.type }}/{{ package.name }}/{{ index + 1 }}"><i class="user-rating-star icon icon-star-empty"></i></a> <a class="icon icon-star-empty rating-star" href="{{ h.url_for(controller='ckanext.rating.controller:RatingController', action=action, package=package.name, rating=index+1) }}"></a>
{%- endfor -%} {%- endfor -%}
</span> </span>
</span> </span>