# Copyright (c) 2001-2009 bivio Software, Inc. All rights reserved.
#
# Visit http://www.bivio.biz for more info.
#
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of the
# License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; If not, you may get a copy from:
# http://www.opensource.org/licenses/lgpl-license.html
#
# $Id: header.bview,v 2.12 2010/03/10 22:35:53 moeller Exp $
#
# Page menu_heading parent for all Pet Shop views
#
# Parameters:
view_declare('header_content');
view_put(
header_title => 'bOP Pet Shop Demo',
# Used a few places, so centralize here
header_categories => [
grep(
$_ ne 'UNKNOWN',
sort(map($_->get_name,
Bivio::Type->get_instance('Category')->get_list)),
),
],
header_page_print => 0,
);
view_class_map('HTMLWidget');
view_shortcuts('Bivio::PetShop::ViewShortcuts');
view_main(Page(
Title(['bOP PetShop', view_widget_value('header_title')]),
Join([
Grid([
[
Link(Image('banner2', 'none'), 'MAIN'),
Search({}),
Join([
Link(String('Groupware'), 'SITE_WIKI_VIEW'),
' | ',
Link(String('Cart'), 'CART'),
' | ',
# display varies on logged in user state
If(['auth_user'],
Join([
Link(String('Sign-out'), 'LOGOUT'),
' | ',
Link(String('MyAccount'), 'USER_ACCOUNT_EDIT'),
]),
Link(String('Sign-in'), 'LOGIN'),
),
'
',
vs_blank_cell(),
'
',
Link(Image('bivio_power')->put(align => 'se'),
'http://www.bivio.biz'),
])->put(
cell_align => 'E',
string_font => 'menu_link',
cell_nowrap => 1,
),
],
], {
bgcolor => 'header_background',
expand => 1,
}),
Grid([[
vs_acknowledgement()->put(string_font => 'acknowledgement'),
], [
# The child's content
view_widget_value('header_content'),
]], {
expand => 1,
}),
'