Bug Standard veröffentlichen ja nein

kleiner Zahlen
Fixed Navbar TRY
This commit is contained in:
Holger Trampe 2019-12-16 21:19:58 +01:00
parent 11672fb55d
commit b901a749d6
9 changed files with 10 additions and 20 deletions

View File

@ -16,7 +16,7 @@
<input class="form-control" id="tableSearch" size="50" type="text" placeholder="Suche in Tabelle...">
</div>
<div class="table-responsive">
<table class="table">
<table class="table table-hover">
<thead>
<tr>
<th scope="col">Name</th>

View File

@ -17,7 +17,7 @@
<input class="form-control" id="tableSearch" size="50" type="text" placeholder="Suche in Tabelle...">
</div>
<div class="table-responsive">
<table class="table" >
<table class="table table-hover" >
<thead>
<tr>
<th scope="col">Titel</th>

View File

@ -47,15 +47,9 @@
{% endif %}
{% endfor %}
{% getvar as varcounter %}
{% if varcounter > 3%}
<h5 class="card-title">
<a href="{% url 'standard-task' task.pk %}" style="color: #000000;">{{task.name}} ({{varcounter}})</a>
<a href="{% url 'standard-task' task.pk %}" style="color: #000000;">{{task.name}}</a>&nbsp;<small>({{varcounter}})</small>
</h5>
{% else %}
<h5 class="card-title">
<a href="{% url 'standard-task' task.pk %}" style="color: #000000;">{{task.name}}</a>
</h5>
{% endif %}
{% setvar 0 %}
{% for standard in standards_of_agency %}
{% getvar as varcounter %}
@ -76,7 +70,7 @@
<input class="form-control" id="tableSearch" size="20" type="text" placeholder="Suche in Tabelle...">
</div>
<div class="table-responsive">
<table class="table">
<table class="table table-hover">
<thead>
<tr>
<th scope="col">Titel</th>

View File

@ -33,9 +33,7 @@ def StandardAdd(request):
if request.method == 'POST':
normalForm = StandardAddStandard(request.POST, instance=request.user)
editorForm = StandardAddStandardEditor(request.POST, instance=request.user)
if editorForm.is_valid() and normalForm.is_valid():
print(request.POST)
normalForm.agency = request.user.profile.agency
normalForm.created_standard_by = request.user
normalForm.created_standard_date = datetime.now()
@ -57,7 +55,7 @@ def StandardAdd(request):
new_standard.public = normalForm.cleaned_data['public']
new_standard.save()
tempstandardname = normalForm.cleaned_data['name']
if(new_standard.public and request.user.has_perm('standard-management')):
if(new_standard.public and request.user.has_perm('users.standard_management')):
messages.success(request, f'Standard {tempstandardname} hinzugefügt und veröffentlicht.')
else:
new_standard.public = False

View File

@ -17,7 +17,7 @@
<input class="form-control" id="tableSearch" size="50" type="text" placeholder="Suche in Tabelle...">
</div>
<div class="table-responsive">
<table class="table">
<table class="table table-hover">
<thead>
<tr>
<th scope="col">Name</th>

View File

@ -40,7 +40,7 @@
<div id="wrapper">
<!-- Sidebar -->
<ul class="navbar-nav bg-gray-900 sidebar sidebar-dark accordion " id="accordionSidebar">
<ul class="navbar-nav bg-gray-900 sidebar sidebar-dark accordion fixed " id="accordionSidebar">
<!-- Sidebar - Brand -->
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="{% url 'users-dashboard' %}">

View File

@ -9,8 +9,6 @@
{% else %}
<p>Keine Ergebnisse in Standards</p>
{% endif %}
<hr>
<h4>Bereiche</h4>
{% if res_areas|length > 0 %}

View File

@ -20,7 +20,7 @@
<input class="form-control" id="tableSearch" size="50" type="text" placeholder="Suche in Tabelle...">
</div>
<div class="table-responsive">
<table class="table">
<table class="table table-hover">
<thead>
<tr>
<th scope="col">Name</th>