aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-06-17 00:53:35 +0000
committerCash Costello <cash.costello@gmail.com>2009-06-17 00:53:35 +0000
commit4928e46d6b93ccd1256117e08283341bdc224791 (patch)
tree913d615840d0901832f0b926ff31c01ab61b49e0
parent0afd1a3ce8392863a89932b7525d58be8c7f5135 (diff)
downloadelgg-4928e46d6b93ccd1256117e08283341bdc224791.tar.gz
elgg-4928e46d6b93ccd1256117e08283341bdc224791.tar.bz2
tabbed interface for admin now
-rw-r--r--admin.php4
-rw-r--r--languages/en.php4
-rw-r--r--views/default/admin/tidypics.php40
-rw-r--r--views/default/tidypics/settings.php13
-rw-r--r--views/default/tidypics/stats.php3
5 files changed, 50 insertions, 14 deletions
diff --git a/admin.php b/admin.php
index 23a3c22f3..e881c5ecd 100644
--- a/admin.php
+++ b/admin.php
@@ -12,10 +12,12 @@
admin_gatekeeper();
set_context('admin');
set_page_owner($_SESSION['guid']);
+
+ $tab = isset($_GET['tab']) ? $_GET['tab'] : 'settings';
$body = elgg_view_title(elgg_echo('tidypics:administration'));
- $body .= elgg_view("admin/tidypics");
+ $body .= elgg_view("admin/tidypics", array('tab' => $tab));
page_draw(elgg_echo('tidypics:administration'), elgg_view_layout("two_column_left_sidebar", '', $body));
diff --git a/languages/en.php b/languages/en.php
index 9bcd623f6..f71a1fb89 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -40,13 +40,15 @@
'tidypics:viewsbyowner' => "Views: %s by %s users (not including you)",
'tidypics:viewsbyothers' => "Views: %s (%s by you)",
'tidypics:administration' => 'Tidypics Administration',
+ 'tidypics:stats' => 'Stats',
//settings
+ 'tidypics:settings' => 'Settings',
'tidypics:admin:instructions' => 'These are the core Tidypics settings. Change them for your setup and then click save.',
'tidypics:settings:image_lib' => "Image Library: ",
'tidypics:settings:download_link' => "Show download link",
'tidypics:settings:tagging' => "Enable photo tagging",
- 'tidypics:settings:photo_ratings' => "Enable photo ratings (requires rate plugin of Miguel Montes or comptabile)",
+ 'tidypics:settings:photo_ratings' => "Enable photo ratings (requires rate plugin of Miguel Montes or compatible)",
'tidypics:settings:exif' => "Show EXIF data",
'tidypics:settings:grp_perm_override' => "Allow group members full access to group albums",
'tidypics:settings:maxfilesize' => "Maximum image size in megabytes (MB):",
diff --git a/views/default/admin/tidypics.php b/views/default/admin/tidypics.php
index cecf5409f..7bc2c2921 100644
--- a/views/default/admin/tidypics.php
+++ b/views/default/admin/tidypics.php
@@ -2,19 +2,35 @@
global $CONFIG;
+ $tab = $vars['tab'];
- echo '<div class="contentWrapper">';
+ $settingsselect = '';
+ $statsselect = '';
+ switch($tab) {
+ case 'settings':
+ $settingsselect = 'class="selected"';
+ break;
+ case 'stats':
+ $statsselect = 'class="selected"';
+ break;
+ }
- echo elgg_view('output/longtext', array('value' => elgg_echo("tidypics:admin:instructions")));
-
- global $CONFIG;
- $system_url = $CONFIG->wwwroot . 'mod/tidypics/system.php';
?>
-<p>
-<a href="<?php echo $system_url; ?>">Run Server Analysis</a>
-</p>
+<div class="contentWrapper">
+ <div id="elgg_horizontal_tabbed_nav">
+ <ul>
+ <li <?php echo $settingsselect; ?>'><a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/admin.php?tab=settings'; ?>"><?php echo elgg_echo('tidypics:settings'); ?></a></li>
+ <li <?php echo $statsselect; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/admin.php?tab=stats'; ?>"><?php echo elgg_echo('tidypics:stats'); ?></a></li>
+ </ul>
+ </div>
<?php
- echo elgg_view("tidypics/forms/admin");
-
- echo "</div>";
-?> \ No newline at end of file
+ switch($tab) {
+ case 'settings':
+ echo elgg_view("tidypics/settings");
+ break;
+ case 'stats':
+ echo elgg_view("tidypics/stats");
+ break;
+ }
+?>
+</div> \ No newline at end of file
diff --git a/views/default/tidypics/settings.php b/views/default/tidypics/settings.php
new file mode 100644
index 000000000..e69d6d306
--- /dev/null
+++ b/views/default/tidypics/settings.php
@@ -0,0 +1,13 @@
+<?php
+
+ echo elgg_view('output/longtext', array('value' => elgg_echo("tidypics:admin:instructions")));
+
+ global $CONFIG;
+ $system_url = $CONFIG->wwwroot . 'mod/tidypics/system.php';
+?>
+<p>
+<a href="<?php echo $system_url; ?>">Run Server Analysis</a>
+</p>
+<?php
+ echo elgg_view("tidypics/forms/admin");
+?> \ No newline at end of file
diff --git a/views/default/tidypics/stats.php b/views/default/tidypics/stats.php
new file mode 100644
index 000000000..8680ab052
--- /dev/null
+++ b/views/default/tidypics/stats.php
@@ -0,0 +1,3 @@
+<?php
+ echo 'Stats go here';
+?> \ No newline at end of file