aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-24 22:20:03 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-24 22:20:03 +0000
commitc0bc34a6ce4c08e652ef86712dd6b9c1781eade5 (patch)
treee5057c33f98e0b8f029a131f2172a49ccd88a7de /views/default
parent3b0b462b5790f15fcb612de66544838bdbce658b (diff)
downloadelgg-c0bc34a6ce4c08e652ef86712dd6b9c1781eade5.tar.gz
elgg-c0bc34a6ce4c08e652ef86712dd6b9c1781eade5.tar.bz2
Added ability to make arbitrary links for the menu items.
git-svn-id: http://code.elgg.org/elgg/trunk@5498 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r--views/default/admin/menu_items.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/views/default/admin/menu_items.php b/views/default/admin/menu_items.php
index c9bdc5bca..1233eeb1b 100644
--- a/views/default/admin/menu_items.php
+++ b/views/default/admin/menu_items.php
@@ -42,6 +42,46 @@ for ($i=0; $i<6; $i++) {
}
$form_body .= '<br /><br />';
+// add arbitrary links
+$form_body .= elgg_view_title(elgg_echo('admin:add_menu_item'));
+$form_body .= elgg_view('output/longtext', array('value' => elgg_echo("admin:add_menu_item:description")));
+
+$custom_items = get_config('menu_items_custom_items');
+
+$name_str = elgg_echo('name');
+$url_str = elgg_echo('admin:plugins:label:website');
+
+$form_body .= '<ul>';
+
+if (is_array($custom_items)) {
+ foreach ($custom_items as $url => $name) {
+ $name_input = elgg_view('input/text', array(
+ 'internalname' => 'custom_item_names[]',
+ 'value' => $name
+ ));
+
+ $url_input = elgg_view('input/text', array(
+ 'internalname' => 'custom_item_urls[]',
+ 'value' => $url
+ ));
+
+ $form_body .= "<li>$name_str: $name_input $url_str: $url_input $delete</li>";
+ }
+}
+
+$new = elgg_echo('new');
+$name_input = elgg_view('input/text', array(
+ 'internalname' => 'custom_item_names[]',
+));
+
+$url_input = elgg_view('input/text', array(
+ 'internalname' => 'custom_item_urls[]',
+));
+
+$form_body .= "<li>$name_str: $name_input $url_str: $url_input</li>
+</ul>";
+
+$form_body .= '<br /><br />';
$form_body .= elgg_view('input/submit', array('value' => elgg_echo('save')));
echo elgg_view('input/form', array(