Skip to content

Commit

Permalink
Provide a proper unique id and a review state class for the first lev…
Browse files Browse the repository at this point in the history
…el tabs

Fixes #184
  • Loading branch information
ale-rt committed Feb 23, 2019
1 parent a1993c9 commit a5693d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions news/184.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Provide a proper unique id and a review state class for the first level tabs
[ale-rt]
6 changes: 3 additions & 3 deletions plone/app/layout/navigation/navtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ class NavTreeProvider(ContentProviderBase):
)
_item_markup_template = (
u'<li class="{id}{has_sub_class}">'
u'{opener}'
u'<a href="{url}" class="state-{review_state}"{aria_haspopup}>{title}</a>{opener}' # noqa: E 501
u'{sub}'
u'</li>'
Expand Down Expand Up @@ -426,9 +425,10 @@ def navtree(self):
entry = tab.copy()
entry.update({
'path': '/'.join((navtree_path, tab['id'])),
'uid': None,
'review_state': None,
'uid': tab['id'],
})
if 'review_state' not in entry:
entry['review_state'] = None
if 'title' not in entry:
entry['title'] = (
tab.get('name')
Expand Down

0 comments on commit a5693d5

Please sign in to comment.