DEV FÜR 0.9.0

This commit is contained in:
holger.trampe 2020-05-10 12:23:46 +02:00
parent ce2bc15b61
commit c7bcd601fd
55 changed files with 302 additions and 231 deletions

View File

@ -131,7 +131,7 @@ a.disabled {
<i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i> <i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i>
</a> </a>
<div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink"> <div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink">
<div class="dropdown-header">Dateioptionen</div> <div class="dropdown-header" style="color: #ffffff">Dateioptionen</div>
<a class="dropdown-item" href="javascript:moveFile({{file.pk}})">Verschieben</a> <a class="dropdown-item" href="javascript:moveFile({{file.pk}})">Verschieben</a>
<a class="dropdown-item" href="javascript:replaceFile({{file.pk}})">Ersetzen</a> <a class="dropdown-item" href="javascript:replaceFile({{file.pk}})">Ersetzen</a>
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
@ -264,7 +264,7 @@ a.disabled {
Sie können die Datei nicht mit sich selbst ersetzen. Sie können die Datei nicht mit sich selbst ersetzen.
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-success" data-dismiss="modal">Schließen</button> <button type="button" class="btn btn-primary" data-dismiss="modal">Schließen</button>
</div> </div>
</div> </div>
</div> </div>
@ -285,8 +285,8 @@ a.disabled {
<div id="connectedStandards"></div> <div id="connectedStandards"></div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal" onclick="javascript:doDelDataFile()">Löschen</button>&nbsp;&nbsp; <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="javascript:doDelDataFile()">Löschen</button>&nbsp;&nbsp;
<button type="button" class="btn btn-success" data-dismiss="modal">Abbrechen</button> <button type="button" class="btn" data-dismiss="modal">Abbrechen</button>
</div> </div>
</div> </div>
</div> </div>
@ -324,8 +324,8 @@ a.disabled {
</div> </div>
<div class="modal-footer" > <div class="modal-footer" >
&nbsp;&nbsp; &nbsp;&nbsp;
<button id="btnDoReplaceFileSnd" type="button" class="btn btn-danger" data-dismiss="modal" onclick="javascript:doreplaceFile(0)" disabled="true">Ersetzen, Alte Datei <u>nicht</u> löschen!</button>&nbsp;&nbsp; <button id="btnDoReplaceFileSnd" type="button" class="btn btn-primary" data-dismiss="modal" onclick="javascript:doreplaceFile(0)" disabled="true">Ersetzen, Alte Datei <u>nicht</u> löschen!</button>&nbsp;&nbsp;
<button type="button" class="btn btn-success" data-dismiss="modal">Abbrechen</button> <button type="button" class="btn btn" data-dismiss="modal">Abbrechen</button>
</div> </div>
</div> </div>
</div> </div>
@ -348,7 +348,7 @@ a.disabled {
<div id="agencydirlist"></div> <div id="agencydirlist"></div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-success" data-dismiss="modal">Abbrechen</button> <button type="button" class="btn" data-dismiss="modal">Abbrechen</button>
</div> </div>
</div> </div>
</div> </div>
@ -377,8 +377,9 @@ a.disabled {
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Abrechen</button>&nbsp;
<button id="doActionTaskModal" type="button" class="btn btn-success" data-dismiss="modal" onclick="javascript:addDirAction()" disabled="true">Ordner anlegen</button> <button id="doActionTaskModal" type="button" class="btn btn-primary" data-dismiss="modal" onclick="javascript:addDirAction()" disabled="true">Ordner anlegen</button>
<button type="button" class="btn" data-dismiss="modal">Abbrechen</button>&nbsp;
</div> </div>
</div> </div>
</div> </div>

View File

@ -249,7 +249,8 @@ def adddirbyajax(request, parent):
request.decoding = 'utf-8' request.decoding = 'utf-8'
# VALIDATE FILE-TYPE # VALIDATE FILE-TYPE
file_ext = request.FILES['uploadedfile'].name.split(".")[1] file_ext_arr = request.FILES['uploadedfile'].name.split(".")
file_ext = file_ext_arr[len(file_ext_arr)-1]
allowed_types = ["txt", "TXT", "png", "PNG", "jpeg", "JPEG", "jpg", "JPG", "PDF", "pdf", "csv", "CSV", "DOC", "doc", "DOCX", "docx", "ODT", "odt", "PPT", "ppt", "PPTX", "pptx", "XLS", "xls", "XLSX", "xlsx", "mov", "MOV", "SVG", "svg", "ZIP", "zip", "RAR", "rar", "EPS", "eps", "MP3", "mp3", "WAV", "wav", "avi", "AVI", "FLV", "flv", "MP4", "mp4"] allowed_types = ["txt", "TXT", "png", "PNG", "jpeg", "JPEG", "jpg", "JPG", "PDF", "pdf", "csv", "CSV", "DOC", "doc", "DOCX", "docx", "ODT", "odt", "PPT", "ppt", "PPTX", "pptx", "XLS", "xls", "XLSX", "xlsx", "mov", "MOV", "SVG", "svg", "ZIP", "zip", "RAR", "rar", "EPS", "eps", "MP3", "mp3", "WAV", "wav", "avi", "AVI", "FLV", "flv", "MP4", "mp4"]
file_ok = False file_ok = False

View File

@ -4,6 +4,7 @@ from django.contrib.auth.models import User
from users.models import AgencyGroup, Agency, Profile, AgencyJob, AgencyNetwork, UserTime from users.models import AgencyGroup, Agency, Profile, AgencyJob, AgencyNetwork, UserTime
from PIL import Image from PIL import Image
from bootstrap_datepicker_plus import DatePickerInput from bootstrap_datepicker_plus import DatePickerInput
from django.utils.translation import gettext as _
class AgencyTimeManagement(forms.ModelForm): class AgencyTimeManagement(forms.ModelForm):
class Meta: class Meta:
@ -76,7 +77,7 @@ class UserTimeForm(forms.ModelForm):
} }
fields = ["holiday", "loose_holidedate", "startdate", "holiday_start", "wd_mo", "wd_tu", "wd_we", "wd_th", "wd_fr"] fields = ["holiday", "loose_holidedate", "startdate", "holiday_start", "wd_mo", "wd_tu", "wd_we", "wd_th", "wd_fr"]
widgets = { widgets = {
'loose_holidedate': DatePickerInput(options={"format":'DD.MM.YYYY', "locale":'de'}), 'loose_holidedate': DatePickerInput(options={"format":'DD.MM', "locale":'de'}),
"startdate" : DatePickerInput(options={"format":'DD.MM.YYYY', "locale":'de'}) "startdate" : DatePickerInput(options={"format":'DD.MM.YYYY', "locale":'de'})
} }
@ -121,6 +122,13 @@ class UserNewUserForm(forms.ModelForm):
model = User model = User
fields = ["first_name", "last_name", "email"] fields = ["first_name", "last_name", "email"]
error_messages = {
'email': {
'unique': _("Diese E-Mailadresse ist bereits vergeben."),
},
}
# NEW USER PROFILE FORM # NEW USER PROFILE FORM
class UserProfileForm(forms.ModelForm): class UserProfileForm(forms.ModelForm):

View File

@ -17,7 +17,7 @@
{{ form|crispy }} {{ form|crispy }}
<hr> <hr>
<a class="btn" href="{% url 'dasettings' %} ">Abbrechen</a> <a class="btn" href="{% url 'dasettings' %} ">Abbrechen</a>
<button type="submit" class="btn btn-primary" style="float: right">Agenturverbund speichern</button> <button type="submit" class="btn btn-primary" style="float: right">Speichern</button>
</form> </form>
</div> </div>
</div> </div>

View File

@ -29,7 +29,7 @@
</fieldset> </fieldset>
<hr> <hr>
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-success">Agenturdaten Aktualisieren</button>&nbsp; <button type="submit" class="btn btn-primary">Agenturdaten aktualisieren</button>&nbsp;
</div> </div>
</form> </form>
</div> </div>
@ -61,8 +61,9 @@
<i class="fas fa-redo-alt"></i> <i class="fas fa-redo-alt"></i>
</button> </button>
</div> </div>
<button type="button" class="btn btn-primary js-crop-and-upload">Ausschneiden</button>&nbsp;
<button type="button" class="btn btn-default" data-dismiss="modal" onclick="clearImgField()">Abbrechen</button> <button type="button" class="btn btn-default" data-dismiss="modal" onclick="clearImgField()">Abbrechen</button>
<button type="button" class="btn btn-primary js-crop-and-upload">Ausschneiden</button>
</div> </div>
</div> </div>
</div> </div>
@ -280,7 +281,7 @@ function updateFunc(id, funcname){
<input class="form-control" type="text" value="{{ele.name}}" onkeyup="javascript:updateFunc({{ele.pk}}, this.value)"> <input class="form-control" type="text" value="{{ele.name}}" onkeyup="javascript:updateFunc({{ele.pk}}, this.value)">
</td> </td>
<td> <td>
<button type="button" class="btn btn-danger" onclick="javascript:funcDel({{ele.pk}})" data-toggle="tooltip" data-placement="top" title="Agenturfunktion löschen"><i class="fas fa-trash-alt"></i></button> <button type="button" class="btn btn-danger" style="float: right" onclick="javascript:funcDel({{ele.pk}})" data-toggle="tooltip" data-placement="top" title="Agenturfunktion löschen"><i class="fas fa-trash-alt"></i></button>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
@ -292,7 +293,7 @@ function updateFunc(id, funcname){
<button type="button" class="btn btn-primary" title="Neue Funktion hinzufügen" onclick="javascript:addAgencyJob()" data-toggle="tooltip" data-placement="top" title="Dialog für eine neue Agenturfunktion öffnen"><i class="fas fa-plus"></i>&nbsp;Funktion</button> <button type="button" class="btn btn-primary" title="Neue Funktion hinzufügen" onclick="javascript:addAgencyJob()" data-toggle="tooltip" data-placement="top" title="Dialog für eine neue Agenturfunktion öffnen"><i class="fas fa-plus"></i>&nbsp;Funktion</button>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-success" data-dismiss="modal">Schließen</button> <button type="button" class="btn btn-primary" data-dismiss="modal">Fertig</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,7 +1,7 @@
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% load counter_tag %} {% load counter_tag %}
{% load static %} {% 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>&nbsp;Agenturverbund erstellen</a> <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>&nbsp;Agenturverbund</a>
<hr> <hr>
<h4>Ihre Agenturverbünde</h4> <h4>Ihre Agenturverbünde</h4>
<div class="table-responsive"> <div class="table-responsive">
@ -117,8 +117,8 @@
Möchten Sie den Agenturverbund <b><span id="agname">NAME</span></b> verlassen? Möchten Sie den Agenturverbund <b><span id="agname">NAME</span></b> verlassen?
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal" onclick="javascript:doRemAgFromAgn()">Ja, Agenturverbund verlassen</button>&nbsp; <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="javascript:doRemAgFromAgn()">Ja, Agenturverbund verlassen</button>&nbsp;
<button type="button" class="btn btn-success" data-dismiss="modal">Abbrechen</button> <button type="button" class="btn btn" data-dismiss="modal">Abbrechen</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -7,9 +7,9 @@
Achtung! Wenn Sie den Agenturverbund löschen, können die Agenturen innerhalb des Verbunds keine Informationen mehr austauschen. Achtung! Wenn Sie den Agenturverbund löschen, können die Agenturen innerhalb des Verbunds keine Informationen mehr austauschen.
<form method="POST"> <form method="POST">
{% csrf_token %} {% csrf_token %}
<div class="form-group"> <div class="form-group mt-2">
<button type="submit" class="btn btn-danger">Verbund löschen</button>&nbsp; <button type="submit" class="btn btn-primary">Verbund löschen</button>&nbsp;
<a href="{% url 'dasettings' %}" class="btn btn-success">Abbrechen</a> <a href="{% url 'dasettings' %}" class="btn">Abbrechen</a>
</div> </div>
</form> </form>
</div> </div>

View File

@ -7,15 +7,15 @@
<div id="allGroups"> <div id="allGroups">
<div id="groupAccordion" class="mt-3"> <div id="groupAccordion" class="mt-3">
{% for aggroup in agencygroups %} {% for aggroup in agencygroups %}
{% setvar 0 %} {% setvar 0 %}
{% for user in usersofagency %} {% for user in usersofagency %}
{% for group in user.groups.all %} {% for group in user.groups.all %}
{% if group.name == aggroup.group.name %} {% if group.name == aggroup.group.name %}
{% incvar %} {% incvar %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
{% getvar as varcounter %} {% getvar as varcounter %}
<div class="card mb-2"> <div class="card mb-2">
<div class="card-header" id="agroup_{{aggroup.pk}}" style="float: left"> <div class="card-header" id="agroup_{{aggroup.pk}}" style="float: left">
<h5 class="mb-0"> <h5 class="mb-0">
@ -99,6 +99,11 @@
</div> </div>
</div> </div>
</div> </div>
{% if forloop.counter == 2 %}
<hr>
{% endif %}
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
@ -446,9 +451,10 @@ function validateGroupName(groupname){
<input class="form-control" id="newgroupname" type="text" value="" placeholder="Gruppenname" onkeyup="javascript:validateGroupName(this.value)"> <input class="form-control" id="newgroupname" type="text" value="" placeholder="Gruppenname" onkeyup="javascript:validateGroupName(this.value)">
<div id="groupnameerr" class="alert alert-danger mt-3" style="display: none">Falsche Eingabe! Keine Sonderzeichen!</div> <div id="groupnameerr" class="alert alert-danger mt-3" style="display: none">Falsche Eingabe! Keine Sonderzeichen!</div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Abbrechen</button>&nbsp; <button id="saveNewGroup" type="button" class="btn btn-primary" data-dismiss="modal" onclick="javascript:updateGroupName()" disabled="true">Speichern</button>
<button id="saveNewGroup" type="button" class="btn btn-success" data-dismiss="modal" onclick="javascript:updateGroupName()" disabled="true">Speichern</button> &nbsp;
<button type="button" class="btn" data-dismiss="modal">Abbrechen</button>
</div> </div>
</div> </div>
</div> </div>
@ -467,8 +473,8 @@ function validateGroupName(groupname){
<div class="modal-body" id="delGroupBody"> <div class="modal-body" id="delGroupBody">
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal" onclick="javascript:doDelGroup()">Gruppe löschen</button>&nbsp;&nbsp; <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="javascript:doDelGroup()">Gruppe löschen</button>&nbsp;&nbsp;
<button type="button" class="btn btn-success" data-dismiss="modal">Abbrechen</button> <button type="button" class="btn" data-dismiss="modal">Abbrechen</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -28,7 +28,7 @@
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<button type="submit" class="btn btn-success" data-toggle="tooltip" data-placement="top" title="Mit dem Speichern wird die Seite neu geladen, damit alle Einstellungen aktualisiert werden. Werden Module deaktiviert, gehen die Einstellungen und zugewiesenen Rechte nicht verloren.">Moduleinstellungen aktualisieren</button> <button type="submit" class="btn btn-primary" data-toggle="tooltip" data-placement="top" title="Mit dem Speichern wird die Seite neu geladen, damit alle Einstellungen aktualisiert werden. Werden Module deaktiviert, gehen die Einstellungen und zugewiesenen Rechte nicht verloren.">Moduleinstellungen aktualisieren</button>
</form> </form>
</div> </div>
@ -56,18 +56,22 @@
{% endif %} {% endif %}
{% if formfield.name == 'module_organigramm' and user.profile.agency.module_organigramm %} {% if formfield.name == 'module_organigramm' and user.profile.agency.module_organigramm %}
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Schließen</button>&nbsp;
<button id="" type="button" onclick="javascript:updateOrganigrammSettings()" class="btn btn-success" data-dismiss="modal" >Speichern</button> <button id="" type="button" onclick="javascript:updateOrganigrammSettings()" class="btn btn-primary" data-dismiss="modal" >Speichern</button>
&nbsp;
<button type="button" class="btn" data-dismiss="modal">Abbrechen</button>
</div> </div>
{% elif formfield.name == 'module_timemanagement' and user.profile.agency.module_timemanagement %} {% elif formfield.name == 'module_timemanagement' and user.profile.agency.module_timemanagement %}
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Schließen</button>&nbsp;
<button id="" type="button" onclick="javascript:updateTmSettings()" class="btn btn-success" data-dismiss="modal" >Speichern</button> <button id="" type="button " onclick="javascript:updateTmSettings()" class="btn btn-primary" data-dismiss="modal" >Speichern</button>
&nbsp;
<button type="button" class="btn" data-dismiss="modal">Abbrechen</button>
</div> </div>
{% else %} {% else %}
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Schließen</button>&nbsp; <button type="button" class="btn btn-primary" data-dismiss="modal">Schließen</button>&nbsp;
</div> </div>
{% endif %} {% endif %}
</div> </div>

View File

@ -63,7 +63,7 @@
<small>Agenturrelevante Daten (Bild, Telefonnummer etc.) werden in der Benutzerverwaltung verändert.</small> <small>Agenturrelevante Daten (Bild, Telefonnummer etc.) werden in der Benutzerverwaltung verändert.</small>
<div class="form-group mt-3"> <div class="form-group mt-3">
<button type="submit" class="btn btn-success">E-Mailadresse aktualisieren</button>&nbsp; <button type="submit" class="btn btn-primary">E-Mailadresse aktualisieren</button>&nbsp;
</div> </div>
</form> </form>
<form method="POST" enctype="multipart/form-data"> <form method="POST" enctype="multipart/form-data">
@ -76,7 +76,7 @@
</fieldset> </fieldset>
<div class="form-group mt-3"> <div class="form-group mt-3">
<button type="submit" class="btn btn-success">Passwort ändern</button>&nbsp; <button type="submit" class="btn btn-primary">Passwort ändern</button>&nbsp;
</div> </div>
</form> </form>
</div> </div>

View File

@ -133,7 +133,7 @@
{% endif %} {% endif %}
{% if user|usergperm:"usermanager" %} {% if user|usergperm:"usermanager" %}
<div class="tab-pane fade" id="user" role="tabpanel" aria-labelledby="user-tab"> <div class="tab-pane fade" id="user" role="tabpanel" aria-labelledby="user-tab">
<h5 class="mt-3">Mtarbeiter{% if request.user.profile.showtooltips %}&nbsp;<small><i data-toggle="tooltip" data-placement="top" title="Legen Sie hier neue Mtarbeiter an, weisen ihnen Gruppen zu und ändern Sie Stammdaten wie Foto, Namen und Agenturfunktion." class="far fa-question-circle"></i></small>{% endif %}</h5> <h5 class="mt-3">Mitarbeiter{% if request.user.profile.showtooltips %}&nbsp;<small><i data-toggle="tooltip" data-placement="top" title="Legen Sie hier neue Mtarbeiter an, weisen ihnen Gruppen zu und ändern Sie Stammdaten wie Foto, Namen und Agenturfunktion." class="far fa-question-circle"></i></small>{% endif %}</h5>
<hr> <hr>
{% block user_content %} {% block user_content %}
{% include "dasettings/user_content.html" %} {% include "dasettings/user_content.html" %}
@ -200,7 +200,8 @@ var defaultsettingsview = "profil";
e.preventDefault(); e.preventDefault();
$(this).tab('show'); $(this).tab('show');
lastview_name = $(this)[0]['hash'].substring(1); lastview_name = $(this)[0]['hash'].substring(1);
localStorage.setItem('activeTabSettings', lastview_name); localStorage.setItem('activeTabSettings', lastview_name);
console.log(lastview_name)
}); });

View File

@ -40,7 +40,7 @@ noclickeffect:active { border-style: outset !important;}
<span id="areaname_{{area.pk}}" style="color: #ffffff">Bereich <b>{{area.name}}&nbsp;</b></span> <span id="areaname_{{area.pk}}" style="color: #ffffff">Bereich <b>{{area.name}}&nbsp;</b></span>
</button> </button>
<button type="button" style="float: right" class="btn btn-light btn-sm" onclick="javascript:addArea({{area.pk}})" data-toggle="tooltip" data-placement="top" title="Bereichsnamen und -farbe ändern"><small><i class="fas fa-pen"></i></small></button> <button type="button" style="float: right" class="btn btn-light btn-sm" onclick="javascript:addArea({{area.pk}})" data-toggle="tooltip" data-placement="top" title="Bereichsnamen und -farbe ändern"><small><i class="fas fa-pen"></i></small></button>
<button style="float: right" type="button" class="btn btn-light btn-sm mr-1" onclick="javascript:delArea({{area.pk}})" data-toggle="tooltip" data-placement="top" title="Bereich löschen"><i class="fas fa-trash-alt"></i></button> <button style="float: right" type="button" class="btn btn-light btn-sm mr-1" onclick="javascript:delArea({{area.pk}})" data-toggle="tooltip" data-placement="top" title="Bereich löschen"><i class="fas fa-trash"></i></button>
</h5> </h5>
</div> </div>
<div id="area_content_{{area.pk}}" class="collapse" data-labelledby="area_{{area.pk}}" data-parent="#sortableAreas"> <div id="area_content_{{area.pk}}" class="collapse" data-labelledby="area_{{area.pk}}" data-parent="#sortableAreas">
@ -65,8 +65,8 @@ noclickeffect:active { border-style: outset !important;}
<td>{{ task.created_area_by.first_name }} {{ task.created_area_by.last_name }}</td> <td>{{ task.created_area_by.first_name }} {{ task.created_area_by.last_name }}</td>
<td>{{ task.created_area_date }}</td> <td>{{ task.created_area_date }}</td>
<td> <td>
<button style="float: right" class="btn btn-primary btn-sm" onclick="javascript:updateTaskComplete({{task.pk}})" data-toggle="tooltip" data-placement="top" title="Tätigkeit bearbeiten"><small><i class="fas fa-pen"></i></small></button> <button style="float: right" class="btn btn-sm btn-secondary " onclick="javascript:updateTaskComplete({{task.pk}})" data-toggle="tooltip" data-placement="top" title="Tätigkeit bearbeiten"><small><i class="fas fa-pen"></i></small></button>
<button style="float: right" type="button" class="btn btn-danger btn-sm mr-1" onclick="javascript:delTask({{task.pk}})" data-toggle="tooltip" data-placement="top" title="Tätigkeit löschen"><i class="fas fa-trash-alt"></i></button> <button style="float: right" type="button" class="btn btn-secondary btn-sm mr-1" onclick="javascript:delTask({{task.pk}})" data-toggle="tooltip" data-placement="top" title="Tätigkeit löschen"><i class="fas fa-trash"></i></button>
</td> </td>
</tr> </tr>
{% endif %} {% endif %}
@ -103,8 +103,10 @@ noclickeffect:active { border-style: outset !important;}
<div id="newareaname_err" class="alert alert-danger mt-3" style="display: none">Falsche Eingabe! Keine Sonderzeichen!</div> <div id="newareaname_err" class="alert alert-danger mt-3" style="display: none">Falsche Eingabe! Keine Sonderzeichen!</div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Abbrechen</button>&nbsp;
<button id="doActionAreaModal" type="button" class="btn btn-success" data-dismiss="modal" onclick="javascript:mainmodalAreaSave()" disabled="true">Speichern</button> <button id="doActionAreaModal" type="button" class="btn btn-primary" data-dismiss="modal" onclick="javascript:mainmodalAreaSave()" disabled="true">Speichern</button>
&nbsp;
<button type="button" class="btn" data-dismiss="modal">Abbrechen</button>
</div> </div>
</div> </div>
</div> </div>
@ -125,8 +127,8 @@ noclickeffect:active { border-style: outset !important;}
Möchten Sie den Bereich <b><span id="areaName"></span></b> wirklich löschen? Alle darin enthaltenen Tätigkeiten werden gelöscht und die Standards müssen neu einer Tätigkeit und einem Bereich zugeordnet werde! Möchten Sie den Bereich <b><span id="areaName"></span></b> wirklich löschen? Alle darin enthaltenen Tätigkeiten werden gelöscht und die Standards müssen neu einer Tätigkeit und einem Bereich zugeordnet werde!
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal" onclick="javascript:doDelArea()">Bereich löschen</button>&nbsp;&nbsp; <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="javascript:doDelArea()">Bereich löschen</button>&nbsp;&nbsp;
<button type="button" class="btn btn-success" data-dismiss="modal" onclick="javascript:$('#delArea').modal('toggle')">Abbrechen</button> <button type="button" class="btn" data-dismiss="modal" onclick="javascript:$('#delArea').modal('toggle')">Abbrechen</button>
</div> </div>
</div> </div>
</div> </div>
@ -153,8 +155,10 @@ noclickeffect:active { border-style: outset !important;}
<div id="newtaskname_err" class="alert alert-danger mt-3" style="display: none">Falsche Eingabe! Keine Sonderzeichen!</div> <div id="newtaskname_err" class="alert alert-danger mt-3" style="display: none">Falsche Eingabe! Keine Sonderzeichen!</div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Abbrechen</button>&nbsp;
<button id="doActionTaskModal" type="button" class="btn btn-success" data-dismiss="modal" onclick="javascript:mainmodalTaskSave()" disabled="true">Speichern</button> <button id="doActionTaskModal" type="button" class="btn btn-primary" data-dismiss="modal" onclick="javascript:mainmodalTaskSave()" disabled="true">Speichern</button>
&nbsp;
<button type="button" class="btn " data-dismiss="modal">Abbrechen</button>
</div> </div>
</div> </div>
</div> </div>
@ -204,8 +208,8 @@ noclickeffect:active { border-style: outset !important;}
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal" onclick="javascript:updateTask()" id="doActionUpdateTask">Tätigkeit aktualisieren</button>&nbsp;&nbsp; <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="javascript:updateTask()" id="doActionUpdateTask">Speichern</button>&nbsp;&nbsp;
<button type="button" class="btn btn-success" data-dismiss="modal" onclick="javascript:$('#updateTask').modal('toggle')">Schließen</button> <button type="button" class="btn" data-dismiss="modal" onclick="javascript:$('#updateTask').modal('toggle')">Abrechen</button>
</div> </div>
</div> </div>
</div> </div>
@ -245,8 +249,8 @@ noclickeffect:active { border-style: outset !important;}
Möchten Sie den Bereich <b><span id="taskName"></span></b> wirklich löschen? Alle darin enthaltenen <u>Standards</u> müssen eine Tätigkeit erhalten! Möchten Sie den Bereich <b><span id="taskName"></span></b> wirklich löschen? Alle darin enthaltenen <u>Standards</u> müssen eine Tätigkeit erhalten!
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal" onclick="javascript:doDelTask()">Tätigkeit löschen</button>&nbsp;&nbsp; <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="javascript:doDelTask()">Tätigkeit löschen</button>&nbsp;&nbsp;
<button type="button" class="btn btn-success" data-dismiss="modal" onclick="javascript:$('#delTask').modal('toggle')">Abbrechen</button> <button type="button" class="btn" data-dismiss="modal" onclick="javascript:$('#delTask').modal('toggle')">Abbrechen</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -28,7 +28,7 @@
<td>{{ item.profile.phonemobile }}</td> <td>{{ item.profile.phonemobile }}</td>
<td> <td>
{% if item != request.user %} {% if item != request.user %}
<a class="dropdown-item text-danger" href="{% url 'users-delete' item.pk %}" ><i class="fas fa-trash-alt"></i></a> <a href="{% url 'users-delete' item.pk %}" ><button class="btn btn-sm btn-secondary"><i class="fas fa-trash"></i></button></a>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>

View File

@ -61,7 +61,7 @@
<span id="user_email">{{ mail }}</span>&nbsp;<button onclick="javascript:ChangeMail()" style="float: right" type="button" class="btn btn-secondary btn-sm" id="changemailbutton"><i class="fas fa-pen"></i></button> <span id="user_email">{{ mail }}</span>&nbsp;<button onclick="javascript:ChangeMail()" style="float: right" type="button" class="btn btn-secondary btn-sm" id="changemailbutton"><i class="fas fa-pen"></i></button>
</p> </p>
<div style="float: left"> <div style="float: left">
<button type="button" id="" onclick="javascript:sendPassMail({{vieweduser}})" class="btn-primary btn-sm active" >Passwort wiederherstellen</button>&nbsp;&nbsp; <button type="button" id="" onclick="javascript:sendPassMail({{vieweduser}})" class="btn btn-primary btn-sm active" >Passwort wiederherstellen</button>&nbsp;&nbsp;
<br /><br /><span class="alert alert-success" id="mailsend" role="alert" style="display: none;">&nbsp;E-Mail gesendet!</span> <br /><br /><span class="alert alert-success" id="mailsend" role="alert" style="display: none;">&nbsp;E-Mail gesendet!</span>
</div> </div>
</div> </div>
@ -143,12 +143,18 @@
</div> </div>
</div> </div>
<hr> <hr>
{% if newuser == 1 %} {% if newuser == 1 %}
<a class="btn" href="{% url 'dasettings' %} ">Profil später bearbeiten</a>
{% else %}
<a class="btn" href="{% url 'dasettings' %} ">Abbrechen</a>
{% endif%}
{% if newuser == 1 %}
<button type="submit" class="btn btn-primary" style="float: right">Profilerstellung abschließen</button> <button type="submit" class="btn btn-primary" style="float: right">Profilerstellung abschließen</button>
{% else %} {% else %}
<button type="submit" name="submitprof" class="btn btn-primary" style="float: right">Profil Aktualisieren</button> <button type="submit" name="submitprof" class="btn btn-primary" style="float: right">Speichern</button>
{% endif %} {% endif %}
<a class="btn" href="{% url 'dasettings' %} ">Profilbearbeitung abbrechen</a>
</form> </form>
</div> </div>
<div class="tab-pane fade" id="contract" role="tabpanel" aria-labelledby="contract-tab"> <div class="tab-pane fade" id="contract" role="tabpanel" aria-labelledby="contract-tab">

View File

@ -99,7 +99,7 @@ def DASettings(request):
context.update({"agencyjobs" : AgencyJob.objects.filter(agency__pk=request.user.profile.agency.pk).order_by("name")}) context.update({"agencyjobs" : AgencyJob.objects.filter(agency__pk=request.user.profile.agency.pk).order_by("name")})
# LOAD GROUPS # LOAD GROUPS
agencygroups = AgencyGroup.objects.filter(agency__pk=request.user.profile.agency.pk).order_by("agencygroupname") agencygroups = AgencyGroup.objects.filter(agency__pk=request.user.profile.agency.pk).order_by("agencygroupname").order_by("-savefordel")
context.update({"agencygroups" : agencygroups}) context.update({"agencygroups" : agencygroups})
# LOAD AREAS # LOAD AREAS
@ -393,9 +393,22 @@ def SettingsAjaxRouter(request):
area.save() area.save()
success = True success = True
# REMOVE AREA # REMOVE AREA
elif request.method == 'GET' and request.GET['action'] == "remove_area" : elif request.method == 'GET' and request.GET['action'] == "remove_area" :
Areas(pk=request.GET['id']).delete() todelarea = Areas.objects.get(pk=request.GET['id'], agency=request.user.profile.agency)
success = True # REMOVE STANDARDS AREA
tempstandards = Standards.objects.filter(agency=request.user.profile.agency, area=todelarea)
if(request.user.has_perm('standardmanager')):
for s in tempstandards:
s.area = None
s.task = None
s.public = False
s.save()
todelarea.delete()
success = True
else:
success = False
# ADD TASK # ADD TASK
elif request.method == 'GET' and request.GET['action'] == "add_task" : elif request.method == 'GET' and request.GET['action'] == "add_task" :
task = Tasks(created_area_by=request.user, area=Areas.objects.get(pk=request.GET['areaid']), agency=request.user.profile.agency, name=request.GET["newvalue"]) task = Tasks(created_area_by=request.user, area=Areas.objects.get(pk=request.GET['areaid']), agency=request.user.profile.agency, name=request.GET["newvalue"])
@ -427,7 +440,22 @@ def SettingsAjaxRouter(request):
success = True success = True
# REMOVE Task # REMOVE Task
elif request.method == 'GET' and request.GET['action'] == "remove_task" : elif request.method == 'GET' and request.GET['action'] == "remove_task" :
Tasks.objects.get(pk=request.GET['id'], agency=request.user.profile.agency).delete()
todeltask = Tasks.objects.get(pk=request.GET['id'], agency=request.user.profile.agency)
# REMOVE STANDARDS AREA
tempstandards = Standards.objects.filter(agency=request.user.profile.agency, task=todeltask)
if(request.user.has_perm('standardmanager')):
for s in tempstandards:
s.task = None
s.public = False
s.save()
todeltask.delete()
success = True
else:
success = False
success = True success = True
# UPDATE TASK VISIBLE # UPDATE TASK VISIBLE
elif request.method == 'GET' and request.GET['action'] == "update_visible_taskname" : elif request.method == 'GET' and request.GET['action'] == "update_visible_taskname" :
@ -574,6 +602,14 @@ def UserProfileUpdate(request, pk, newuser=0):
return render(request, 'dasettings/user_usprof.html', context) return render(request, 'dasettings/user_usprof.html', context)
else: else:
usertime = ""
try:
usertime = UserTimeForm(instance=UserTime.objects.get(user=usertochange))
except:
usertime = UserTime(user=usertochange)
usertime.save()
usertime = UserTimeForm(instance=UserTime.objects.get(user=usertochange))
context = { context = {
'active_link' : 'dasettings', 'active_link' : 'dasettings',

View File

@ -15,35 +15,32 @@ import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
############################################## LOCAL #####################################
BASE_URL = "http://localhost:8000/"
CRONAPIKEY = "gCddsaz6NOnE9QbXZM5LasdEk122D"
############################################## DEV #####################################
BASE_URL = "https://dev01.digitale-agentur.com/"
CRONAPIKEY = "gCddsaz6NOnE9QbXZM5LasdEk122D"
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = True
# Database # MAIL DEV
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases EMAIL_HOST = 'smtp.strato.de'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = "support@dev01.digitale-agentur.com"
EMAIL_HOST_PASSWORD = "support@dev01.digitale-agentur.com"
DEFAULT_FROM_EMAIL = "support@dev01.digitale-agentur.com"
# DEV # DEV
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.db.backends.mysql',
'NAME' : 'digitaleagentur', 'NAME' : 'digitaleagentur_dev01',
'USER' : 'root', 'USER' : 'digitaleagentur_dev01',
'PASSWORD' : '', 'PASSWORD' : 't3TvtGAOkFHYXdJlUMIu9u3U',
'PORT' : 3306 'PORT' : 3306
} }
} }
############################################## DEV #####################################
# MAIL DEV
EMAIL_HOST = 'gymhum.de'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = "holger.trampe"
EMAIL_HOST_PASSWORD = "Motte2016_!"
DEFAULT_FROM_EMAIL = "holger.trampe@gymhum.de"
################################################### LOCAL ###############################
# Nach zehn Stunden läuft der Cookie ab! # Nach zehn Stunden läuft der Cookie ab!

View File

@ -28,8 +28,8 @@
{{form|crispy}} {{form|crispy}}
<p>Ihrer Mitteilung wird Automatisch eine Anrede und eine Verabscheidung hinzugefügt!</p> <p>Ihrer Mitteilung wird Automatisch eine Anrede und eine Verabscheidung hinzugefügt!</p>
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-success">Mitteilung verschicken</button>&nbsp; <button type="submit" class="btn btn-primary">Mitteilung verschicken</button>&nbsp;
<a href="{% url 'users-dashboard' %}" class="btn btn-success">Abbrechen</a> <a href="{% url 'users-dashboard' %}" class="btn">Abbrechen</a>
</div> </div>
</form> </form>
</div> </div>
@ -55,7 +55,7 @@
<td>{{ item.created_by.first_name }} {{ item.created_by.last_name }}</td> <td>{{ item.created_by.first_name }} {{ item.created_by.last_name }}</td>
<td>{{ item.created_date }}</td> <td>{{ item.created_date }}</td>
<td><a href="{% url 'message-single' item.pk %}">{{ item.content|truncatechars:30 }}</a></td> <td><a href="{% url 'message-single' item.pk %}">{{ item.content|truncatechars:30 }}</a></td>
<td><button href="#" class="btn btn-sm btn-danger" style="float: right;" onclick="javascript:delMessage({{item.pk}})"><i class="fas fa-trash-alt"></i></button></td> <td><button href="#" class="btn btn-sm btn-secondary" style="float: right;" onclick="javascript:delMessage({{item.pk}})"><i class="fas fa-trash"></i></button></td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
@ -86,8 +86,8 @@
Wollen Sie die Mitteilung wirklich löschen? Wollen Sie die Mitteilung wirklich löschen?
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal" onclick="javascript:delAction()">Löschen</button>&nbsp;&nbsp; <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="javascript:delAction()">Löschen</button>&nbsp;&nbsp;
<button type="button" class="btn btn-success" data-dismiss="modal">Abbrechen</button> <button type="button" class="btn" data-dismiss="modal">Abbrechen</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -3,18 +3,20 @@
{% block content %} {% block content %}
{% if request.user.profile.agency.module_messages %} {% if request.user.profile.agency.module_messages %}
<div class="content-section col-6"> <div class="content-section col-6">
<h3>Mitteilung von {{mess.created_by.first_name}} {{mess.created_by.last_name}}</h3> <h3>Mitteilung von {{mess.created_by.first_name}} {{mess.created_by.last_name}}</h3>
<small>Versendet am {{mess.created_date}}</small> <small>Versendet am {{mess.created_date}}</small>
<hr> <hr>
<div class="card">
<div class="card-body">
Hallo {{request.user.first_name}} {{request.user.last_name}},<br /><br /> Hallo {{request.user.first_name}} {{request.user.last_name}},<br /><br />
{{mess.content}} {{mess.content}}
<br /><br /> <br /><br />
Mit freundlichen Grüßen<br /><br /> Mit freundlichen Grüßen<br /><br />
{{mess.created_by.first_name}} {{mess.created_by.last_name}} {{mess.created_by.first_name}} {{mess.created_by.last_name}}
<hr> <hr>
<button class="btn btn-danger" style="float: right;" onclick="javascript:showDelMod()"><i class="fas fa-trash-alt"></i></button> <button class="btn btn-primary btn-sm" style="float: right;" onclick="javascript:showDelMod()"><i class="fas fa-trash-alt"></i></button>
</div> </div></div></div>
<!-- CONFIRMA DELETE DIR --> <!-- CONFIRMA DELETE DIR -->
<div class="modal fade" id="delMess" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="groupDelFunction" aria-hidden="true"> <div class="modal fade" id="delMess" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="groupDelFunction" aria-hidden="true">
@ -30,8 +32,8 @@
Wollen Sie die Mitteilung wirklich löschen? Wollen Sie die Mitteilung wirklich löschen?
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal" onclick="javascript:delAction()">Löschen</button>&nbsp;&nbsp; <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="javascript:delAction()">Löschen</button>&nbsp;&nbsp;
<button type="button" class="btn btn-success" data-dismiss="modal">Abbrechen</button> <button type="button" class="btn btn" data-dismiss="modal">Abbrechen</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -12,7 +12,7 @@
{{normalForm.media}} {{normalForm.media}}
{{normalForm|crispy}} {{normalForm|crispy}}
<hr> <hr>
<button type="submit" class="btn btn-success" href="{% url 'news-add' %} ">News speichern</button>&nbsp; <button type="submit" class="btn btn-primary" href="{% url 'news-add' %} ">News anlegen</button>&nbsp;
<a class="btn" href="{% url 'news-management' %} ">Abbrechen</a> <a class="btn" href="{% url 'news-management' %} ">Abbrechen</a>
</form> </form>
</div> </div>

View File

@ -12,8 +12,8 @@
<form method="POST"> <form method="POST">
{% csrf_token %} {% csrf_token %}
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-danger">News löschen</button>&nbsp; <button type="submit" class="btn btn-primary">News löschen</button>&nbsp;
<a href="{% url 'news-management' %}" class="btn btn-success">Abbrechen</a> <a href="{% url 'news-management' %}" class="btn ">Abbrechen</a>
</div> </div>
</form> </form>
</div> </div>

View File

@ -2,16 +2,14 @@
{% block content %} {% block content %}
{% if request.user.profile.agency.module_news %} {% if request.user.profile.agency.module_news %}
<div class="content-section col-12"> <div class="content-section col-12">
<h3>News&nbsp;<small><i data-toggle="tooltip" data-placement="top" title="Hier können aktuelle Nachrichten für die Agentur erstellt und verwaltet werden." class="far fa-question-circle"></i></small></h3> <h3>News&nbsp;<small><i data-toggle="tooltip" data-placement="top" title="Hier können aktuelle Nachrichten für die Agentur erstellt und verwaltet werden." class="far fa-question-circle"></i></small>
{% if perms.users.modulenews %}
<a class="btn btn-sm btn-primary" href="{% url 'news-add' %} " style="float: right" data-toggle="tooltip" data-placement="top" title="Neue News für Ihre Agentur erstellen"><i class="fas fa-plus"></i>&nbsp;News</a>
{% endif %}
</h3>
<hr> <hr>
{% if perms.users.modulenews %}
<div class="row">
<div class="content-section col-4">
<a class="btn btn-primary" href="{% url 'news-add' %} " data-toggle="tooltip" data-placement="top" title="Neue News für Ihre Agentur erstellen"><i class="fas fa-plus"></i>&nbsp;News</a>
</div>
</div>
<hr>
{% endif %}
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<ul class="nav nav-tabs" id="news_tabs" role="tablist"> <ul class="nav nav-tabs" id="news_tabs" role="tablist">
@ -57,16 +55,13 @@
<td>{{ news_single.go_online_on|date:"d.m.Y, H:i"}} bis {{ news_single.go_offline_on|date:"d.m.Y, H:i"}}</td> <td>{{ news_single.go_online_on|date:"d.m.Y, H:i"}} bis {{ news_single.go_offline_on|date:"d.m.Y, H:i"}}</td>
<td> <td>
{% if news_single.created_by == request.user or perms.users.news_management %} {% if news_single.created_by == request.user or perms.users.news_management %}
<div class="dropdown no-arrow"> <a style="float: right" class="btn btn-secondary btn-sm ml-2" href="{% url 'news-delete' news_single.pk %}">
<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <small><i class="fas fa-trash"></i></small>
<i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i> </a>
</a> &nbsp;
<div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink"> <a style="float: right" class="btn btn-secondary btn-sm " href="{% url 'news-update' news_single.pk %}">
<a class="dropdown-item" href="{% url 'news-update' news_single.pk %}" class="btn">Bearbeiten</a> <small><i class="fas fa-pen"></i></small>
<div class="dropdown-divider"></div> </a>
<a class="dropdown-item text-danger" href="{% url 'news-delete' news_single.pk %}">Löschen</a>
</div>
</div>
{% endif %} {% endif %}
</div> </div>
</td> </td>
@ -103,18 +98,14 @@
<td>{{ news_single.go_online_on|date:"d.m.Y, H:i"}} bis {{ news_single.go_offline_on|date:"d.m.Y, H:i"}}</td> <td>{{ news_single.go_online_on|date:"d.m.Y, H:i"}} bis {{ news_single.go_offline_on|date:"d.m.Y, H:i"}}</td>
<td> <td>
{% if news_single.created_by == request.user or perms.users.news_management %} {% if news_single.created_by == request.user or perms.users.news_management %}
<div class="dropdown no-arrow"> <a style="float: right" class="btn btn-secondary btn-sm ml-2" href="{% url 'news-delete' news_single.pk %}">
<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <small><i class="fas fa-trash"></i></small>
<i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i> </a>
</a> &nbsp;
<div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink"> <a style="float: right" class="btn btn-secondary btn-sm " href="{% url 'news-update' news_single.pk %}">
<a class="dropdown-item" href="{% url 'news-update' news_single.pk %}" class="btn">Bearbeiten</a> <small><i class="fas fa-pen"></i></small>
<div class="dropdown-divider"></div> </a>
<a class="dropdown-item text-danger" href="{% url 'news-delete' news_single.pk %}">Löschen</a>
</div>
</div>
{% endif %} {% endif %}
</div>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
@ -154,18 +145,14 @@
<td>{{ news_single.go_online_on|date:"d.m.Y, H:i"}} bis {{ news_single.go_offline_on|date:"d.m.Y, H:i"}}</td> <td>{{ news_single.go_online_on|date:"d.m.Y, H:i"}} bis {{ news_single.go_offline_on|date:"d.m.Y, H:i"}}</td>
<td> <td>
{% if news_single.created_by == request.user or perms.users.news_management %} {% if news_single.created_by == request.user or perms.users.news_management %}
<div class="dropdown no-arrow"> <a style="float: right" class="btn btn-secondary btn-sm ml-2" href="{% url 'news-delete' news_single.pk %}">
<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <small><i class="fas fa-trash"></i></small>
<i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i> </a>
</a> &nbsp;
<div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink"> <a style="float: right" class="btn btn-secondary btn-sm " href="{% url 'news-update' news_single.pk %}">
<a class="dropdown-item" href="{% url 'news-update' news_single.pk %}" class="btn">Bearbeiten</a> <small><i class="fas fa-pen"></i></small>
<div class="dropdown-divider"></div> </a>
<a class="dropdown-item text-danger" href="{% url 'news-delete' news_single.pk %}">Löschen</a>
</div>
</div>
{% endif %} {% endif %}
</div>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}

View File

@ -10,7 +10,7 @@
{{normalForm.media}} {{normalForm.media}}
{{normalForm|crispy}} {{normalForm|crispy}}
<hr> <hr>
<button type="submit" class="btn btn-success" href="{% url 'news-update' news_id %} ">Aktualisieren</button>&nbsp; <button type="submit" class="btn btn-primary" href="{% url 'news-update' news_id %} ">News aktualisieren</button>&nbsp;
<a class="btn" href="{% url 'news-management' %} ">Abbrechen</a> <a class="btn" href="{% url 'news-management' %} ">Abbrechen</a>
</form> </form>
</div> </div>

View File

@ -112,7 +112,7 @@ class NewsDeleteView(LoginRequiredMixin, DeleteView):
template_name = 'news/news_confirm_delete.html' template_name = 'news/news_confirm_delete.html'
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super(NewsDeleteView, self).get_context_data(**kwargs) context = super(NewsDeleteView, self).get_context_data(**kwargs)
context['active_link'] = 'newsmanagement' context['active_link'] = 'newsmanagement'
return context return context

View File

@ -3,12 +3,12 @@
<div class="content-section col-5"> <div class="content-section col-5">
<h3>Alle Benachrichtigungen</h3> <h3>Alle Benachrichtigungen</h3>
<hr> <hr>
<button href="#" class="btn btn-danger mb-2" data-toggle="tooltip" data-placement="top" title="Alle Benachrichtigung löschen" onclick="javascript:delNotify(false)">Alle Benachrichtigungen löschen</button> <button href="#" class="btn btn-primary mb-2" data-toggle="tooltip" data-placement="top" title="Alle Benachrichtigung löschen" onclick="javascript:delNotify(false)">Alle Benachrichtigungen löschen</button>
{% for notification in usernotifications %} {% for notification in usernotifications %}
<div class="card mb-2 notifydelclass" id="notify_{{notification.pk}}"> <div class="card mb-2 notifydelclass" id="notify_{{notification.pk}}">
<div class="card-body"> <div class="card-body">
<button href="#" class="btn btn-danger" style="float: right;" onclick="javascript:delNotify({{notification.pk}})"><i class="fas fa-trash-alt"></i></button> <button href="#" class="btn btn-secondary btn-sm" style="float: right;" onclick="javascript:delNotify({{notification.pk}})"><i class="fas fa-trash"></i></button>
<p class="card-text"> <p class="card-text">
{% if notification.notificationtype == "agencynews" %} {% if notification.notificationtype == "agencynews" %}
<a href="/news/news/{{notification.elementid}}/single" class="" style="text-decoration: none; color: #000000"> <a href="/news/news/{{notification.elementid}}/single" class="" style="text-decoration: none; color: #000000">
@ -45,8 +45,8 @@
Möchten Sie alle Benachrichtigungen löschen? Möchten Sie alle Benachrichtigungen löschen?
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal" onclick="javascript:doDelAllNotifications()">Alle Benachrichtigungen löschen</button>&nbsp;&nbsp; <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="javascript:doDelAllNotifications()">Alle Benachrichtigungen löschen</button>&nbsp;&nbsp;
<button type="button" class="btn btn-success" data-dismiss="modal">Abbrechen</button> <button type="button" class="btn" data-dismiss="modal">Abbrechen</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -56,11 +56,11 @@
</p> </p>
<h6><b>Festnetz</b></h6> <h6><b>Festnetz</b></h6>
<p> <p>
{{ phoneland }} <a href="tel:{{ phoneland }}">{{ phoneland }}</a>
</p> </p>
<h6><b>Mobil</b></h6> <h6><b>Mobil</b></h6>
<p> <p>
{{ phonemobile }}{% if phone_public %}&nbsp;<b>(nur Intern)</b>{% endif %} <a href="tel:{{ phonemobile }}">{{ phonemobile }}</a>{% if phone_public %}&nbsp;<b>(nur Intern)</b>{% endif %}
</p> </p>
</div> </div>
</div> </div>

View File

@ -9,7 +9,7 @@
{% csrf_token %} {% csrf_token %}
{{form|crispy}} {{form|crispy}}
<hr> <hr>
<button type="submit" class="btn btn-success">Passwort speichern</button>&nbsp; <button type="submit" class="btn btn-primary">Passwort anlegen</button>&nbsp;
<a class="btn" href="{% url 'organizer-management' %} ">Abbrechen</a> <a class="btn" href="{% url 'organizer-management' %} ">Abbrechen</a>
</form> </form>
</div> </div>

View File

@ -13,8 +13,8 @@
<form method="POST"> <form method="POST">
{% csrf_token %} {% csrf_token %}
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-danger">Passwort löschen</button>&nbsp; <button type="submit" class="btn btn-primary">Passwort löschen</button>&nbsp;
<a href="{% url 'organizer-management' %}" class="btn btn-success">Abbrechen</a> <a href="{% url 'organizer-management' %}" class="btn">Abbrechen</a>
</div> </div>
</form> </form>
</div> </div>

View File

@ -11,7 +11,7 @@
{{form|crispy}} {{form|crispy}}
<hr> <hr>
<button type="submit" class="btn btn-success">Passwort aktualisieren</button>&nbsp; <button type="submit" class="btn btn-primary">Passwort aktualisieren</button>&nbsp;
<a class="btn" href="{% url 'organizer-management' %}">Abbrechen</a> <a class="btn" href="{% url 'organizer-management' %}">Abbrechen</a>
</form> </form>
</div> </div>

View File

@ -14,8 +14,8 @@
<form method="POST"> <form method="POST">
{% csrf_token %} {% csrf_token %}
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-danger">Kategorie löschen</button>&nbsp; <button type="submit" class="btn btn-primary">Kategorie löschen</button>&nbsp;
<a href="{% url 'category-management' %}" class="btn btn-success">Abbrechen</a> <a href="{% url 'category-management' %}" class="btn">Abbrechen</a>
</div> </div>
</form> </form>
</div> </div>

View File

@ -9,7 +9,7 @@
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}
<hr> <hr>
<button type="submit" class="btn btn-success">Kategorie aktualisieren</button>&nbsp; <button type="submit" class="btn btn-primary">Kategorie aktualisieren</button>&nbsp;
<a class="btn" href="{% url 'category-management' %} ">Abbrechen</a> <a class="btn" href="{% url 'category-management' %} ">Abbrechen</a>
</form> </form>
</div> </div>

View File

@ -19,7 +19,7 @@
{% endfor %} {% endfor %}
</div></div> </div></div>
<hr> <hr>
<button type="submit" class="btn btn-success">Kontakt speichern</button>&nbsp; <button type="submit" class="btn btn-primary">Kontakt anlegen</button>&nbsp;
<a class="btn" href="{% url 'organizer-management' %} ">Abbrechen</a> <a class="btn" href="{% url 'organizer-management' %} ">Abbrechen</a>
</form> </form>
</div> </div>

View File

@ -13,8 +13,8 @@
<form method="POST"> <form method="POST">
{% csrf_token %} {% csrf_token %}
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-danger">Kontakt löschen</button>&nbsp; <button type="submit" class="btn btn-primary">Kontakt löschen</button>&nbsp;
<a href="{% url 'organizer-management' %}" class="btn btn-success">Abbrechen</a> <a href="{% url 'organizer-management' %}" class="btn">Abbrechen</a>
</div> </div>
</form> </form>
</div> </div>

View File

@ -19,7 +19,7 @@
</div></div> </div></div>
<hr> <hr>
<button type="submit" class="btn btn-success">Kontakt aktualisieren</button>&nbsp; <button type="submit" class="btn btn-primary">Kontakt aktualisieren</button>&nbsp;
<a class="btn" href="{% url 'organizer-management' %}">Abbrechen</a> <a class="btn" href="{% url 'organizer-management' %}">Abbrechen</a>
</form> </form>
</div> </div>

View File

@ -43,16 +43,14 @@
</td> </td>
<td> <td>
{% if user|usergperm:"moduleorganizer" %} {% if user|usergperm:"moduleorganizer" %}
<div class="dropdown no-arrow"> <a style="float: right" class="btn btn-secondary btn-sm ml-2" href="{% url 'cont-delete' agc.pk %}">
<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <small>
<i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i> <i class="fas fa-trash"></i></small></a>
</a>
<div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink"> <a style="float: right" class="btn btn-secondary btn-sm " href="{% url 'cont-update' agc.pk %}">
<a class="dropdown-item" href="{% url 'cont-update' agc.pk %}">Bearbeiten</a> <small>
<div class="dropdown-divider"></div> <i class="fas fa-pen"></i>
<a class="dropdown-item text-danger" href="{% url 'cont-delete' agc.pk %}">Löschen</a> </small></a>
</div>
</div>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
@ -94,7 +92,7 @@
{% endif %} {% endif %}
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-success" data-dismiss="modal">Schließen</button> <button type="button" class="btn btn-primary" data-dismiss="modal">Schließen</button>
</div> </div>
</div> </div>
</div> </div>
@ -122,7 +120,7 @@
<input class="form-control" type="text" value="{{ele.name}}" onkeyup="javascript:updateCategory({{ele.pk}}, this.value)"> <input class="form-control" type="text" value="{{ele.name}}" onkeyup="javascript:updateCategory({{ele.pk}}, this.value)">
</td> </td>
<td> <td>
<button type="button" class="btn btn-danger" onclick="javascript:catDel({{ele.pk}})" data-toggle="tooltip" data-placement="top" title="Kategorie löschen"><i class="fas fa-trash-alt"></i></button> <button type="button" class="btn btn-danger btn-sm" onclick="javascript:catDel({{ele.pk}})" style="float: right" data-toggle="tooltip" data-placement="top" title="Kategorie löschen"><i class="fas fa-trash-alt"></i></button>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
@ -134,7 +132,7 @@
<button type="button" class="btn btn-primary" title="Neue Kategorie hinzufügen" onclick="javascript:addCategory()" data-toggle="tooltip" data-placement="top" title="Dialog für eine neue Kategorie öffnen"><i class="fas fa-plus"></i>&nbsp;Kategorie</button> <button type="button" class="btn btn-primary" title="Neue Kategorie hinzufügen" onclick="javascript:addCategory()" data-toggle="tooltip" data-placement="top" title="Dialog für eine neue Kategorie öffnen"><i class="fas fa-plus"></i>&nbsp;Kategorie</button>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-success" data-dismiss="modal">Schließen</button> <button type="button" class="btn btn-primary" data-dismiss="modal">Fertig</button>
</div> </div>
</div> </div>
</div> </div>
@ -282,7 +280,7 @@ function addCategory(){
success: function( data ) success: function( data )
{ {
new_id = data["new_id"]; new_id = data["new_id"];
$('#allCategory > tbody:last-child').append('<tr id="categorys_'+new_id+'"><td><input class="form-control" type="text" value="" placeholder="Neue Kateogire" onkeyup="javascript:updateCategory('+new_id+', this.value)"></td><td><button type="button" class="btn btn-danger" onclick="javascript:catDel('+new_id+')" data-toggle="tooltip" data-placement="top" title="Kategorie löschen"><i class="fas fa-trash-alt"></i></button></td></tr>'); $('#allCategory > tbody:last-child').append('<tr id="categorys_'+new_id+'"><td><input class="form-control" type="text" value="" placeholder="Neue Kategorie" onkeyup="javascript:updateCategory('+new_id+', this.value)"></td><td><button type="button" class="btn btn-danger" onclick="javascript:catDel('+new_id+')" data-toggle="tooltip" data-placement="top" title="Kategorie löschen"><i class="fas fa-trash-alt"></i></button></td></tr>');
} }
}); });
} }

View File

@ -121,7 +121,7 @@
</div></div> </div></div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-success" data-dismiss="modal">Beenden</button> <button type="button" class="btn btn-primary" data-dismiss="modal">Fertig</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -10,7 +10,7 @@
{{ form|crispy }} {{ form|crispy }}
<hr> <hr>
<p><small>Hinweis zum Weblink: Bitte setzen Sie den vollständigen Link in das Formular!<br/>Z.B. <i>https://digitale-agentur.com</i></small></p> <p><small>Hinweis zum Weblink: Bitte setzen Sie den vollständigen Link in das Formular!<br/>Z.B. <i>https://digitale-agentur.com</i></small></p>
<button type="submit" class="btn btn-success">Quicklink speichern</button>&nbsp; <button type="submit" class="btn btn-primary">Quicklink anlegen</button>&nbsp;
<a class="btn" href="{% url 'organizer-management' %} ">Abbrechen</a> <a class="btn" href="{% url 'organizer-management' %} ">Abbrechen</a>
</form> </form>
</div> </div>

View File

@ -13,8 +13,8 @@
<form method="POST"> <form method="POST">
{% csrf_token %} {% csrf_token %}
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-danger">Quicklink löschen</button>&nbsp; <button type="submit" class="btn btn-primary">Quicklink löschen</button>&nbsp;
<a href="{% url 'organizer-management' %}" class="btn btn-success">Abbrechen</a> <a href="{% url 'organizer-management' %}" class="btn">Abbrechen</a>
</div> </div>
</form> </form>
</div> </div>

View File

@ -12,7 +12,7 @@
<p><small>Hinweis zum Weblink: Bitte setzen Sie den vollständigen Link in das Formular!<br/>Z.B. <i>https://digitale-agentur.com</i> <p><small>Hinweis zum Weblink: Bitte setzen Sie den vollständigen Link in das Formular!<br/>Z.B. <i>https://digitale-agentur.com</i>
</small> </p> </small> </p>
<button type="submit" class="btn btn-success">Quicklink aktualisieren</button>&nbsp; <button type="submit" class="btn btn-primary">Quicklink aktualisieren</button>&nbsp;
<a class="btn" href="{% url 'organizer-management' %} ">Abbrechen</a> <a class="btn" href="{% url 'organizer-management' %} ">Abbrechen</a>
</form> </form>
</div> </div>

View File

@ -7,7 +7,7 @@
</div> </div>
{% endif %} {% endif %}
<!--<hr>--> <!--<hr>-->
<div class="row col-12 " > <div class="content-section col-12">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover" id="qltable"> <table class="table table-hover" id="qltable">
<thead> <thead>
@ -28,16 +28,14 @@
<!--<td><img src="{{ ql.get_photo_url }}" width="15%"></td> --> <!--<td><img src="{{ ql.get_photo_url }}" width="15%"></td> -->
<td> <td>
{% if user|usergperm:"moduleorganizer" %} {% if user|usergperm:"moduleorganizer" %}
<div class="dropdown no-arrow"> <a style="float: right" class="btn btn-secondary btn-sm ml-2" href="{% url 'ql-delete' ql.pk%}">
<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <small>
<i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i> <i class="fas fa-trash"></i></small></a>
</a>
<div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink"> <a style="float: right" class="btn btn-secondary btn-sm " href="{% url 'ql-update' ql.pk%}">
<a class="dropdown-item" href="{% url 'ql-update' ql.pk%}">Bearbeiten</a> <small>
<div class="dropdown-divider"></div> <i class="fas fa-pen"></i>
<a class="dropdown-item text-danger" href="{% url 'ql-delete' ql.pk%}" >Löschen</a> </small></a>
</div>
</div>
{% endif %} {% endif %}
</div> </div>
</td> </td>

View File

@ -41,8 +41,8 @@ class Standards(models.Model):
public = models.BooleanField(default=False) public = models.BooleanField(default=False)
freefield_title = models.CharField(max_length=200, blank=False, default="") freefield_title = models.CharField(max_length=200, blank=False, null=True, default="")
freefield_content = models.TextField(max_length=500, blank=False, default="") freefield_content = models.TextField(max_length=500, blank=False, null=True, default="")
delflag = models.BooleanField(default=False) delflag = models.BooleanField(default=False)
deldate = models.DateTimeField(default=timezone.now, blank=True) deldate = models.DateTimeField(default=timezone.now, blank=True)

View File

@ -12,8 +12,8 @@
<form method="POST"> <form method="POST">
{% csrf_token %} {% csrf_token %}
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-danger">Standard löschen</button>&nbsp; <button type="submit" class="btn btn-primary">Standard löschen</button>&nbsp;
<a href="{% url 'standards' %}" class="btn btn-success">Abbrechen</a> <a href="{% url 'standards' %}" class="btn">Abbrechen</a>
</div> </div>
</form> </form>
</div> </div>

View File

@ -99,7 +99,7 @@
<table id="linked_standards" class="table table-hover table-sm"> <table id="linked_standards" class="table table-hover table-sm">
{% if update == True %} {% if update == True %}
{% for s in standard.linked_standards.all %} {% for s in standard.linked_standards.all %}
<tr id="added_standards_{{s.pk}}"><td>{{s.name}}</td><td><button type="button" class="btn btn-danger btn-sm" onclick="javascript:remEle('standards',{{s.pk}}, '{{s.name}}')"><i class="fas fa-trash-alt"></i></button></td></tr> <tr id="added_standards_{{s.pk}}"><td>{{s.name}}</td><td><button type="button" style="float: right;" class="btn btn-danger btn-sm" onclick="javascript:remEle('standards',{{s.pk}}, '{{s.name}}')"><i class="fas fa-trash-alt"></i></button></td></tr>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</table> </table>
@ -152,7 +152,7 @@
<table id="linked_files" class="table table-hover table-sm"> <table id="linked_files" class="table table-hover table-sm">
{% if update == True %} {% if update == True %}
{% for f in standard.addedfiles.all %} {% for f in standard.addedfiles.all %}
<tr id="added_files_{{f.pk}}"><td>{{f.name}}</td><td><button type="button" class="btn btn-danger btn-sm" onclick="javascript:remEle('files',{{f.pk}}, '{{f.name}}')"><i class="fas fa-trash-alt"></i></button></td></tr> <tr id="added_files_{{f.pk}}"><td>{{f.name}}</td><td><button type="button" class="btn btn-danger btn-sm" style="float: right;" onclick="javascript:remEle('files',{{f.pk}}, '{{f.name}}')"><i class="fas fa-trash-alt"></i></button></td></tr>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</table> </table>
@ -240,7 +240,7 @@
{% endif %} {% endif %}
<hr> <hr>
<button type="submit" class="btn btn-success"> <button type="submit" class="btn btn-primary">
Standard{% if update == True %} aktualisieren{% else %} anlegen{% endif %} Standard{% if update == True %} aktualisieren{% else %} anlegen{% endif %}
</button>&nbsp; </button>&nbsp;
<a class="btn" href="{% url 'standards' %} ">Abbrechen</a> <a class="btn" href="{% url 'standards' %} ">Abbrechen</a>
@ -398,7 +398,7 @@
{% endif %} {% endif %}
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-success" data-dismiss="modal">Fertig</button> <button type="button" class="btn btn-primary" data-dismiss="modal">Fertig</button>
</div> </div>
</div> </div>
</div> </div>
@ -478,13 +478,13 @@
<table id="linked_quicklinks" class="table table-hover table-sm"> <table id="linked_quicklinks" class="table table-hover table-sm">
{% if update == True %} {% if update == True %}
{% for q in standard.addedquicklinks.all %} {% for q in standard.addedquicklinks.all %}
<tr id="added_quicklinks_{{q.pk}}"><td>{{q.name}}</td><td><button type="button" class="btn btn-danger btn-sm" onclick="javascript:remEle('quicklinks',{{q.pk}}, '{{q.name}}')"><i class="fas fa-trash-alt"></i></button></td></tr> <tr id="added_quicklinks_{{q.pk}}"><td>{{q.name}}</td><td><button type="button" class="btn btn-danger btn-sm" style="float: right;" onclick="javascript:remEle('quicklinks',{{q.pk}}, '{{q.name}}')"><i class="fas fa-trash-alt"></i></button></td></tr>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</table> </table>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-success" data-dismiss="modal">Schließen</button> <button type="button" class="btn btn-primary" data-dismiss="modal">Fertig</button>
</div> </div>
</div> </div>
</div> </div>
@ -522,13 +522,13 @@
<table id="linked_contacts" class="table table-hover table-sm"> <table id="linked_contacts" class="table table-hover table-sm">
{% if update == True %} {% if update == True %}
{% for q in standard.addedcontacts.all %} {% for q in standard.addedcontacts.all %}
<tr id="added_contacts_{{q.pk}}"><td>{{q.company}}</td><td><button type="button" class="btn btn-danger btn-sm" onclick="javascript:remEle('contacts',{{q.pk}}, '{{q.company}}')"><i class="fas fa-trash-alt"></i></button></td></tr> <tr id="added_contacts_{{q.pk}}"><td>{{q.company}}</td><td><button type="button" class="btn btn-danger btn-sm" onclick="javascript:remEle('contacts',{{q.pk}}, '{{q.company}}')" style="float: right;" ><i class="fas fa-trash-alt"></i></button></td></tr>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</table> </table>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-success" data-dismiss="modal">Schließen</button> <button type="button" class="btn btn-primary" data-dismiss="modal">Fertig</button>
</div> </div>
</div> </div>
</div> </div>
@ -566,14 +566,14 @@
<table id="linked_passwords" class="table table-hover table-sm"> <table id="linked_passwords" class="table table-hover table-sm">
{% if update == True %} {% if update == True %}
{% for q in standard.addedpasswords.all %} {% for q in standard.addedpasswords.all %}
<tr id="added_passwords_{{q.pk}}"><td>{{q.name}}</td><td><button type="button" class="btn btn-danger btn-sm" onclick="javascript:remEle('passwords',{{q.pk}}, '{{q.name}}')"><i class="fas fa-trash-alt"></i></button></td></tr> <tr id="added_passwords_{{q.pk}}"><td>{{q.name}}</td><td><button type="button" class="btn btn-danger btn-sm" onclick="javascript:remEle('passwords',{{q.pk}}, '{{q.name}}')" style="float: right;" ><i class="fas fa-trash-alt"></i></button></td></tr>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</table> </table>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-success" data-dismiss="modal">Schließen</button> <button type="button" class="btn btn-primary" data-dismiss="modal">Fertig</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -5,7 +5,7 @@
<div class="content-section col-12"> <div class="content-section col-12">
<h3>Standards{% if request.user.profile.showtooltips %}&nbsp;<small><i data-toggle="tooltip" data-placement="top" title="Standards dokumentieren und erläutern verschiedenen Verfahren, strukturiert nach Bereichen und Tätigkeiten." class="far fa-question-circle"></i></small>{% endif %} <h3>Standards{% if request.user.profile.showtooltips %}&nbsp;<small><i data-toggle="tooltip" data-placement="top" title="Standards dokumentieren und erläutern verschiedenen Verfahren, strukturiert nach Bereichen und Tätigkeiten." class="far fa-question-circle"></i></small>{% endif %}
<a class="btn btn-primary" href="{% url 'standard-add' %}" style="float: right;"><i class="fas fa-plus"></i>&nbsp;Standard</a> <a class="btn btn-primary btn-sm" href="{% url 'standard-add' %}" style="float: right;"><i class="fas fa-plus"></i>&nbsp;Standard</a>
</h3> </h3>
<small>Sichtbar sind alle veröffentlichten und von {{ user.first_name }} {{ user.last_name}} erstellten Standards.</small> <small>Sichtbar sind alle veröffentlichten und von {{ user.first_name }} {{ user.last_name}} erstellten Standards.</small>
<hr> <hr>
@ -185,7 +185,7 @@
<a href="{% url 'standard-single' standard.pk %}">{{standard.name}}</a> <a href="{% url 'standard-single' standard.pk %}">{{standard.name}}</a>
{% else %} {% else %}
{% if standard.created_standard_by == request.user or perms.users.standardmanager %} {% if standard.created_standard_by == request.user or perms.users.standardmanager %}
<a href="{% url 'standard-update' standard.pk %}">{{standard.name}}</a>&nbsp;<i class="fas fa-exclamation-circle"data-toggle="tooltip" data-placement="top" title="Es wurden nicht alle Pflichtfelder ausgefüllt."></i> <a href="{% url 'standard-add' standard.pk %}">{{standard.name}}</a>&nbsp;<i class="fas fa-exclamation-circle"data-toggle="tooltip" data-placement="top" title="Es wurden nicht alle Pflichtfelder ausgefüllt."></i>
{% else %} {% else %}
{{standard.name}}&nbsp;<i class="fas fa-exclamation-circle"data-toggle="tooltip" data-placement="top" title="Es wurden nicht alle Pflichtfelder ausgefüllt."></i> {{standard.name}}&nbsp;<i class="fas fa-exclamation-circle"data-toggle="tooltip" data-placement="top" title="Es wurden nicht alle Pflichtfelder ausgefüllt."></i>
{% endif %} {% endif %}

View File

@ -30,10 +30,8 @@ class StandardsManagement(LoginRequiredMixin, ListView):
standards_of_user = Standards.objects.filter(agency__pk=self.request.user.profile.agency.pk, created_standard_by=self.request.user.pk) standards_of_user = Standards.objects.filter(agency__pk=self.request.user.profile.agency.pk, created_standard_by=self.request.user.pk)
#standards_of_agency = Standards.objects.filter(agency__pk=self.request.user.profile.agency.pk, public=True) #standards_of_agency = Standards.objects.filter(agency__pk=self.request.user.profile.agency.pk, public=True)
unpubstandards_of_user = Standards.objects.filter(agency__pk=self.request.user.profile.agency.pk, public=False) unpubstandards_of_user = Standards.objects.filter(agency__pk=self.request.user.profile.agency.pk, public=False)
#tasks = Tasks.objects.filter(agency__pk=self.request.user.profile.agency.pk) #tasks = Tasks.objects.filter(agency__pk=self.request.user.profile.agency.pk)
standardcontent = [] standardcontent = []
for a in areas: for a in areas:
standardcontent.append({"area" : a, "tasks" : []}) standardcontent.append({"area" : a, "tasks" : []})
tasks_in_area = Tasks.objects.filter(agency__pk=self.request.user.profile.agency.pk, area__pk=a.pk).order_by("name") tasks_in_area = Tasks.objects.filter(agency__pk=self.request.user.profile.agency.pk, area__pk=a.pk).order_by("name")

