Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubicweb
Commits
d2cd38749c17
Commit
a470d6c7
authored
Feb 10, 2011
by
Sylvain Thénault
Browse files
[manage view] get etypes first to avoid xhtml validation error if no one found
parent
12aa5cd81ce5
Changes
1
Hide whitespace changes
Inline
Side-by-side
web/views/startup.py
View file @
d2cd3874
...
...
@@ -77,13 +77,14 @@ class ManageView(StartupView):
def
entities
(
self
):
schema
=
self
.
_cw
.
vreg
.
schema
self
.
w
(
u
'<div class="hr"> </div>'
)
self
.
w
(
u
'<h2>%s</h2>
\n
'
%
self
.
_cw
.
_
(
'Browse by entity type'
))
manager
=
self
.
_cw
.
user
.
matching_groups
(
'managers'
)
self
.
w
(
u
'<table class="startup">'
)
self
.
entity_types_table
(
eschema
for
eschema
in
schema
.
entities
()
if
uicfg
.
indexview_etype_section
.
get
(
eschema
)
==
'application'
)
self
.
w
(
u
'</table>'
)
eschemas
=
[
eschema
for
eschema
in
schema
.
entities
()
if
uicfg
.
indexview_etype_section
.
get
(
eschema
)
==
'application'
]
if
eschemas
:
self
.
w
(
u
'<div class="hr"> </div>'
)
self
.
w
(
u
'<h2>%s</h2>
\n
'
%
self
.
_cw
.
_
(
'Browse by entity type'
))
self
.
w
(
u
'<table class="startup">'
)
self
.
entity_types_table
(
eschemas
)
self
.
w
(
u
'</table>'
)
def
entity_types_table
(
self
,
eschemas
):
infos
=
sorted
(
self
.
entity_types
(
eschemas
),
...
...
Write
Preview
Markdown
is supported
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