Skip to content

Commit

Permalink
Fix contentmenu template for add new content types. Added a more sane…
Browse files Browse the repository at this point in the history
… way to label with a class the li tags in the Plone toolbar. Thi fix last commit errors.
  • Loading branch information
sneridagh authored and bloodbare committed Oct 9, 2014
1 parent f2c1166 commit 28d051f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion plone/app/contentmenu/contentmenu.pt
Expand Up @@ -145,4 +145,4 @@
</li>
</tal:moreoptions>

</tal:contentactionmenus>
</tal:contentactionmenus>
16 changes: 10 additions & 6 deletions plone/app/contentmenu/menu.py
Expand Up @@ -60,7 +60,7 @@ class ActionsSubMenuItem(BrowserSubMenuItem):
extra = {
'id': 'plone-contentmenu-actions',
'level': 1,
'class': 'content-action'
'li_class': 'plonetoolbar-content-action'
}

def __init__(self, context, request):
Expand Down Expand Up @@ -147,7 +147,8 @@ def extra(self):
return {
'id': 'plone-contentmenu-display',
'disabled': self.disabled(),
'level': 1
'level': 1,
'li_class': 'plonetoolbar-display-view'
}

@property
Expand Down Expand Up @@ -507,7 +508,9 @@ def __init__(self, context, request):

@property
def extra(self):
return {'id': 'plone-contentmenu-factories', 'level': 0}
return {'id': 'plone-contentmenu-factories',
'level': 0,
'li_class': 'plonetoolbar-contenttype'}

@property
def action(self):
Expand Down Expand Up @@ -677,7 +680,8 @@ def extra(self):
'class': 'state-%s' % state,
'state': state,
'stateTitle': stateTitle,
'level': 0}
'level': 0,
'li_class': 'plonetoolbar-workfow-transition'}

@property
def description(self):
Expand Down Expand Up @@ -756,7 +760,7 @@ def getMenuItems(self, context, request):
if action['category'] != 'workflow':
continue

cssClass = 'workfow-transition'
cssClass = ''
actionUrl = action['url']
if actionUrl == "":
actionUrl = '%s/content_status_modify?workflow_action=%s' % (
Expand Down Expand Up @@ -845,7 +849,7 @@ def __init__(self, context, request):
@property
def extra(self):
return {'id': 'plone-contentmenu-portetmanager',
'class': 'portlet-manager',
'li_class': 'plonetoolbar-portlet-manager',
'level': 1}

@property
Expand Down

1 comment on commit 28d051f

@mister-roboto
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TESTS PASSED
Mr.Roboto url : http://jenkins.plone.org/roboto/get_info?push=6105428746ab4cabab3a3e13125ac175
[SUCCESS] kgs-plone.app.contentmenu-plone-5.0-python-2.7 kgs

Please sign in to comment.