diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0a3c6e2a852495306a63b2b0ee5b002e1075b1e7..93b94f5c05501f0429f0f4b780b26d36c41b38ef 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,23 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog`_, and this project adheres to `Semantic Versioning`_. +`1.4.4`_ +-------- + +Fixed +~~~~~ + +* Fixed URL to editPersonView + +`1.4.3`_ +-------- + +Fixed +----- + +* Show link to person edit view on registration detail page +* Add get_person() method on EventRegistration model + `1.4.2`_ -------- @@ -120,3 +137,4 @@ Added .. _1.4: https://edugit.org/Teckids/hacknfun//AlekSIS-App-Paweljong/-/tags/1.4 .. _1.4.1: https://edugit.org/Teckids/hacknfun//AlekSIS-App-Paweljong/-/tags/1.4.1 .. _1.4.2: https://edugit.org/Teckids/hacknfun//AlekSIS-App-Paweljong/-/tags/1.4.2 +.. _1.4.3: https://edugit.org/Teckids/hacknfun//AlekSIS-App-Paweljong/-/tags/1.4.3 diff --git a/aleksis/apps/paweljong/models.py b/aleksis/apps/paweljong/models.py index 7954979455e5d76a5b9f6a340fd8d369f6daee47..7626a1a84d52b998b1f490acc7a5f9e7ca1b7549 100644 --- a/aleksis/apps/paweljong/models.py +++ b/aleksis/apps/paweljong/models.py @@ -271,6 +271,9 @@ class EventRegistration(ExtensibleModel): RegistrationState, verbose_name=_("States"), related_name="registrations" ) + def get_person(self): + return self.person + def get_invoice(self): # FIXME Maybe do not hard-code this client, __ = Client.objects.get_or_create(name="Teckids e.V.") diff --git a/aleksis/apps/paweljong/templates/paweljong/event_registration/full.html b/aleksis/apps/paweljong/templates/paweljong/event_registration/full.html index 14ebcf957b06bca6f1b1596da1475fec7f2858fa..d4ca917085e313a38efdc385ce8c06a776251036 100644 --- a/aleksis/apps/paweljong/templates/paweljong/event_registration/full.html +++ b/aleksis/apps/paweljong/templates/paweljong/event_registration/full.html @@ -14,37 +14,46 @@ {% has_perm 'paweljong.delete_registration' user registration as can_delete_registration %} {% has_perm 'paweljong.send_notification_mail' user registration as can_send_notification %} {% has_perm 'tezor.view_invoice_rule' user registration as can_view_invoice %} + {% has_perm 'core.edit_person_rule' user person as can_change_person %} {% if can_manage_registration or can_manage_registration_preferences or can_delete_registration or can_send_notification %} <p> {% if can_manage_registration %} <a href="{% url 'edit_registration_by_pk' registration.pk %}" class="btn waves-effect waves-light"> - <i class="material-icons left">edit</i> + <i class="material-icons left iconify" data-icon="mdi:edit"></i> {% trans "Edit" %} </a> {% endif %} {% if can_delete_registration %} <a href="{% url 'delete_registration_by_pk' registration.pk %}" class="btn waves-effect waves-light red"> - <i class="material-icons left">delete</i> + <i class="material-icons left iconify" data-icon="mdi:delete"></i> {% trans "Delete" %} </a> {% endif %} {% if can_send_notification %} <a href="{% url 'registration_notification_by_pk' registration.pk %}" class="btn waves-effect waves-light"> - <i class="material-icons left">email</i> + <i class="material-icons left iconify" data-icon="mdi:email"></i> {% trans "Notification" %} </a> {% endif %} {% if can_view_invoice %} <a href="{% url 'invoice_by_token' registration.get_invoice.token %}" class="btn waves-effect waves-light"> - <i class="material-icons left">attach_money</i> + <i class="material-icons left iconify" data-icon="mdi:cash"></i> {% trans "Invoice" %} </a> {% endif %} + {% if can_change_person %} + <a href="{% url 'edit_person_by_id' registration.person.id %}" class="btn waves-effect waves-light"> + <i class="material-icons left iconify" data-icon="mdi:account-edit"></i> + {% trans "Edit person" %} + </a> + {% endif %} + + </p> {% endif %} diff --git a/pyproject.toml b/pyproject.toml index 89376fe64d1713044249cb35c1e1d3c0ee7b0dc5..23912ab951ebc153c728bf2eaf1c079073ee9e67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "AlekSIS-App-Paweljong" -version = "1.4.2" +version = "1.4.4" packages = [ { include = "aleksis" } ]