Organigrammes : standardisation des tableaux
authorJean-Philippe Caissy <jpcaissy@piji.ca>
Wed, 4 Apr 2012 16:39:42 +0000 (11:39 -0500)
committerJean-Philippe Caissy <jpcaissy@piji.ca>
Wed, 4 Apr 2012 16:39:42 +0000 (11:39 -0500)
project/rh/admin.py
project/rh/templates/admin/rh/implantationproxy/change_list.html [new file with mode: 0644]
project/rh/templates/admin/rh/regionproxy/change_list.html [new file with mode: 0644]
project/rh/templates/admin/rh/serviceproxy/change_list.html [new file with mode: 0644]

index 2a8116a..00c06c2 100644 (file)
@@ -968,7 +968,11 @@ class ServiceAdmin(AUFMetadataAdminMixin, admin.ModelAdmin, ArchiveMixin):
 
 class ServiceProxyAdmin(ServiceAdmin):
     list_display = ('nom', '_organigramme')
-    list_display_links = ('nom',)
+    actions = None
+
+    def __init__(self, *args, **kwargs):
+        super(ServiceProxyAdmin, self).__init__(*args, **kwargs)
+        self.list_display_links = (None, )
 
     def has_add_permission(self, obj):
         return False
@@ -983,10 +987,12 @@ class ServiceProxyAdmin(ServiceAdmin):
                 extra_context=extra_context)
 
     def _organigramme(self, obj):
-        return """<a href="%s">Organigramme</a>""" % (reverse('rho_service', args=(obj.id,)))
+        return """<a href="%s"><strong>Organigramme</strong></a>""" % \
+                (reverse('rho_service', args=(obj.id,)))
     _organigramme.allow_tags = True
     _organigramme.short_description = "Organigramme"
 
+
 class StatutAdmin(AUFMetadataAdminMixin, admin.ModelAdmin):
     list_display = ('code', 'nom', '_date_modification', 'user_modification', )
     fieldsets = AUFMetadataAdminMixin.fieldsets + (
@@ -1136,25 +1142,33 @@ class ValeurPointAdmin(AUFMetadataAdminMixin, admin.ModelAdmin):
 
 class ImplantationProxyAdmin(admin.ModelAdmin):
     list_display = ('nom', '_organigramme')
-    list_display_links = ('nom',)
+    actions = None
+
+    def __init__(self, *args, **kwargs):
+        super(ImplantationProxyAdmin, self).__init__(*args, **kwargs)
+        self.list_display_links = (None, )
 
     def has_add_permission(self, obj):
         return False
 
     def _organigramme(self, obj):
-        return """<a href="%s">Organigramme</a>""" % (reverse('rho_implantation', args=(obj.id,)))
+        return """<a href="%s"><strong>Organigramme</strong></a>""" % (reverse('rho_implantation', args=(obj.id,)))
     _organigramme.allow_tags = True
     _organigramme.short_description = "Organigramme"
 
 class RegionProxyAdmin(admin.ModelAdmin):
     list_display = ('nom', '_organigramme')
-    list_display_links = ('nom',)
+    actions = None
+
+    def __init__(self, *args, **kwargs):
+        super(RegionProxyAdmin, self).__init__(*args, **kwargs)
+        self.list_display_links = (None, )
 
     def has_add_permission(self, obj):
         return False
 
     def _organigramme(self, obj):
-        return """<a href="%s">Organigramme</a>""" % (reverse('rho_region', args=(obj.id,)))
+        return """<a href="%s"><strong>Organigramme</strong></a>""" % (reverse('rho_region', args=(obj.id,)))
     _organigramme.allow_tags = True
     _organigramme.short_description = "Organigramme"
 
diff --git a/project/rh/templates/admin/rh/implantationproxy/change_list.html b/project/rh/templates/admin/rh/implantationproxy/change_list.html
new file mode 100644 (file)
index 0000000..441e1e2
--- /dev/null
@@ -0,0 +1,5 @@
+{% extends "alphafilter/change_list.html" %}
+
+{% block content_title %}
+<h1>Organigramme par implantations</h1>
+{% endblock %}
diff --git a/project/rh/templates/admin/rh/regionproxy/change_list.html b/project/rh/templates/admin/rh/regionproxy/change_list.html
new file mode 100644 (file)
index 0000000..5bce329
--- /dev/null
@@ -0,0 +1,5 @@
+{% extends "alphafilter/change_list.html" %}
+
+{% block content_title %}
+<h1>Organigramme par bureau</h1>
+{% endblock %}
diff --git a/project/rh/templates/admin/rh/serviceproxy/change_list.html b/project/rh/templates/admin/rh/serviceproxy/change_list.html
new file mode 100644 (file)
index 0000000..d86718a
--- /dev/null
@@ -0,0 +1,5 @@
+{% extends "alphafilter/change_list.html" %}
+
+{% block content_title %}
+<h1>Organigramme par services</h1>
+{% endblock %}