# Copyright (c) 2007-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: Menu.bunit,v 1.19 2010/05/31 17:33:31 nagler Exp $ WikiText({die_on_validate_error => 0}); wiki_uri_to_req('MyPage'); my($t1) = class('Type.WikiDataName')->to_absolute('T1.bmenu'); model('RealmFile')->delete({path => $t1}); model('RealmFile')->create_with_content({path => $t1}, \(<<'EOF')); Label,Link,Class,Selected Regexp Index Home,/ Login,/pub/login MyPage,^MyPage Document,^Document,pdf ^Flyer ^icon.png,^Flyer,,mypage EOF [ [{ value => '@b-menu value=T1', is_public => 0, }] => qr{@{[join('.*', qw( class="bmenu" "/bunit_wiki/\w+/Index" Index class="want_sep" "/" Home class="want_sep" "/pub/login" Login class="want_sep selected" "/bunit_wiki/\w+/MyPage" MyPage class="pdf want_sep" "/bunit_wiki/\w+/Document" Document class="want_sep selected">Flyer.