View File

@ -17,11 +17,11 @@ User._meta.get_field('last_name').blank = False
# PATH FOR AGENCYPIC # PATH FOR AGENCYPIC
def picturepath_agency(instance, filename): def picturepath_agency(instance, filename):
# file will be uploaded to MEDIA_URL/agency_<id>/<subdirs>/<filename> # file will be uploaded to MEDIA_URL/agency_<id>/<subdirs>/<filename>
return settings.MEDIA_URL + 'agencydata/agency_{0}/agencystats/{1}'.format(instance.pk, filename) return 'agencydata/agency_{0}/agencystats/{1}'.format(instance.pk, filename)
# PATH FOR PROFILEPICS # PATH FOR PROFILEPICS
def picturepath_user(instance, filename): def picturepath_user(instance, filename):
return settings.MEDIA_URL + 'agencydata/agency_{0}/agencystats/profilepics/{1}'.format(instance.agency.pk, filename) return 'agencydata/agency_{0}/agencystats/profilepics/{1}'.format(instance.agency.pk, filename)
@ -81,7 +81,7 @@ class Agency(models.Model):
plz = models.CharField(default="", max_length=5, blank=True) plz = models.CharField(default="", max_length=5, blank=True)
agency_email = models.EmailField(default="", blank=True) agency_email = models.EmailField(default="", blank=True)
phone = models.CharField(default="", max_length=50, blank=True) phone = models.CharField(default="", max_length=50, blank=True)
agencypic = models.ImageField(default=settings.MEDIA_URL + 'ag_default.jpg', upload_to=picturepath_agency, blank=True) agencypic = models.ImageField(default='ag_default.jpg', upload_to=picturepath_agency, blank=True)
@ -170,7 +170,7 @@ class Profile(models.Model):
func = models.ForeignKey("AgencyJob", blank=True, null=True, default=None, on_delete=models.SET_NULL) func = models.ForeignKey("AgencyJob", blank=True, null=True, default=None, on_delete=models.SET_NULL)
# Wenn dieses Profil gelöscht wird, wird NICHT die Agency geslöscht # Wenn dieses Profil gelöscht wird, wird NICHT die Agency geslöscht
agency = models.ForeignKey(Agency, on_delete=models.PROTECT) agency = models.ForeignKey(Agency, on_delete=models.PROTECT)
image = models.ImageField(default=settings.MEDIA_URL + 'default.jpg', upload_to=picturepath_user, blank=True) image = models.ImageField(default='default.jpg', upload_to=picturepath_user, blank=True)
compfunc = models.CharField(max_length=60, blank=True) compfunc = models.CharField(max_length=60, blank=True)
visible = models.BooleanField(default=True) visible = models.BooleanField(default=True)
persnumber = models.CharField(default="", max_length=50, blank=True) persnumber = models.CharField(default="", max_length=50, blank=True)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

