Fixed conflict
authorJean-Philippe Caissy <jpcaissy@piji.ca>
Tue, 10 Apr 2012 21:03:12 +0000 (16:03 -0500)
committerJean-Philippe Caissy <jpcaissy@piji.ca>
Tue, 10 Apr 2012 21:03:12 +0000 (16:03 -0500)
1  2 
project/rh/admin.py

@@@ -969,14 -930,9 +969,13 @@@ class ServiceAdmin(AUFMetadataAdminMixi
      _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
@@@ -1155,8 -1107,11 +1157,11 @@@ class ImplantationProxyAdmin(admin.Mode
      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"
  
@@@ -1171,8 -1122,11 +1176,11 @@@ class RegionProxyAdmin(admin.ModelAdmin
      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"