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 6460b0e..f1f33de 100644 Binary files a/digitaleagentur/__pycache__/settings.cpython-38.pyc and b/digitaleagentur/__pycache__/settings.cpython-38.pyc differ diff --git a/news/__pycache__/views.cpython-38.pyc b/news/__pycache__/views.cpython-38.pyc index db028f8..aa7cc38 100644 Binary files a/news/__pycache__/views.cpython-38.pyc and b/news/__pycache__/views.cpython-38.pyc differ diff --git a/news/templates/news/news_management.html b/news/templates/news/news_management.html index ceff159..617e9a6 100644 --- a/news/templates/news/news_management.html +++ b/news/templates/news/news_management.html @@ -12,57 +12,138 @@

-
-
- -
-
- - - - - - - - - - - - {% 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