Navbar (#31)
* started workin on 'navbar' module * changed bootstrap theme to bootswatch/Simplex * big work on navbar logic * starting creating menus using navbar * converted app views to new Wepage decorator, updated navbar * reimplemented DernieresMaraudes as a dropdown instead of ContextMixin * reorganised static files, minor code cleanups * turned Link.href into lazy-evaluated property * collapsed 'navbar' module into 'website', dynamic building of ApplicationMenu subclasses * minor cleanup * blah blah blah * added way to add admin/non-admin links * minor style change : red border for active page instead of all dropdowns * deleted file * prepare adding removing menu templates files, being replaced by code * essayé de généraliser le code pour les modaux bootstrap, non testé git status * more preparation and thinking on navbar app_menus logic... * added LinkManager and DropdownManager, getting closer... * small fix in DropdownManager.__get__ * boosted up work: keep it simple so it can be merged fast, major layout changes * added month filter on maraudes:liste * added 'as_icon' filter to display boolean/null values as bootstrap icons * remove inactive user from planning selection * removed all unused 'menu' templates * set up django_select2 to use static files * small fix after review
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
<div class="col-md-12 col-lg-6">
|
||||
{% if maraude.est_terminee %}
|
||||
{% include "compte_rendu/compterendu.html" %}
|
||||
{% else %}
|
||||
{% if perms.maraudes.can_add_compterendu %}<a class="btn btn-primary" href="{% url 'maraudes:create' maraude.pk %}">Écrire le compte-rendu</a>
|
||||
{% else %} <p class="alert alert-info">Le compte-rendu n'a pas encore été écrit</p>{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -11,7 +11,13 @@
|
||||
avec {% if user.is_superuser %}{{prochaine_maraude.binome}}{%else%}{{prochaine_maraude.referent}}{%endif%}.
|
||||
</strong></p>
|
||||
<hr />
|
||||
<p><mark>Informations, notes, rendez-vous ?</mark></p>
|
||||
{% if prochaine_maraude.est_terminee %}
|
||||
<a class="btn btn-sm btn-primary" href="{% url 'maraudes:details' pk=prochaine_maraude.pk %}">
|
||||
Voir le compte-rendu
|
||||
</a>{%else%}
|
||||
<a class="btn btn-sm btn-primary" href="{% url 'maraudes:create' pk=prochaine_maraude.pk %}">
|
||||
Rédiger le compte-rendu
|
||||
</a>{% endif %}
|
||||
{% else %}<p>Aucune maraude prévue.</p>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
{% if object.est_terminee %}
|
||||
<a href="{% url 'maraudes:details' object.id %}" class="btn btn-link">
|
||||
{% else %}
|
||||
<a href="#" class="btn btn-link disabled">
|
||||
{% endif %}
|
||||
{{object.date}}
|
||||
</a>
|
||||
{% if object.est_terminee %}<a href="{% url 'maraudes:details' object.id %}" class="btn btn-link">
|
||||
{% else %}<a href="#" class="btn btn-link disabled">{% endif %}
|
||||
{{object.date}}</a>
|
||||
<div class="pull-right">
|
||||
<span class="label label-info">{{ object.binome }} & {{ object.referent }}</span>
|
||||
{% if object.est_terminee %}
|
||||
<span class="label label-success">{{object.rencontres.count}} rencontres</span>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
{% load bootstrap3 %}
|
||||
{% load tables %}
|
||||
<div class="col-md-12 col-lg-6">
|
||||
<div class="col-lg-10">
|
||||
<div class="panel panel-primary">
|
||||
<!-- Default panel contents -->
|
||||
<div class="panel-heading text-center">
|
||||
<h3 class="panel-title">Maraudes passées</h3>
|
||||
</div>
|
||||
|
||||
<!-- Table -->
|
||||
{% table object_list cols=2 cell_template="maraudes/list_table_cell.html" %}
|
||||
{% table object_list cols=3 cell_template="maraudes/list_table_cell.html" %}
|
||||
{% if is_paginated %}
|
||||
<div class="panel-footer text-center">
|
||||
<ul class="pagination">
|
||||
@@ -20,15 +19,14 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3">
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<div class="panel-heading text-center">
|
||||
<h3 class="panel-title">Filtres</h3>
|
||||
</div>
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item disabled">Vos maraudes seulement</a></li>
|
||||
<a href="#" class="list-group-item disabled">Ce mois-ci</a></li>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Filtrer <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{% url 'maraudes:liste' %}">Pas de filtre</a></li>
|
||||
<li><a href="?filter=month-only">Ce mois-ci</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
{% if user.is_superuser %}{% load bootstrap3 %}
|
||||
<li class="dropdown app-menu"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Administration<b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{% url 'maraudes:planning' %}">{% bootstrap_icon "calendar" %} Planning</a></li>
|
||||
<li><a href="{% url 'admin:app_list' app_label=active_app.label %}">{% bootstrap_icon "wrench" %} Gérer les maraudes</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
@@ -1,15 +0,0 @@
|
||||
{% load bootstrap3 %}
|
||||
<li class="app-menu">
|
||||
<a href="{% url 'maraudes:liste' %}">Liste des maraudes
|
||||
<span class="pull-right">{% bootstrap_icon "list" %}</span></a>
|
||||
</li>
|
||||
{% if dernieres_maraudes %}
|
||||
<li class="dropdown app-menu"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Dernières maraudes <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">{% for m in dernieres_maraudes %}
|
||||
<li><a href="{% url 'maraudes:details' m.pk %}" {% if maraude == m %}style="color:#fff;"{% endif %}>
|
||||
<strong>{{ m }}</strong> <small>{{m.binome}} & {{m.referent}}</small></a>
|
||||
</li>{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user