diff options
Diffstat (limited to 'views/default/input')
-rw-r--r-- | views/default/input/tasks/list.php | 27 | ||||
-rw-r--r-- | views/default/input/tasks/priority.php | 13 |
2 files changed, 40 insertions, 0 deletions
diff --git a/views/default/input/tasks/list.php b/views/default/input/tasks/list.php new file mode 100644 index 000000000..864f227ab --- /dev/null +++ b/views/default/input/tasks/list.php @@ -0,0 +1,27 @@ +<?php + +$container_guid = get_input('container_guid', elgg_get_page_owner_guid()); + +$entities = elgg_get_entities(array( + 'type' => 'object', + 'subtype' => 'tasklist_top', + 'container_guid' => $container_guid, + 'limit' => 0, +)); + +if ($entities) { + $options_values = array(); + foreach ($entities as $entity) { + $options_values[$entity->guid] = $entity->title; + } +} else { + $container_name = get_entity($container_guid)->name; + $options_values = array(0 => elgg_echo('tasks:owner', array($container_name))); +} + +/*echo elgg_view('input/dropdown', array( + 'name' => $vars['name'], + 'options_values' => $options_values, + 'value' => $vars['value'], +));*/ +echo elgg_view('input/hidden', array('name' => $vars['name'], 'value' => $vars['value'])); diff --git a/views/default/input/tasks/priority.php b/views/default/input/tasks/priority.php new file mode 100644 index 000000000..43973beaa --- /dev/null +++ b/views/default/input/tasks/priority.php @@ -0,0 +1,13 @@ +<?php + +$vars['options_values'] = array( + '1' => 'low', + '2' => 'normal', + '3' => 'high', +); + +if(!isset($vars['value']) || !$vars['value']){ + $vars['value'] = '2'; +} + +echo elgg_view('input/dropdown', $vars); |