GitIgnore hinzugefügt um sicherzustellen, dass die Ordner MIGRATIONS nicht mehr überschrieben werden. Damit sollte das anpassen der Datenbank mit makemigrations und migrate ausreichen
This commit is contained in:
parent
7629ff151a
commit
eb06b38d0a
|
|
@ -11,16 +11,15 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
var data = [
|
var data = [
|
||||||
{ 'id': 'parent', 'role': 'Agentur {{request.user.profile.agency.name}}', 'color': '#71AF17' },
|
{ 'id': 'parent', 'role': "", 'name': 'Agentur {{request.user.profile.agency.name}}', 'color': '#71AF17', "imageUrl": "{{ request.user.profile.agency.agencypic.url }}", },
|
||||||
{% for u in agencyuser %}
|
{% for u in agencyuser %}
|
||||||
{% if u.profile.parent == u %}
|
{% if u.profile.parent == u %}
|
||||||
{ 'id': '{{u.pk}}', 'role': '{{u.first_name}} {{u.last_name}}\n{{u.profile.get_func_display}}', 'manager': 'parent', 'color': '#1859B7' },
|
{ 'id': '{{u.pk}}' , 'name': "{{u.first_name}} {{u.last_name}}",'role': '{{u.profile.get_func_display}}\n{{u.profile.compfunc}}', 'manager': 'parent', 'color': '#1859B7', "imageUrl": "{{u.profile.image.url}}" },
|
||||||
{% else %}
|
{% else %}
|
||||||
{ 'id': '{{u.pk}}', 'role': '{{u.first_name}} {{u.last_name}}\n{{u.profile.get_func_display}}', 'manager': '{{u.profile.parent.pk}}', 'color': '#1859B7', "imageUrl": "{{u.profile.image}}" },
|
{ 'id': '{{u.pk}}', 'name': "{{u.first_name}} {{u.last_name}}", 'role': '{{u.profile.get_func_display}}\n{{u.profile.compfunc}}', 'manager': '{{u.profile.parent.pk}}', 'color': '#1859B7', "imageUrl": "{{u.profile.image.url }}" },
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
];
|
];/*
|
||||||
console.log(data)
|
|
||||||
var items = new ej.data.DataManager(data);
|
var items = new ej.data.DataManager(data);
|
||||||
var diagram = new ej.diagrams.Diagram({
|
var diagram = new ej.diagrams.Diagram({
|
||||||
width: "1400px",
|
width: "1400px",
|
||||||
|
|
@ -52,7 +51,7 @@ diagram.appendTo('#diagram');
|
||||||
|
|
||||||
function nodeDefaults(node) {
|
function nodeDefaults(node) {
|
||||||
node.annotations[0].style.color = "white";
|
node.annotations[0].style.color = "white";
|
||||||
node.annotations[0].style.size = "2em";
|
node.annotations[0].style.font = "2em";
|
||||||
node.width = 220;
|
node.width = 220;
|
||||||
node.height = 120;
|
node.height = 120;
|
||||||
return node;
|
return node;
|
||||||
|
|
@ -68,6 +67,7 @@ function connectorDefaults(connector) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Funtion to add the Template of the Node.
|
//Funtion to add the Template of the Node.
|
||||||
|
|
||||||
function setNodeTemplate(obj, diagram) {
|
function setNodeTemplate(obj, diagram) {
|
||||||
// create the stack panel
|
// create the stack panel
|
||||||
var content = new ej.diagrams.StackPanel();
|
var content = new ej.diagrams.StackPanel();
|
||||||
|
|
@ -106,5 +106,80 @@ function setNodeTemplate(obj, diagram) {
|
||||||
content.children = [image, innerStack];
|
content.children = [image, innerStack];
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
var items = new ej.data.DataManager(data);
|
||||||
|
|
||||||
|
var diagram = new ej.diagrams.Diagram({
|
||||||
|
width: "1000px", height: "600px",
|
||||||
|
dataSourceSettings: {
|
||||||
|
// set the unique field from data source
|
||||||
|
id: 'id',
|
||||||
|
// set the field which is used to identify the reporting person
|
||||||
|
parentId: 'manager',
|
||||||
|
// define the employee data
|
||||||
|
dataManager: items
|
||||||
|
},
|
||||||
|
layout: {
|
||||||
|
// set the layout type
|
||||||
|
type: 'OrganizationalChart',
|
||||||
|
},
|
||||||
|
getConnectorDefaults: connectorDefaults,
|
||||||
|
setNodeTemplate: setNodeTemplate,
|
||||||
|
// hide the gridlines in the diagram
|
||||||
|
snapSettings: { constraints: ej.diagrams.SnapConstraints.None }
|
||||||
|
});
|
||||||
|
diagram.appendTo('#diagram');
|
||||||
|
|
||||||
|
//Define the common settings for connectors.
|
||||||
|
function connectorDefaults(connector) {
|
||||||
|
connector.targetDecorator.shape = 'None';
|
||||||
|
connector.type = 'Orthogonal';
|
||||||
|
connector.style.strokeColor = 'gray';
|
||||||
|
return connector;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Funtion to add the Template of the Node.
|
||||||
|
function setNodeTemplate(obj, diagram) {
|
||||||
|
// create the stack panel
|
||||||
|
var content = new ej.diagrams.StackPanel();
|
||||||
|
content.id = obj.id + '_outerstack';
|
||||||
|
content.orientation = 'Horizontal';
|
||||||
|
content.style.strokeColor = 'gray';
|
||||||
|
content.padding = { left: 5, right: 10, top: 5, bottom: 5 };
|
||||||
|
|
||||||
|
// create the image element to map the image data from the data source
|
||||||
|
var image = new ej.diagrams.ImageElement();
|
||||||
|
image.id = obj.id + '_pic';
|
||||||
|
image.width = 50; image.height = 50; image.style.strokeColor = 'none';
|
||||||
|
image.source = obj.data.imageUrl;
|
||||||
|
|
||||||
|
// create the stack panel to append the text elements.
|
||||||
|
var innerStack = new ej.diagrams.StackPanel();
|
||||||
|
innerStack.style.strokeColor = 'none';
|
||||||
|
innerStack.margin = { left: 5, right: 0, top: 0, bottom: 0 };
|
||||||
|
innerStack.id = obj.id + '_innerstack';
|
||||||
|
|
||||||
|
// create the text element to map the name data from the data source
|
||||||
|
var text = new ej.diagrams.TextElement();
|
||||||
|
text.style.bold = true;
|
||||||
|
text.fontSize = 16;
|
||||||
|
text.id = obj.id + '_name';
|
||||||
|
text.content = obj.data.name;
|
||||||
|
|
||||||
|
// create the text element to map the role data from the data source
|
||||||
|
var desigText = new ej.diagrams.TextElement();
|
||||||
|
desigText.id = obj.id + '_desig';
|
||||||
|
desigText.content = obj.data.role;
|
||||||
|
|
||||||
|
// append the text elements
|
||||||
|
innerStack.children = [text, desigText];
|
||||||
|
|
||||||
|
// append the image and inner stack elements
|
||||||
|
content.children = [image, innerStack];
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,61 +0,0 @@
|
||||||
{% extends "users/base.html" %}
|
|
||||||
{% load crispy_forms_tags %}
|
|
||||||
{% block content %}
|
|
||||||
<div class="content-section">
|
|
||||||
<div class="media">
|
|
||||||
<img class="img-profile " width="17%" src="{{ user.image.url }}">
|
|
||||||
<div class="media-body col-5">
|
|
||||||
<h2 class="account-heading">ddddProfil von {{ user.first_name }} {{ user.last_name }}</h2>
|
|
||||||
<hr>
|
|
||||||
<div class="row mt-2">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<h6><b>Name</b></h6>
|
|
||||||
<p>
|
|
||||||
{{ user.first_name}} {{ user.last_name }}
|
|
||||||
</p>
|
|
||||||
<h6><b>E-Mail</b></h6>
|
|
||||||
<p>
|
|
||||||
{{ user.email }}
|
|
||||||
</p>
|
|
||||||
<h6><b>Agenturfunktion</b></h6>
|
|
||||||
<p>
|
|
||||||
{{ get_func_display }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<h6><b>Tätigkeit</b></h6>
|
|
||||||
<p>
|
|
||||||
{{ compfunc }}
|
|
||||||
</p>
|
|
||||||
<h6><b>Fesetznetz</b></h6>
|
|
||||||
<p>
|
|
||||||
{{ phoneland }}
|
|
||||||
</p>
|
|
||||||
<h6><b>Mobil</b></h6>
|
|
||||||
<p>
|
|
||||||
{{ phonemobile }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Für das Speichern der Bilder enctype -->
|
|
||||||
<div class="col-7 mt-5">
|
|
||||||
<form method="POST" enctype="multipart/form-data">
|
|
||||||
{% csrf_token %}
|
|
||||||
<fieldset class="form-group">
|
|
||||||
<legend class="border-bottom mb-4">
|
|
||||||
Profil bearbeiten
|
|
||||||
</legend>
|
|
||||||
<!-- FORMS LADEN -->
|
|
||||||
{{ profileform_form|crispy }}
|
|
||||||
</fieldset>
|
|
||||||
<hr>
|
|
||||||
<div class="form-group">
|
|
||||||
<button type="submit" class="btn btn-success">Speichern</button>
|
|
||||||
<a href="{% url 'usersmanagement' %}" class="btn">Abbrechen</a>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock content %}
|
|
||||||
|
|
@ -57,8 +57,6 @@ class AgencyCreateView(CreateView):
|
||||||
)
|
)
|
||||||
return super().form_valid(form)
|
return super().form_valid(form)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def dashboard(request):
|
def dashboard(request):
|
||||||
|
|
||||||
|
|
@ -69,7 +67,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('-created_standard_date')[:10]
|
standards_of_agency = Standards.objects.filter(agency__pk=request.user.profile.agency.pk).filter(public=True).order_by('-created_standard_date')[: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]
|
||||||
|
|
@ -126,9 +124,6 @@ class UsersCreateUser(LoginRequiredMixin, CreateView):
|
||||||
html_message=msg_html,
|
html_message=msg_html,
|
||||||
fail_silently=False,
|
fail_silently=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return super().form_valid(form)
|
return super().form_valid(form)
|
||||||
|
|
||||||
# USER muss eingeloggt sein, um diese Seite zu sehen
|
# USER muss eingeloggt sein, um diese Seite zu sehen
|
||||||
|
|
@ -426,10 +421,6 @@ def GlobalSearch(request):
|
||||||
final_results_st.append(tempele)
|
final_results_st.append(tempele)
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return JsonResponse({'standards' : final_results_st})
|
return JsonResponse({'standards' : final_results_st})
|
||||||
else:
|
else:
|
||||||
return HttpResponse("Request method is not a GET")
|
return HttpResponse("Request method is not a GET")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue