Skip to content

Commit

Permalink
Merge pull request #185 from plone/184-fix-tab-id-and-review-state
Browse files Browse the repository at this point in the history
Provide a proper unique id and a review state class for the first lev…
  • Loading branch information
agitator authored Feb 27, 2019
2 parents 40bb46a + e1e9502 commit a9dfe56
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 a9dfe56

Please sign in to comment.