diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-17 12:00:58 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-17 12:00:58 -0300 |
commit | 228d3697bcd0218605be2e28131574cc85293a2e (patch) | |
tree | 6a59c627f6226bd2b3056b959acc9cc871eb1f8f /views/default/input/tasks | |
download | elgg-228d3697bcd0218605be2e28131574cc85293a2e.tar.gz elgg-228d3697bcd0218605be2e28131574cc85293a2e.tar.bz2 |
Squashed 'mod/tasks/' content from commit c9b1097
git-subtree-dir: mod/tasks
git-subtree-split: c9b1097ce081d6893f9c939146208559c089dc15
Diffstat (limited to 'views/default/input/tasks')
-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); |