diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-23 23:24:40 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-23 23:24:40 +0000 |
commit | 417333356a9293ce0b927d5dd08a4820658bd915 (patch) | |
tree | d9c6c705eb14337ac9c4dfa78c391967a6e6910f /views/default/forms/admin/menu | |
parent | c78063361a3d46aecc7c8e6747937ac2360bd003 (diff) | |
download | elgg-417333356a9293ce0b927d5dd08a4820658bd915.tar.gz elgg-417333356a9293ce0b927d5dd08a4820658bd915.tar.bz2 |
updated more of the admin backend to use new CSS/HTML
git-svn-id: http://code.elgg.org/elgg/trunk@7920 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/forms/admin/menu')
-rw-r--r-- | views/default/forms/admin/menu/save.php | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/views/default/forms/admin/menu/save.php b/views/default/forms/admin/menu/save.php new file mode 100644 index 000000000..6c9cd9bd5 --- /dev/null +++ b/views/default/forms/admin/menu/save.php @@ -0,0 +1,100 @@ +<?php +/** + * Form body for setting up site menu + */ + +// get site menu items +global $CONFIG; +$menu = $CONFIG->menus['site']; +$builder = new ElggMenuBuilder($menu); +$menu = $builder->getMenu('name'); +$menu_items = $menu['default']; + +$featured_menu_names = elgg_get_config('site_featured_menu_names'); + +$dropdown_values = array(); +foreach ($menu_items as $item) { + $dropdown_values[$item->getName()] = $item->getTitle(); +} +$dropdown_values[''] = elgg_echo('none'); + +?> +<div class="elgg-module elgg-inline-module"> + <div class="elgg-head"> + <h3><?php echo elgg_echo('admin:menu_items:configure'); ?></h3> + </div> + <div class="elgg-body"> +<?php +echo elgg_view('output/longtext', array( + 'value' => elgg_echo("admin:menu_items:description") +)); + +// @todo Could probably make this number configurable +for ($i=0; $i<6; $i++) { + if (array_key_exists($i, $featured_menu_names)) { + $current_value = $featured_menu_names[$i]; + } else { + $current_value = ''; + } + + echo elgg_view('input/pulldown', array( + 'options_values' => $dropdown_values, + 'internalname' => 'featured_menu_names[]', + 'value' => $current_value + )); +} +?> + </div> +</div> + +<div class="elgg-module elgg-inline-module"> + <div class="elgg-head"> + <h3><?php echo elgg_echo('admin:add_menu_item'); ?></h3> + </div> + <div class="elgg-body"> +<?php +echo elgg_view('output/longtext', array( + 'value' => elgg_echo("admin:add_menu_item:description") +)); + +$custom_items = elgg_get_config('site_custom_menu_items'); + +$name_str = elgg_echo('name'); +$url_str = elgg_echo('admin:plugins:label:website'); + +echo '<ul class="elgg-simple-list">'; + +if (is_array($custom_items)) { + foreach ($custom_items as $title => $url) { + $name_input = elgg_view('input/text', array( + 'internalname' => 'custom_menu_titles[]', + 'value' => $title + )); + + $url_input = elgg_view('input/text', array( + 'internalname' => 'custom_menu_urls[]', + 'value' => $url + )); + + echo "<li>$name_str: $name_input $url_str: $url_input $delete</li>"; + } +} + +$new = elgg_echo('new'); +$name_input = elgg_view('input/text', array( + 'internalname' => 'custom_menu_titles[]', +)); + +$url_input = elgg_view('input/text', array( + 'internalname' => 'custom_menu_urls[]', +)); + +echo "<li class='custom_menuitem'>$name_str: $name_input $url_str: $url_input</li> +</ul>"; + +?> + </div> +</div> +<?php + +echo elgg_view('input/submit', array('value' => elgg_echo('save'))); |