diff --git a/event/static/js/enrol_event.js b/event/static/js/enrol_event.js new file mode 100644 index 0000000..fe8680e --- /dev/null +++ b/event/static/js/enrol_event.js @@ -0,0 +1,18 @@ +$(function(){ + function initEnrolment(elt) { + elt = $(elt); + elt.find("form.enrolment").on("submit", function() { + elt.addClass("sending-request"); + var form = this; + var url = form.action + "?ajax"; + $.post(url, $(form).serialize(), function(data) { + elt.html(data); + elt.removeClass("sending-request"); + initEnrolment(elt); + }); + return false; + }); + } + + $.each($(".activity-summary"), function(i, item) { initEnrolment(item) }); +}); diff --git a/event/templates/event/activity_summary.html b/event/templates/event/activity_summary.html index 1513a7f..96f94fd 100644 --- a/event/templates/event/activity_summary.html +++ b/event/templates/event/activity_summary.html @@ -71,7 +71,7 @@ {% endwith %}
- s'inscrire (TODO) + {% enrol_btn activity request.user %}
diff --git a/event/templates/event/event.html b/event/templates/event/event.html index faafb10..55dbbbf 100644 --- a/event/templates/event/event.html +++ b/event/templates/event/event.html @@ -3,6 +3,11 @@ {% block title %}{% trans "Évènement" %}{% endblock %} +{% block extra_js %} + {{ block.super }} + +{% endblock %} + {% block content %}

