Div. Dinge

This commit is contained in:
holger.trampe 2021-03-25 17:04:25 +01:00
parent f7247e14ab
commit 38d24c5612
6 changed files with 33 additions and 10 deletions

View File

@ -137,7 +137,8 @@
<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">
{% if perms.users.standardgopublic %}
{% getUnpubStandards request.user as standardUnPubCount %}
{% if standardUnPubCount > 0 %}
{% if standard.public %}
<a class="dropdown-item" href="{% url 'standard-status' standard.pk %}">Veröffentlichung aufheben</a>
{% else %}

View File

@ -84,7 +84,6 @@ def getAbsenceAsks(user):
return unconfirmedab
# WORKDAY HISTORY
# TASK: Hier flag prüfen, ob der User selbst den Tag bearbeitet hat - aktuell werden nur fremde Änderugnen angezeigt
@register.simple_tag
def getWorkDayHistory(workday):
workday = Workday.objects.get(pk=workday.pk)

View File

@ -39,6 +39,11 @@
</div>
</div>
<hr>
<div class="row" >
<div class="col-12">
{{form.confirm_info|as_crispy_field}}
</div>
</div>
<div class="row">
<!--
<div class="col-12">
@ -64,12 +69,31 @@
-->
<!-- TODO: Hier das Design so machen, dass es wie bei Basti aussieht mit Profilbild und den Infos, was verändert wurde-->
<div class="col-12">
<style type="text/css">
.roundimg_ab {
border-radius: 50%;
}
</style>
<h5>Bearbeitungsverlauf</h5>
{% for historyele in absence.history.all %}
<p><small>Von {{historyele.history_user.get_full_name}} am {{historyele.history_date|date:"d.m.Y H:i"}}</small>
{{historyele.confirm_info}}
{{historyele.confirm_status}}
</p>
<hr>
<div class="row">
<div class="col-2">
<img style="width:100%" class="img-profile roundimg_ab ml-2" src="{{ request.user.profile.get_photo_url }}">
</div>
<div class="col">
<small>{{historyele.history_user.get_full_name}} am {{historyele.history_date|date:"d.m.Y, H:i"}}
<br />
{% if historyele.confirm_status == 0 %}
Angenommen {% if historyele.confirm_info|length > 0 %}| Begründung: {{historyele.confirm_info}} {% endif %}
{% elif historyele.confirm_status == 1 %}
in Bearbeitung {% if historyele.confirm_info|length > 0 %}| Begründung: {{historyele.confirm_info}} {% endif %}
{% else %}
Abgelehnt
{% endif %}
</small>
</div>
</div>
{% endfor %}
</div>
</div>
@ -152,7 +176,7 @@
$("#id_info").val("{{absence.info}}");
$("#id_info").prop("disabled", true);
$("#id_confirm_info").val("{{absence.confirm_info}}");
$("#id_confirm_info").prop("disabled", true);
//$("#id_confirm_info").prop("disabled", true);
date_start = "{{start}}";
date_end = "{{end}}";

View File

@ -110,7 +110,7 @@ def AbsenceUpdate(request, pk):
absence.endday_info = str(formtocheck.cleaned_data["endday_info"])
absence.reason = formtocheck.cleaned_data["reason"]
#absence.info = formtocheck.cleaned_data["info"]
#absence.confirm_info = formtocheck.cleaned_data["confirm_info"]
absence.confirm_info = formtocheck.cleaned_data["confirm_info"]
rep = None
if(formtocheck.cleaned_data["representator"] != None):

View File

@ -163,7 +163,6 @@
Agentur
</div>
{% getUnpubStandards request.user as standardUnPubCount %}
{% if active_link == 'standards' %}
<li class="nav-item active">