File tree Expand file tree Collapse file tree
frontend/templates/frontend Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,11 +97,17 @@ <h5 class="modal-title" id="deleteContentModalLabel">{% trans "Delete" %} <i>{{
9797 {{ content.description|linebreaks }} <!-- resolves to s -->
9898 </ div >
9999 </ div >
100- < h5 > < a name ="rating "> {% trans "Rating" %}</ a > < span class ="badge float-right text-right "> {{ content.get_rate }}/5</ span > </ h5 >
100+ < h5 > < a name ="rating "> {% trans "Rating" %}</ a >
101+ {% if content.get_rate != -1 %}
102+ < span class ="badge float-right text-right "> {{ content.get_rate }}/5</ span >
103+ {% else %}
104+ < span class ="badge float-right text-right "> No rating yet</ span >
105+ {% endif %}
106+ </ h5 >
101107 < div class ="starrating risingstar d-flex justify-content-end flex-row-reverse ">
102108 {% for i in 5|rev_range %}
103109 < input type ="radio " id ="star{{ i }} " name ="rating " value ="{{ i }} "
104- {% if i < = user_rate %}class ="active " {% endif %} />
110+ {% if i < = content.get_rate %}class ="active " {% endif %} />
105111 < label for ="star{{ i }} " onclick ="window.location.href='{% url 'frontend:rating' course.id topic.id content.id i %}' "> </ label >
106112 {% endfor %}
107113 </ div >
Original file line number Diff line number Diff line change 1919 </ a >
2020 < div class ="card-footer ">
2121 < span class ="badge badge-primary "> {{ content.language }}</ span >
22- ·
2322 {% if content.tags.count > 0 %}
23+ ·
2424 {% for tag in content.tags.all %}
2525 < span class ="badge badge-secondary "> {{ tag }}</ span >
2626 {% endfor %}
2727 {% endif %}
28+ {% if content.get_rate != -1 %}
2829 ·
29- {% if content.get_rate == -1 %}
30- < span class ="badge badge-info "> ~ </ span >
31- {% else %}
3230 < span class ="badge badge-info "> {{ content.get_rate}}</ span >
3331 {% endif %}
3432 </ div >
You can’t perform that action at this time.
0 commit comments