_date_modification.short_description = u'date modification'
_date_modification.admin_order_field = 'date_modification'
-
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
def has_add_permission(self, obj):
return False
+ def has_change_permission(self, request, obj=None):
+ return in_drh_or_admin(request.user)
+
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"
def has_add_permission(self, obj):
return False
+ def has_change_permission(self, request, obj=None):
+ return in_drh_or_admin(request.user)
+
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"