* 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:
artus40
2017-02-11 18:20:13 +01:00
committed by GitHub
parent 288ca2cc20
commit 0be59a61a7
61 changed files with 665 additions and 525 deletions

View File

@@ -12,7 +12,7 @@ class MaraudeurAdmin(admin.ModelAdmin):
('Informations', {'fields': [('first_name', 'last_name')]}),
]
list_display = ('first_name', 'last_name', 'is_active')
list_display = ('username', 'is_active')

View File

@@ -1,5 +1,16 @@
from django.apps import AppConfig
from website.decorators import Webpage
from .models import Professionnel
class UtilisateursConfig(AppConfig):
name = 'utilisateurs'
utilisateurs = Webpage('utilisateurs',
icon="user",
defaults={
'users': [Professionnel],
'ajax': False,
'title': ('Utilisateurs','app'),
})

View File

@@ -0,0 +1,2 @@
{{ user.first_name }}, {{ user.last_name }}

7
utilisateurs/urls.py Normal file
View File

@@ -0,0 +1,7 @@
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.UtilisateurView.as_view(), name="index"),
]

14
utilisateurs/views.py Normal file
View File

@@ -0,0 +1,14 @@
from django.views import generic
from .apps import utilisateurs
from .models import Professionnel
@utilisateurs
class UtilisateurView(generic.DetailView):
template_name = "utilisateurs/details.html"
model = Professionnel
def get_object(self):
qs = self.get_queryset()
return qs.filter(pk=self.request.user.pk)