imip-agent

Change of imipweb/resource.py

623:b567a5b9a816
imipweb/resource.py
     1.1 --- a/imipweb/resource.py	Thu Jul 30 19:29:10 2015 +0200
     1.2 +++ b/imipweb/resource.py	Thu Jul 30 22:11:56 2015 +0200
     1.3 @@ -90,7 +90,7 @@
     1.4          else:
     1.5              return self.env.new_url(uid)
     1.6  
     1.7 -    # Access to objects.
     1.8 +    # Control naming helpers.
     1.9  
    1.10      def element_identifier(self, name, index=None):
    1.11          return index is not None and "%s-%d" % (name, index) or name
    1.12 @@ -98,6 +98,11 @@
    1.13      def element_name(self, name, suffix, index=None):
    1.14          return index is not None and "%s-%s" % (name, suffix) or name
    1.15  
    1.16 +    def element_enable(self, index=None):
    1.17 +        return index is not None and str(index) or "enable"
    1.18 +
    1.19 +    # Access to objects.
    1.20 +
    1.21      def _get_identifiers(self, path_info):
    1.22          parts = path_info.lstrip("/").split("/")
    1.23          if len(parts) == 1: