parent
4ab1604773
commit
ab665481fa
Binary file not shown.
|
|
@ -0,0 +1,4 @@
|
||||||
|
html h1, h2, h3, h4, h5, h6, b, a {
|
||||||
|
font-family: 'Roboto' !important;
|
||||||
|
font-size: 1em !important;
|
||||||
|
}
|
||||||
|
|
@ -24,7 +24,10 @@
|
||||||
<link href="{% static 'users/css/sb-admin-2.css' %}" rel="stylesheet">
|
<link href="{% static 'users/css/sb-admin-2.css' %}" rel="stylesheet">
|
||||||
|
|
||||||
<link href="{% static 'users/css/theme.css' %}" rel="stylesheet">
|
<link href="{% static 'users/css/theme.css' %}" rel="stylesheet">
|
||||||
|
<link href="{% static 'users/css/custom.css' %}" rel="stylesheet">
|
||||||
<!--<link href="{%static 'users/css/bootstrap.min.css' %}" rel="stylesheet">-->
|
<!--<link href="{%static 'users/css/bootstrap.min.css' %}" rel="stylesheet">-->
|
||||||
|
<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
@ -47,9 +50,9 @@
|
||||||
|
|
||||||
<!-- Nav Item - Dashboard -->
|
<!-- Nav Item - Dashboard -->
|
||||||
{% if active_link == 'dashboard' %}
|
{% if active_link == 'dashboard' %}
|
||||||
<li class="nav-item active">
|
<li class="nav-item active">
|
||||||
{% else%}
|
{% else %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
{%endif%}
|
{%endif%}
|
||||||
<a class="nav-link" href="{% url 'users-dashboard' %}">
|
<a class="nav-link" href="{% url 'users-dashboard' %}">
|
||||||
<i class="fas fa-fw fa-tachometer-alt"></i>
|
<i class="fas fa-fw fa-tachometer-alt"></i>
|
||||||
|
|
@ -279,7 +282,7 @@
|
||||||
<!-- Custom scripts for all pages-->
|
<!-- Custom scripts for all pages-->
|
||||||
<script src="{%static 'users/js/sb-admin-2.min.js' %}"></script>
|
<script src="{%static 'users/js/sb-admin-2.min.js' %}"></script>
|
||||||
|
|
||||||
|
<link href="{% static 'users/css/custom.css' %}" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Page level plugins -->
|
<!-- Page level plugins -->
|
||||||
<!--<script src="vendor/chart.js/Chart.min.js"></script>-->
|
<!--<script src="vendor/chart.js/Chart.min.js"></script>-->
|
||||||
|
|
|
||||||
|
|
@ -11,41 +11,13 @@
|
||||||
<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 %}
|
as
|
||||||
<div class=" mb-4">
|
|
||||||
<div class="card">
|
{% endfor %}
|
||||||
<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>
|
</div>
|
||||||
{% 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" >
|
<div class="col text-right" >
|
||||||
<img class="img-profile" width="50%" src="{{ request.user.profile.agency.agencypic.url }}">
|
<img class="img-profile" width="50%" src="{{ request.user.profile.agency.agencypic.url }}">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@ class AgencyCreateView(CreateView):
|
||||||
|
|
||||||
return super().form_valid(form)
|
return super().form_valid(form)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def dashboard(request):
|
def dashboard(request):
|
||||||
|
|
||||||
|
|
@ -63,7 +62,7 @@ def dashboard(request):
|
||||||
# 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).order_by('-last_modified_on')[:10]
|
standards_of_agency = Standards.objects.filter(agency__pk=request.user.profile.agency.pk).order_by('-last_modified_on')[:10]
|
||||||
context.update({'active_link' : 'standards', 'standards_of_agency' : standards_of_agency})
|
context.update({'active_link' : 'dashboard', 'standards_of_agency' : standards_of_agency})
|
||||||
#return context
|
#return context
|
||||||
|
|
||||||
return render (request, 'users/dashboard.html', context)
|
return render (request, 'users/dashboard.html', context)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue