From 90dd87c9bddb95435e0554b52fc5d0aaa81c8149 Mon Sep 17 00:00:00 2001 From: "holger.trampe" Date: Sun, 5 Jan 2020 14:29:03 +0100 Subject: [PATCH] 0.7.3 mehr gefixed --- areas/templates/areas/areas_update.html | 9 +- .../__pycache__/settings.cpython-38.pyc | Bin 4495 -> 4495 bytes news/__pycache__/views.cpython-38.pyc | Bin 3365 -> 3553 bytes news/templates/news/news_management.html | 165 +++++++++++++----- news/templates/news/news_management_SAVE.html | 68 ++++++++ news/views.py | 8 +- .../standards/standards_management.html | 2 +- tasks/templates/tasks/tasks_update.html | 2 +- .../templates/users/datenschutz_content.html | 2 +- users/templates/users/impressum_content.html | 2 +- 10 files changed, 205 insertions(+), 53 deletions(-) create mode 100644 news/templates/news/news_management_SAVE.html diff --git a/areas/templates/areas/areas_update.html b/areas/templates/areas/areas_update.html index aae7a6f..28e20f9 100644 --- a/areas/templates/areas/areas_update.html +++ b/areas/templates/areas/areas_update.html @@ -2,7 +2,7 @@ {% load static %} {% load crispy_forms_tags %} {% block content %} -
+

Bereich aktualisieren


@@ -10,12 +10,12 @@ {{ form|crispy }}
Mitarbeiter hinzufügen
- +
- + {% for us in possible_users %} {% endfor %} @@ -116,8 +116,9 @@ //Check for valid input on inputfield - function checkValue(){ + function checkValue(){ var g = $('#searchusers').val(); + console.log(g); var id = $('#usersfree').find('option[value="' + g + '"]').attr('id'); if(id != undefined && id.length > 0){ tempid = id; diff --git a/digitaleagentur/__pycache__/settings.cpython-38.pyc b/digitaleagentur/__pycache__/settings.cpython-38.pyc index 6460b0ebd68dfe16a1d82d990ccfd8621ab6c311..f1f33de10fd8e1cb2237b719ef5fdb8e52d2be03 100644 GIT binary patch delta 19 YcmeBI?pNjt<>lpK00O2b8@XBq0VqKP9{>OV delta 19 ZcmeBI?pNjt<>lpK0D|AgHgdHJ0st+61o{8~ diff --git a/news/__pycache__/views.cpython-38.pyc b/news/__pycache__/views.cpython-38.pyc index db028f809c4485440823c13ddc51688399fcf18e..aa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!H}3J{s3bb!AN zjgu*U5IW3cFi*73q1CF2R;v^Ls$~o@vLZUbtVddQvj@v5729KDn2SPNMed=6BG?3? z9np<=hxQ2;wH62%j6l z9CizFdd#QykF}Rzxf%fOA3vGp`A+zG_%Uu0(SLsZ( zQE_Y+cDmxF%28P+^6#L^UVyJ)_U|u6WU?S0Bb&ko(+HeRWSp5?Xb`VNo2akQSC0LF aK$?pxV

-
-
- -
-
- - - - - - - - - - - - {% for news_single in news %} - - - - - - - - {% endfor %} - -
TitelErstellt vonErstellt amSichtbar von/bis 
{{news_single.name }}{{ news_single.created_by.first_name }} {{ news_single.created_by.last_name }}{{ news_single.created_date }}{{ news_single.go_online_on|date:"d.m.Y, H:i"}} bis {{ news_single.go_offline_on|date:"d.m.Y, H:i"}} - {% if news_single.created_by == request.user or perms.users.news_management %} - - {% endif %} +
+
+ +
+
+
+
+
Aktuelle News
+
+
+
+ +
+
+ + + + + + + + + + + + {% for news_single in news %} + + + + + + + + {% endfor %} + +
TitelErstellt vonErstellt amSichtbar von/bis 
{{news_single.name }}{{ news_single.created_by.first_name }} {{ news_single.created_by.last_name }}{{ news_single.created_date }}{{ news_single.go_online_on|date:"d.m.Y, H:i"}} bis {{ news_single.go_offline_on|date:"d.m.Y, H:i"}} + {% if news_single.created_by == request.user or perms.users.news_management %} + + {% endif %} + +
+
+
+
+
+
Archivierte News
+
+ +
+
+
-
-
-
+
+ + + + + + + + + + + + {% for news_single in news_arch %} + + + + + + + + {% endfor %} + +
TitelErstellt vonErstellt amSichtbar von/bis 
{{news_single.name }}{{ news_single.created_by.first_name }} {{ news_single.created_by.last_name }}{{ news_single.created_date }}{{ news_single.go_online_on|date:"d.m.Y, H:i"}} bis {{ news_single.go_offline_on|date:"d.m.Y, H:i"}} + {% if news_single.created_by == request.user or perms.users.news_management %} + + {% endif %} + +
+
+
+
+ + {% endblock content %} diff --git a/news/templates/news/news_management_SAVE.html b/news/templates/news/news_management_SAVE.html new file mode 100644 index 0000000..d7a72a9 --- /dev/null +++ b/news/templates/news/news_management_SAVE.html @@ -0,0 +1,68 @@ +{% extends "users/base.html" %} +{% block content %} +
+

News

+
+

+ Hier können aktuelle Nachrichten für die Agentur erstellt und verwaltet werden. +

+
+ +
+
+
+
+ +
+
+ + + + + + + + + + + + {% for news_single in news %} + + + + + + + + {% endfor %} + +
TitelErstellt vonErstellt amSichtbar von/bis 
{{news_single.name }}{{ news_single.created_by.first_name }} {{ news_single.created_by.last_name }}{{ news_single.created_date }}{{ news_single.go_online_on|date:"d.m.Y, H:i"}} bis {{ news_single.go_offline_on|date:"d.m.Y, H:i"}} + {% if news_single.created_by == request.user or perms.users.news_management %} + + {% endif %} + +
+
+
+ +{% endblock content %} diff --git a/news/views.py b/news/views.py index 461fe6d..9d32a42 100644 --- a/news/views.py +++ b/news/views.py @@ -8,6 +8,7 @@ from django.contrib.auth.decorators import login_required from datetime import datetime from django.contrib import messages from django.utils.dateparse import parse_date +from django.utils import timezone # Create your views here. # ALLE STANDARDS EINER AGENTUR class NewsManagement(LoginRequiredMixin, ListView): @@ -16,10 +17,11 @@ class NewsManagement(LoginRequiredMixin, ListView): # Loading only user same agency # Change context and return for template-data def get_context_data(self, **kwargs): - filterdate = datetime.now() - news = News.objects.filter(agency__pk=self.request.user.profile.agency.pk).order_by('-created_date') + filterdate = timezone.now() + 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') context = super().get_context_data(**kwargs) - context.update({'active_link' : 'newsmanagement', 'news' : news}) + context.update({'active_link' : 'newsmanagement', 'news' : news, 'news_arch' : news_arch}) return context ''' class NewsAddNews(LoginRequiredMixin, CreateView): diff --git a/standards/templates/standards/standards_management.html b/standards/templates/standards/standards_management.html index c342c48..b058c8e 100644 --- a/standards/templates/standards/standards_management.html +++ b/standards/templates/standards/standards_management.html @@ -195,7 +195,7 @@ $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1) }); }); - }) + }) $('#area_tabs a').on('click', function (e) { diff --git a/tasks/templates/tasks/tasks_update.html b/tasks/templates/tasks/tasks_update.html index a397bb2..6482e8a 100644 --- a/tasks/templates/tasks/tasks_update.html +++ b/tasks/templates/tasks/tasks_update.html @@ -10,7 +10,7 @@ {{ form|crispy }}
Mitarbeiter hinzufügen
- +
diff --git a/users/templates/users/datenschutz_content.html b/users/templates/users/datenschutz_content.html index 6bc25df..19c709f 100644 --- a/users/templates/users/datenschutz_content.html +++ b/users/templates/users/datenschutz_content.html @@ -1 +1 @@ -

TODO Datenschutz Content

+

Informationen über den Datenschutz

diff --git a/users/templates/users/impressum_content.html b/users/templates/users/impressum_content.html index 348ec6f..f723ce4 100644 --- a/users/templates/users/impressum_content.html +++ b/users/templates/users/impressum_content.html @@ -1 +1 @@ -

TODO Impressum Content

+

E-Mail: support@digitale-agentur.com