Skip to content

Commit 737dac3

Browse files
committed
Add max duration for talks in CFP
1 parent 1198dee commit 737dac3

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

apps/commons/filters.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,7 @@ def startswith(value, argument):
113113

114114
def msgtag_to_bulmaclass(message_tag):
115115
return BULMA_CLASSES.get(message_tag, 'is-link')
116+
117+
118+
def duration_in_minutes(value):
119+
return value.seconds // 60

apps/commons/templatetags/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def compose2(f, g):
2323
register.filter('sum_float', filters.sum_float)
2424
register.filter('startswith', filters.startswith)
2525
register.filter('msgtag_to_bulmaclass', filters.msgtag_to_bulmaclass)
26+
register.filter('duration_in_minutes', filters.duration_in_minutes)
2627

2728

2829
@register.simple_tag(takes_context=True)

apps/events/templates/events/call-for-papers.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{% load static utils %}
44

5-
{% block title %}Call For Papers - {{ evento }} - {{ block.super }}{% endblock %}
5+
{% block title %}Call For Papers - {{ event }} - {{ block.super }}{% endblock %}
66

77
{% block content %}
88

@@ -12,8 +12,14 @@ <h1>Call for papers <i class="fas fa-inbox"></i></h1>
1212
<h2>
1313
<a href="{% url 'events:detail_event' slug=event.slug %}">{{ event.name }}</a>
1414
</h2>
15-
{{ event.short_description|as_markdown }}
16-
<p>El período de presentación de propuestas estará abierto hasta el <strong>{{ event.cfp_stop_at }}</strong>.</p>
15+
<p><em>{{ event.short_description|as_markdown }}</em></p>
16+
<p>
17+
<i class="far fa-calendar-check"></i>
18+
El período de presentación de propuestas estará abierto hasta el <strong>{{ event.cfp_stop_at }}</strong>.
19+
<br>
20+
<i class="far fa-clock"></i>
21+
La duración máxima de la charla será de <strong>{{ event.default_slot_duration|duration_in_minutes }}<strong> minutos.
22+
</p>
1723

1824
<form action="./" method="post" class="uniForm">
1925
{% csrf_token %}

0 commit comments

Comments
 (0)