diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-07-14 13:13:46 -0400 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-07-14 13:13:46 -0400 |
commit | 65548983c054a48fe0adb94c327847a7101db390 (patch) | |
tree | a07a448fc4b67279d3a60993f06a586e3717ad9f /views/default/forms/photos/admin/settings.php | |
parent | f7f38da31ca53c25775d1a28668a1dd9aefd5277 (diff) | |
download | elgg-65548983c054a48fe0adb94c327847a7101db390.tar.gz elgg-65548983c054a48fe0adb94c327847a7101db390.tar.bz2 |
admin settings form divided into subviews
Diffstat (limited to 'views/default/forms/photos/admin/settings.php')
-rw-r--r-- | views/default/forms/photos/admin/settings.php | 107 |
1 files changed, 12 insertions, 95 deletions
diff --git a/views/default/forms/photos/admin/settings.php b/views/default/forms/photos/admin/settings.php index 16d5eb0ce..2b6399a67 100644 --- a/views/default/forms/photos/admin/settings.php +++ b/views/default/forms/photos/admin/settings.php @@ -7,104 +7,21 @@ $plugin = elgg_get_plugin_from_id('tidypics'); -// main settings -$checkboxes = array('tagging', 'view_count', 'uploader', 'exif', 'download_link'); -foreach ($checkboxes as $checkbox) { - echo '<div>'; - $checked = $plugin->$checkbox ? 'checked' : false; - echo elgg_view('input/checkbox', array( - 'name' => "params[$checkbox]", - 'value' => true, - 'checked' => (bool)$plugin->$checkbox, - )); - echo ' ' . elgg_echo("tidypics:settings:$checkbox"); - echo '</div>'; -} - -// max image size -echo '<div>'; -echo elgg_echo('tidypics:settings:maxfilesize'); -echo elgg_view('input/text', array( - 'name' => 'params[maxfilesize]', - 'value' => $plugin->maxfilesize, -)); -echo '</div>'; - -// image library -echo '<h3>' . elgg_echo('tidypics:settings:heading:img_lib') . '</h3>'; -echo'<div>'; -echo elgg_echo('tidypics:settings:image_lib') . ': '; -echo elgg_view('input/dropdown', array( - 'name' => 'params[image_lib]', - 'options_values' => tidypics_get_image_libraries(), - 'value' => $plugin->image_lib, -)); -echo '</div>'; -echo '<div>'; -echo elgg_echo('tidypics:settings:im_path') . ' '; -echo elgg_view("input/text", array('name' => 'params[im_path]', 'value' => $plugin->im_path)); -echo '</div>'; - +$title = elgg_echo('tidypics:settings:main'); +$content = elgg_view('forms/photos/admin/settings/main', array('plugin' => $plugin)); +echo elgg_view_module('inline', $title, $content); -// river integration -echo '<h3>' . elgg_echo('tidypics:settings:heading:river') . '</h3>'; -echo '<div>'; -echo elgg_echo('tidypics:settings:img_river_view') . ': '; -echo elgg_view('input/dropdown', array( - 'name' => 'params[img_river_view]', - 'options_values' => array( - 'all' => elgg_echo('tidypics:option:all'), - 'batch' => '1', - 'none' => elgg_echo('tidypics:option:none'), - ), - 'value' => $plugin->img_river_view, -)); -echo '</div>'; -echo '<div>'; -echo elgg_echo('tidypics:settings:album_river_view') . ': '; -echo elgg_view('input/dropdown', array( - 'name' => 'params[album_river_view]', - 'options_values' => array( - 'cover' => elgg_echo('tidypics:option:cover'), - 'set' => elgg_echo('tidypics:option:set'), - ), - 'value' => $plugin->album_river_view, -)); -echo '</div>'; - - -// thumbnail sizes -echo '<div>'; -echo '<h3>' . elgg_echo('tidypics:settings:heading:sizes') . '</h3>'; -echo '<h6>' . elgg_echo('tidypics:settings:sizes:instructs') . '</h6>'; -$image_sizes = unserialize($plugin->image_sizes); -echo '<table>'; -$sizes = array('large', 'small', 'tiny'); -foreach ($sizes as $size) { - echo '<tr>'; - echo '<td class="pas">'; - echo elgg_echo("tidypics:settings:{$size}size"); - echo '</td><td class="pas">'; - echo 'width: '; - echo elgg_view('input/text', array( - 'name' => "{$size}_image_width", - 'value' => $image_sizes["{$size}_image_width"], - 'class' => 'tidypics-input-thin', - )); - echo '</td><td class="pas">'; - echo 'height: '; - echo elgg_view('input/text', array( - 'name' => "{$size}_image_height", - 'value' => $image_sizes["{$size}_image_height"], - 'class' => 'tidypics-input-thin', - )); - echo '</td>'; - echo '</tr>'; -} -echo '</table>'; -echo '</div>'; +$title = elgg_echo('tidypics:settings:heading:img_lib'); +$content = elgg_view('forms/photos/admin/settings/image_lib', array('plugin' => $plugin)); +echo elgg_view_module('inline', $title, $content); +$title = elgg_echo('tidypics:settings:heading:river'); +$content = elgg_view('forms/photos/admin/settings/activity', array('plugin' => $plugin)); +echo elgg_view_module('inline', $title, $content); +$title = elgg_echo('tidypics:settings:heading:sizes'); +$content = elgg_view('forms/photos/admin/settings/thumbnails', array('plugin' => $plugin)); +echo elgg_view_module('inline', $title, $content); echo elgg_view('input/submit', array('value' => elgg_echo("save"))); |