Compare commits

..

1 Commits
main ... fix_28

Author SHA1 Message Date
ac724b5240 feat: Language added for talks. Closing #28 2024-02-22 13:53:21 +01:00
4 changed files with 5 additions and 20 deletions

View File

@ -394,7 +394,7 @@ class Talk(PonyConfModel):
elif self.accepted is False:
return _('Refused')
else:
return _('Pending decision')
return _('Pending decision, score: %(score).1f') % {'score': self.score}
def get_status_color(self):
if self.accepted is True:
@ -430,7 +430,6 @@ class Talk(PonyConfModel):
1 if self.plenary else 0,
self.materials,
self.video,
self.score,
]
@property

View File

@ -95,20 +95,7 @@
<a class="btn {% if vote == 2 %} active {% endif %}btn-success" href="{% url 'talk-vote' talk.pk 2 %}">+2</a>
</div>
</p>
<p><button class="btn btn-info" onclick="toggle_votes()">{% trans "Toggle actual votes" %}</button> <span id="actual_votes" class="invisible">{{ talk.vote_set.count }} {% trans "vote" %}{{ talk.vote_set.count|pluralize }}, {% trans "average:" %} {{ talk.score|floatformat:1 }}</span></p>
<script>
function toggle_votes(){
let votes = document.getElementById('actual_votes');
if (votes != null) {
if (votes.className == "invisible") {
votes.className = "visible";
} else {
votes.className = "invisible";
}
}
}
</script>
<p>{{ talk.vote_set.count }} {% trans "vote" %}{{ talk.vote_set.count|pluralize }}, {% trans "average:" %} {{ talk.score|floatformat:1 }}</p>
<a href="{% url 'talk-accept' talk.pk %}" class="btn btn-success">{% trans "Accept" %}</a>
<a href="{% url 'talk-decline' talk.pk %}" class="btn btn-danger">{% trans "Decline" %}</a>

View File

@ -59,7 +59,6 @@
<th class="text-center">{% trans "Track" %}</th>
<th class="text-center">{% trans "Tags" %}</th>
<th class="text-center">{% trans "Status" %} <a href="?{{ sort_urls.status }}"><span class="glyphicon glyphicon-{{ sort_glyphicons.status }} pull-right"></span></a></th>
<th class="text-center">{% trans "Score" %} <a href="?{{ sort_urls.score }}"><span class="glyphicon glyphicon-{{ sort_glyphicons.score }} pull-right"></span></a></th>
</tr>
</thead>
<tfoot>
@ -87,8 +86,9 @@
<td>{{ talk.language }}</td>
<td>{{ talk.track|default:"" }}</td>
<td>{{ talk.get_tags_html }}</td>
<td>{{ talk.get_status_str }}</td>
<td>{{ talk.score }}</td>
<td>
{{ talk.get_status_str }}
</td>
</tr>
{% if forloop.last%}
</tbody>

View File

@ -730,7 +730,6 @@ def talk_list(request):
'title': 'title',
'category': 'category',
'status': 'accepted',
'score': 'score',
}
sort = request.GET.get('sort')
if sort in SORT_MAPPING.keys():