Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
fix reviews stuff (bug 668407)
Browse files Browse the repository at this point in the history
  • Loading branch information
potch committed Jun 30, 2011
1 parent c1a5d8d commit f1242ad
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
10 changes: 6 additions & 4 deletions apps/addons/templates/addons/impala/details.html
Expand Up @@ -149,10 +149,12 @@ <h2>{{ _('About this Add-on') }}</h2>
{% endcache %} {# cache addon #}

<aside class="secondary addon-reviews c">
<div>
{{ addon.average_rating|stars }}
{{ _('Average') }}
</div>
{% if reviews %}
<div>
{{ addon.average_rating|stars }}
{{ _('Average') }}
</div>
{% endif %}
{% include "reviews/grouped_ratings.html" %}
{% set amo_user = request.amo_user if user.is_authenticated() else None %}
{% if not addon.has_author(amo_user) %}
Expand Down
14 changes: 7 additions & 7 deletions apps/addons/templates/addons/impala/review_list_box.html
Expand Up @@ -34,13 +34,13 @@ <h3>
</p>
{% endif %}
{% else %}
<div class="review">
<h3>{{ _('This add-on has not yet been reviewed.') }}</h3>
<p>
<a href="{{ url('reviews.add', addon.slug) }}">
{{ _('Be the first to write a review!') }}
</a>
</p>
<div class="review no-reviews">
<h3>
{% trans url = url('reviews.add', addon.slug) %}
This add-on has not yet been reviewed.
<a href="{{ url }}">Be the first!</a>
{% endtrans %}
</h3>
</div>
{% endif %}
{% endcache %}
6 changes: 6 additions & 0 deletions media/css/impala/addon_details.less
Expand Up @@ -246,6 +246,12 @@

#reviews .review {
border-bottom: 1px dotted #C9DDF2;
&.no-reviews {
border-bottom: 0;
h3 {
font-style: normal;
}
}
padding: 1em 0;
h3 {
color: #333333;
Expand Down

0 comments on commit f1242ad

Please sign in to comment.