From be8a215c51186449b60656ed651918ecd236ea5b Mon Sep 17 00:00:00 2001 From: "holger.trampe" Date: Sun, 9 Feb 2020 20:54:10 +0100 Subject: [PATCH] =?UTF-8?q?Benachrichtigungssystem=20fertig,=20Quicklinks?= =?UTF-8?q?=20f=C3=BCr=20Modulkram=20umgeschrieben,=20Modulsettings=20ange?= =?UTF-8?q?fangen=20und=20f=C3=BCr=200.8=20erstmal=20fertig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../__pycache__/settings.cpython-38.pyc | Bin 4674 -> 4784 bytes .../__pycache__/urls.cpython-38.pyc | Bin 2157 -> 2223 bytes .../__pycache__/wsgi.cpython-38.pyc | Bin 583 -> 583 bytes digitaleagentur/settings.py | 10 +- digitaleagentur/urls.py | 2 +- orga/__pycache__/views.cpython-38.pyc | Bin 1892 -> 1878 bytes orga/templates/orga/orga_main.html | 2 +- orga/views.py | 2 +- quicklinks/__pycache__/urls.cpython-38.pyc | Bin 860 -> 863 bytes quicklinks/__pycache__/views.cpython-38.pyc | Bin 3937 -> 3968 bytes quicklinks/templates/quicklinks/ql_add.html | 4 + .../quicklinks/ql_confirm_delete.html | 4 + .../templates/quicklinks/ql_management.html | 7 +- .../templates/quicklinks/ql_update.html | 4 + quicklinks/urls.py | 7 +- quicklinks/views.py | 3 +- users/__pycache__/models.cpython-38.pyc | Bin 4757 -> 4875 bytes users/__pycache__/signals.cpython-38.pyc | Bin 1718 -> 2596 bytes users/models.py | 8 +- users/signals.py | 61 ++++++- users/templates/users/base.html | 149 +++++++++++++++--- 21 files changed, 222 insertions(+), 41 deletions(-) diff --git a/digitaleagentur/__pycache__/settings.cpython-38.pyc b/digitaleagentur/__pycache__/settings.cpython-38.pyc index 77c9ca1273eb7c237caf921ce12b26e06cf2c328..e75ddf6d6f601e973b1ad20501cb6fc8b5c48954 100644 GIT binary patch delta 681 zcmYjNOIK1+6u#$hKr&FSWs+K|GW{Pbsa;9^10W?{d0kK!BC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python-38.pyc b/digitaleagentur/__pycache__/urls.cpython-38.pyc index b3c21f008bdbca0340c08c05e5ba8a639da8700a..6f2959df7e4ed6e63e29a552fc0343990497b26f 100644 GIT binary patch delta 235 zcmaDWuwGC*l$V!_0SI!W9pZX{tj8b@GLQgr9Dum^-$w1djBcsSDUPWuDNfCdDb6W; zz0Bz%sobfYSu#K@o8r>TB+d{e2V~1nU@ZETDhHNR0P+<u#Z(xRN=C|(o=nvAzLbFv*|WK#yZr$~A71@=fW fCm@rDQGk&L846Ce=TPNl6nMiV%J-T@jDryXmZvzS delta 169 zcmZ24_*OtWl$V!_0SM-p+s8QqS&u;+WFQ9QH~?|+yN%j=8O_p#Q@K+)vt)o+HpQ`* zNt_`{4#<|Dz*zJuRSqnt0OTuzr$0Y)BVC^WgALzVL_lL+4%7EumH0QVXoO#lD@ diff --git a/digitaleagentur/__pycache__/wsgi.cpython-38.pyc b/digitaleagentur/__pycache__/wsgi.cpython-38.pyc index 3e8074ed8331e5114f8ce3cecda75b42903f4bfc..d86f035780369138f75e2da81a9aa38db41fec72 100644 GIT binary patch delta 21 bcmX@ka-4-Hl$V!_0SFvL9O5?eSTg|tF(w2F delta 21 bcmX@ka-4-Hl$V!_0SNxzeiplt$C?QMKxPIr diff --git a/digitaleagentur/settings.py b/digitaleagentur/settings.py index f3e5338..4c38a3f 100644 --- a/digitaleagentur/settings.py +++ b/digitaleagentur/settings.py @@ -27,10 +27,13 @@ SECRET_KEY = '_qv2t2lmsctjxpbb4rrp=op%_20_hxzonv^mvty1o85c)l$s^q' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = ['digitale-agentur.com', 'www.digitale-agentur.com', 'localhost'] +ALLOWED_HOSTS = ['digitale-agentur.com', 'www.digitale-agentur.com', 'localhost', "0.0.0.0"] + + # Application definition INSTALLED_APPS = [ + 'notificsys.apps.NotificsysConfig', 'users.apps.UsersConfig', 'dasettings.apps.DASettingsConfig', 'areas.apps.AreasConfig', @@ -86,6 +89,8 @@ TEMPLATES = [ WSGI_APPLICATION = 'digitaleagentur.wsgi.application' +ASGI_APPLICATION = 'digitaleagentur.routing.application' + # CKEDITOR CKEDITOR_JQUERY_URL = '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js' @@ -134,6 +139,7 @@ DATABASES = { } } + # Password validation # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators @@ -206,6 +212,8 @@ EMAIL_HOST_USER = "support@digitale-agentur.com" EMAIL_HOST_PASSWORD = "aPx9m3!7x3m@8o!t" DEFAULT_FROM_EMAIL = "support@digitale-agentur.com" + + # FOR DATEPICKER BOOTSTRAP4 = { 'include_jquery': True, diff --git a/digitaleagentur/urls.py b/digitaleagentur/urls.py index 55fc334..2122f55 100644 --- a/digitaleagentur/urls.py +++ b/digitaleagentur/urls.py @@ -7,7 +7,6 @@ from users.views import AgencyCreateView from . import views from ckeditor_uploader.views import upload from django.contrib.auth.decorators import login_required - ''' Main URLS @@ -43,6 +42,7 @@ urlpatterns = [ path('register/', AgencyCreateView.as_view(template_name='users/register.html'), name='register'), path('register/done', views.registerdone, name='register-done'), path('summernote/', include('django_summernote.urls')), + path('notifications/', include('notificsys.urls'), name="notifications") ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/orga/__pycache__/views.cpython-38.pyc b/orga/__pycache__/views.cpython-38.pyc index 81e76217bca66a22d833c00df34e2d6c44db4770..f1cf44f4df5d2eeff7c9de9e7be7a9ac422e0560 100644 GIT binary patch delta 194 zcmaFDca4uXl$V!_0SGSJ*vCn3IeR$zxw}qoXIa81 zIa!CbPKq}@wIseEBflg+zO*Q(NE2vvkrs&1o_vi}MNS>WR0a~a7&C9NBo?J67O8-Q ZR6&H=WC^wqMyAQRZ0i{HC(E#V001bjF)jcA delta 207 zcmcb{_k@o(l$V!_0SKm@R*BQw$ZO5a_-(Q$vl`>8$py^Q>}r^@n6rezqzIT41(RZ6 zQapuo4o@vti9`)U3RewRGjlLQiDU|QGh;AA3PUi1CeLIC7U#*`EK3-rCL6HU=?J8! zmc*x(<|W6cWEL0XBv#(y1&I`7`tR giAAZ2Mam!{6%e61nTsuik!^B3+d4+Q$$ab{0O)TwSpWb4 diff --git a/orga/templates/orga/orga_main.html b/orga/templates/orga/orga_main.html index f522382..bd37be8 100644 --- a/orga/templates/orga/orga_main.html +++ b/orga/templates/orga/orga_main.html @@ -78,7 +78,7 @@ function unflatten(arr) { return tree; } -var html = ['
    ']; +var html = ['
      ']; //Create UL-LI-List for tree function createList(arr) { diff --git a/orga/views.py b/orga/views.py index 06f201c..e066fce 100644 --- a/orga/views.py +++ b/orga/views.py @@ -64,7 +64,7 @@ def singleorga(request, pk): 'user_id' : user_id, 'prios' : prios, 'mail' : user.email, - 'userfunc' : user.profile.get_func_display, + 'userfunc' : "CHANGE", 'imageurl' : user.profile.get_photo_url, 'compfunc' : user.profile.compfunc, 'phoneland' : user.profile.phoneland, diff --git a/quicklinks/__pycache__/urls.cpython-38.pyc b/quicklinks/__pycache__/urls.cpython-38.pyc index 5a2f4d87d8a584cd67c7d58ba1e6052baf6c916e..89da13424185801acab57c38b62382eea8c548a9 100644 GIT binary patch delta 63 zcmcb^cAt$ml$V!_0SL0<9O9;L>EcT2!o;o1apelUi7snVg-InU`I>`7C1# QBR8uEqYR@25c2&709m3EiU0rr delta 60 zcmcc5c885Ol$V!_0SI>ID8^0L$h(G7M7Xp#wWwIHFeg4YF)uMaH8(Y{Wb*~a7DjG1 N5k?tC2_WSA4FDdY5mo>I diff --git a/quicklinks/__pycache__/views.cpython-38.pyc b/quicklinks/__pycache__/views.cpython-38.pyc index f99d89de4a3b3a2d840a0e2633839408eae90ff2..30dc2dd99bb01f7de3158799c0c7c6b594847ccd 100644 GIT binary patch delta 1155 zcmZ`&OHUI~6z;Usp|7DYiWcM{2s%Oq6l)^Y;KIksXcJg8p_8HaB8}76nUMt>O=P3H z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VcSN19(KC=aV7RTtl%ut1pB1tme(N+ zO|0bEdxYwcWl1!{)ObGkZ?tgY1KsV~jzhNXC$7Ki)>tiWMQ*~z9V^40#y=Es>L~9u Z_XD^7n@(PAk=2c&s)?p%CQQSeJp}WX$

      Quicklink anlegen


      @@ -13,4 +14,7 @@ Abbrechen +{% else %} +

      Das Modul Quicklinks wurden in ihrer Agentur deaktiviert.

      +{% endif %} {% endblock content %} diff --git a/quicklinks/templates/quicklinks/ql_confirm_delete.html b/quicklinks/templates/quicklinks/ql_confirm_delete.html index 3501d6d..cda46f5 100644 --- a/quicklinks/templates/quicklinks/ql_confirm_delete.html +++ b/quicklinks/templates/quicklinks/ql_confirm_delete.html @@ -1,6 +1,7 @@ {% extends "users/base.html" %} {% load crispy_forms_tags %} {% block content %} +{% if request.user.profile.agency.module_quicklinks %}
      @@ -17,4 +18,7 @@
      +{% else %} +

      Das Modul Quicklinks wurden in ihrer Agentur deaktiviert.

      +{% endif %} {% endblock content %} \ No newline at end of file diff --git a/quicklinks/templates/quicklinks/ql_management.html b/quicklinks/templates/quicklinks/ql_management.html index 9437c1f..8dac933 100644 --- a/quicklinks/templates/quicklinks/ql_management.html +++ b/quicklinks/templates/quicklinks/ql_management.html @@ -1,12 +1,14 @@ {% extends "users/base.html" %} +{% load counter_tag %} {% block content %} +{% if request.user.profile.agency.module_quicklinks %}

      Quicklinks


      Quicklinks helfen zur schnellen Verlinkung von oft genutzten Diensten.

      - {% if perms.users.ql_management %} + {% if user|usergperm:"modulequicklinks" %}
      Quicklink anlegen @@ -86,4 +88,7 @@ function saveDefQL(){ }); } +{% else %} +

      Das Modul Quicklinks wurden in ihrer Agentur deaktiviert.

      +{% endif %} {% endblock content %} diff --git a/quicklinks/templates/quicklinks/ql_update.html b/quicklinks/templates/quicklinks/ql_update.html index 5608ca4..7188b02 100644 --- a/quicklinks/templates/quicklinks/ql_update.html +++ b/quicklinks/templates/quicklinks/ql_update.html @@ -1,6 +1,7 @@ {% extends "users/base.html" %} {% load crispy_forms_tags %} {% block content %} +{% if request.user.profile.agency.module_quicklinks %}

      Quicklink aktualisieren


      @@ -15,4 +16,7 @@ Abbrechen
      +{% else %} +

      Das Modul Quicklinks wurden in ihrer Agentur deaktiviert.

      +{% endif %} {% endblock content %} diff --git a/quicklinks/urls.py b/quicklinks/urls.py index 6a0ffa1..2b140a4 100644 --- a/quicklinks/urls.py +++ b/quicklinks/urls.py @@ -6,11 +6,10 @@ from . import views ''' Permissions definiert in models.py bei USERS und dann hier vor die View geschrieben! ''' - urlpatterns = [ path('', QlManagement.as_view(template_name="quicklinks/ql_management.html"), name='ql-management'), - path('addql/', permission_required('users.ql_management')(QlAdd.as_view(template_name="quicklinks/ql_add.html")), name='ql-addql'), - path('addql//delete', permission_required('users.ql_management')(QlDeleteView.as_view()), name='ql-delete'), - path('addql//', permission_required('users.ql_management')(QlUpdateView.as_view()), name='ql-update'), + path('addql/', permission_required('users.modulequicklinks')(QlAdd.as_view(template_name="quicklinks/ql_add.html")), name='ql-addql'), + path('addql//delete', permission_required('users.modulequicklinks')(QlDeleteView.as_view()), name='ql-delete'), + path('addql//', permission_required('users.modulequicklinks')(QlUpdateView.as_view()), name='ql-update'), path('lerg/', views.loaddefaultql, name="ql-ajaxloaddef"), ] diff --git a/quicklinks/views.py b/quicklinks/views.py index 8b6de6b..9da12ab 100644 --- a/quicklinks/views.py +++ b/quicklinks/views.py @@ -5,12 +5,11 @@ from .models import QuickLinks from .forms import QlAddQlForm from django.contrib import messages from django.shortcuts import redirect -from django.http import HttpResponse +from django.http import HttpResponse, HttpResponseRedirect # Create your views here. class QlManagement(LoginRequiredMixin, ListView): model = QuickLinks - # Adding active_link # Loading only user same agency # Change context and return for template-data diff --git a/users/__pycache__/models.cpython-38.pyc b/users/__pycache__/models.cpython-38.pyc index 3a5993723c9fb824dce4d422230f114e26253666..97840063f9cecd8dff5b95da23d635f48cbc4c5a 100644 GIT binary patch delta 1447 zcmZ`(-ESL35ck^WkNErzNt_R-Zlk)r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py4wO>-;Kr4S%@mpl?5c@)r@t2HM7AJ60D-4ga$xcR@;b-h( zY$15jiUYDyw@=9>=*I_IW(ViL;{3l79wSACmK!E?5{5BqVDIa%T2-vyPtw_1tZ9I> zTYB4-Pzu602_cU&(R`MBr&>}9s4qCof^obZEo3**_J!#5lFtbR#zuS}9U10xmi%6j zBSM1ZYn}HF_Qo!b_OQM1!dL$_pze}q1mvOw@@CB+&iFKz5%=&-?1~u1e7rm~!d7cd zf@F?jIZ_%)%tG0u|NUT=!cchVWxg=J;USHV3JaEooWO zo~HJ$r~$cnF&g=WhU+#Q+x^=JdBLh|8Sii~HE?~F9HvXD-$Hc8bBc7(#i(-FP#v6h zvr}8XHLAd!3h^M6NvDFC;`as>nv!r=R%Z(B= xbpw+k9)z>_IrZNd|AT%y*8i3JU-L diff --git a/users/__pycache__/signals.cpython-38.pyc b/users/__pycache__/signals.cpython-38.pyc index 32d517ab01f99be6cf8cd742f8d3ee473743bce9..0694505654f64d57b59178986eac61e902f87999 100644 GIT binary patch literal 2596 zcmcImOK;mo5av=OMN!nlk2sDIpi24_(5PsSMG+)v+9XKo1aNX8+!73TO;P4U-CZTI zK=tBY9rWHFoMZn%554tY?6s%-g`7IGlwCDNkEOAr-PzgM*?D~9C!LOG!1we08{cj9 z4C7B+tbP_OZom+~0igyZnURx#>PCLm_!uB*1e}fbqD2hA+Ps{MsztxLwjmd3)V zoJniq-8R0xx@gKaobszC?ou00xs^TXoOUbs6(Pp=4=Ve#_sYQdfKQ!W@TWCHPdQQT z24@<RI_|KVX+j-i8+fTI9B?>rl{r0Bjf@q_4s#|W)t;XFT5umF8wr!DkA{USd#Vvpsw@osu*Lf*=%$5` zQ4urMtnZ}CIeZ@RL61K*nfyj(Qk7wDoRd$d<| zDxda$F^|m!l!bl?Kn-0-S-9t1nr^^3ym=FL))G>6=>@uV0svVQwUzqz6&wGr`*g8h z+43qNxGQ%2Gi04`8j<;rU^~o`>3xAz;gxcW|SJ_r^z>tsj9^`nEWB z4dorA90G?zs+C2{DaX3w=s;yN-CcURxB;PK>^!Q;8T2v1l$`_qX3Ci!h63Qyp1}(e zWg+-!BnWzU9z48t^TFO%ySKl&dGEnq(5a1uP{(6N10Nj?EvsJj;5Dl;(cb5uf+2yM zizGzit{UAn56y}I;9Fdgce?DqwDHxXpbmpg{XeP(Y zBRZ-&+^Tn`E)~;ALYg)4tW&Gj?TsUr*J*)0Dp>nFm(SGc1n8gN$Jq!2SO;@!$;S4R zL312sWdy}phZ`G#24v-ER|?gXV<_}wtlzuhc8%^D*xfI{xLL-oV>=c*KsLdXKG}q! N|4ff~YcT9C`3sbEzUBY` delta 716 zcmYk3Pm9w)7{=$FG=G{VX?Lxbl`W0SUZN+#qpS$+3c_wnYZVk+%Fb*zu}#AyyJ(3N zsn(OgRUpc$* zX?1UK$PEr$W%?Cm1}lFgOL*yQcqXe9UKKrst3fT;VivMCa|(Z(RR_eYt$wB7J_7}< zieC`5>b1nAA;b>BHIo0IRddYuOu)0`rf|8JwB(S6+N@$=2rA0~@T)}%I zQROz#($W$b-62dtx10hiy`iF)=uAz^fzcpLYmn3k$_>m0Na!M=BM~8CtO-2(PcVXs zn8zOE>R8M!A^~^{55!G;XVR zUGvNr*f< - {% if perms.users.agencyinfo %} - - {% endif %}
      - +
      @@ -374,6 +395,7 @@ + @@ -452,10 +474,8 @@ function getDimensions() { // window.resize event listener window.addEventListener('resize', function() { if (!throttled) { // nur wenn throttled nicht gesetzt ist - getDimensions(); // Callback-Aktion - - throttled = true; // Jetzt wird wieder ausgebremst - + getDimensions(); // Callback-Aktion + throttled = true; // Jetzt wird wieder ausgebremst setTimeout(function() { // Timeout throttled = false; }, delay); @@ -463,4 +483,91 @@ window.addEventListener('resize', function() { }); getDimensions(); + +/* + AJAX CALL FOR NOTIFICATIONS + +*/ +newunknownotificationscounter = 0; + +function loadUnsendNotifications(){ + $.ajax( + { + type: "GET", + url: "/notifications/checknotifications", + data : { + action : "checknotifications" + }, + success: function( data ) + { + notifications = data['unknownnotification']; + var i = 0; + for (var key in notifications) { + $("#notification_items").append('
      '+notifications[i]['date']+'
      '+notifications[i]['text']+'
      ') + i = i + 1; + newunknownotificationscounter = newunknownotificationscounter + 1; + } + $("#notificationcounter").html(""); + + if(i > 0){$("#notificationcounter").html(i);} + + + } + }); +} + +function loadUnviewnNotifications(){ + $.ajax( + { + type: "GET", + url: "/notifications/getnotifications", + data : { + action : "oldnotifications" + }, + success: function( data ) + { + notifications = data['oldnotifications']; + i = 0; + for (var key in notifications) { + if(newunknownotificationscounter <= 5){ + $("#notification_items").append('
      '+notifications[i]['date']+'
      '+notifications[i]['text']+'
      ') + i = i + 1; + } + } + } + }); +} + +function changeNewNotToViewed(){ + $.ajax( + { + type: "GET", + url: "/notifications/newnotificationsviewed", + data : { + action : "newnotificationsviewed" + }, + success: function( data ) + { + $("#notificationcounter").html(""); + } + }); +} + +function removeNotification(notifyid){ + //$("#notifyid_" + notifyid).remove() + //$("#allnotificationsarea").show(); +} + +$(document).ready(function(){ + $("#notification_items").html(""); + loadUnsendNotifications(); + loadUnviewnNotifications(); +}); + +$(window).click(function() { + $("#notification_items").html(""); + loadUnsendNotifications(); + loadUnviewnNotifications(); +}); + \ No newline at end of file