web/uicfg.py
branchtls-sprint
changeset 1721 694f6a50e138
parent 1631 8370be19afd7
child 1723 30c3a713ab61
equal deleted inserted replaced
1720:14c9a0a1aca1 1721:694f6a50e138
    48               'is', 'is_instance_of', 'identity',
    48               'is', 'is_instance_of', 'identity',
    49               'owned_by', 'created_by',
    49               'owned_by', 'created_by',
    50               'in_state', 'wf_info_for', 'require_permission',
    50               'in_state', 'wf_info_for', 'require_permission',
    51               'from_entity', 'to_entity',
    51               'from_entity', 'to_entity',
    52               'see_also'):
    52               'see_also'):
    53     rdisplay.tag_relation({}, ('*', rtype, '*'), 'subject')
    53     rdisplay.tag_relation('!*', rtype, '*', {})
    54     rdisplay.tag_relation({}, ('*', rtype, '*'), 'object')
    54     rdisplay.tag_relation('*', rtype, '!*', {})
    55 
    55 
    56 
    56 
    57 # index view configuration ####################################################
    57 # index view configuration ####################################################
    58 # entity type category in the index/manage page. May be one of
    58 # entity type category in the index/manage page. May be one of
    59 # * 'application'
    59 # * 'application'
    67 # autoform.AutomaticEntityForm configuration ##################################
    67 # autoform.AutomaticEntityForm configuration ##################################
    68 
    68 
    69 # relations'category (eg primary/secondary/generic/metadata/generated)
    69 # relations'category (eg primary/secondary/generic/metadata/generated)
    70 rcategories = RelationTags()
    70 rcategories = RelationTags()
    71 # use primary and not generated for eid since it has to be an hidden
    71 # use primary and not generated for eid since it has to be an hidden
    72 rcategories.tag_relation('primary', ('*', 'eid', '*'), 'subject')
    72 rcategories.tag_attribute('*', 'eid', 'primary')
    73 rcategories.tag_relation('primary', ('*', 'in_state', '*'), 'subject')
    73 rcategories.tag_attribute('*', 'description', 'secondary')
    74 rcategories.tag_relation('secondary', ('*', 'description', '*'), 'subject')
    74 rcategories.tag_attribute('*', 'creation_date', 'metadata')
    75 rcategories.tag_relation('metadata', ('*', 'creation_date', '*'), 'subject')
    75 rcategories.tag_attribute('*', 'modification_date', 'metadata')
    76 rcategories.tag_relation('metadata', ('*', 'modification_date', '*'), 'subject')
    76 rcategories.tag_attribute('*', 'has_text', 'generated')
    77 rcategories.tag_relation('metadata', ('*', 'owned_by', '*'), 'subject')
    77 
    78 rcategories.tag_relation('metadata', ('*', 'created_by', '*'), 'subject')
    78 rcategories.tag_relation('!*', 'in_state', '*', 'primary')
    79 rcategories.tag_relation('generated', ('*', 'has_text', '*'), 'subject')
    79 rcategories.tag_relation('!*', 'owned_by', '*', 'metadata')
    80 rcategories.tag_relation('generated', ('*', 'is', '*'), 'subject')
    80 rcategories.tag_relation('!*', 'created_by', '*', 'metadata')
    81 rcategories.tag_relation('generated', ('*', 'is', '*'), 'object')
    81 rcategories.tag_relation('!*', 'is', '*', 'generated')
    82 rcategories.tag_relation('generated', ('*', 'is_instance_of', '*'), 'subject')
    82 rcategories.tag_relation('*', 'is', '!*', 'generated')
    83 rcategories.tag_relation('generated', ('*', 'is_instance_of', '*'), 'object')
    83 rcategories.tag_relation('!*', 'is_instance_of', '*', 'generated')
    84 rcategories.tag_relation('generated', ('*', 'identity', '*'), 'subject')
    84 rcategories.tag_relation('*', 'is_instance_of', '!*', 'generated')
    85 rcategories.tag_relation('generated', ('*', 'identity', '*'), 'object')
    85 rcategories.tag_relation('!*', 'identity', '*', 'generated')
    86 rcategories.tag_relation('generated', ('*', 'require_permission', '*'), 'subject')
    86 rcategories.tag_relation('*', 'identity', '!*', 'generated')
    87 rcategories.tag_relation('generated', ('*', 'wf_info_for', '*'), 'subject')
    87 rcategories.tag_relation('!*', 'require_permission', '*', 'generated')
    88 rcategories.tag_relation('generated', ('*', 'wf_info_for', '*'), 'object')
    88 rcategories.tag_relation('!*', 'wf_info_for', '*', 'generated')
    89 rcategories.tag_relation('generated', ('*', 'for_user', '*'), 'subject')
    89 rcategories.tag_relation('*', 'wf_info_for', '!*', 'generated')
    90 rcategories.tag_relation('generated', ('*', 'for_user', '*'), 'object')
    90 rcategories.tag_relation('!*', 'for_user', '*', 'generated')
       
    91 rcategories.tag_relation('*', 'for_user', '!*', 'generated')
    91 
    92 
    92 # relations'field class
    93 # relations'field class
    93 rfields = RelationTags()
    94 rfields = RelationTags()
    94 
    95 
    95 # relations'widget class
    96 # relations'widget class
    97 
    98 
    98 # inlined view flag for non final relations: when True for an entry, the
    99 # inlined view flag for non final relations: when True for an entry, the
    99 # entity(ies) at the other end of the relation will be editable from the
   100 # entity(ies) at the other end of the relation will be editable from the
   100 # form of the edited entity
   101 # form of the edited entity
   101 rinlined = RelationTags()
   102 rinlined = RelationTags()
   102 rinlined.tag_relation(True, ('*', 'use_email', '*'), 'subject')
   103 rinlined.tag_relation('!*', 'use_email', '*', True)
   103 
   104 
   104 
   105 
   105 # set of tags of the form <action>_on_new on relations. <action> is a
   106 # set of tags of the form <action>_on_new on relations. <action> is a
   106 # schema action (add/update/delete/read), and when such a tag is found
   107 # schema action (add/update/delete/read), and when such a tag is found
   107 # permissions checking is by-passed and supposed to be ok
   108 # permissions checking is by-passed and supposed to be ok
   110 
   111 
   111 # boxes.EditBox configuration #################################################
   112 # boxes.EditBox configuration #################################################
   112 
   113 
   113 # 'link' / 'create' relation tags, used to control the "add entity" submenu
   114 # 'link' / 'create' relation tags, used to control the "add entity" submenu
   114 rmode = RelationTags()
   115 rmode = RelationTags()
   115 rmode.tag_relation('link', ('*', 'is', '*'), 'subject')
   116 rmode.tag_relation('!*', 'is', '*', 'link')
   116 rmode.tag_relation('link', ('*', 'is', '*'), 'object')
   117 rmode.tag_relation('*', 'is', '!*', 'link')
   117 rmode.tag_relation('link', ('*', 'is_instance_of', '*'), 'subject')
   118 rmode.tag_relation('!*', 'is_instance_of', '*', 'link')
   118 rmode.tag_relation('link', ('*', 'is_instance_of', '*'), 'object')
   119 rmode.tag_relation('*', 'is_instance_of', '!*', 'link')
   119 rmode.tag_relation('link', ('*', 'identity', '*'), 'subject')
   120 rmode.tag_relation('!*', 'identity', '*', 'link')
   120 rmode.tag_relation('link', ('*', 'identity', '*'), 'object')
   121 rmode.tag_relation('*', 'identity', '!*', 'link')
   121 rmode.tag_relation('link', ('*', 'owned_by', '*'), 'subject')
   122 rmode.tag_relation('!*', 'owned_by', '*', 'link')
   122 rmode.tag_relation('link', ('*', 'created_by', '*'), 'subject')
   123 rmode.tag_relation('!*', 'created_by', '*', 'link')
   123 rmode.tag_relation('link', ('*', 'require_permission', '*'), 'subject')
   124 rmode.tag_relation('!*', 'require_permission', '*', 'link')
   124 rmode.tag_relation('link', ('*', 'wf_info_for', '*'), 'subject')
   125 rmode.tag_relation('!*', 'wf_info_for', '*', 'link')
   125 rmode.tag_relation('link', ('*', 'wf_info_for', '*'), 'object')
   126 rmode.tag_relation('*', 'wf_info_for', '!*', 'link')