#101 Team data view

* adds overview of shared teams on object detail view
* adds team data view if button is clicked
pull/122/head
mpeltriaux 3 years ago
parent edcf7b3c78
commit 87a93b9a7f

@ -98,6 +98,10 @@
<tr>
<th scope="row">{% trans 'Shared with' %}</th>
<td class="align-middle">
{% for team in obj.intervention.teams.all %}
{% include 'user/includes/team_data_modal_button.html' %}
{% endfor %}
<hr>
{% for user in obj.intervention.users.all %}
{% include 'user/includes/contact_modal_button.html' %}
{% endfor %}

@ -81,6 +81,10 @@
<tr>
<th scope="row">{% trans 'Shared with' %}</th>
<td class="align-middle">
{% for team in obj.teams.all %}
{% include 'user/includes/team_data_modal_button.html' %}
{% endfor %}
<hr>
{% for user in obj.users.all %}
{% include 'user/includes/contact_modal_button.html' %}
{% endfor %}

@ -74,6 +74,10 @@
<tr>
<th scope="row">{% trans 'Shared with' %}</th>
<td class="align-middle">
{% for team in obj.teams.all %}
{% include 'user/includes/team_data_modal_button.html' %}
{% endfor %}
<hr>
{% for user in obj.users.all %}
{% include 'user/includes/contact_modal_button.html' %}
{% endfor %}

@ -114,6 +114,10 @@
<tr>
<th scope="row">{% trans 'Shared with' %}</th>
<td class="align-middle">
{% for team in obj.teams.all %}
{% include 'user/includes/team_data_modal_button.html' %}
{% endfor %}
<hr>
{% for user in obj.users.all %}
{% include 'user/includes/contact_modal_button.html' %}
{% endfor %}

Binary file not shown.

