Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
seda
Commits
2868b0e02676
Commit
d8eff697
authored
May 27, 2016
by
Sylvain Thénault
Browse files
[ui] Generate rules for seda_relationship automatically
parent
6ae346cc2636
Changes
3
Hide whitespace changes
Inline
Side-by-side
views/dataobject.py
View file @
2868b0e0
...
...
@@ -114,9 +114,6 @@ for etype in ('SEDABinaryDataObject', 'SEDAPhysicalDataObject'):
rec
.
tag_object_of
((
'*'
,
'seda_data_object_version_from'
,
etype
),
{
'rvid'
:
'seda.reledit.complexlink'
,
'novalue_label'
:
_
(
'<unauthorized>'
)})
# in its own tab
afs
.
tag_object_of
((
'*'
,
'seda_relationship'
,
etype
),
'main'
,
'hidden'
)
pvs
.
tag_object_of
((
'*'
,
'seda_relationship'
,
etype
),
'hidden'
)
def
uri_cardinality_vocabulary
(
form
,
field
):
...
...
views/uicfg.py
View file @
2868b0e0
...
...
@@ -903,7 +903,7 @@ afs.tag_object_of(('*', 'seda_custodial_history_file', '*'), 'main', 'inlined')
afs
.
tag_subject_of
((
'*'
,
'seda_when'
,
'*'
),
'main'
,
'hidden'
)
afs
.
tag_object_of
((
'*'
,
'seda_when'
,
'*'
),
'main'
,
'inlined'
)
afs
.
tag_subject_of
((
'*'
,
'seda_relationship'
,
'*'
),
'main'
,
'hidden'
)
afs
.
tag_object_of
((
'*'
,
'seda_relationship'
,
'*'
),
'main'
,
'
inlined
'
)
afs
.
tag_object_of
((
'*'
,
'seda_relationship'
,
'*'
),
'main'
,
'
hidden
'
)
afs
.
tag_subject_of
((
'*'
,
'seda_data_object_version_from'
,
'*'
),
'main'
,
'hidden'
)
afs
.
tag_object_of
((
'*'
,
'seda_data_object_version_from'
,
'*'
),
'main'
,
'inlined'
)
afs
.
tag_object_of
((
'*'
,
'seda_data_object_version_to'
,
'*'
),
'main'
,
'hidden'
)
...
...
@@ -1025,6 +1025,8 @@ pvs.tag_subject_of(('*', 'seda_binary_data_object', '*'), 'hidden')
pvs
.
tag_object_of
((
'*'
,
'seda_binary_data_object'
,
'*'
),
'hidden'
)
pvs
.
tag_subject_of
((
'*'
,
'seda_physical_data_object'
,
'*'
),
'hidden'
)
pvs
.
tag_object_of
((
'*'
,
'seda_physical_data_object'
,
'*'
),
'hidden'
)
pvs
.
tag_subject_of
((
'*'
,
'seda_relationship'
,
'*'
),
'hidden'
)
pvs
.
tag_object_of
((
'*'
,
'seda_relationship'
,
'*'
),
'hidden'
)
pvs
.
tag_subject_of
((
'*'
,
'seda_creating_application_name'
,
'*'
),
'hidden'
)
pvs
.
tag_object_of
((
'*'
,
'seda_creating_application_name'
,
'*'
),
'hidden'
)
pvs
.
tag_subject_of
((
'*'
,
'seda_creating_application_version'
,
'*'
),
'hidden'
)
...
...
xsd2uicfg.py
View file @
2868b0e0
...
...
@@ -31,6 +31,7 @@ LEVEL_ETYPES = set(('SEDABinaryDataObjectType', 'SEDAPhysicalDataObjectType',
RTYPES_IN_TAB
=
set
((
'seda_binary_data_object'
,
'seda_physical_data_object'
,
'seda_relationship'
,
))
for
element_name
in
(
'CodeListVersions'
,
'FormatIdentification'
,
'FileInfo'
):
for
rtype
,
role
,
path
in
XSDM_MAPPING
.
iter_rtype_role
(
element_name
):
...
...
@@ -121,6 +122,9 @@ class UICFGGenerator(CodeGenerator):
yield
mapping
.
rtype
,
'subject'
,
{
'label'
:
'value'
}
def
primaryview_section_for_rdef_mapping
(
self
,
mapping
):
if
(
'pvs'
,
mapping
.
rtype
)
in
self
.
_processed
:
return
self
.
_processed
.
add
((
'pvs'
,
mapping
.
rtype
))
if
mapping
.
rtype
in
RTYPES_IN_TAB
:
section
=
'hidden'
role
=
mapping
.
composite
or
'subject'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment