# Copyright (c) 2006-2008 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: TaskMenu.bunit,v 1.19 2010/06/27 23:27:58 nagler Exp $ Widget({ view_class_map => 'XHTMLWidget', setup_render => sub { my($req, undef, undef, undef, $object) = @_; my($t) = $object->get('task_map')->[0]->get('_task_menu_cfg') ->{task_id}; $req->server_redirect($t) if $t; return; }, }); req()->set_realm_and_user(qw(demo guest)); [ [[vs_new(qw(XLink back_to_top))]] => '
', [[qw(SITE_ROOT)]] => qr{}i, [[[qw(SITE_ROOT site_name)]]] => qr{}, [[{ task_id => 'SITE_ROOT', label => 'site_name', }]] => qr{}, [[ { task_id => 'SITE_ROOT', path_info => '/x', }, { task_id => 'SITE_ROOT', path_info => undef, }, ], { selected_item => sub { my($widget, $source) = @_; return $widget->render_simple_attr(href => $source) eq '/'; }, }] => qr{task_menu.*href="/x".*class="want_sep selected" href="/">}s, [[{ task_id => 'SITE_ROOT', path_info => '/x', }]] => qr{}i, [[{ task_id => 'SITE_ROOT', control => [sub {0}], }]] => '', [[{ task_id => 'SITE_ROOT', control => [sub {1}], }]] => qr{}i, [[qw(ADM_SUBSTITUTE_USER SITE_ROOT)]] => qr{}i, [[qw(ADM_SUBSTITUTE_USER SITE_ROOT), { task_id => Bivio::Agent::TaskId->USER_HOME, realm => 'demo', }]] => qr{}i, [[{ task_id => 'USER_HOME', label => [sub {'x'}], }, { task_id => 'SITE_ROOT', label => [sub {'y'}], }], { want_sorting => 1, selected_item => [sub {'y'}], }] => qr{}, [[{ task_id => 'SITE_ROOT', xlink => 'back_to_top', }]] => '', [[{ xlink => 'back_to_top', control => 0, }]] => '', [[{xlink => 'bunit2'}]] => qr{anchor}, [[{ xlink => vs_new(qw(XLink back_to_top)), }]] => '', [[{ xlink => vs_new(qw(SiteRoot hm_bunit1)), }]] => '', [['SITE_ROOT'], {selected_label_prefix => '!!'}] => qr{task_menu.*class="selected" href="/">!!home}is, [[vs_new(Simple => 'xyz'), vs_new(RealmDropDown => 'user')]] => qr{xyz