{{ event.title}} {% if perms.event.event_can_change and user.is_staff %} @@ -49,7 +54,9 @@ de {{ activity.beginning | time:"H:i" }} à {{ activity.end| time:"H:i" }} - {% include "event/activity_summary.html" with activity=activity %} +
+ {% include "event/activity_summary.html" with activity=activity %} +
{% endfor %} diff --git a/event/templates/event/tags/enrol_btn.html b/event/templates/event/tags/enrol_btn.html new file mode 100644 index 0000000..8bf45fd --- /dev/null +++ b/event/templates/event/tags/enrol_btn.html @@ -0,0 +1,6 @@ +{% load i18n %} +
+ {% csrf_token %} + + {{ enrolled|yesno:_("Inscrit,") }} +
diff --git a/event/templatetags/event_tags.py b/event/templatetags/event_tags.py index 186c290..3742972 100644 --- a/event/templatetags/event_tags.py +++ b/event/templatetags/event_tags.py @@ -7,3 +7,10 @@ register = template.Library() @register.filter() def get_herited(activity, attrname): return activity.get_herited(attrname) + +@register.inclusion_tag("event/tags/enrol_btn.html") +def enrol_btn(activity, user): + return { + "enrolled": activity.staff.filter(id=user.id).exists(), + "activity": activity, + } diff --git a/event/urls.py b/event/urls.py index af334d4..54c81f5 100644 --- a/event/urls.py +++ b/event/urls.py @@ -1,5 +1,5 @@ from django.conf.urls import url -from event.views import Index, EventView, ActivityView +from event.views import Index, EventView, ActivityView, EnrolActivityView app_name = 'event' urlpatterns = [ @@ -7,4 +7,6 @@ urlpatterns = [ url(r'^(?P[-\w]+)/$', EventView.as_view(), name='event'), url(r'^activity/(?P[0-9]+)/$', ActivityView.as_view(), name='activity'), + url(r'^activity/(?P[0-9]+)/enrol/$', + EnrolActivityView.as_view(), name="enrol_activity"), ] diff --git a/event/views.py b/event/views.py index db151dc..5a5d3df 100644 --- a/event/views.py +++ b/event/views.py @@ -1,6 +1,8 @@ -from django.views.generic import TemplateView -from django.views.generic import DetailView +from django.views.generic import TemplateView, DetailView, View from django.contrib.auth.mixins import LoginRequiredMixin +from django.shortcuts import get_object_or_404, render +from django.http import JsonResponse, HttpResponseRedirect +from django.urls import reverse from .models import Event, Activity from equipment.models import EquipmentAttribution @@ -34,3 +36,22 @@ class ActivityView(LoginRequiredMixin, DetailView): .filter(activity=activity) .prefetch_related('equipment')) return context + + +class EnrolActivityView(LoginRequiredMixin, View): + http_method_names = ['post'] + + def post(self, request, pk, *args, **kwargs): + activity = get_object_or_404(Activity, id=pk) + action = request.POST.get("goal", None) + success = True + if action == "enrol": + activity.staff.add(request.user) + elif action == "unenrol": + activity.staff.remove(request.user) + else: + success = False + if "ajax" in request.GET: + return render(request, "event/activity_summary.html", + {"activity": activity}) + return HttpResponseRedirect(reverse("event:activity", kwargs={"pk":pk})) diff --git a/shared/static/css/global.css b/shared/static/css/global.css index 4533628..568d35a 100644 --- a/shared/static/css/global.css +++ b/shared/static/css/global.css @@ -359,4 +359,21 @@ a.module { .glyphicon.dunno { color: #5599C4 !important; } +.sending-request { + position: relative; } + .sending-request:after { + content: "Chargement..."; + position: absolute; + width: 100%; + height: 100%; + background: #fff; + opacity: 0.8; + color: #777; + text-align: center; + box-sizing: border-box; + z-index: 5; + top: 0; + left: 0; + padding: 8%; } + /*# sourceMappingURL=global.css.map */ diff --git a/shared/static/css/global.css.map b/shared/static/css/global.css.map index cd7ffeb..9da2885 100644 --- a/shared/static/css/global.css.map +++ b/shared/static/css/global.css.map @@ -1,7 +1,7 @@ { "version": 3, -"mappings": ";AAAA;iBACiB;ACDjB,YAAY;AAwBZ,WAAW;ACxBX,aAAc;EACV,KAAK,EAAa,OAAO;EACzB,gBAAgB,EAAE,OAAO;EACzB,YAAY,EAAM,OAAO;;AAE7B,gBAAiB;EACb,KAAK,EAAa,OAAO;EACzB,gBAAgB,EAAE,OAAO;EACzB,YAAY,EAAM,OAAO;;AAE7B,gBAAiB;EACb,KAAK,EAAa,OAAO;EACzB,gBAAgB,EAAE,OAAO;EACzB,YAAY,EAAM,OAAO;;AAE7B,cAAe;EACX,KAAK,EAAa,OAAO;EACzB,gBAAgB,EAAE,OAAO;EACzB,YAAY,EAAM,OAAO;;AAE7B,MAAO;EACH,aAAa,EAAE,CAAC;;ACrBpB,YAAY;AAEZ,cAAe;EACb,WAAW,EAAS,IAAI;EACxB,cAAc,EAAM,IAAI;EACxB,gBAAgB,EFYL,OAAgB;EEX3B,KAAK,EFDa,OAAO;;AEK3B,eAAgB;EACd,gBAAgB,EFML,OAAgB;EEL3B,gBAAgB,EAAG,WAAW;EAC9B,YAAY,EAAM,IAAI;EAEhB,qIAEoB;IAChB,KAAK,EAAE,IAAI;IACX,gBAAgB,EFHX,OAAgB;;AEQjC,gBAAiB;EACb,UAAU,EAAE,qBAAsB;EAClC,OAAO,EAAG,GAAG;EAEb,iBAAiB;EACjB,gBAAgB,EFbH,OAAgB;EEc7B,YAAY,EAAE,IAAI;EAClB,WAAW,EAAE,KAAK;EAClB,YAAY,EAAE,KAAK;EAEnB,yBAA0B;IAV9B,gBAAiB;MAWT,gBAAgB,EAAI,WAAW;MAC/B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AQ;EACjB,OAAO,EAAG,IAAI;EACd,gBAAgB,EAAE,OAAO;EAEzB,cAAQ;IACJ,OAAO,EAAE,OAAO;IAChB,gBAAgB,EAAE,WAAW;EAGjC,WAAG;IACC,SAAS,EAAE,OAAO;IAClB,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE,OAAO;;AAKnB,mBAAU;EACN,OAAO,EAAE,QAAQ;EACjB,WAAW,EAAE,GAAG;EAChB,cAAc,EAAE,IAAI;EAEpB,WAAW,EAAE,IAAI;EACjB,YAAY,EAAE,iBAA0B;EAExC,4BAAW;IACP,WAAW,EAAE,iBAA0B;IACvC,YAAY,EAAE,IAAI;EAGtB,mCAAgB;IACZ,SAAS,EAAE,KAAK;;AAMxB,cAAM;EACF,KAAK,EAAC,kBAAoB;AAE9B,aAAK;EACD,KAAK,EAAC,kBAAmB;AAE7B,gBAAQ;EACJ,KAAK,EAAC,kBAAsB;;AAIpC,gBAAiB;EACb,QAAQ,EAAE,QAAQ;EAElB,sBAAQ;IACJ,OAAO,EAAE,eAAe;IACxB,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,MAAM;IAClB,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,CAAC;IACV,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;IACP,OAAO,EAAE,EAAE", "sources": ["global.scss","variables.scss","messages.scss","header.scss","forms.scss","tree.scss"], "names": [], "file": "global.css" -} +} \ No newline at end of file diff --git a/shared/static/css/global.scss b/shared/static/css/global.scss index 71eacf6..7a2088e 100644 --- a/shared/static/css/global.scss +++ b/shared/static/css/global.scss @@ -250,3 +250,23 @@ a.module { color:$dunno_color!important; } } + +.sending-request { + position: relative; + + &:after { + content: "Chargement..."; + position: absolute; + width: 100%; + height: 100%; + background: #fff; + opacity: 0.8; + color: #777; + text-align: center; + box-sizing: border-box; + z-index: 5; + top: 0; + left: 0; + padding: 8%; + } +}