Skip to content

Commit

Permalink
AdminBar: Move "Navigate" icon into central bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Taverne Sylvain committed Dec 30, 2010
1 parent dbc0ed3 commit 031be19
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions skin_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def tabs(self):
context = self.context
here = context.resource
here_link = context.get_link(here)
is_folder = isinstance(here, Folder)

# Tabs
tabs = []
Expand All @@ -95,8 +96,20 @@ def tabs(self):
'label': view.get_title(context),
'active': active,
'class': active and 'active' or None})
# Manage content
active = context.view_name == 'manage_content'
if is_folder:
icon = '/ui/icons/16x16/folder.png'
name = './;manage_content'
else:
icon = '/ui/common/icons/16x16/parent_folder.png'
name = '../;manage_content'
tabs.append({'name': name,
'label': MSG(u'Navigation'),
'icon': icon,
'class': active and 'active' or None})
# New resources
if isinstance(here, Folder) is True:
if is_folder:
if len(here.get_document_types()) > 0:
active = context.view_name == 'new_resource'
tabs.append({'name': './;new_resource',
Expand Down Expand Up @@ -126,7 +139,6 @@ def edition_tabs(self):
@thingy_lazy_property
def backoffice_tabs(self):
context = self.context
here = context.resource
tabs = []
is_site_root = context.site_root == context.resource
# Go home
Expand All @@ -135,18 +147,6 @@ def backoffice_tabs(self):
'label': MSG(u'Go home'),
'icon': '/ui/icons/16x16/action_home.png',
'class': active and 'active' or None})
# Navigation
active = context.view_name == 'manage_content'
if isinstance(here, Folder) is True:
icon = '/ui/icons/16x16/folder.png'
name = './;manage_content'
else:
icon = '/ui/common/icons/16x16/parent_folder.png'
name = '../;manage_content'
tabs.append({'name': name,
'label': MSG(u'Navigation'),
'icon': icon,
'class': active and 'active' or None})
# New resource
active = is_site_root and context.view_name == 'website_new_resource'
tabs.append({'name': '/;website_new_resource',
Expand Down

0 comments on commit 031be19

Please sign in to comment.