Bugliste von basti fertig ausser Punkte welche diskutiert werden muessen. MIGRATIONS NEED!
This commit is contained in:
parent
301d486384
commit
5284ef72fb
|
|
@ -3,8 +3,10 @@
|
|||
{% load counter_tag %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<div class="content-section col-8">
|
||||
<h4>Agenturen in Verbund {{agn.name}}</h4>
|
||||
<div class="content-section col-12">
|
||||
<h4>Agenturen in Verbund {{agn.name}}
|
||||
<a style="float: right" href="{% url 'dasettings' %}" type="button" class="btn btn-secondary btn-sm"><i class="fas fa-chevron-circle-left"></i></a>
|
||||
</h4>
|
||||
{% if outstanding|length > 0 %}
|
||||
<hr>
|
||||
<h5>Ausstehende Einladungen</h5>
|
||||
|
|
@ -75,7 +77,7 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
<a href="{% url 'dasettings' %}" type="button" class="btn btn-primary">Zurück zu Verbünden</a>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,6 @@
|
|||
{% load static %}
|
||||
<a type="button" class="btn btn-primary" href="{% url 'newagn' %}" data-toggle="tooltip" data-placement="top" title="Erstellen Sie einen neuen Agenturverbund und teilen Sie Ihre Standards."><i class="fas fa-plus"></i> Agenturverbund erstellen</a>
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
<h4>Ihre Agenturverbünde</h4>
|
||||
<div class="table-responsive">
|
||||
<table class="table hover" id="agntable">
|
||||
|
|
@ -36,7 +33,9 @@
|
|||
<span id="aglink_{{agn.pk}}" style="display: none;">Kopiert!</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{agn.creator_agency.name }}</td>
|
||||
<td>{{agn.creator_agency.name }}
|
||||
<button style="float: right" class="btn btn-secondary btn-sm" onclick="javascript:$('#showAgencyInfo_{{agn.creator_agency.pk}}').modal('toggle');"><i class="fas fa-info-circle"></i></button>
|
||||
</td>
|
||||
<td>{{agn.creator.first_name }} {{agn.creator.last_name }}</td>
|
||||
<td>{{agn.created_on }}</td>
|
||||
<td>{{agn.lastactivity}}</td>
|
||||
|
|
@ -56,6 +55,31 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
{% for agn in agencynetworks %}
|
||||
<div class="modal fade" tabindex="-1" id="showAgencyInfo_{{agn.creator_agency.pk}}" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Agenturinfo</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Agentur <b>{{agn.creator_agency.name}}</b>
|
||||
<hr>
|
||||
{% if agn.creator_agency.inhaber|length > 0 %}Inhaber: {{agn.creator_agency.inhaber}}<br /> {% endif %}
|
||||
{% if agn.creator_agency.street|length > 0 %}Adresse: {{agn.creator_agency.street}} {{agn.creator_agency.plz}} {{agn.creator_agency.city}}<br /> {% endif %}
|
||||
{% if agn.creator_agency.phone|length > 0 %}Telefon: {{agn.creator_agency.phone}} <hr>{% endif %}
|
||||
E-Mailadresse: <a href="mailto:{{agn.agency_mail}}">{{agn.creator_agency.agency_email}}</a>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-success" data-dismiss="modal">Schliessen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<div class="modal fade" id="showAGNLink" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="" aria-hidden="true">
|
||||
<div class="modal-dialog " role="document">
|
||||
|
|
|
|||
|
|
@ -171,9 +171,9 @@ var defaultsettingsview = "profil";
|
|||
//Check prev Side
|
||||
var check_for_settings = document.referrer;
|
||||
//If prev side was not settings, reload cookie
|
||||
if(check_for_settings.indexOf("settings") == -1){
|
||||
$('#' + defaultsettingsview).tab('show');
|
||||
document.cookie = "lastview=" + defaultsettingsview;
|
||||
if(check_for_settings.indexOf("settings") == -1){
|
||||
$('#' + defaultsettingsview).tab('show');
|
||||
document.cookie = "lastview=" + defaultsettingsview;
|
||||
}
|
||||
|
||||
// Load active Tab with CSS class, if last Side was part of Settings
|
||||
|
|
@ -190,6 +190,7 @@ var defaultsettingsview = "profil";
|
|||
$(this).tab('show');
|
||||
lastview_name = $(this)[0]['hash'].substring(1);
|
||||
document.cookie = "lastview="+lastview_name;
|
||||
console.log(document.cookie)
|
||||
});
|
||||
|
||||
//Get Cookie by Name from document.cookie. Returns a String!
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ noclickeffect:active { border-style: outset !important;}
|
|||
<button type="button" class="btn btn-primary" onclick="javascript:addArea(false)" data-toggle="tooltip" data-placement="top" title="Neuen Bereich erstellen."><i class="fas fa-plus"></i> Bereich</button>
|
||||
</div>
|
||||
|
||||
<div id="allAreas" class="mt-3 col-8">
|
||||
<div id="allAreas" class="mt-3 col-9">
|
||||
<div class="areaCollapseContent" id="sortableAreas" class="mt-3">
|
||||
{%for area in agencyareas%}
|
||||
<div class="card mb-2" id="maincard_{{area.pk}}">
|
||||
|
|
|
|||
|
|
@ -23,5 +23,4 @@ urlpatterns = [
|
|||
path('managnag/acceptinv/<int:network>/<int:targetag>/<int:aginvpk>', permission_required('users.agencynetwork')(views.AddAgToNetwork), name='acceptinvite'),
|
||||
path('managnag/deli/<int:pk>', permission_required('users.agencynetwork')(views.DelAgInv), name='delinvite'),
|
||||
#path('managnag/delfromagn/<int:agn>/<int:ag>', permission_required('users.agencynetwork')(views.DelFromAgn), name='delagfromagn'),
|
||||
|
||||
]
|
||||
Binary file not shown.
|
|
@ -16,9 +16,13 @@ import os
|
|||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
BASE_URL = "https://dev01.digitale-agentur.com/"
|
||||
#BASE_URL = "https://digitale-agentur.com/"
|
||||
#BASE_URL = "http://localhost:8000/"
|
||||
CRONAPIKEY = "gCddsaz6NOnE9QbXZM5LasdEk122D"
|
||||
|
||||
# Nach zehn Stunden läuft der Cookie ab!
|
||||
SESSION_COOKIE_AGE = 8*60*60
|
||||
|
||||
# FOR SUMMERNOTE ORIGIN
|
||||
X_FRAME_OPTIONS = 'SAMEORIGIN'
|
||||
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@ from users.models import UserFullName
|
|||
class MessageForm(forms.Form):
|
||||
def __init__(self, user, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields['target_user'] = forms.ChoiceField(label="Mitarbeiter", choices=[(u.id, u) for u in UserFullName.objects.filter(profile__agency__pk=user.profile.agency.pk).exclude(pk=user.pk)])
|
||||
self.fields['target_user'] = forms.MultipleChoiceField(required=True, label="Mitarbeiter", choices=[(u.id, u) for u in UserFullName.objects.filter(profile__agency__pk=user.profile.agency.pk).exclude(pk=user.pk)], widget=forms.CheckboxSelectMultiple())
|
||||
self.fields['message_content'] = forms.CharField(required=True, widget=forms.Textarea, label="Mitteilung")
|
||||
|
|
@ -37,10 +37,10 @@
|
|||
|
||||
<div class="tab-pane fade" id="usermess" role="tabpanel" aria-labelledby="usermess-tab">
|
||||
<h5 class="mt-3">Meine Mitteilungen{% if request.user.profile.showtooltips %} <small><i data-toggle="tooltip" data-placement="top" title="Hier sehen Sie Ihre erhaltenen Mitteilungen" class="far fa-question-circle"></i></small>{% endif %}</h5>
|
||||
<div class="col-6 mt-3">
|
||||
<div class="col-12 mt-3">
|
||||
{% if usermessages|length > 0 %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<table class="table table-hover" id="allmessages">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Absender</th>
|
||||
|
|
@ -94,9 +94,39 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
<style>
|
||||
/* DATATABLES */
|
||||
.paginate_button {
|
||||
padding: 0px !important;
|
||||
border: 0px !important;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('#send').tab('show');
|
||||
|
||||
$('#allmessages').DataTable({
|
||||
"language": {
|
||||
"search" : "Suche",
|
||||
"info": "Zeige _START_ bis _END_ von _TOTAL_ Einträgen",
|
||||
"lengthMenu": "Zeige _MENU_ Einträge",
|
||||
"zeroRecords": "Nichts gefunden",
|
||||
"infoEmpty": "Keine Einträge",
|
||||
"paginate": {
|
||||
"first": "Erste",
|
||||
"last": "Letzte",
|
||||
"next": "Nächste",
|
||||
"previous": "Zurück"
|
||||
},
|
||||
},
|
||||
"buttons" : {
|
||||
"className" : "btn-danger"
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
var delmessid = "";
|
||||
|
|
|
|||
|
|
@ -24,31 +24,35 @@ def mainmessageview(request):
|
|||
formtocheck = MessageForm(request.user, request.POST)
|
||||
|
||||
if formtocheck.is_valid():
|
||||
targetuser_id = formtocheck.cleaned_data["target_user"]
|
||||
targetuser = User.objects.get(pk=targetuser_id)
|
||||
messagecontent = formtocheck.cleaned_data["message_content"]
|
||||
message = Message.objects.create(target_user=targetuser, agency=request.user.profile.agency, content=messagecontent, created_by=request.user)
|
||||
|
||||
targeturl = request.build_absolute_uri() + "sl/" + str(message.id)
|
||||
notificationtext = "Sie haben eine neue Mitteilung erhalten."
|
||||
|
||||
targetuser_ids = formtocheck.cleaned_data["target_user"]
|
||||
print(targetuser_ids)
|
||||
for user in targetuser_ids:
|
||||
targetuser = User.objects.get(pk=user)
|
||||
messagecontent = formtocheck.cleaned_data["message_content"]
|
||||
message = Message.objects.create(target_user=targetuser, agency=request.user.profile.agency, content=messagecontent, created_by=request.user)
|
||||
|
||||
targeturl = request.build_absolute_uri() + "sl/" + str(message.id)
|
||||
notificationtext = "Sie haben eine neue Mitteilung erhalten: " + message.content
|
||||
|
||||
|
||||
if(targetuser.profile.user_messages_mail):
|
||||
|
||||
username = targetuser.first_name + " " + targetuser.last_name
|
||||
msg_html = render_to_string('notificsys/notification_mail.html', {'username': username, 'notificationtext' : notificationtext, 'linktarget' : targeturl})
|
||||
send_mail(
|
||||
'Agentur-Benachrichtigung',
|
||||
'Hallo ' + targetuser.first_name + ' ' + targetuser.last_name + '! ' + notificationtext + " <a href='"+targeturl+"'>Klicken Sie hier.</a>",
|
||||
'support@digitale-agentur.com',
|
||||
[targetuser.email],
|
||||
html_message=msg_html,
|
||||
fail_silently=False
|
||||
)
|
||||
if(targetuser.profile.user_messages_mail):
|
||||
|
||||
username = targetuser.first_name + " " + targetuser.last_name
|
||||
msg_html = render_to_string('notificsys/notification_mail.html', {'username': username, 'notificationtext' : notificationtext, 'linktarget' : targeturl})
|
||||
send_mail(
|
||||
'Agentur-Benachrichtigung',
|
||||
'Hallo ' + targetuser.first_name + ' ' + targetuser.last_name + '! ' + notificationtext + " <a href='"+targeturl+"'>Klicken Sie hier.</a>",
|
||||
'support@digitale-agentur.com',
|
||||
[targetuser.email],
|
||||
html_message=msg_html,
|
||||
fail_silently=False
|
||||
)
|
||||
|
||||
if(targetuser.profile.user_messages_push):
|
||||
newnotification = UserNotification(touser=targetuser, elementid=message.id, notificationtext='Hallo ' + targetuser.first_name + ' ' + targetuser.last_name + '! ' + notificationtext, notificationtype="messagereceived")
|
||||
newnotification.save()
|
||||
if(targetuser.profile.user_messages_push):
|
||||
newnotification = UserNotification(touser=targetuser, elementid=message.id, notificationtext='Hallo ' + targetuser.first_name + ' ' + targetuser.last_name + '! ' + notificationtext, notificationtype="messagereceived")
|
||||
newnotification.save()
|
||||
|
||||
|
||||
else:
|
||||
messages.warning(request, f'Bitte valide Daten eingeben!')
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ def CheckNotifications(request):
|
|||
elelink = "messages/sl/" + str(notify.elementid)
|
||||
elif notify.notificationtype == "newstandard":
|
||||
elelink = "standards/standard/" + str(notify.elementid) + "/single"
|
||||
elif notify.notificationtype == "wantedag":
|
||||
elelink = "dasettings/managnag/" + str(notify.elementid)
|
||||
else:
|
||||
elelink = "notifications/showallnotificaions/"
|
||||
|
||||
|
|
@ -59,7 +61,9 @@ def GetBasicNotifications(request):
|
|||
elif notify.notificationtype == "messagereceived":
|
||||
elelink = "messages/sl/" + str(notify.elementid)
|
||||
elif notify.notificationtype == "newstandard":
|
||||
elelink = "standards/standard/" + str(notify.elementid) + "/single"
|
||||
elelink = "standards/standard/" + str(notify.elementid) + "/single"
|
||||
elif notify.notificationtype == "wantedag":
|
||||
elelink = "dasettings/managnag/" + str(notify.elementid)
|
||||
else:
|
||||
elelink = "notifications/showallnotificaions/"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{% load counter_tag %}
|
||||
|
||||
<div class="row">
|
||||
<div class="content-section col-10">
|
||||
<div class="content-section col-12">
|
||||
<div class="row"><div class="content-section col-9">
|
||||
{% if user|usergperm:"moduleorganizer" %}
|
||||
<a class="btn btn-primary " href="{% url 'add-agpass' %}"><i class="fas fa-plus"></i> Passwort</a>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
<hr>
|
||||
<div class="row col-9 " >
|
||||
<div class="row col-12 " >
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover" id="qltable">
|
||||
<thead>
|
||||
|
|
|
|||
|
|
@ -50,6 +50,9 @@ class StandardAddStandard(forms.ModelForm):
|
|||
elif self.instance.pk:
|
||||
self.fields['task'].queryset = Tasks.objects.none()
|
||||
|
||||
self.fields['area'].required = True
|
||||
self.fields['task'].required = True
|
||||
|
||||
self.fields['freefield_title'].required = False
|
||||
self.fields['freefield_content'].required = False
|
||||
self.fields['freefield_content'].widget.attrs['rows'] = 2
|
||||
|
|
@ -109,18 +112,25 @@ class StandardUpdateStandard(forms.ModelForm):
|
|||
loggeduser = kwargs['instance'].created_standard_by
|
||||
standard = kwargs['instance']
|
||||
super(StandardUpdateStandard, self).__init__(*args, **kwargs)
|
||||
self.fields['area'].queryset = Areas.objects.filter(agency__pk=loggeduser.profile.agency.pk)
|
||||
|
||||
try:
|
||||
self.fields['area'].queryset = Areas.objects.filter(agency__pk=loggeduser.profile.agency.pk)
|
||||
# Dummy PK
|
||||
self.fields['task'].queryset = Tasks.objects.filter(area__pk=standard.area.pk)
|
||||
self.fields['task'].queryset = Tasks.objects.filter(area__pk=standard.area.pk)
|
||||
except:
|
||||
pass
|
||||
|
||||
if 'area' in self.data:
|
||||
try:
|
||||
areaid = int(self.data.get('area'))
|
||||
self.fields['task'].queryset = Tasks.objects.filter(area__id=areaid).order_by('name')
|
||||
except (ValueError, TypeError):
|
||||
pass
|
||||
elif loggeduser.pk:
|
||||
elif loggeduser.pk and standard.area != None:
|
||||
self.fields['task'].queryset = Tasks.objects.filter(area__pk=standard.area.pk)
|
||||
|
||||
self.fields['area'].required = True
|
||||
self.fields['task'].required = True
|
||||
|
||||
self.fields['freefield_title'].required = False
|
||||
self.fields['freefield_content'].required = False
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ class StandardComments(models.Model):
|
|||
|
||||
class Standards(models.Model):
|
||||
agency = models.ForeignKey(Agency, on_delete=models.CASCADE)
|
||||
area = models.ForeignKey(Areas, on_delete=models.CASCADE)
|
||||
task = models.ForeignKey(Tasks, on_delete=models.CASCADE)
|
||||
area = models.ForeignKey(Areas, on_delete=models.CASCADE, blank=True, null=True)
|
||||
task = models.ForeignKey(Tasks, on_delete=models.CASCADE, blank=True, null=True)
|
||||
name = models.CharField(max_length=200, blank=False, default="")
|
||||
content = models.TextField(blank=True, verbose_name='Inhalt', default="")
|
||||
|
||||
|
|
@ -43,6 +43,9 @@ class Standards(models.Model):
|
|||
freefield_title = models.CharField(max_length=200, blank=False, default="")
|
||||
freefield_content = models.TextField(max_length=500, blank=False, default="")
|
||||
|
||||
delflag = models.BooleanField(default=False)
|
||||
deldate = models.DateTimeField(default=timezone.now, blank=True)
|
||||
|
||||
|
||||
# USER
|
||||
# VERTRETER
|
||||
|
|
|
|||
|
|
@ -22,13 +22,12 @@
|
|||
{% getsumofallag agn.pk as agsum %}
|
||||
{% getoutstandinginvites agn.pk as outstanding %}
|
||||
{% ifaginadminagn agn.pk request.user.profile.agency.pk as is_adminag %}
|
||||
<tr onclick="window.location.href = '{% url 'standard-agn' agn.pk %}';" id="agn_{{agn.pk}}">
|
||||
<td>{{agn.name}}</td>
|
||||
<td>{{agn.creator_agency.name }}</td>
|
||||
<tr id="agn_{{agn.pk}}">
|
||||
<td><a href="{% url 'standard-agn' agn.pk %}">{{agn.name}}</a></td>
|
||||
<td>{{agn.creator_agency.name }} <button style="float: right" class="btn btn-secondary btn-sm" onclick="javascript:$('#showAgencyInfo_{{agn.creator_agency.pk}}').modal('toggle');"><i class="fas fa-info-circle"></i></button> </td>
|
||||
<td>{{agn.lastactivity}}</td>
|
||||
<td>{{agsum}}</td>
|
||||
<td>{{agn.standards.all|length}}</td>
|
||||
|
||||
<td>{{agn.standards.all|length}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
@ -65,6 +64,34 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% for agn in agencynetworks %}
|
||||
<div class="modal fade" tabindex="-1" id="showAgencyInfo_{{agn.creator_agency.pk}}" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Agenturinfo</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Agentur <b>{{agn.creator_agency.name}}</b>
|
||||
<hr>
|
||||
{% if agn.creator_agency.inhaber|length > 0 %}Inhaber: {{agn.creator_agency.inhaber}}<br /> {% endif %}
|
||||
{% if agn.creator_agency.street|length > 0 %}Adresse: {{agn.creator_agency.street}} {{agn.creator_agency.plz}} {{agn.creator_agency.city}}<br /> {% endif %}
|
||||
{% if agn.creator_agency.phone|length > 0 %}Telefon: {{agn.creator_agency.phone}} <hr>{% endif %}
|
||||
E-Mailadresse: <a href="mailto:{{agn.agency_mail}}">{{agn.creator_agency.agency_email}}</a>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-success" data-dismiss="modal">Schliessen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
<style>
|
||||
/* DATATABLES */
|
||||
.paginate_button {
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@
|
|||
<div class="card-header" id="st_files">
|
||||
<h5 class="mb-0">
|
||||
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#st_files_content" aria-expanded="false" aria-controls="st_files_content">
|
||||
<i class="fas fa-file"></i> Dateien{% if request.user.profile.showtooltips %} <small><i data-toggle="tooltip" data-placement="top" title="Fügen Sie ihren Standards Dateien zu. Diese liegen entweder bereits unter Dateien oder können iher direkt hochgeladen werden. Neu hochgeladene Dateien werden im Heimverzeichnis gespeichert." class="far fa-question-circle"></i></small>{% endif %}
|
||||
<i class="fas fa-file"></i> Dateien{% if request.user.profile.showtooltips %} <small><i data-toggle="tooltip" data-placement="top" title="Fügen Sie ihren Standards Dateien zu. Diese liegen entweder bereits unter Dateien oder können iher direkt hochgeladen werden. Neu hochgeladene Dateien werden im Uploadordner für Standards gespeichert." class="far fa-question-circle"></i></small>{% endif %}
|
||||
</button>
|
||||
</h5>
|
||||
</div>
|
||||
|
|
@ -128,7 +128,7 @@
|
|||
<input type="file" id="uploadedfile" name="uploadedfile" style="display:none">
|
||||
{% if user|usergperm:"filesmanager" %}
|
||||
<div class="alert alert-secondary text-center mt-5" id="directdiv" role="alert" style="line-height: 17px; text-align: center;">
|
||||
<button type="button" class="btn btn-primary btn-sm" id="uploadButton" onclick="javascript:uploadButtonPush()"><i class="fas fa-plus"></i></button> <small>klicken/hineinziehen<p class="mt-2">Dateien werden im <b>Heimverzeichnis</b>gespeichert.
|
||||
<button type="button" class="btn btn-primary btn-sm" id="uploadButton" onclick="javascript:uploadButtonPush()"><i class="fas fa-plus"></i></button> <small>klicken/hineinziehen<p class="mt-2">Dateien werden im <b>Uploadordner für Standards</b>gespeichert.
|
||||
</small></p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@
|
|||
{% block content %}
|
||||
|
||||
<div class="content-section col-12">
|
||||
<h3>Standards aus Agenturverbund {{agn.name}}</h3>
|
||||
<h3>Standards aus Agenturverbund {{agn.name}}
|
||||
<a style="float: right" href="{% url 'standards' %}" type="button" class="btn btn-secondary btn-sm"><i class="fas fa-chevron-circle-left"></i></a>
|
||||
</h3>
|
||||
<small>Sie sehen nur veröffentlichte Standards innerhalb des Verbunds und Standards, die nicht von Ihrer Agentur geteilt worden sind.</small>
|
||||
<hr>
|
||||
|
||||
|
|
@ -24,11 +26,27 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
{% for standard in standards_of_agency_network %}
|
||||
{% checkifsharedstandardinagency request.user.profile.agency standard as isshared %}
|
||||
|
||||
{% if standard.public and standard.agency != request.user.profile.agency %}
|
||||
{% checkifsharedstandardinagency request.user.profile.agency standard as isshared %}
|
||||
{% if standard.public %}
|
||||
<tr>
|
||||
<td><a href="{% url 'standard-single-agn' standard.pk %}">{{standard.name}}</a></td>
|
||||
<td>
|
||||
{% setbool False %}
|
||||
{% for ag in standard.visibleby.all %}
|
||||
{% if request.user|has_group:ag.group.name %}
|
||||
{% setbool True %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if standard.visibleby.all|length == 0 %}
|
||||
{% setbool True %}
|
||||
{% endif %}
|
||||
{% getbool as groupchecker %}
|
||||
|
||||
{% if groupchecker %}
|
||||
<a href="{% url 'standard-single-agn' standard.pk %}">{{standard.name|truncatechars:28}}</a>
|
||||
{% else %}
|
||||
<p class="card-text text-secondary" data-toggle="popover" data-placement="top" data-trigger="hover" title="Zugriffsbeschränkung" data-content="Zugriff beschränkt auf {% for sgroup in standard.visibleby.all %}{{sgroup.agencygroupname}}{% if forloop.counter < standard.visibleby.all|length %},{%endif%}{% endfor %}"><i class="fas fa-lock"></i> {{standard.name|truncatechars:28}}</p>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{standard.agency.name}}</td>
|
||||
<td>{{standard.last_modified_on|date:"d.m.Y, H:i"}}</td>
|
||||
<td>{{standard.agencynetworkcounter}}</td>
|
||||
|
|
|
|||
|
|
@ -84,7 +84,9 @@
|
|||
</div>
|
||||
{% endfor %}
|
||||
<div class="tab-pane fade" id="t_agencynetwork" role="tabpanel" aria-labelledby="agencynetwork">
|
||||
<h4 class="mt-4 mb-4">Standards aus Agenturverbünden</h4>
|
||||
<h4 class="mt-4 mb-4">Agenturverbünde
|
||||
<!--<a style="float: right;" class="btn btn-sm btn-secondary" href="{% url 'dasettings' %}"><i class="fas fa-cog"></i></a>-->
|
||||
</h4>
|
||||
|
||||
{% block agnet %}
|
||||
{% include "standards/agencynetwork_content.html" %}
|
||||
|
|
@ -111,7 +113,17 @@
|
|||
<tbody id="tableresults">
|
||||
{% for standard in standards_of_user %}
|
||||
<tr>
|
||||
<td><a href="{% url 'standard-single' standard.pk %}">{{standard.name}}</a></td>
|
||||
<td>
|
||||
{% if standard.area != None and standard.task != None %}
|
||||
<a href="{% url 'standard-single' standard.pk %}">{{standard.name}}</a>
|
||||
{% else %}
|
||||
{% if standard.created_standard_by == request.user or perms.users.standard_management %}
|
||||
<a href="{% url 'standard-update' standard.pk %}">{{standard.name}}</a> - In Bearbeitung
|
||||
{% else %}
|
||||
{{standard.name}} - In Bearbeitung
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{standard.created_standard_date|date:"d.m.Y, H:i"}}</td>
|
||||
<td>{{standard.last_modified_by.first_name}} {{standard.last_modified_by.last_name}}</td>
|
||||
<td>{{standard.last_modified_on|date:"d.m.Y, H:i"}}</td>
|
||||
|
|
@ -126,7 +138,9 @@
|
|||
{% if standard.public %}
|
||||
<a class="dropdown-item" href="{% url 'standard-status' standard.pk %}">Veröffentlichung aufheben</a>
|
||||
{% else %}
|
||||
<a class="dropdown-item" href="{% url 'standard-status' standard.pk %}">Veröffentlichen</a>
|
||||
{% if standard.area != None and standard.task != None %}
|
||||
<a class="dropdown-item" href="{% url 'standard-status' standard.pk %}">Veröffentlichen</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if standard.created_standard_by == request.user or perms.users.standard_management %}
|
||||
|
|
@ -164,7 +178,17 @@
|
|||
<tbody id="tableresults_s">
|
||||
{% for standard in unpubstandards_of_user %}
|
||||
<tr>
|
||||
<td><a href="{% url 'standard-single' standard.pk %}">{{standard.name}}</a></td>
|
||||
<td>
|
||||
{% if standard.area != None and standard.task != None %}
|
||||
<a href="{% url 'standard-single' standard.pk %}">{{standard.name}}</a>
|
||||
{% else %}
|
||||
{% if standard.created_standard_by == request.user or perms.users.standard_management %}
|
||||
<a href="{% url 'standard-update' standard.pk %}">{{standard.name}}</a> - In Bearbeitung
|
||||
{% else %}
|
||||
{{standard.name}} - In Bearbeitung
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{standard.created_standard_date|date:"d.m.Y, H:i"}}</td>
|
||||
<td>{{standard.last_modified_by.first_name}} {{standard.last_modified_by.last_name}}</td>
|
||||
<td>{{standard.last_modified_on|date:"d.m.Y, H:i"}}</td>
|
||||
|
|
@ -179,11 +203,13 @@
|
|||
{% if standard.public %}
|
||||
<a class="dropdown-item" href="{% url 'standard-status' standard.pk %}">Veröffentlichung aufheben</a>
|
||||
{% else %}
|
||||
<a class="dropdown-item" href="{% url 'standard-status' standard.pk %}">Veröffentlichen</a>
|
||||
{% if standard.area != None and standard.task != None %}
|
||||
<a class="dropdown-item" href="{% url 'standard-status' standard.pk %}">Veröffentlichen</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if standard.created_standard_by == request.user or perms.users.standard_management %}
|
||||
<a class="dropdown-item" href="{% url 'standard-update' standard.pk %}">Bearbeiten</a>
|
||||
<a class="dropdown-item" href="{% url 'standard-update' standard.pk %}">Bearbeiten</a>
|
||||
{% endif %}
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-danger" href="{% url 'standard-delete' standard.pk %}" >Löschen</a>
|
||||
|
|
@ -212,6 +238,7 @@
|
|||
});
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
|
||||
var activeTab = localStorage.getItem('activeTab');
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@
|
|||
|
||||
<div class="col-6">
|
||||
<div class="mt-2">
|
||||
<p><span id="comments_counter">{{comments|length}}</span> <span id="comments_word">{% if comments|length < 2 %} Kommentar {% else %} Kommentare {% endif %}</span></p>
|
||||
<p><span id="comments_counter">{{comments|length}}</span> <span id="comments_word">{% if comments|length == 1 %} Kommentar {% elif comments|length == 0 %} Kommentare {% else %} Kommentare {% endif %}</span></p>
|
||||
<div class="form-group">
|
||||
{% getifuserdidcomment standard request.user as userdidcomment%}
|
||||
|
||||
|
|
@ -178,10 +178,10 @@
|
|||
$("#comments_counter").html(comments_counter);
|
||||
|
||||
if(comments_counter < 2){
|
||||
$("#comments_word").html("Kommentr")
|
||||
$("#comments_word").html("Kommentar")
|
||||
}
|
||||
else{
|
||||
$("#comments_word").html("Kommentr")
|
||||
$("#comments_word").html("Kommentare")
|
||||
}
|
||||
|
||||
$("#commentsection").prepend('<div id="comment_'+data["sc_id"]+'"><small>Von '+data['sc_user'] +' am '+data['sc_date'] +'</small><br />'+data['sc_c'] +'<br/><div class="mt-2"><button type="button" class="btn btn-sm btn-secondary" disabled="true"><i class="far fa-thumbs-down"></i></button> <button type="button" class="btn btn-sm btn-secondary" disabled="true" ><i class="far fa-thumbs-up"></i></button> <span style="float: right;"><button type="button" class="btn btn-sm btn-secondary" onclick="javascript:delComment('+data['sc_id']+')" ><i class="fa fa-trash"></i></button></span></div><hr></div>');
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@
|
|||
<div class="card-header" id="st_files">
|
||||
<h5 class="mb-0">
|
||||
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#st_files_content" aria-expanded="false" aria-controls="st_files_content">
|
||||
<i class="fas fa-file"></i> Dateien{% if request.user.profile.showtooltips %} <small><i data-toggle="tooltip" data-placement="top" title="Fügen Sie ihren Standards Dateien zu. Diese liegen entweder bereits unter Dateien oder können iher direkt hochgeladen werden. Neu hochgeladene Dateien werden im Heimverzeichnis gespeichert." class="far fa-question-circle"></i></small>{% endif %}
|
||||
<i class="fas fa-file"></i> Dateien{% if request.user.profile.showtooltips %} <small><i data-toggle="tooltip" data-placement="top" title="Fügen Sie ihren Standards Dateien zu. Diese liegen entweder bereits unter Dateien oder können iher direkt hochgeladen werden. Neu hochgeladene Dateien werden im Uploadordner für Standards gespeichert." class="far fa-question-circle"></i></small>{% endif %}
|
||||
</button>
|
||||
</h5>
|
||||
</div>
|
||||
|
|
@ -119,7 +119,7 @@
|
|||
<input type="file" id="uploadedfile" name="uploadedfile" style="display:none">
|
||||
{% if user|usergperm:"filesmanager" %}
|
||||
<div class="alert alert-secondary text-center mt-5" id="directdiv" role="alert" style="line-height: 17px; text-align: center;">
|
||||
<button type="button" class="btn btn-primary btn-sm" id="uploadButton" onclick="javascript:uploadButtonPush()"><i class="fas fa-plus"></i></button> <small>klicken/hineinziehen<p class="mt-2">Dateien werden im <b>Heimverzeichnis</b>gespeichert.
|
||||
<button type="button" class="btn btn-primary btn-sm" id="uploadButton" onclick="javascript:uploadButtonPush()"><i class="fas fa-plus"></i></button> <small>klicken/hineinziehen<p class="mt-2">Dateien werden im <b>Uploadordner für Standards</b>gespeichert.
|
||||
</small></p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
@ -205,7 +205,7 @@
|
|||
</div>
|
||||
<p>Wenn ein Standard bearbeitet wurde, kann er nur von einer Person mit dem Recht <i>Standards bearbeiten und freischalten</i> wieder veröffentlicht werden. Ein Standard wird nach Bearbeitung als <i>Nicht veröffentlicht</i> gesetzt.</p>
|
||||
<hr>
|
||||
<button type="submit" class="btn btn-success" href="{% url 'standard-update' standard_id %} ">Aktualisieren</button>
|
||||
<button type="submit" class="btn btn-success" href="{% url 'standard-update' standard_id %} ">Speichern</button>
|
||||
|
||||
{% if perms.users.standard_management %}
|
||||
{% if standard_status == False %}
|
||||
|
|
|
|||
|
|
@ -400,8 +400,8 @@ def CopyStandard(request, pk):
|
|||
new_standard.last_modified_by = request.user
|
||||
new_standard.created_standard_date = datetime.now()
|
||||
new_standard.last_modified_on = datetime.now()
|
||||
new_standard.task = task
|
||||
new_standard.area = area
|
||||
new_standard.task = None
|
||||
new_standard.area = None
|
||||
new_standard.name = sc.name
|
||||
new_standard.content = sc.content
|
||||
new_standard.public = False
|
||||
|
|
|
|||
|
|
@ -237,5 +237,5 @@ def adjust_group_notifications_task(instance, action, reverse, model, pk_set, us
|
|||
|
||||
@receiver(signal=post_save, sender=AgencyNetworkPreperation)
|
||||
def save_agjoin_prep(sender, instance, **kwargs):
|
||||
newnotification = UserNotification(touser=instance.target_network.creator, notificationtext="Eine Agentur möchte Ihrem Verbund beitreten.", notificationtype="wantedag")
|
||||
newnotification = UserNotification(touser=instance.target_network.creator, notificationtext="Eine Agentur möchte Ihrem Verbund beitreten.", notificationtype="wantedag", elementid=instance.pk)
|
||||
newnotification.save()
|
||||
|
|
@ -40,13 +40,13 @@
|
|||
{% endif %}
|
||||
|
||||
<hr>
|
||||
<h4>Personen</h4>
|
||||
<h4>Mitarbeiter</h4>
|
||||
{% if res_pers|length > 0 %}
|
||||
{% for s in res_pers %}
|
||||
<i class="fas fa-fw fa-users"></i> <a href="{% url 'orga-single' s.pk %}"><b>{{s.first_name}} {{s.last_name}}</b></a><br /><br />
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p>Keine Ergebnisse in Personen</p>
|
||||
<p>Keine Ergebnisse bei Mitarbeitern</p>
|
||||
{% endif %}
|
||||
|
||||
<hr>
|
||||
|
|
@ -58,4 +58,62 @@
|
|||
{% else %}
|
||||
<p>Keine Ergebnisse in Quicklinks</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<h4>Kontakte</h4>
|
||||
{% if res_contacts|length > 0 %}
|
||||
{% for s in res_contacts %}
|
||||
<button class="btn btn-primary" onclick="javascript:$('#infos_searchres_{{s.pk}}').modal('toggle');" target="_blank"><b>{{s.company}}</b></button><br /><br />
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p>Keine Ergebnisse in Kontakten</p>
|
||||
{% endif %}
|
||||
|
||||
<hr>
|
||||
<h4>Passwörtern</h4>
|
||||
{% if res_pass|length > 0 %}
|
||||
{% for s in res_pass %}
|
||||
<i class="fas fa-external-link-alt"></i> <a href="{{ s.link }}" target="_blank"><b>{{s.name}}</b></a><br /><br />
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p>Keine Ergebnisse in Passwörtern</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% for agc in res_contacts %}
|
||||
<div class="modal fade " id="infos_searchres_{{agc.pk}}" tabindex="-1" role="dialog" data-backdrop="static" aria-hidden="true">
|
||||
<div class="modal-dialog " role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLongTitle">{{agc.company}}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Schließen">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{% if agc.personname|length > 0 %}
|
||||
Ansprechpartner: {{agc.personname}}<br/>
|
||||
{% endif %}
|
||||
{% if agc.mail|length > 0 %}
|
||||
E-Mailadresse: <a href="mailto:{{agc.mail}}">{{agc.mail}}</a><br />
|
||||
{% endif %}
|
||||
{% if agc.phone1|length > 0 %}
|
||||
Telefon 1: <a href="tel::{{agc.phone1}}">{{agc.phone1}}</a><br />
|
||||
{% endif %}
|
||||
{% if agc.phone2|length > 0 %}
|
||||
Telefon 1: <a href="tel::{{agc.phone2}}">{{agc.phone2}}</a><br />
|
||||
{% endif %}
|
||||
{% if agc.street|length > 0 %}
|
||||
Adresse: {{agc.street}} {{agc.plz}} {{agc.city}} <br />
|
||||
{% endif %}
|
||||
{% if agc.desc|length > 0 %}
|
||||
Anmerkungen: {{agc.desc}}<br />
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-success" data-dismiss="modal">Schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
@ -33,6 +33,7 @@ from django.contrib.auth.models import Group
|
|||
from cloud.models import DataDir
|
||||
from message.models import Message
|
||||
from notificsys.models import UserNotification
|
||||
from organizer.models import AGContacts, AGPassword
|
||||
import socket
|
||||
|
||||
|
||||
|
|
@ -99,6 +100,9 @@ def toUpdate(request):
|
|||
print("NO MAIN DIR FOUND - CREATE")
|
||||
rootdir = DataDir(is_root=True, agency=request.user.profile.agency)
|
||||
rootdir.save()
|
||||
|
||||
|
||||
|
||||
print("AGENCY ROOT DIR CREATED")
|
||||
else:
|
||||
print("MAIN ROOT DIR FOUND - FILESMODULE READY")
|
||||
|
|
@ -503,6 +507,8 @@ def GlobalSearch(request):
|
|||
|
||||
res_news = News.objects.filter(agency__pk=ag).filter(name__icontains=searchfor) | News.objects.filter(agency__pk=ag).filter(content__icontains=searchfor) | News.objects.filter(agency__pk=ag).filter(created_by__last_name__icontains=searchfor)|News.objects.filter(agency__pk=ag).filter(created_by__first_name__icontains=searchfor)
|
||||
|
||||
res_pass = AGPassword.objects.filter(agency__pk=ag).filter(name__icontains=searchfor)
|
||||
res_contacts = AGContacts.objects.filter(agency__pk=ag).filter(personname__icontains=searchfor) | AGContacts.objects.filter(agency__pk=ag).filter(company__icontains=searchfor)
|
||||
|
||||
|
||||
res_areas = Areas.objects.filter(agency__pk=ag).filter(name__icontains=searchfor)
|
||||
|
|
@ -510,7 +516,7 @@ def GlobalSearch(request):
|
|||
res_pers = User.objects.filter(profile__agency__pk=ag).filter(first_name__icontains=searchfor) | User.objects.filter(profile__agency__pk=ag).filter(last_name__icontains=searchfor)
|
||||
links = QuickLinks.objects.filter(agency__pk=ag).filter(name__icontains=searchfor) | QuickLinks.objects.filter(agency__pk=ag).filter(link__icontains=searchfor)
|
||||
|
||||
html = render_to_string('users/searchres.html', {'links': links, 'res_standard': res_standard, 'res_areas': res_areas, 'res_tasks': res_tasks, 'res_pers': res_pers, 'res_news' : res_news})
|
||||
html = render_to_string('users/searchres.html', {'links': links, 'res_standard': res_standard, 'res_areas': res_areas, 'res_tasks': res_tasks, 'res_pers': res_pers, 'res_news' : res_news, 'res_pass' : res_pass, 'res_contacts' : res_contacts})
|
||||
return HttpResponse(html)
|
||||
else:
|
||||
return HttpResponse("Request method is not a GET")
|
||||
|
|
|
|||
Loading…
Reference in New Issue