web/uicfg.py
changeset 3629 559cad62c786
parent 3503 06bced8edddf
parent 3597 de066e1b4c36
child 3655 af86ab65a282
equal deleted inserted replaced
3590:1b0dbcf4b214 3629:559cad62c786
   282             elif sschema.is_metadata(rschema):
   282             elif sschema.is_metadata(rschema):
   283                 sectdict['main'] = 'metadata'
   283                 sectdict['main'] = 'metadata'
   284             else:
   284             else:
   285                 card, composed = _card_and_comp(sschema, rschema, oschema, role)
   285                 card, composed = _card_and_comp(sschema, rschema, oschema, role)
   286                 if card in '1+':
   286                 if card in '1+':
   287                     if not rschema.is_final() and composed:
   287                     sectdict['main'] = 'attributes'
   288                         # XXX why? probably because we want it unlined, though
   288                     if not 'muledit' in sectdict:
   289                         # this is not the case by default
   289                         sectdict['muledit'] = 'attributes'
   290                         sectdict['main'] = 'hidden'
       
   291                     else:
       
   292                         sectdict['main'] = 'attributes'
       
   293                         if not 'muledit' in sectdict:
       
   294                             sectdict['muledit'] = 'attributes'
       
   295                 elif rschema.is_final():
   290                 elif rschema.is_final():
   296                     sectdict['main'] = 'attributes'
   291                     sectdict['main'] = 'attributes'
   297                 else:
   292                 else:
   298                     sectdict['main'] = 'relations'
   293                     sectdict['main'] = 'relations'
   299         if not 'muledit' in sectdict:
   294         if not 'muledit' in sectdict:
   400                         and not rschema.has_perm(entity._cw, 'delete', toeid=eid,
   395                         and not rschema.has_perm(entity._cw, 'delete', toeid=eid,
   401                                                  fromeid=entity.related(rschema.type, role)[0][0])):
   396                                                  fromeid=entity.related(rschema.type, role)[0][0])):
   402                         continue
   397                         continue
   403             yield (rschema, targetschemas, role)
   398             yield (rschema, targetschemas, role)
   404 
   399 
   405 
       
   406 autoform_section = AutoformSectionRelationTags('autoform_section')
   400 autoform_section = AutoformSectionRelationTags('autoform_section')
   407 
   401 
   408 # relations'field class
   402 # relations'field class
   409 autoform_field = RelationTags('autoform_field')
   403 autoform_field = RelationTags('autoform_field')
   410 
   404