web/uicfg.py
changeset 2234 1fbcf202882d
parent 2126 a25859917ccc
parent 2191 1f0fde12e35b
child 2381 caad2367d940
equal deleted inserted replaced
2209:2b91abd9f5a4 2234:1fbcf202882d
   127         assert isinstance(tag, dict)
   127         assert isinstance(tag, dict)
   128         super(DisplayCtrlRelationTags, self).tag_relation(key, tag)
   128         super(DisplayCtrlRelationTags, self).tag_relation(key, tag)
   129         self._counter += 1
   129         self._counter += 1
   130         tag.setdefault('order', self._counter)
   130         tag.setdefault('order', self._counter)
   131 
   131 
       
   132     def tag_subject_of(self, key, tag):
       
   133         subj, rtype, obj = key
       
   134         if obj != '*':
       
   135             self.warning('using explict target type in display_ctrl.tag_subject_of() '
       
   136                          'has no effect, use (%s, %s, "*") instead of (%s, %s, %s)',
       
   137                          subj, rtype, subj, rtype, obj)
       
   138         super(DisplayCtrlRelationTags, self).tag_subject_of((subj, rtype, '*'), tag)
       
   139 
       
   140     def tag_object_of(self, key, tag):
       
   141         subj, rtype, obj = key
       
   142         if subj != '*':
       
   143             self.warning('using explict subject type in display_ctrl.tag_object_of() '
       
   144                          'has no effect, use ("*", %s, %s) instead of (%s, %s, %s)',
       
   145                          rtype, obj, subj, rtype, obj)
       
   146         super(DisplayCtrlRelationTags, self).tag_object_of(('*', rtype, obj), tag)
   132 
   147 
   133 def init_primaryview_display_ctrl(rtag, sschema, rschema, oschema, role):
   148 def init_primaryview_display_ctrl(rtag, sschema, rschema, oschema, role):
   134     if role == 'subject':
   149     if role == 'subject':
   135         oschema = '*'
   150         oschema = '*'
   136         label = rschema.type
   151         label = rschema.type