From ee353c0675589b1591b4997ccc129d360d6964fd Mon Sep 17 00:00:00 2001 From: Holger Trampe Date: Mon, 16 Dec 2019 22:40:24 +0100 Subject: [PATCH] Modul Quicklinks --- .gitignore | 3 + .../__pycache__/settings.cpython-38.pyc | Bin 4399 -> 4437 bytes .../__pycache__/urls.cpython-38.pyc | Bin 1941 -> 1996 bytes digitaleagentur/settings.py | 1 + digitaleagentur/urls.py | 2 + quicklinks/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 159 bytes quicklinks/__pycache__/admin.cpython-38.pyc | Bin 0 -> 200 bytes quicklinks/__pycache__/apps.cpython-38.pyc | Bin 0 -> 387 bytes quicklinks/__pycache__/forms.cpython-38.pyc | Bin 0 -> 707 bytes quicklinks/__pycache__/models.cpython-38.pyc | Bin 0 -> 1136 bytes quicklinks/__pycache__/urls.cpython-38.pyc | Bin 0 -> 787 bytes quicklinks/__pycache__/views.cpython-38.pyc | Bin 0 -> 3009 bytes quicklinks/admin.py | 3 + quicklinks/apps.py | 4 + quicklinks/forms.py | 15 ++++ quicklinks/migrations/__init__.py | 0 quicklinks/models.py | 33 +++++++++ quicklinks/templates/quicklinks/ql_add.html | 15 ++++ .../quicklinks/ql_confirm_delete.html | 20 +++++ .../templates/quicklinks/ql_management.html | 70 ++++++++++++++++++ .../templates/quicklinks/ql_update.html | 16 ++++ quicklinks/tests.py | 3 + quicklinks/urls.py | 15 ++++ quicklinks/views.py | 67 +++++++++++++++++ users/__pycache__/models.cpython-38.pyc | Bin 3825 -> 3883 bytes users/models.py | 3 +- users/templates/users/base.html | 11 +++ 28 files changed, 280 insertions(+), 1 deletion(-) create mode 100644 quicklinks/__init__.py create mode 100644 quicklinks/__pycache__/__init__.cpython-38.pyc create mode 100644 quicklinks/__pycache__/admin.cpython-38.pyc create mode 100644 quicklinks/__pycache__/apps.cpython-38.pyc create mode 100644 quicklinks/__pycache__/forms.cpython-38.pyc create mode 100644 quicklinks/__pycache__/models.cpython-38.pyc create mode 100644 quicklinks/__pycache__/urls.cpython-38.pyc create mode 100644 quicklinks/__pycache__/views.cpython-38.pyc create mode 100644 quicklinks/admin.py create mode 100644 quicklinks/apps.py create mode 100644 quicklinks/forms.py create mode 100644 quicklinks/migrations/__init__.py create mode 100644 quicklinks/models.py create mode 100644 quicklinks/templates/quicklinks/ql_add.html create mode 100644 quicklinks/templates/quicklinks/ql_confirm_delete.html create mode 100644 quicklinks/templates/quicklinks/ql_management.html create mode 100644 quicklinks/templates/quicklinks/ql_update.html create mode 100644 quicklinks/tests.py create mode 100644 quicklinks/urls.py create mode 100644 quicklinks/views.py diff --git a/.gitignore b/.gitignore index e4b082a..fa99085 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,9 @@ areas/migrations/* news/migrations/* !news/migrations/__init__.py +quicklinks/migrations/* +!quicklinks/migrations/__init__.py + standards/migrations/* !standards/migrations/__init__.py diff --git a/digitaleagentur/__pycache__/settings.cpython-38.pyc b/digitaleagentur/__pycache__/settings.cpython-38.pyc index 6d53cfa933b53269805a1f5e1d229219bd7c83a6..597bc12368b50f9b77871897fc340a2aec127051 100644 GIT binary patch delta 521 zcmXYsNmEln6op?uU(f;{22?OWAPHj#yf|wd5XE^$#NjGp}OIA5Rm6E zM>xtct8R|(FivoiQ=C@4VE1sQ?sAseInJvv#RbJ_E-GGPhRa-0c9m;fw;hr71~<87 z-H6}j4tKf7ed|U2EDxA#-aTZVM@{~iCp<-X#&Z^IOXPi_qZfHu*C=w3phl5bx|e`b zJ*Hw8%UI31%|7 zm2OAUk&-E;S#P*9$U7NoDuouRDh=~qM)a{!He`$slI5d}>wp}eWP;B!sb|0!c7C15 zopZ8Zx2N28H<4Q32$#yM;aa&G6f2c#Fx%|6XT0BSu4A_H@qEm$K`MbpszI$|q^$vo!hkrgKyjV6$JGxAQh% zYAlHbO5BgJm3O3tuhLpjO6dEhQXAi;T|et!TRPd11iR9u4U+6hH$S9D&t86VF?9+j fZ6)@P2b_>|yyc!&IRCA~bU0P?&#gZE75;k;1h9{R diff --git a/digitaleagentur/__pycache__/urls.cpython-38.pyc b/digitaleagentur/__pycache__/urls.cpython-38.pyc index 7905a5b52836dcc0049a29b416dcfcccdf6d9b94..edf28b383696605d41e483adb2faa7d24f72cf66 100644 GIT binary patch delta 384 zcmbQre}-Q>l$V!_0SK}_e2=Z*WMFs<;vfSNAjbiSiw{lI{!p)w!q>~3%ABH@%95hg z%$OnqnkAWJ&O7 znK4BP%2!Th&l1lPNl{5rO;PJ*N>PW3YXHS1fa01dJiUx5T2N7Kps3{J1V+(%DWIG_ zSk3?{XPC+h6f**g8AHWPQrWVkQ%pg;bpBNCRL(3JAeK!r>tzyWh>`=c&BrsQVkX)@hnDM&2IxW&Gii%EfTvp=&O6XUJT zd8`K+*_40^i|P=Zkm3`H3EJ~9dLeP9vfU<3eZ C)=4!0 diff --git a/digitaleagentur/settings.py b/digitaleagentur/settings.py index e9960f2..f37f049 100644 --- a/digitaleagentur/settings.py +++ b/digitaleagentur/settings.py @@ -34,6 +34,7 @@ INSTALLED_APPS = [ 'areas.apps.AreasConfig', 'orga.apps.OrgaConfig', 'tasks.apps.TasksConfig', + 'quicklinks.apps.QuicklinksConfig', 'standards.apps.StandardsConfig', 'news.apps.NewsConfig', 'crispy_forms', diff --git a/digitaleagentur/urls.py b/digitaleagentur/urls.py index 7dd686f..024d6ec 100644 --- a/digitaleagentur/urls.py +++ b/digitaleagentur/urls.py @@ -18,6 +18,7 @@ from django.contrib.auth.decorators import login_required standards orga news + quicklinkgs -> Rest ist von Django @@ -29,6 +30,7 @@ urlpatterns = [ path('dashboard/', include('users.urls'), name="dashboard"), path('areas/', include('areas.urls'), name="areas-management"), path('tasks/', include('tasks.urls'), name="tasks-management"), + path('ql/', include('quicklinks.urls'), name="ql-management"), path('standards/', include('standards.urls'), name="standards"), path('news/', include('news.urls'), name="dashboard"), path('orga/', include('orga.urls'), name="orga"), diff --git a/quicklinks/__init__.py b/quicklinks/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/quicklinks/__pycache__/__init__.cpython-38.pyc b/quicklinks/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..78c6cde3996b91ef4bbc1f5ae9bb1e197e7da272 GIT binary patch literal 159 zcmWIL<>g`kg1hg&$Aaj`AOaaM0yz#qT+9L_QW%06G#UL?G8BP?5yUSSXRDad;?$zz zn9#hU)Wn<^m;B_?+|<01;uv?&keHOr^vsgPoYcg0pipU1Okrtea&}H;UUqRze0*kJ bW=VX!UP0w84x8Nkl+v73JCNz0ftUdRdGIMm literal 0 HcmV?d00001 diff --git a/quicklinks/__pycache__/admin.cpython-38.pyc b/quicklinks/__pycache__/admin.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1407c65aa0d150a9064867b32a2c8985abcf7f90 GIT binary patch literal 200 zcmWIL<>g`kg1hg&$2tM&#~=v@#i>QbF`;=y zsfjr;F8Rr&xv6<2#WC)lAu%bL>6s;oIjM>1K%vs2n8MP`2Vg>*X;WU&0 literal 0 HcmV?d00001 diff --git a/quicklinks/__pycache__/apps.cpython-38.pyc b/quicklinks/__pycache__/apps.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8bc1553be3e9102a5e9d0f2ee9915f16bfba679c GIT binary patch literal 387 zcmYjNu};G<5Ix61N<%C46IiqK0}w(%MXFdTA;=OLStd47sNoInV1-n zI&n@A?Me6U-o5kP$=Pfc1KP*;&%-0ePfw05M3SPrGXx2eXsAg}2&_N`lD>hYioDW1 zkl`I9CtuhF3F#+SZM$sDQ&kqea%==iitgqJ3UVR=Uz42504LCXe%n>WMptIz#tC`6 z{jaQ(u#Y%5qE?*uG3Rw7JMHr+=i5%`KPB|>9c+X<2H2;|bCx+}9m|YWLbL0p=xSwl zj;(I)nXJlcC$thJmO9H0E176pw`gB1#aZ56fDn;^ukqkh`7BJ?EPS8!+Mpa(kJ$u; PKDrq1z4V_j%$WwiTESha literal 0 HcmV?d00001 diff --git a/quicklinks/__pycache__/forms.cpython-38.pyc b/quicklinks/__pycache__/forms.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eb58539461049e6c036663e97d176f974287c06c GIT binary patch literal 707 zcmZuv-D=w~6xN>=Crw~KcYA<=8RP-V7%dwsgEkPhFc2QX%~69}*Y{GEZ?>|1h;Ea7EXMZSkj&Q|81Yp2DYq;T@ zY~e*CjYM05@~X*9#@Pvj4D?q9+VM+yD~*QHdsgHRc%KzKWfxs&A{yhf4xE3B-U9}v zt;w>l*H@=?dllDodVffCj&Q|i2#y&J%m|FdL0~L#D~tq*aa1~3`eT6Qp!|=_pK_k> z$v9~g2~in$(qvQsj5d^dj*{aqkM<WL!~CuZzKEswSK^EW%=^*1xS2kmx1V4VK=`Qg4z$agfZ4_G5xF!KH_ap;d89+DRj9RNR(M;)ZU;8`4Ys(66{7gD}`7+~wXG;hr#N%~LCE zapxWB`j@aj=^ENeGA?9}>}e#@$uTfjiH}0%0%&`Gce|g-Ozp%%a#*kra-jwj{QCN6 zfUyNLe-9u?XmApm!kXEl0qAh!+zee{9yhtgZLs`5tN^SgZ*T|Io})^i2WKQ~^CoY> zdyTh2^_mXemhoi%GEV0x+0Rl6>O~Oz)%M`TKavm1 z1!slO=3)*>IP*_TMS0g$__ex)&_TdGYPbPRcOp?xHqJ9y7J`;a-h|{#BQTjq0D+?FgH~X)L&-+8|)cw|lwjm6W!UIPB=*oL;uqD6o5XdAe=w^BGH{ ztjEWdu&`BPPkVKbYH7`72-G64il^5nczLF!>`n0krs!FY$z*_##LG5hfu<4AVaIE+Xnu?;2B|2G?D{ zLgv!w3Ns%(vGrVGI%s_dtuOc(eL{c_Tl`Lohb?~B;%g^~>F6bzj&Gn^G{wd#iQd4! zcbT#GYT7XaUaYfxDcP>dB%@|jGAS~pvSJV3U>oe1=$t<%IaxEoa&3C&{FG7)o-xie zdkq<_wJ0fREmS{*w5u)8@~xWh_)`1{pKY|@P)MwqC^-Zyb0SzB@A%_A$rjweeM0Gu z&+Ad8m{hY{nd0dt(@f^-3zB2Yu;Rzblf!gjTaqqv$p}x+idAK&qtd6(UZpf! uXPR&ZBg=Iq(|w~-`;uAt!FWfapcQAwcE)N5BEk_K;z@suAK(d|{QL!c9qzyY literal 0 HcmV?d00001 diff --git a/quicklinks/__pycache__/views.cpython-38.pyc b/quicklinks/__pycache__/views.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e9b09641efd9fe12fd599163f645bbed66014be1 GIT binary patch literal 3009 zcmbtW+iu%N5aseFijsUyb3>9UNpETkrC0P86bTYED3BO%Tlax*K``94O_`LOT`Ctt zd2)dCrTv1UaDcw}2l@m3i+$}=zMyEHdS)p{mR&y-rLcq9*%fDI=ge8Iv|6Es=f}VQ z`r%UDvi_vW!N301NVjvla3aU(PVN?741z2YIEG)CI)L>cUbKhE>`R9n#>M-p~(dR-!Tev+~&-&kpd&5i$ekXgF^*f#p zZ%C1p;`>ZI(829Yl|~C!w)nm^yeY~g%Pad$k&9~gb5=PBmxo!pc{}TGDmZB@=hr!3 z&c7PS0@I)nN+s(;r4-J=#~Dvl8;YUllCSL+46I%hwz-H_YQ z*kfm8?>4wIa=7~o=FA$|@a8Qc^bo%K>7zK_+SG18DTEGja_MGnGPQLhNz3fMh-oh8 z;I`A$o*Hfmspr;38K;AODIS(F&M}b$FI^kl?TNHh+F#4^68mZr#Sp60?oiQmOAfFi zv|qW_He3e-iSosFA8CJRYSMAFt3o-1M zUBS!M>PjDl&R1^^(jgt8TD|r4cdI;G&&nhht z!!EEnwtfC!J-UYz?$mS;$8>6Otiw1i27H*4-i+gW!z8a(s$=o6D01UQx5lxjBG2Pk zUV_6)v`M>6q6L8-wG`DoV6JB@$K&fGY&(cA&LU6vQO)4Y<_>Tc7#%GNy>2iU0tLSI z447XySMKFgh$HNhcZ0Y#lxf5PQ#K(uV=ocqEXjH7t8n7T1=8tUX5;J*<#Ay;|Xfeq8 zs!aN+Fp27L4P+4CPx6fK*(O!(lId`oUHq5QuhO(E-I5qwRn zQG-m<+b4LAB)NUnQ1>1hjkwr!TW8#86n|BHa(_6iMcCfM7>BjM0z+<-vK;BLPIxQ? z<@Cr2+&?aFT^)hL+@CAmUe#-_6o?6Z)DRd_+@qaKRKY@#V?0iOk2_o`1>|Dd* zA?zFo>Bz;{JRUn#P6HsrUGf8(nzJzekHrp!_%Q`RXE`RVineHFsdGZl@g4|#&{Z1) zS*F8MNh+W|J2unzgUs%BlVQ2hE$F*YN$R=i#CSvXDS%G|A+uBx+eo4vN!O9Akq98P zZ!U5*zSXH1s$$`pX-5@@&^>O5RT9XhIp_%|zbv{Au2vrpU(z?9B7ii(9Op3ba~7Hl I^9!^80PpCI)c^nh literal 0 HcmV?d00001 diff --git a/quicklinks/admin.py b/quicklinks/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/quicklinks/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/quicklinks/apps.py b/quicklinks/apps.py new file mode 100644 index 0000000..a6e7ca4 --- /dev/null +++ b/quicklinks/apps.py @@ -0,0 +1,4 @@ +from django.apps import AppConfig + +class QuicklinksConfig(AppConfig): + name = 'quicklinks' diff --git a/quicklinks/forms.py b/quicklinks/forms.py new file mode 100644 index 0000000..a696478 --- /dev/null +++ b/quicklinks/forms.py @@ -0,0 +1,15 @@ +from django import forms +from django.forms import ModelForm +from .models import QuickLinks + + +class QlAddQlForm(forms.ModelForm): + + class Meta: + model =QuickLinks + labels = { + "name" : "Name", + "link" : "Weblink", + "logo" : "Logo", + } + fields = ['name', 'link', 'logo'] \ No newline at end of file diff --git a/quicklinks/migrations/__init__.py b/quicklinks/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/quicklinks/models.py b/quicklinks/models.py new file mode 100644 index 0000000..7eea489 --- /dev/null +++ b/quicklinks/models.py @@ -0,0 +1,33 @@ +from django.db import models +from users.models import Agency +from django.urls import reverse +from colorful.fields import RGBColorField +from django.contrib.auth.models import User +import datetime + +''' + +Model Quicklinks + +Verwaltet alle gespeicherten Bereiche für die Agentur. Wird eine neue erstellt, +wird dieser die Agency zugewiesen. Das Farb-Feld ist für später, damit im +Ogranigramm eine Farbe für den jeweiligen Bereich festgelegt wird. + +users speichert alle primary-Keys der User, welche diesem Bereich zugeordnet sind! + +''' +class QuickLinks(models.Model): + + # Wenn die Area gelöscht wird, wird NICHT die Agency gelöscht + agency = models.ForeignKey(Agency, on_delete=models.PROTECT) + name = models.CharField(max_length=200, blank=False) + link = models.CharField(max_length=200, blank=False) + logo = models.ImageField(default='agencymain/default.jpg', upload_to='agencymain', blank=True) + + def __str__(self): + return f'{self.name}' + + def get_absolute_url(self): + return reverse('ql-update', kwargs={'pk':self.pk}) + + diff --git a/quicklinks/templates/quicklinks/ql_add.html b/quicklinks/templates/quicklinks/ql_add.html new file mode 100644 index 0000000..e29d3f3 --- /dev/null +++ b/quicklinks/templates/quicklinks/ql_add.html @@ -0,0 +1,15 @@ +{% extends "users/base.html" %} +{% load crispy_forms_tags %} +{% block content %} + +{% endblock content %} diff --git a/quicklinks/templates/quicklinks/ql_confirm_delete.html b/quicklinks/templates/quicklinks/ql_confirm_delete.html new file mode 100644 index 0000000..3501d6d --- /dev/null +++ b/quicklinks/templates/quicklinks/ql_confirm_delete.html @@ -0,0 +1,20 @@ +{% extends "users/base.html" %} +{% load crispy_forms_tags %} +{% block content %} +
+
+
+ +
+
+
+ +
+ {% csrf_token %} +
+   + Abbrechen +
+
+
+{% endblock content %} \ No newline at end of file diff --git a/quicklinks/templates/quicklinks/ql_management.html b/quicklinks/templates/quicklinks/ql_management.html new file mode 100644 index 0000000..ef839d5 --- /dev/null +++ b/quicklinks/templates/quicklinks/ql_management.html @@ -0,0 +1,70 @@ +{% extends "users/base.html" %} +{% block content %} +
+

Quicklinks

+
+

+ Quicklinks helfen zur schnellen Verlinkung von oft genutzten Diensten. +

+ {% if perms.users.ql_management %} + + {% endif %} +
+
+ +
+
+
+
+ + + + + + + + + + + {% for ql in quicklinks %} + + + + + + + {% endfor %} + +
NameLinkLogo 
{{ql.name }}{{ ql.link }} + {% if perms.users.ql_management %} + + {% endif %} + +
+
+
+ +{% endblock content %} diff --git a/quicklinks/templates/quicklinks/ql_update.html b/quicklinks/templates/quicklinks/ql_update.html new file mode 100644 index 0000000..a00645a --- /dev/null +++ b/quicklinks/templates/quicklinks/ql_update.html @@ -0,0 +1,16 @@ +{% extends "users/base.html" %} +{% load crispy_forms_tags %} +{% block content %} +
+

Quicklink aktualisieren

+
+
+ {% csrf_token %} + {{ form|crispy }} +
+ +   + Abbrechen +
+
+{% endblock content %} diff --git a/quicklinks/tests.py b/quicklinks/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/quicklinks/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/quicklinks/urls.py b/quicklinks/urls.py new file mode 100644 index 0000000..777b297 --- /dev/null +++ b/quicklinks/urls.py @@ -0,0 +1,15 @@ +from django.urls import path +from django.contrib.auth import views as auth_views +from django.contrib.auth.decorators import login_required, permission_required +from .views import QlManagement, QlAdd, QlDeleteView, QlUpdateView +''' +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'), + +] diff --git a/quicklinks/views.py b/quicklinks/views.py new file mode 100644 index 0000000..488e018 --- /dev/null +++ b/quicklinks/views.py @@ -0,0 +1,67 @@ +from django.shortcuts import render +from django.contrib.auth.mixins import LoginRequiredMixin +from django.views.generic import CreateView, ListView, UpdateView, DetailView, DeleteView +from .models import QuickLinks +from .forms import QlAddQlForm +from django.contrib import messages + +# 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 + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + quicklinks = QuickLinks.objects.filter(agency__pk=self.request.user.profile.agency.pk).order_by('name') + context.update({'active_link' : 'quicklinks', 'quicklinks' : quicklinks}) + return context + +class QlAdd(LoginRequiredMixin, CreateView): + model = QuickLinks + success_url = '/ql' + form_class = QlAddQlForm + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context.update({'active_link' : 'quicklinks'}) + return context + + def form_valid(self, form): + # Send message to the site + messages.success(self.request, f'Quicklink angelegt!') + # SAVE OBJECTS TO SIGNALE! + form.instance.agency = self.request.user.profile.agency + return super().form_valid(form) + +class QlDeleteView(LoginRequiredMixin, DeleteView): + model = QuickLinks + success_url = '/ql' + template_name = 'quicklinks/ql_confirm_delete.html' + + def delete(self, request, *args, **kwargs): + response = super(QlDeleteView, self).delete(request, *args, **kwargs) + messages.success(request, f'Quicklink wurde gelöscht!') + return response + + def get_context_data(self, **kwargs): + context = super(QlDeleteView, self).get_context_data(**kwargs) + context['active_link'] = 'quicklinks' + return context + +class QlUpdateView(LoginRequiredMixin, UpdateView): + model = QuickLinks + template_name = 'quicklinks/ql_update.html' + success_url = '/ql' + form_class = QlAddQlForm + + def form_valid(self, form): + # Send message to the site + messages.success(self.request, f'Quicklink aktualisiert!') + return super().form_valid(form) + + def get_context_data(self, **kwargs): + context = super(QlUpdateView, self).get_context_data(**kwargs) + context['active_link'] = 'quicklinks' + return context \ No newline at end of file diff --git a/users/__pycache__/models.cpython-38.pyc b/users/__pycache__/models.cpython-38.pyc index b75a791fb76e2871da27b8503f9b29daeca5e7db..3bf03d6fe95c04eb89676d2b6c3993b5371553f0 100644 GIT binary patch delta 138 zcmew;yIPJnl$V!_0SKBtevh5IkynbFiyg>w0ODe~$%fqGJSpty>`}}q9Kj5loSTEV zT^LO?nWA_LbK-Lo^Agijb5rw5s+0puGn2D(GV`*F6_QdDi;_|^OH%U`O7l__Qj3a9 cQgd=9PvLP85dfOX!NkOf1b=RR#>3470MJ?^;s5{u delta 81 zcmZ22_feKNl$V!_0SLMle21yE Ylh5(k3Go4?IhdFj;qcdH1zv6@0JFso$^ZZW diff --git a/users/models.py b/users/models.py index 6723488..b02900b 100644 --- a/users/models.py +++ b/users/models.py @@ -130,7 +130,8 @@ class Profile(models.Model): ('areas_management', 'Bereiche bearbeiten'), ('tasks_management', 'Aufgabenbereiche bearbeiten'), ('standard_management', 'Standards bearbeiten und freischalten'), - ('news_management', 'News bearbeiten und veröffentlichen') + ('news_management', 'News bearbeiten und veröffentlichen'), + ('ql_management', 'Quicklinks bearbeiten und erstellen') ] diff --git a/users/templates/users/base.html b/users/templates/users/base.html index 4b4aa23..d7bb2d4 100644 --- a/users/templates/users/base.html +++ b/users/templates/users/base.html @@ -100,6 +100,17 @@ + {% if active_link == 'quicklinks' %} + + {% if perms.users.users_usermanagement or perms.users.areas_management or perms.users.tasks_management or perms.user.news_management %}