@ -324,20 +324,28 @@
<a class="dropdown-item text-center small text-gray-500" href="{% url 'showallnotificaions' %}">Alle Benachrichtigungen ansehen</a> <a class="dropdown-item text-center small text-gray-500" href="{% url 'showallnotificaions' %}">Alle Benachrichtigungen ansehen</a>
</div> </div>
</li> </li>
<style type="text/css">
.roundimg {
border-radius: 50%;
}
</style>
<div class="topbar-divider d-none d-sm-block"></div> <div class="topbar-divider d-none d-sm-block"></div>
<!-- Nav Item - User Information --> <!-- Nav Item - User Information -->
<li class="nav-item dropdown no-arrow"> <li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="mr-2 d-none d-lg-inline text-gray-600 small">{{request.user.first_name}} {{request.user.last_name}}</span> <span class="mr-2 d-none d-lg-inline text-gray-600 small">{{request.user.first_name}} {{request.user.last_name}}</span>
<img class="img-profile " src="{{ user.profile.get_photo_url }}"> <img class="img-profile roundimg" src="{{ user.profile.get_photo_url }}">
</a> </a>
<!-- Dropdown - User Information --> <!-- Dropdown - User Information -->
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown"> <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
<a class="dropdown-item" href="{% url 'orga-single' user.pk %}"> <!--<a class="dropdown-item" onclick="userGoToSettings({{user.pk}})" href="{% url 'orga-single' user.pk %}">-->
<a class="dropdown-item" onclick="userGoToSettings()" href="#/">
<i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i> <i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
Orga-Profil Einstellungen
</a>
<a class="dropdown-item" onclick="userGoToNotification()" href="#/">
<i class="fas fa-bell fa-sm fa-fw mr-2 text-gray-400"></i>
Benachrichtigungen
</a> </a>
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
<a class="dropdown-item" href="{% url 'users-logout' %}"> <a class="dropdown-item" href="{% url 'users-logout' %}">
@ -432,7 +440,15 @@
<script type="text/javascript"> <script type="text/javascript">
function userGoToSettings(){
localStorage.setItem('activeTabSettings', "profil");
location.href = "{% url 'dasettings' %}"
}
function userGoToNotification(){
localStorage.setItem('activeTabSettings', "notifications");
location.href = "{% url 'dasettings' %}"
}
function clearSF(){ function clearSF(){
$("#searchcontent").empty(); $("#searchcontent").empty();

View File

@ -40,7 +40,7 @@
{% endif %} {% endif %}
{% if request.user.profile.agency.module_news %} {% if request.user.profile.agency.module_news %}
<div class="card d-block mb-3" style="width: 34.8%"> <div class="card d-block mb-3" style="width: 38%">
<div class="card-body"> <div class="card-body">
<img style="max-height: 400px; max-width: 100%" src="{{ request.user.profile.agency.get_photo_url }}"> <img style="max-height: 400px; max-width: 100%" src="{{ request.user.profile.agency.get_photo_url }}">
</div> </div>
@ -48,9 +48,9 @@
{% endif %} {% endif %}
{% if not request.user.profile.agency.module_news %} {% if not request.user.profile.agency.module_news %}
<div class="card d-block mb-3 mr-3 " style="width: 60%" > <div class="card d-block mb-3 mr-3 " style="width: 60%" >
{% else %} {% else %}
<div class="card d-block mb-3" style="width: 96%"> <div class="card d-block mb-3" style="width: 99%">
{% endif %} {% endif %}
<div class="card-body"> <div class="card-body">
@ -76,7 +76,7 @@
</div> </div>
</div> </div>
{% if not request.user.profile.agency.module_news %} {% if not request.user.profile.agency.module_news %}
<div class="card d-block mb-3" style="width: 34.8%"> <div class="card d-block mb-3" style="width: 38%">
<div class="card-body"> <div class="card-body">
<img style="max-height: 400px; max-width: 100%" src="{{ request.user.profile.agency.get_photo_url }}"> <img style="max-height: 400px; max-width: 100%" src="{{ request.user.profile.agency.get_photo_url }}">
</div> </div>

View File

@ -85,10 +85,10 @@
<ul class=" bg-gray-900 navbar sidebar-dark accordion fixed-top" id="accordionSidebar"> <ul class=" bg-gray-900 navbar sidebar-dark accordion fixed-top" id="accordionSidebar">
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="{% url 'users-dashboard' %}"> <a class="sidebar-brand d-flex align-items-center justify-content-center" href="{% url 'users-dashboard' %}">
<i class="fas fa-laptop" style="margin-top: 0px;"></i>
<div class="sidebar-brand-text mx-3" style="text-align: left;"> <div class="sidebar-brand-text mx-3" style="text-align: left;">
<b> Digitale<br />Agentur</b> <img src="{% static 'users/img/logo.png' %}" style="float: left;" width="10%" class="">
<img src="{% static 'users/img/VVE-Logo.png' %}" style="float: right; " width="3%" class=""> <img src="{% static 'users/img/VVE-Logo.png' %}" style="float: right;" width="3%" class="">
</div> </div>
</a> </a>
</ul> </ul>

View File

@ -9,8 +9,8 @@
{% csrf_token %} {% csrf_token %}
{{form|crispy}} {{form|crispy}}
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-success">Supportanfrage verschicken</button>&nbsp; <button type="submit" class="btn btn-primary">Supportanfrage verschicken</button>&nbsp;
<a href="{% url 'users-dashboard' %}" class="btn btn-success">Abbrechen</a> <a href="{% url 'users-dashboard' %}" class="btn">Abbrechen</a>
</div> </div>
</form> </form>
</div> </div>

View File

@ -14,8 +14,8 @@
{% csrf_token %} {% csrf_token %}
<p>Alle vom Benutzer erstellen Standards werden dem aktuellen Benutzer zugewiesen.<br /><small>(Aktuller Benutzer: {{request.user.pre_name}} {{request.user.last_name}})</small></p> <p>Alle vom Benutzer erstellen Standards werden dem aktuellen Benutzer zugewiesen.<br /><small>(Aktuller Benutzer: {{request.user.pre_name}} {{request.user.last_name}})</small></p>
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-danger">Benutzer löschen</button>&nbsp; <button type="submit" class="btn btn-primary">Benutzer löschen</button>&nbsp;
<a href="{% url 'dasettings' %}" class="btn btn-success">Abbrechen</a> <a href="{% url 'dasettings' %}" class="btn">Abbrechen</a>
</div> </div>
</form> </form>
</div> </div>

View File

@ -7,7 +7,7 @@ from django.contrib.auth.models import Permission
from areas.models import Areas from areas.models import Areas
from tasks.models import Tasks from tasks.models import Tasks
from PIL import Image from PIL import Image
from django.utils.translation import gettext as _
# Standard-User-Formular - NUR Username und Password wird hier genutzt # Standard-User-Formular - NUR Username und Password wird hier genutzt
class UsersAddNewUser(UserCreationForm): class UsersAddNewUser(UserCreationForm):
@ -17,6 +17,13 @@ class UsersAddNewUser(UserCreationForm):
model = User model = User
fields = ['username', 'first_name', 'last_name', 'password1', 'password2', 'email'] fields = ['username', 'first_name', 'last_name', 'password1', 'password2', 'email']
error_messages = {
'email': {
'unique': _("DIE JIBBET SCHON!"),
},
}
# Change logged Users Data (Usernamen an Email) NUR HIER MÖGLICH! # Change logged Users Data (Usernamen an Email) NUR HIER MÖGLICH!
class UsersChangeProfil(forms.ModelForm): class UsersChangeProfil(forms.ModelForm):
email = forms.EmailField() email = forms.EmailField()

View File

@ -276,7 +276,7 @@ def dashboard(request):
# Loading only user same agency # Loading only user same agency
# Change context and return for template-data # Change context and return for template-data
# # Get all Users of the Same Agency as logged user # # Get all Users of the Same Agency as logged user
standards_of_agency = Standards.objects.filter(agency__pk=request.user.profile.agency.pk).filter(public=True).order_by('-last_modified_on')[:5] standards_of_agency = Standards.objects.filter(agency__pk=request.user.profile.agency.pk).filter(public=True).exclude(area=None).exclude(task=None).order_by('-last_modified_on')[:5]
filterdate = datetime.now() filterdate = datetime.now()
news = News.objects.filter(agency__pk=request.user.profile.agency.pk).filter(go_online_on__lt=filterdate).filter(go_offline_on__gt=filterdate).order_by('-go_online_on')[:4] news = News.objects.filter(agency__pk=request.user.profile.agency.pk).filter(go_online_on__lt=filterdate).filter(go_offline_on__gt=filterdate).order_by('-go_online_on')[:4]