Pinning of submissions
This commit is contained in:
parent
2bcf645461
commit
1883792c7f
@ -57,8 +57,11 @@
|
|||||||
<h1>Watch <q>{{episode.name}}</q> From</h1>
|
<h1>Watch <q>{{episode.name}}</q> From</h1>
|
||||||
<div class="submission-list">
|
<div class="submission-list">
|
||||||
{% for sbm in submissions %}
|
{% for sbm in submissions %}
|
||||||
<div class="submission{% if sbm.positives < sbm.negatives %} buried{% endif %}">
|
<div class="submission{% if sbm.positives < sbm.negatives %} buried{% endif %}{% if sbm.pinned %} pinned{% endif %}">
|
||||||
<a href="{{sbm.url}}" class="link"><i class="fa fa-fw fa-globe"></i> {{sbm.url}}</a>
|
<a href="{{sbm.url}}" class="link">
|
||||||
|
{% if sbm.pinned %}<i class="fa fa-fw fa-thumb-tack" title="Pinned submission"></i>{% endif %}
|
||||||
|
<i class="fa fa-fw fa-globe"></i> {{sbm.url}}
|
||||||
|
</a>
|
||||||
<div class="vote-btns" data-vote-id="{{sbm.id}}">
|
<div class="vote-btns" data-vote-id="{{sbm.id}}">
|
||||||
<form method="POST" action="/show/{{show.abbr}}/vote/{{sbm.id}}/1">
|
<form method="POST" action="/show/{{show.abbr}}/vote/{{sbm.id}}/1">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
@ -76,7 +76,7 @@ class EpisodeView(TemplateView):
|
|||||||
),
|
),
|
||||||
negatives=Count('votes') - F('positives'),
|
negatives=Count('votes') - F('positives'),
|
||||||
score=F('positives') - F('negatives')
|
score=F('positives') - F('negatives')
|
||||||
).order_by('-score')
|
).order_by('-pinned', '-score')
|
||||||
|
|
||||||
# Add fields to context
|
# Add fields to context
|
||||||
ctx['show'] = show
|
ctx['show'] = show
|
||||||
|
Reference in New Issue
Block a user