parent
c331f8e88a
commit
4ab1604773
Binary file not shown.
|
|
@ -28,9 +28,7 @@ DEBUG = True
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['digitale-agentur.com', 'www.digitale-agentur.com', 'localhost']
|
ALLOWED_HOSTS = ['digitale-agentur.com', 'www.digitale-agentur.com', 'localhost']
|
||||||
|
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
'users.apps.UsersConfig',
|
'users.apps.UsersConfig',
|
||||||
'areas.apps.AreasConfig',
|
'areas.apps.AreasConfig',
|
||||||
|
|
@ -170,13 +168,12 @@ LOGIN_REDIRECT_URL = 'users-dashboard'
|
||||||
#STATIC_ROOT = (os.path.join(SITE_ROOT, 'static/'))
|
#STATIC_ROOT = (os.path.join(SITE_ROOT, 'static/'))
|
||||||
|
|
||||||
#DEV-UMBGEUNG
|
#DEV-UMBGEUNG
|
||||||
#STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
|
|
||||||
#SERVER
|
############################# FÜR COMMIT
|
||||||
STATIC_URL = 'users/static/'
|
|
||||||
SITE_ROOT = os.path.dirname(os.path.realpath(__file__)) + '/..'
|
SITE_ROOT = os.path.dirname(os.path.realpath(__file__)) + '/..'
|
||||||
STATIC_ROOT = (os.path.join(SITE_ROOT, 'users/static/'))
|
STATIC_ROOT = (os.path.join(SITE_ROOT, 'users/static/'))
|
||||||
STATICFILES_DIRS = (os.path.join(SITE_ROOT, 'users/static/'))
|
#STATICFILES_DIRS = (os.path.join(SITE_ROOT, 'users/static/'),)
|
||||||
|
|
||||||
# CRISPY
|
# CRISPY
|
||||||
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,29 @@
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Home</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="false">Profile</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" id="contact-tab" data-toggle="tab" href="#contact" role="tab" aria-controls="contact" aria-selected="false">Contact</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="tab-content" id="myTabContent">
|
||||||
|
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">...</div>
|
||||||
|
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">...</div>
|
||||||
|
<div class="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">...</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,67 +0,0 @@
|
||||||
/* global CKEDITOR */
|
|
||||||
;(function() {
|
|
||||||
var el = document.getElementById('ckeditor-init-script');
|
|
||||||
if (el && !window.CKEDITOR_BASEPATH) {
|
|
||||||
window.CKEDITOR_BASEPATH = el.getAttribute('data-ckeditor-basepath');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Polyfill from https://developer.mozilla.org/en/docs/Web/API/Element/matches
|
|
||||||
if (!Element.prototype.matches) {
|
|
||||||
Element.prototype.matches =
|
|
||||||
Element.prototype.matchesSelector ||
|
|
||||||
Element.prototype.mozMatchesSelector ||
|
|
||||||
Element.prototype.msMatchesSelector ||
|
|
||||||
Element.prototype.oMatchesSelector ||
|
|
||||||
Element.prototype.webkitMatchesSelector ||
|
|
||||||
function(s) {
|
|
||||||
var matches = (this.document || this.ownerDocument).querySelectorAll(s),
|
|
||||||
i = matches.length;
|
|
||||||
while (--i >= 0 && matches.item(i) !== this) {}
|
|
||||||
return i > -1;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function runInitialisers() {
|
|
||||||
if (!window.CKEDITOR) {
|
|
||||||
setTimeout(runInitialisers, 100);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
initialiseCKEditor();
|
|
||||||
initialiseCKEditorInInlinedForms();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (document.readyState != 'loading' && document.body) {
|
|
||||||
document.addEventListener('DOMContentLoaded', initialiseCKEditor);
|
|
||||||
runInitialisers();
|
|
||||||
} else {
|
|
||||||
document.addEventListener('DOMContentLoaded', runInitialisers);
|
|
||||||
}
|
|
||||||
|
|
||||||
function initialiseCKEditor() {
|
|
||||||
var textareas = Array.prototype.slice.call(document.querySelectorAll('textarea[data-type=ckeditortype]'));
|
|
||||||
for (var i=0; i<textareas.length; ++i) {
|
|
||||||
var t = textareas[i];
|
|
||||||
if (t.getAttribute('data-processed') == '0' && t.id.indexOf('__prefix__') == -1) {
|
|
||||||
t.setAttribute('data-processed', '1');
|
|
||||||
var ext = JSON.parse(t.getAttribute('data-external-plugin-resources'));
|
|
||||||
for (var j=0; j<ext.length; ++j) {
|
|
||||||
CKEDITOR.plugins.addExternal(ext[j][0], ext[j][1], ext[j][2]);
|
|
||||||
}
|
|
||||||
CKEDITOR.replace(t.id, JSON.parse(t.getAttribute('data-config')));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function initialiseCKEditorInInlinedForms() {
|
|
||||||
document.body.addEventListener('click', function(e) {
|
|
||||||
if (e.target && (
|
|
||||||
e.target.matches('.add-row a') ||
|
|
||||||
e.target.matches('.grp-add-handler')
|
|
||||||
)) {
|
|
||||||
initialiseCKEditor();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}());
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -280,6 +280,7 @@
|
||||||
<script src="{%static 'users/js/sb-admin-2.min.js' %}"></script>
|
<script src="{%static 'users/js/sb-admin-2.min.js' %}"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Page level plugins -->
|
<!-- Page level plugins -->
|
||||||
<!--<script src="vendor/chart.js/Chart.min.js"></script>-->
|
<!--<script src="vendor/chart.js/Chart.min.js"></script>-->
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<h5>Neueste Standards</h5>
|
<h5>Neueste Standards</h5>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<hr>
|
<hr>
|
||||||
<div class="col mt-2">
|
<div class="col mt-2">
|
||||||
{% for item in standards_of_agency %}
|
{% for item in standards_of_agency %}
|
||||||
{% if item.public or item.created_standard_by == user or perms.users.standard_management %}
|
{% if item.public or item.created_standard_by == user or perms.users.standard_management %}
|
||||||
<div class=" mb-4">
|
<div class=" mb-4">
|
||||||
|
|
@ -46,8 +46,8 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor%}
|
{% endfor%}
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col text-right" >
|
||||||
<img class="img-profile" width="75%" src="{{ request.user.profile.agency.agencypic.url }}">
|
<img class="img-profile" width="50%" src="{{ request.user.profile.agency.agencypic.url }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
{% extends "users/base.html" %}
|
||||||
|
{% block content %}
|
||||||
|
<div class="content-section col-12">
|
||||||
|
<h3>Willkommen, {{request.user.first_name}} {{request.user.last_name}}!</h3>
|
||||||
|
<small>Letzter Login: {{ request.user.last_login }}</small>
|
||||||
|
<hr>
|
||||||
|
<h4>Agentur: <b>{{ request.user.profile.agency.name }}</b></h4>
|
||||||
|
<hr>
|
||||||
|
<h5>Neueste Standards</h5>
|
||||||
|
<div class="row">
|
||||||
|
<hr>
|
||||||
|
<div class="col mt-2">
|
||||||
|
{% for item in standards_of_agency %}
|
||||||
|
{% if item.public or item.created_standard_by == user or perms.users.standard_management %}
|
||||||
|
<div class=" mb-4">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
|
||||||
|
<a href="{% url 'standard-single' item.pk%}">
|
||||||
|
{% if item.public %}
|
||||||
|
<h5><u>{{item.name}}</u></h5>
|
||||||
|
{% else %}
|
||||||
|
<h5 class="text-warning"><u>{{item.name}}</u></h5>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
{% if item.created_standard_by == user or perms.users.standard_management %}
|
||||||
|
<div class="dropdown no-arrow">
|
||||||
|
<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
<i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i>
|
||||||
|
</a>
|
||||||
|
<div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink">
|
||||||
|
<!--<div class="dropdown-header">Benutzerdaten</div>-->
|
||||||
|
<a class="dropdown-item" href="{% url 'standard-update' item.pk %}">Bearbeiten</a>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<a class="dropdown-item text-danger" href="{% url 'standard-delete' item.pk %}" >Löschen</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<h6 class="card-title">{{item.created_standard_by.first_name}} {{item.created_standard_by.last_name}} <small>Zuletzt bearbeitet von {{ item.last_modified_by.first_name }} {{ item.last_modified_by.last_name }} am {{ item.last_modified_on }}</small>
|
||||||
|
</h6>
|
||||||
|
<p class="card-text">{{ item.content|truncatechars:80|safe}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor%}
|
||||||
|
</div>
|
||||||
|
<div class="col text-right" >
|
||||||
|
<img class="img-profile" width="50%" src="{{ request.user.profile.agency.agencypic.url }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock content %}
|
||||||
|
|
@ -43,7 +43,7 @@ class AgencyCreateView(CreateView):
|
||||||
# E-Mail für Passwort-Setzung!
|
# E-Mail für Passwort-Setzung!
|
||||||
send_mail(
|
send_mail(
|
||||||
'Agenturanmeldung',
|
'Agenturanmeldung',
|
||||||
'Hallo ' + form.cleaned_data.get('first_name') + ' ' + form.cleaned_data.get('last_name') + '! Bitte setzen sie sich auf localhost:8000/password-reset/ ein Passwort. Anschließend können Sie weitere Details Ihrer Agentur eingeben.',
|
'Hallo ' + form.cleaned_data.get('first_name') + ' ' + form.cleaned_data.get('last_name') + '! Bitte setzen sie sich auf https://digitale-agentur.com/password-reset/ ein Passwort. Anschließend können Sie weitere Details Ihrer Agentur eingeben.',
|
||||||
'support@digitale-agentur.com',
|
'support@digitale-agentur.com',
|
||||||
[form.cleaned_data.get('email')],
|
[form.cleaned_data.get('email')],
|
||||||
fail_silently=False,
|
fail_silently=False,
|
||||||
|
|
@ -107,7 +107,7 @@ class UsersCreateUser(LoginRequiredMixin, CreateView):
|
||||||
# E-Mail für Passwort-Setzung!
|
# E-Mail für Passwort-Setzung!
|
||||||
send_mail(
|
send_mail(
|
||||||
self.request.user.profile.agency.name + ' Anmeldung',
|
self.request.user.profile.agency.name + ' Anmeldung',
|
||||||
'Hallo ' + form.cleaned_data.get('first_name') + ' ' + form.cleaned_data.get('last_name') + '! Bitte setzen sie sich auf localhost:8000/password-reset/ ein Passwort.',
|
'Hallo ' + form.cleaned_data.get('first_name') + ' ' + form.cleaned_data.get('last_name') + '! Bitte setzen sie sich auf https://digitale-agentur.com/password-reset/ ein Passwort.',
|
||||||
'support@digitale-agentur.com',
|
'support@digitale-agentur.com',
|
||||||
[form.cleaned_data.get('email')],
|
[form.cleaned_data.get('email')],
|
||||||
fail_silently=False,
|
fail_silently=False,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue