30 lines
1.0 KiB
HTML
30 lines
1.0 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
{% load i18n %}
|
|
|
|
{% block volunteerstab %} class="active"{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<h1>{% trans "Become a volunteers!" %}</h1>
|
|
|
|
{% for activity in activities %}
|
|
{% if forloop.first %}<div class="list-group">{% endif %}
|
|
<div class="list-group-item{% if request.user in activity.participants.all %} list-group-item-info{% endif %}">
|
|
<h4 clas="list-group-item-heading">{{ activity.name }}</h4>
|
|
<p class="list-group-item-text">
|
|
<p>{{ activity.description }}</p>
|
|
<p>
|
|
{% if volunteer not in activity.volunteers.all %}
|
|
<a class="btn btn-primary" href="{% url 'volunteer-join' volunteer_token=volunteer.token activity=activity.slug %}">{% trans "I will be happy to help on that!" %}</a>
|
|
{% else %}
|
|
<a class="btn btn-danger" href="{% url 'volunteer-quit' volunteer_token=volunteer.token activity=activity.slug %}">{% trans "Sorry, I have a setback" %}</a>
|
|
{% endif %}
|
|
</p>
|
|
</p>
|
|
</div>
|
|
{% if forloop.last %}</div>{% endif %}
|
|
{% endfor %}
|
|
|
|
{% endblock %}
|