@ -3,21 +3,21 @@
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#: compensation/filters.py:122 compensation/forms/modalForms.py:36
#: compensation/filters.py:123 compensation/forms/modalForms.py:36
#: compensation/forms/modalForms.py:47 compensation/forms/modalForms.py:63
#: compensation/forms/modalForms.py:356 compensation/forms/modalForms.py:463
#: intervention/forms/forms.py:54 intervention/forms/forms.py:156
#: intervention/forms/forms.py:168 intervention/forms/modalForms.py:154
#: intervention/forms/modalForms.py:167 intervention/forms/modalForms.py:180
#: intervention/forms/forms.py:168 intervention/forms/modalForms.py:150
#: intervention/forms/modalForms.py:163 intervention/forms/modalForms.py:176
#: konova/filters/mixins.py:53 konova/filters/mixins.py:54
#: konova/filters/mixins.py:81 konova/filters/mixins.py:82
#: konova/filters/mixins.py:94 konova/filters/mixins.py:95
#: konova/filters/mixins.py:107 konova/filters/mixins.py:108
#: konova/filters/mixins.py:120 konova/filters/mixins.py:121
#: konova/filters/mixins.py:134 konova/filters/mixins.py:135
#: konova/filters/mixins.py:270 konova/filters/mixins.py:315
#: konova/filters/mixins.py:353 konova/filters/mixins.py:354
#: konova/filters/mixins.py:385 konova/filters/mixins.py:386
#: konova/filters/mixins.py:270 konova/filters/mixins.py:316
#: konova/filters/mixins.py:354 konova/filters/mixins.py:355
#: konova/filters/mixins.py:386 konova/filters/mixins.py:387
#: konova/forms.py:143 konova/forms.py:244 konova/forms.py:315
#: konova/forms.py:359 konova/forms.py:369 konova/forms.py:382
#: konova/forms.py:394 konova/forms.py:412 user/forms.py:42
@ -26,7 +26,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-02-18 12:35+0100\n"
"POT-Creation-Date: 2022-02-18 14:01+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -52,7 +52,7 @@ msgstr "Bis"
#: intervention/forms/forms.py:102
#: intervention/templates/intervention/detail/view.html:56
#: intervention/templates/intervention/report/report.html:37
#: intervention/utils/quality.py:49 konova/filters/mixins.py:395
#: intervention/utils/quality.py:49 konova/filters/mixins.py:396
msgid "Conservation office"
msgstr "Eintragungsstelle"
@ -221,7 +221,7 @@ msgstr "Abbuchungen"
#: compensation/templates/compensation/detail/eco_account/includes/states-before.html:36
#: ema/templates/ema/detail/includes/states-after.html:36
#: ema/templates/ema/detail/includes/states-before.html:36
#: intervention/forms/modalForms.py:365
#: intervention/forms/modalForms.py:361
msgid "Surface"
msgstr "Fläche"
@ -284,8 +284,8 @@ msgid "Type"
msgstr "Typ"
#: analysis/templates/analysis/reports/includes/old_data/amount.html:24
#: compensation/tables.py:89 intervention/forms/modalForms.py:376
#: intervention/forms/modalForms.py:383 intervention/tables.py:88
#: compensation/tables.py:89 intervention/forms/modalForms.py:372
#: intervention/forms/modalForms.py:379 intervention/tables.py:88
#: intervention/templates/intervention/detail/view.html:19
#: konova/templates/konova/includes/quickstart/interventions.html:4
#: templates/navbars/navbar.html:22
@ -295,7 +295,7 @@ msgstr "Eingriff"
#: analysis/templates/analysis/reports/includes/old_data/amount.html:34
#: compensation/tables.py:266
#: compensation/templates/compensation/detail/eco_account/view.html:20
#: intervention/forms/modalForms.py:349 intervention/forms/modalForms.py:356
#: intervention/forms/modalForms.py:345 intervention/forms/modalForms.py:352
#: konova/templates/konova/includes/quickstart/ecoaccounts.html:4
#: templates/navbars/navbar.html:34
msgid "Eco-account"
@ -309,7 +309,7 @@ msgstr "Altfälle"
msgid "Before"
msgstr "Vor"
#: compensation/filters.py:121
#: compensation/filters.py:122
msgid "Show only unrecorded"
msgstr "Nur unverzeichnete anzeigen"
@ -364,7 +364,7 @@ msgstr "Kompensation XY; Flur ABC"
#: ema/templates/ema/detail/includes/actions.html:34
#: ema/templates/ema/detail/includes/deadlines.html:34
#: ema/templates/ema/detail/includes/documents.html:34
#: intervention/forms/forms.py:180 intervention/forms/modalForms.py:179
#: intervention/forms/forms.py:180 intervention/forms/modalForms.py:175
#: intervention/templates/intervention/detail/includes/documents.html:34
#: intervention/templates/intervention/detail/includes/payments.html:34
#: intervention/templates/intervention/detail/includes/revocation.html:38
@ -484,7 +484,7 @@ msgid "Due on which date"
msgstr "Zahlung wird an diesem Datum erwartet"
#: compensation/forms/modalForms.py:64 compensation/forms/modalForms.py:357
#: intervention/forms/modalForms.py:181 konova/forms.py:395
#: intervention/forms/modalForms.py:177 konova/forms.py:395
msgid "Additional comment, maximum {} letters"
msgstr "Zusätzlicher Kommentar, maximal {} Zeichen"
@ -512,7 +512,7 @@ msgstr "Zusatzbezeichnung"
msgid "Select an additional biotope type"
msgstr "Zusatzbezeichnung wählen"
#: compensation/forms/modalForms.py:197 intervention/forms/modalForms.py:367
#: compensation/forms/modalForms.py:197 intervention/forms/modalForms.py:363
msgid "in m²"
msgstr ""
@ -540,7 +540,7 @@ msgstr "Fristart wählen"
#: compensation/templates/compensation/detail/compensation/includes/deadlines.html:31
#: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:31
#: ema/templates/ema/detail/includes/deadlines.html:31
#: intervention/forms/modalForms.py:153
#: intervention/forms/modalForms.py:149
msgid "Date"
msgstr "Datum"
@ -1142,7 +1142,7 @@ msgstr "Daten zu den verantwortlichen Stellen"
msgid "Compensations - Overview"
msgstr "Kompensationen - Übersicht"
#: compensation/views/compensation.py:151 konova/utils/message_templates.py:31
#: compensation/views/compensation.py:151 konova/utils/message_templates.py:33
msgid "Compensation {} edited"
msgstr "Kompensation {} bearbeitet"
@ -1269,7 +1269,7 @@ msgstr "Mehrfachauswahl möglich"
#: intervention/forms/forms.py:86
#: intervention/templates/intervention/detail/view.html:48
#: intervention/templates/intervention/report/report.html:29
#: intervention/utils/quality.py:46 konova/filters/mixins.py:363
#: intervention/utils/quality.py:46 konova/filters/mixins.py:364
msgid "Registration office"
msgstr "Zulassungsbehörde"
@ -1322,7 +1322,7 @@ msgstr "Freigabelink"
#: intervention/forms/modalForms.py:31
msgid "Send this link to users who you want to have writing access on the data"
msgstr "Andere Nutzer erhalten über diesen Link Zugriff auf die Daten"
msgstr "Einzelne Nutzer erhalten über diesen Link Zugriff auf die Daten"
#: intervention/forms/modalForms.py:41
msgid "Add team to share with"
@ -1338,7 +1338,7 @@ msgstr ""
#: intervention/forms/modalForms.py:55
msgid "Add user to share with"
msgstr "Nutzer direkt hinzufügen"
msgstr "Nutzer einzeln hinzufügen"
#: intervention/forms/modalForms.py:57
msgid ""
@ -1352,44 +1352,38 @@ msgstr ""
msgid "Share settings for {}"
msgstr "Freigabe Einstellungen für {}"
#: intervention/forms/modalForms.py:105 intervention/forms/modalForms.py:111
msgid ""
"Only conservation or registration office users are allowed to remove entries."
msgstr ""
"Nur Mitarbeiter der Naturschutz- oder Zulassungsbehördengruppe dürfen Einträge entfernen"
#: intervention/forms/modalForms.py:155
#: intervention/forms/modalForms.py:151
msgid "Date of revocation"
msgstr "Datum des Widerspruchs"
#: intervention/forms/modalForms.py:166
#: intervention/forms/modalForms.py:162
#: intervention/templates/intervention/detail/includes/revocation.html:35
msgid "Document"
msgstr "Dokument"
#: intervention/forms/modalForms.py:169
#: intervention/forms/modalForms.py:165
msgid "Must be smaller than 15 Mb"
msgstr "Muss kleiner als 15 Mb sein"
#: intervention/forms/modalForms.py:194
#: intervention/forms/modalForms.py:190
#: intervention/templates/intervention/detail/includes/revocation.html:18
msgid "Add revocation"
msgstr "Widerspruch hinzufügen"
#: intervention/forms/modalForms.py:251
#: intervention/forms/modalForms.py:247
msgid "Checked intervention data"
msgstr "Eingriffsdaten geprüft"
#: intervention/forms/modalForms.py:257
#: intervention/forms/modalForms.py:253
msgid "Checked compensations data and payments"
msgstr "Kompensationen und Zahlungen geprüft"
#: intervention/forms/modalForms.py:266
#: intervention/forms/modalForms.py:262
#: intervention/templates/intervention/detail/includes/controls.html:19
msgid "Run check"
msgstr "Prüfung vornehmen"
#: intervention/forms/modalForms.py:267 konova/forms.py:514
#: intervention/forms/modalForms.py:263 konova/forms.py:514
msgid ""
"I, {} {}, confirm that all necessary control steps have been performed by "
"myself."
@ -1397,23 +1391,23 @@ msgstr ""
"Ich, {} {}, bestätige, dass die notwendigen Kontrollschritte durchgeführt "
"wurden:"
#: intervention/forms/modalForms.py:351
#: intervention/forms/modalForms.py:347
msgid "Only recorded accounts can be selected for deductions"
msgstr "Nur verzeichnete Ökokonten können für Abbuchungen verwendet werden."
#: intervention/forms/modalForms.py:378
#: intervention/forms/modalForms.py:374
msgid "Only shared interventions can be selected"
msgstr "Nur freigegebene Eingriffe können gewählt werden"
#: intervention/forms/modalForms.py:391
#: intervention/forms/modalForms.py:387
msgid "New Deduction"
msgstr "Neue Abbuchung"
#: intervention/forms/modalForms.py:392
#: intervention/forms/modalForms.py:388
msgid "Enter the information for a new deduction from a chosen eco-account"
msgstr "Geben Sie die Informationen für eine neue Abbuchung ein."
#: intervention/forms/modalForms.py:435
#: intervention/forms/modalForms.py:431
msgid ""
"Eco-account {} is not recorded yet. You can only deduct from recorded "
"accounts."
@ -1421,7 +1415,7 @@ msgstr ""
"Ökokonto {} ist noch nicht verzeichnet. Abbuchungen können nur von "
"verzeichneten Ökokonten erfolgen."
#: intervention/forms/modalForms.py:445
#: intervention/forms/modalForms.py:441
msgid ""
"The account {} has not enough surface for a deduction of {} m². There are "
"only {} m² left"
@ -1616,15 +1610,15 @@ msgstr "Nach Flurstücknenner suchen"
msgid "Show unshared"
msgstr "Nicht freigegebene anzeigen"
#: konova/filters/mixins.py:314
#: konova/filters/mixins.py:315
msgid "Show recorded"
msgstr "Verzeichnete anzeigen"
#: konova/filters/mixins.py:364
#: konova/filters/mixins.py:365
msgid "Search for registration office"
msgstr "Nach Zulassungsbehörde suchen"
#: konova/filters/mixins.py:396
#: konova/filters/mixins.py:397
msgid "Search for conservation office"
msgstr "Nch Eintragungsstelle suchen"
@ -1851,10 +1845,25 @@ msgstr ""
"der Zwischenzeit angelegt wurde, welcher diese Kennung nun bereits verwendet"
#: konova/utils/message_templates.py:15
msgid ""
"Only conservation or registration office users are allowed to remove entries."
msgstr ""
"Nur Mitarbeiter der Naturschutz- oder Zulassungsbehördengruppe dürfen "
"Einträge entfernen"
#: konova/utils/message_templates.py:16
msgid "You need to be part of another user group."
msgstr "Hierfür müssen Sie einer anderen Nutzergruppe angehören!"
#: konova/utils/message_templates.py:17
msgid "Status of Checked and Recorded reseted"
msgstr "'Geprüft'/'Verzeichnet' wurde zurückgesetzt"
#: konova/utils/message_templates.py:20
msgid "This data is not shared with you"
msgstr "Diese Daten sind für Sie nicht freigegeben"
#: konova/utils/message_templates.py:16
#: konova/utils/message_templates.py:21
msgid ""
"Remember: This data has not been shared with you, yet. This means you can "
"only read but can not edit or perform any actions like running a check or "
@ -1864,23 +1873,15 @@ msgstr ""
"bedeutet, dass Sie nur lesenden Zugriff hierauf haben und weder bearbeiten, "
"noch Prüfungen durchführen oder verzeichnen können."
#: konova/utils/message_templates.py:17
msgid "You need to be part of another user group."
msgstr "Hierfür müssen Sie einer anderen Nutzergruppe angehören!"
#: konova/utils/message_templates.py:19
msgid "Status of Checked and Recorded reseted"
msgstr "'Geprüft'/'Verzeichnet' wurde zurückgesetzt"
#: konova/utils/message_templates.py:22
#: konova/utils/message_templates.py:24
msgid "Unsupported file type"
msgstr "Dateiformat nicht unterstützt"
#: konova/utils/message_templates.py:23
#: konova/utils/message_templates.py:25
msgid "File too large"
msgstr "Datei zu groß"
#: konova/utils/message_templates.py:26
#: konova/utils/message_templates.py:28
msgid ""
"Action canceled. Eco account is recorded or deductions exist. Only "
"conservation office member can perform this action."
@ -1888,119 +1889,119 @@ msgstr ""
"Aktion abgebrochen. Ökokonto ist bereits verzeichnet oder Abbuchungen liegen "
"vor. Nur Eintragungsstellennutzer können diese Aktion jetzt durchführen."
#: konova/utils/message_templates.py:29
#: konova/utils/message_templates.py:31
msgid "Compensation {} added"
msgstr "Kompensation {} hinzugefügt"
#: konova/utils/message_templates.py:30
#: konova/utils/message_templates.py:32
msgid "Compensation {} removed"
msgstr "Kompensation {} entfernt"
#: konova/utils/message_templates.py:32
#: konova/utils/message_templates.py:34
msgid "Added compensation action"
msgstr "Maßnahme hinzugefügt"
#: konova/utils/message_templates.py:33
#: konova/utils/message_templates.py:35
msgid "Added compensation state"
msgstr "Zustand hinzugefügt"
#: konova/utils/message_templates.py:36
#: konova/utils/message_templates.py:38
msgid "State removed"
msgstr "Zustand gelöscht"
#: konova/utils/message_templates.py:37
#: konova/utils/message_templates.py:39
msgid "State edited"
msgstr "Zustand bearbeitet"
#: konova/utils/message_templates.py:38
#: konova/utils/message_templates.py:40
msgid "State added"
msgstr "Zustand hinzugefügt"
#: konova/utils/message_templates.py:41
#: konova/utils/message_templates.py:43
msgid "Action added"
msgstr "Maßnahme hinzugefügt"
#: konova/utils/message_templates.py:42
#: konova/utils/message_templates.py:44
msgid "Action edited"
msgstr "Maßnahme bearbeitet"
#: konova/utils/message_templates.py:43
#: konova/utils/message_templates.py:45
msgid "Action removed"
msgstr "Maßnahme entfernt"
#: konova/utils/message_templates.py:46
#: konova/utils/message_templates.py:48
msgid "Deduction added"
msgstr "Abbuchung hinzugefügt"
#: konova/utils/message_templates.py:47
#: konova/utils/message_templates.py:49
msgid "Deduction edited"
msgstr "Abbuchung bearbeitet"
#: konova/utils/message_templates.py:48
#: konova/utils/message_templates.py:50
msgid "Deduction removed"
msgstr "Abbuchung entfernt"
#: konova/utils/message_templates.py:51
#: konova/utils/message_templates.py:53
msgid "Deadline added"
msgstr "Frist/Termin hinzugefügt"
#: konova/utils/message_templates.py:52
#: konova/utils/message_templates.py:54
msgid "Deadline edited"
msgstr "Frist/Termin bearbeitet"
#: konova/utils/message_templates.py:53
#: konova/utils/message_templates.py:55
msgid "Deadline removed"
msgstr "Frist/Termin gelöscht"
#: konova/utils/message_templates.py:56
#: konova/utils/message_templates.py:58
msgid "Payment added"
msgstr "Zahlung hinzugefügt"
#: konova/utils/message_templates.py:57
#: konova/utils/message_templates.py:59
msgid "Payment edited"
msgstr "Zahlung bearbeitet"
#: konova/utils/message_templates.py:58
#: konova/utils/message_templates.py:60
msgid "Payment removed"
msgstr "Zahlung gelöscht"
#: konova/utils/message_templates.py:61
#: konova/utils/message_templates.py:63
msgid "Revocation added"
msgstr "Widerspruch hinzugefügt"
#: konova/utils/message_templates.py:62
#: konova/utils/message_templates.py:64
msgid "Revocation edited"
msgstr "Widerspruch bearbeitet"
#: konova/utils/message_templates.py:63
#: konova/utils/message_templates.py:65
msgid "Revocation removed"
msgstr "Widerspruch entfernt"
#: konova/utils/message_templates.py:66
#: konova/utils/message_templates.py:68
msgid "Document '{}' deleted"
msgstr "Dokument '{}' gelöscht"
#: konova/utils/message_templates.py:67
#: konova/utils/message_templates.py:69
msgid "Document added"
msgstr "Dokument hinzugefügt"
#: konova/utils/message_templates.py:68
#: konova/utils/message_templates.py:70
msgid "Document edited"
msgstr "Dokument bearbeitet"
#: konova/utils/message_templates.py:71
#: konova/utils/message_templates.py:73
msgid "Edited general data"
msgstr "Allgemeine Daten bearbeitet"
#: konova/utils/message_templates.py:72
#: konova/utils/message_templates.py:74
msgid "Added deadline"
msgstr "Frist/Termin hinzugefügt"
#: konova/utils/message_templates.py:75
#: konova/utils/message_templates.py:77
msgid "Geometry conflict detected with {}"
msgstr "Geometriekonflikt mit folgenden Einträgen erkannt: {}"
#: konova/utils/message_templates.py:78
#: konova/utils/message_templates.py:80
msgid "This intervention has {} revocations"
msgstr "Dem Eingriff liegen {} Widersprüche vor"
@ -2416,11 +2417,11 @@ msgstr "Neuen Token generieren"
msgid "A new token needs to be validated by an administrator!"
msgstr "Neue Tokens müssen durch Administratoren freigeschaltet werden!"
#: user/forms.py:168 user/forms.py:172
#: user/forms.py:168 user/forms.py:172 user/forms.py:323 user/forms.py:328
msgid "Team name"
msgstr "Team Name"
#: user/forms.py:179 user/templates/user/team/index.html:30
#: user/forms.py:179 user/forms.py:336 user/templates/user/team/index.html:30
msgid "Description"
msgstr "Beschreibung"
@ -2468,6 +2469,10 @@ msgstr "Gewählter Administrator ({}) muss ein Mitglied des Teams sein."
msgid "Edit team"
msgstr "Team bearbeiten"
#: user/forms.py:347
msgid "Team"
msgstr "Team"
#: user/models/user_action.py:22
msgid "Unrecorded"
msgstr "Entzeichnet"
@ -2484,6 +2489,10 @@ msgstr "Gelöscht"
msgid "Show contact data"
msgstr "Zeige Kontaktdaten"
#: user/templates/user/includes/team_data_modal_button.html:3
msgid "Show team data"
msgstr "Zeige Teamdaten"
#: user/templates/user/index.html:13 user/templates/user/team/index.html:29
msgid "Name"
msgstr ""
@ -2534,7 +2543,7 @@ msgid "Manage teams"
msgstr ""
#: user/templates/user/index.html:69 user/templates/user/team/index.html:18
#: user/views.py:142
#: user/views.py:167
msgid "Teams"
msgstr ""
@ -2594,15 +2603,15 @@ msgstr "Neuer Token generiert. Administratoren sind informiert."
msgid "User API token"
msgstr "API Nutzer Token"
#: user/views.py:153
#: user/views.py:178
msgid "New team added"
msgstr "Neues Team hinzugefügt"
#: user/views.py:166
#: user/views.py:191
msgid "Team edited"
msgstr "Team bearbeitet"
#: user/views.py:179
#: user/views.py:204
msgid "Team removed"
msgstr "Team gelöscht"

@ -315,3 +315,46 @@ class EditTeamModalForm(NewTeamModalForm):
class RemoveTeamModalForm(RemoveModalForm):
pass
class TeamDataForm(BaseModalForm):
name = forms.CharField(
label_suffix="",
label=_("Team name"),
max_length=500,
required=False,
widget=forms.TextInput(
attrs={
"placeholder": _("Team name"),
"class": "form-control",
}
)
)
description = forms.CharField(
label_suffix="",
required=False,
label=_("Description"),
widget=forms.Textarea(
attrs={
"rows": 5,
"class": "form-control"
}
)
)
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.form_title = _("Team")
self.form_caption = ""
self.render_submit = False
form_data = {
"name": self.instance.name,
"description": self.instance.description,
}
self.load_initial_data(
form_data,
[
"name",
"description"
]
)

@ -1,6 +1,6 @@
{% load fontawesome_5 i18n %}
<button class="btn btn-default btn-modal" data-form-url="{% url 'user:contact' user.id %}" title="{% trans 'Show contact data' %}">
{% fa5_icon 'id-card' %}
{% fa5_icon 'user' %}
<span>{{user.username}}</span>
</button>

@ -0,0 +1,6 @@
{% load fontawesome_5 i18n %}
<button class="btn btn-default btn-modal" data-form-url="{% url 'user:team-data' team.id %}" title="{% trans 'Show team data' %}">
{% fa5_icon 'users' %}
<span>{{team.name}}</span>
</button>

@ -16,6 +16,7 @@ urlpatterns = [
path("token/api", api_token_view, name="api-token"),
path("contact/<id>", contact_view, name="contact"),
path("team/", index_team_view, name="team-index"),
path("team/<id>", data_team_view, name="team-data"),
path("team/new", new_team_view, name="team-new"),
path("team/<id>/edit", edit_team_view, name="team-edit"),
path("team/<id>/remove", remove_team_view, name="team-remove"),

@ -13,7 +13,7 @@ from django.utils.translation import gettext_lazy as _
from konova.contexts import BaseContext
from konova.decorators import any_group_check, default_group_required
from user.forms import UserNotificationForm, UserContactForm, UserAPITokenForm, NewTeamModalForm, EditTeamModalForm, \
RemoveTeamModalForm
RemoveTeamModalForm, TeamDataForm
@login_required
@ -133,6 +133,31 @@ def contact_view(request: HttpRequest, id: str):
)
@login_required
def data_team_view(request: HttpRequest, id: str):
""" Renders team data
Args:
request (HttpRequest): The incoming request
id (str): The team's id
Returns:
"""
team = get_object_or_404(Team, id=id)
form = TeamDataForm(request.POST or None, instance=team, request=request)
template = "modal/modal_form.html"
context = {
"form": form,
}
context = BaseContext(request, context).context
return render(
request,
template,
context
)
@login_required
def index_team_view(request: HttpRequest):
template = "user/team/index.html"

Loading…
Cancel
Save