diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2012-12-16 14:45:48 -0500 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2012-12-16 14:45:48 -0500 |
commit | e8330243e2c76c70b53aab15d1c5631760b7c412 (patch) | |
tree | 99c62a2ef8209e15a2253acccc4abdd035b21933 /mod/pages/views/default | |
parent | 4d360c11d14768c8a0229b8b2b1f02622f17c48a (diff) | |
download | elgg-e8330243e2c76c70b53aab15d1c5631760b7c412.tar.gz elgg-e8330243e2c76c70b53aab15d1c5631760b7c412.tar.bz2 |
Refs #1334. Move the page parent input to pages/input/parent.
Diffstat (limited to 'mod/pages/views/default')
-rw-r--r-- | mod/pages/views/default/forms/pages/edit.php | 10 | ||||
-rw-r--r-- | mod/pages/views/default/pages/input/parent.php (renamed from mod/pages/views/default/input/parent.php) | 8 |
2 files changed, 13 insertions, 5 deletions
diff --git a/mod/pages/views/default/forms/pages/edit.php b/mod/pages/views/default/forms/pages/edit.php index 653a7ee47..e14ff19ec 100644 --- a/mod/pages/views/default/forms/pages/edit.php +++ b/mod/pages/views/default/forms/pages/edit.php @@ -18,10 +18,18 @@ foreach ($variables as $name => $type) { if (($type == 'access' || $type == 'write_access') && !$can_change_access) { continue; } + // don't show parent picker input for top or new pages. if ($name == 'parent_guid' && (!$vars['parent_guid'] || !$vars['guid'])) { continue; } + + if ($type == 'parent') { + $input_view = "pages/input/$type"; + } else { + $input_view = "input/$type"; + } + ?> <div> <label><?php echo elgg_echo("pages:$name") ?></label> @@ -30,7 +38,7 @@ foreach ($variables as $name => $type) { echo '<br />'; } - echo elgg_view("input/$type", array( + echo elgg_view($input_view, array( 'name' => $name, 'value' => $vars[$name], 'entity' => ($name == 'parent_guid') ? $vars['entity'] : null, diff --git a/mod/pages/views/default/input/parent.php b/mod/pages/views/default/pages/input/parent.php index f354129fe..c5ee3c3fb 100644 --- a/mod/pages/views/default/input/parent.php +++ b/mod/pages/views/default/pages/input/parent.php @@ -2,10 +2,10 @@ /** * Parent picker * - * @uses $vars['value'] The current value, if any + * @uses $vars['value'] The current value, if any * @uses $vars['options_values'] - * @uses $vars['name'] The name of the input field - * @uses $vars['entity'] Optional. The child entity (uses container_guid) + * @uses $vars['name'] The name of the input field + * @uses $vars['entity'] Optional. The child entity (uses container_guid) */ elgg_load_library('elgg:pages'); @@ -28,7 +28,7 @@ foreach ($pages as $page) { } $defaults = array( - 'class' => 'elgg-input-parent-picker', + 'class' => 'elgg-pages-input-parent-picker', 'options_values' => $options, ); |