fixes planning view and add link to create compterendu of the day on dashboard

This commit is contained in:
artus
2018-10-29 20:51:29 +01:00
parent ea04542792
commit 9c14d24dbe
2 changed files with 17 additions and 17 deletions

View File

@@ -26,6 +26,11 @@
Aucune maraude prévue. Aucune maraude prévue.
{% endif %} {% endif %}
</p> </p>
{% if prochaine_maraude.date == date %}
<a href="{% url 'maraudes:create' pk=prochaine_maraude.pk %}" class="card-link text-success">
<span class="oi oi-pencil" title="Rédiger" aria-hidden="true"></span>
<strong>Rédiger le compte-rendu</strong></a>
{% endif %}
<a href="{% url 'maraudes:planning' %}" class="card-link text-primary"> <a href="{% url 'maraudes:planning' %}" class="card-link text-primary">
<span class="oi oi-calendar" title="Calendar" aria-hidden="true"></span> <span class="oi oi-calendar" title="Calendar" aria-hidden="true"></span>
Voir le planning</a> Voir le planning</a>

View File

@@ -19,32 +19,27 @@
{% block page_content %} {% block page_content %}
<form method="post" action="{% url 'maraudes:planning' %}?month={{month}}&year={{year}}"> <form method="post" action="{% url 'maraudes:planning' %}?month={{month}}&year={{year}}">
<input type="submit" id="submit-form" class="hidden" /> <input type="submit" id="submit-form" class="invisible" />
{% csrf_token %} {% csrf_token %}
{{ formset.management_form }} {{ formset.management_form }}
<table class="table table-bordered"> <table class="table table-responsive">
<tr class="active"> <tr class="thead-dark">
{% for weekday in weekdays %}<th>{{weekday}}</th>{% endfor %} {% for weekday in weekdays %}<th>{{weekday}}</th>{% endfor %}
</tr> </tr>
{% for week in weeks %} {% for week in weeks %}
<tr> <tr>
{% for day, form in week %} {% for day, form in week %}
<td style="min-width:5%;" {% if form %}class="{% if form.instance.id %}success{%else%}warning{%endif%}"{% endif %}>{% if day %}{% if form %} <td {% if form %}class="table-{% if form.instance.id %}success{%else%}warning{%endif%}"{% endif %}>
<div class="row"> {% if day %}<strong class="float-left">{{ day }}</strong>
<div class="col-lg-2">{% endif %} {% if form %}
<strong>{{ day }}</strong>
{% if form %}</div>
<div class="col-lg-10">
{% bootstrap_field form.id %} {% bootstrap_field form.id %}
{% bootstrap_field form.date %} {% bootstrap_field form.date %}
{% bootstrap_field form.heure_debut layout="inline" size="small" %} <div class="d-flex form-group row pl-3">
</div> {% bootstrap_field form.heure_debut size="small" show_label=False %}
</div> {% bootstrap_field form.binome size="small" show_label=False %}
<div class="form-horizontal"> {% bootstrap_field form.referent size="small" show_label=False %}
{% bootstrap_field form.binome layout="horizontal" size="small" show_label=False %} </div>
{% bootstrap_field form.referent layout="horizontal" size="small" show_label=False %} {% endif %}
</div>
{% endif %}
{% endif %} {% endif %}
</td> </td>
{% endfor %} {% endfor %}