diff --git a/.gitignore b/.gitignore index 18dc8c8..8d54bba 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,8 @@ notificsys/migrations/* notificsys/__pycache__/* dasettings/migrations/* +!dasettings/migrations/__init__.py +dasettings/__pycache__/* news/migrations/* !news/migrations/__init__.py diff --git a/cloud/views.py b/cloud/views.py index d470658..0195ac2 100644 --- a/cloud/views.py +++ b/cloud/views.py @@ -11,7 +11,6 @@ from django.conf import settings from django.core.files.storage import default_storage from digitaleagentur.settings import BASE_DIR from django.http import JsonResponse -import os from .models import DataDir, DataFile from datetime import datetime from users.models import AgencyGroup @@ -247,8 +246,8 @@ def adddirbyajax(request, parent): datadir_parentid = list(DataDir.objects.filter(is_defaultstandard=True, agency__pk=request.user.profile.agency.pk))[0] else: datadir_parentid = tempdir - - tempdatafile = DataFile(file=request.FILES['uploadedfile'], name=request.FILES['uploadedfile'].name, owner=request.user, parent=datadir_parentid, agency=request.user.profile.agency) + + tempdatafile = DataFile(file=request.FILES['uploadedfile'], name=str(request.FILES['uploadedfile'].name), owner=request.user, parent=datadir_parentid, agency=request.user.profile.agency) tempdatafile.save() data = {'savedobj_id' : tempdatafile.pk, 'savedobj_name' : tempdatafile.name} else: diff --git a/dasettings/forms.py b/dasettings/forms.py index eb9c025..39f563f 100644 --- a/dasettings/forms.py +++ b/dasettings/forms.py @@ -1,9 +1,21 @@ from django import forms from django.db import models from django.contrib.auth.models import User -from users.models import AgencyGroup, Agency, Profile, AgencyJob +from users.models import AgencyGroup, Agency, Profile, AgencyJob, AgencyNetwork from PIL import Image + +class AgencyNetworkForm(forms.ModelForm): + class Meta: + model = AgencyNetwork + fields = ['name', 'publicjoin'] + + labels = { + "name" : "Name des Agentuverbunds", + "publicjoin" : "Beitritt ohne Bestätigung" + } + + # Change logged Users Data (Usernamen an Email) NUR HIER MÖGLICH! class UsersSelfChangeForm(forms.ModelForm): email = forms.EmailField() diff --git a/dasettings/templates/dasettings/addagencynetwork_content.html b/dasettings/templates/dasettings/addagencynetwork_content.html new file mode 100644 index 0000000..30b032b --- /dev/null +++ b/dasettings/templates/dasettings/addagencynetwork_content.html @@ -0,0 +1,24 @@ +{% extends "users/base.html" %} +{% load crispy_forms_tags %} +{% block content %} +
+ Ein Agenturverbund schließt mehrere Agenturen zusammen. Dabei legen Sie als Ersteller fest, wie der Verbund heißt und wie andere Agenturen beitreten können. Nachdem der Verbund angelegt ist, erhalten Sie einen Link. Mit diesem Link können andere Agenturen beitreten, in dem sie auf den Link klicken. Anschließend erhalten Sie eine Informationen, welche Agenturen beitreten wollen und können diese dann aufnehmen. +
++ Wollen Sie einen öffentlichen Verbund, in der jede Agentur ohne Ihre Bestätigung beitreten kann, aktivieren Sie die Checkbox "Beitritt ohne Bestätigung". Standardmäßig können diese Agenturen nur Standards übernehmen, aber nicht eigene in den Verbund teilen. In unserem Wiki erhalten Sie dazu weitere Informationen. +
+| Agenturname | ++ |
|---|---|
| {{agn_s.wanted_agency.name}} | ++ Annehmen Ablehnen + | +
| Agenturname | +Nur Mitglied | +Inhalte teilen | +Administratives Mitglied | ++ |
|---|---|---|---|---|
| {{agn_s.name}} | ++ | + | + | + + | +
| Name | +Link{% if request.user.profile.showtooltips %} {% endif %} | +Erstelleragentur | +Erstellt durch | +Erstellt am | +Letzte Aktivität am | +Agenturen | +Standards | ++ |
|---|---|---|---|---|---|---|---|---|
| {{agn.name}} | ++ {% if is_adminag %} + + + + {% endif %} + | +{{agn.creator_agency.name }} | +{{agn.creator.first_name }} {{agn.creator.last_name }} | +{{agn.created_on }} | +{{agn.last_activity}} | +{% if is_adminag %} {% endif %} {% if outstanding %} {% endif %} {{agsum}}{% if is_adminag %}{% endif %} | +{{ag_standardsum}} | ++ {% if is_adminag %} + + + {% endif %} + | +
{{ compfunc }}
-{{ phoneland }}
diff --git a/standards/templates/standards/standards_management.html b/standards/templates/standards/standards_management.html index 1daf12f..6ef8263 100644 --- a/standards/templates/standards/standards_management.html +++ b/standards/templates/standards/standards_management.html @@ -2,6 +2,7 @@ {% load counter_tag %} {% block content %} +