1 | <?php |
---|
2 | # -- BEGIN LICENSE BLOCK --------------------------------------- |
---|
3 | # |
---|
4 | # This file is part of Dotclear 2. |
---|
5 | # |
---|
6 | # Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear |
---|
7 | # Licensed under the GPL version 2.0 license. |
---|
8 | # See LICENSE file or |
---|
9 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
---|
10 | # |
---|
11 | # -- END LICENSE BLOCK ----------------------------------------- |
---|
12 | if (!defined('DC_RC_PATH')) {return;} |
---|
13 | |
---|
14 | $core->addBehavior('initWidgets', array('simpleMenuWidgets', 'initWidgets')); |
---|
15 | |
---|
16 | class simpleMenuWidgets |
---|
17 | { |
---|
18 | public static function initWidgets($w) |
---|
19 | { |
---|
20 | $w->create('simplemenu', __('Simple menu'), array('tplSimpleMenu', 'simpleMenuWidget'), null, 'List of simple menu items'); |
---|
21 | $w->simplemenu->setting('title', __('Title (optional)') . ' :', __('Menu')); |
---|
22 | $w->simplemenu->setting('description', __('Item description'), 0, 'combo', |
---|
23 | array( |
---|
24 | __('Displayed in link') => 0, // span |
---|
25 | __('Used as link title') => 1, // title |
---|
26 | __('Displayed in link and used as title') => 2, // both |
---|
27 | __('Not displayed nor used') => 3 // none |
---|
28 | ) |
---|
29 | ); |
---|
30 | $w->simplemenu->setting('homeonly', __('Display on:'), 0, 'combo', |
---|
31 | array( |
---|
32 | __('All pages') => 0, |
---|
33 | __('Home page only') => 1, |
---|
34 | __('Except on home page') => 2 |
---|
35 | ) |
---|
36 | ); |
---|
37 | $w->simplemenu->setting('content_only', __('Content only'), 0, 'check'); |
---|
38 | $w->simplemenu->setting('class', __('CSS class:'), ''); |
---|
39 | $w->simplemenu->setting('offline', __('Offline'), 0, 'check'); |
---|
40 | } |
---|
41 | } |
---|