Standard fertig AUSSER sonderfeld, rest läuft. Darstellung müssen wir echt nochmal besprechen
This commit is contained in:
parent
f61a58dc8a
commit
25fc0c6cad
Binary file not shown.
|
|
@ -21,7 +21,7 @@ class NewsManagement(LoginRequiredMixin, ListView):
|
||||||
news = News.objects.filter(agency__pk=self.request.user.profile.agency.pk).filter(go_online_on__lt=filterdate).filter(go_offline_on__gt=filterdate).order_by('-created_date')
|
news = News.objects.filter(agency__pk=self.request.user.profile.agency.pk).filter(go_online_on__lt=filterdate).filter(go_offline_on__gt=filterdate).order_by('-created_date')
|
||||||
news_arch = News.objects.filter(agency__pk=self.request.user.profile.agency.pk).filter(go_offline_on__lt=filterdate).order_by('-created_date')
|
news_arch = News.objects.filter(agency__pk=self.request.user.profile.agency.pk).filter(go_offline_on__lt=filterdate).order_by('-created_date')
|
||||||
|
|
||||||
news_coming = News.objects.filter(agency__pk=self.request.user.profile.agency.pk).filter(go_offline_on__gt=filterdate).order_by('-created_date')
|
news_coming = News.objects.filter(agency__pk=self.request.user.profile.agency.pk).filter(go_online_on__gt=filterdate).order_by('-created_date')
|
||||||
|
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
context.update({'active_link' : 'dashboard', 'news' : news, 'news_arch' : news_arch, 'news_coming' : news_coming})
|
context.update({'active_link' : 'dashboard', 'news' : news, 'news_arch' : news_arch, 'news_coming' : news_coming})
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -32,11 +32,15 @@ class Standards(models.Model):
|
||||||
|
|
||||||
# USER
|
# USER
|
||||||
# VERTRETER
|
# VERTRETER
|
||||||
representative = models.ForeignKey(User, on_delete=models.PROTECT, related_name="user_repr", blank=True, null=True)
|
#representative = models.ForeignKey(User, on_delete=models.PROTECT, related_name="user_repr", blank=True, null=True)
|
||||||
|
representative = models.ManyToManyField(User, blank=True, related_name='user_rep')
|
||||||
# AUSFÜHRENDER
|
# AUSFÜHRENDER
|
||||||
executor = models.ForeignKey(User, on_delete=models.PROTECT, related_name="user_executor", blank=True, null=True)
|
#executor = models.ForeignKey(User, on_delete=models.PROTECT, related_name="user_executor", blank=True, null=True)
|
||||||
|
executor = models.ManyToManyField(User, blank=True, related_name='user_ex')
|
||||||
# VERANTWORTLICHER
|
# VERANTWORTLICHER
|
||||||
authority = models.ForeignKey(User, on_delete=models.PROTECT, related_name="user_authority", blank=True, null=True)
|
#authority = models.ForeignKey(User, on_delete=models.PROTECT, related_name="user_authority", blank=True, null=True)
|
||||||
|
authority = models.ManyToManyField(User, blank=True, related_name='user_aut')
|
||||||
|
|
||||||
# FILES
|
# FILES
|
||||||
addedfiles = models.ManyToManyField(DataFile, blank=True)
|
addedfiles = models.ManyToManyField(DataFile, blank=True)
|
||||||
# VERLINKTE STANDARDS
|
# VERLINKTE STANDARDS
|
||||||
|
|
@ -44,6 +48,9 @@ class Standards(models.Model):
|
||||||
# GORUPS
|
# GORUPS
|
||||||
visibleby = models.ManyToManyField(AgencyGroup, blank=True)
|
visibleby = models.ManyToManyField(AgencyGroup, blank=True)
|
||||||
|
|
||||||
|
indi_name = models.CharField(max_length=200, blank=False, default="")
|
||||||
|
indi_conmtent = models.CharField(max_length=500, blank=False, default="")
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f'{self.name}'
|
return f'{self.name}'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,9 @@
|
||||||
{% for field in normalForm %}
|
{% for field in normalForm %}
|
||||||
{% if forloop.counter|divisibleby:6 %}
|
{% if forloop.counter|divisibleby:6 %}
|
||||||
</div><div class="col-3">
|
</div><div class="col-3">
|
||||||
{{field|as_crispy_field }}
|
{{field|as_crispy_field }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{field|as_crispy_field }}
|
{{field|as_crispy_field }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
@ -105,6 +105,23 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!--
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header" id="st_indi">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#stindi_content" aria-expanded="false" aria-controls="stindi_content">
|
||||||
|
Freies Feld <small><i data-toggle="tooltip" data-placement="top" title="Bearbeiten Sie hier ein individuelles Text- und Inhaltsfeld." class="far fa-question-circle"></i></small>
|
||||||
|
</button>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="stindi_content" class="collapse" aria-labelledby="st_groups" data-parent="#additionalStandardInfos">
|
||||||
|
<div class="card-body">
|
||||||
|
dd
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div></div>
|
</div></div>
|
||||||
|
|
|
||||||
|
|
@ -17,18 +17,30 @@
|
||||||
| <a href="{% url 'standard-update' standard.pk %}">Bearbeiten</a>
|
| <a href="{% url 'standard-update' standard.pk %}">Bearbeiten</a>
|
||||||
{% endif%}
|
{% endif%}
|
||||||
</small>
|
</small>
|
||||||
<small><br />
|
<small> <br />
|
||||||
|
|
||||||
{% if standard.authority %}
|
{% if standard.authority.count > 0 %}
|
||||||
Verantwortlicher: <span class="badge badge-pill badge-primary" style="font-size: 1.1em; background-color: {{standard.task.area.color}}"><a href="{% url 'orga-single' standard.authority.pk%}" style="color: #ffffff"> {{standard.authority.first_name}} {{standard.authority.last_name}}</a></span> |
|
Verantwortliche:
|
||||||
|
{% for u in standard.authority.all %}
|
||||||
|
<a href="{% url 'orga-single' u.pk%}"> {{u.first_name}} {{u.last_name}}</a> |
|
||||||
|
{% endfor %}
|
||||||
|
<br />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if standard.executor %}
|
{% if standard.executor.count > 0 %}
|
||||||
Ausführende Person: <span class="badge badge-pill badge-primary" style="font-size: 1.1em; background-color: {{standard.task.area.color}}"><a href="{% url 'orga-single' standard.executor.pk%}" style="color: #ffffff">{{standard.executor.first_name}} {{standard.executor.last_name}}</a></span> |
|
Ausführende Personen:
|
||||||
|
{% for u in standard.executor.all %}
|
||||||
|
<a href="{% url 'orga-single' u.pk%}"> {{u.first_name}} {{u.last_name}}</a> |
|
||||||
|
{% endfor %}
|
||||||
|
<br />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if standard.representative %}
|
{% if standard.representative.count > 0 %}
|
||||||
Vertreter: <span class="badge badge-pill badge-primary" style="font-size: 1.1em; background-color: {{standard.task.area.color}}"><a href="{% url 'orga-single' standard.representative.pk%}" style="color: #ffffff">{{standard.representative.first_name}} {{standard.representative.last_name}}</a></span> |
|
Vertreter:
|
||||||
|
{% for u in standard.representative.all %}
|
||||||
|
<a href="{% url 'orga-single' u.pk%}"> {{u.first_name}} {{u.last_name}}</a> |
|
||||||
|
{% endfor %}
|
||||||
|
<br />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -107,13 +107,15 @@ def StandardAdd(request):
|
||||||
new_standard.content = editorForm.cleaned_data['content']
|
new_standard.content = editorForm.cleaned_data['content']
|
||||||
new_standard.public = normalForm.cleaned_data['public']
|
new_standard.public = normalForm.cleaned_data['public']
|
||||||
|
|
||||||
new_standard.representative = normalForm.cleaned_data['representative']
|
|
||||||
new_standard.executor = normalForm.cleaned_data['executor']
|
|
||||||
new_standard.authority = normalForm.cleaned_data['authority']
|
|
||||||
|
|
||||||
# GROUPS
|
# GROUPS
|
||||||
new_standard.save()
|
new_standard.save()
|
||||||
|
|
||||||
|
new_standard.representative.set(normalForm.cleaned_data['representative'])
|
||||||
|
new_standard.executor.set(normalForm.cleaned_data['executor'])
|
||||||
|
new_standard.authority.set(normalForm.cleaned_data['authority'])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ADD GROUPS
|
# ADD GROUPS
|
||||||
groups = normalForm.cleaned_data['checked_groups'].split(",")
|
groups = normalForm.cleaned_data['checked_groups'].split(",")
|
||||||
|
|
||||||
|
|
@ -192,9 +194,9 @@ def StandardUpdate(request, id):
|
||||||
existing_standard.name = normalForm.cleaned_data['name']
|
existing_standard.name = normalForm.cleaned_data['name']
|
||||||
existing_standard.content = editorForm.cleaned_data['content']
|
existing_standard.content = editorForm.cleaned_data['content']
|
||||||
|
|
||||||
existing_standard.representative = normalForm.cleaned_data['representative']
|
existing_standard.representative.set(normalForm.cleaned_data['representative'])
|
||||||
existing_standard.executor = normalForm.cleaned_data['executor']
|
existing_standard.executor.set(normalForm.cleaned_data['executor'])
|
||||||
existing_standard.authority = normalForm.cleaned_data['authority']
|
existing_standard.authority.set(normalForm.cleaned_data['authority'])
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue