]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
tabbed interface for admin now
authorCash Costello <cash.costello@gmail.com>
Wed, 17 Jun 2009 00:53:35 +0000 (00:53 +0000)
committerCash Costello <cash.costello@gmail.com>
Wed, 17 Jun 2009 00:53:35 +0000 (00:53 +0000)
admin.php
languages/en.php
views/default/admin/tidypics.php
views/default/tidypics/settings.php [new file with mode: 0644]
views/default/tidypics/stats.php [new file with mode: 0644]

index 23a3c22f34d0250cc911a5211f7632f8ef9f7198..e881c5ecd58f8486c22e858c1ecd192881ec0753 100644 (file)
--- a/admin.php
+++ b/admin.php
        admin_gatekeeper();\r
        set_context('admin');\r
        set_page_owner($_SESSION['guid']);\r
+       \r
+       $tab = isset($_GET['tab']) ? $_GET['tab'] : 'settings';\r
 \r
        $body = elgg_view_title(elgg_echo('tidypics:administration'));\r
        \r
-       $body .= elgg_view("admin/tidypics");\r
+       $body .= elgg_view("admin/tidypics", array('tab' => $tab));\r
        \r
        page_draw(elgg_echo('tidypics:administration'), elgg_view_layout("two_column_left_sidebar", '', $body));\r
 \r
index 9bcd623f66cf3812181c79a2300a6a639e4153f7..f71a1fb897a2d5430a90243ed07e13d6b7172dee 100644 (file)
                        'tidypics:viewsbyowner' => "Views: %s by %s users (not including you)",\r
                        'tidypics:viewsbyothers' => "Views: %s (%s by you)",\r
                        'tidypics:administration' => 'Tidypics Administration',\r
+                       'tidypics:stats' => 'Stats',\r
                        \r
                //settings\r
+                       'tidypics:settings' => 'Settings',\r
                        'tidypics:admin:instructions' => 'These are the core Tidypics settings. Change them for your setup and then click save.',\r
                        'tidypics:settings:image_lib' => "Image Library: ",\r
                        'tidypics:settings:download_link' => "Show download link",\r
                        'tidypics:settings:tagging' => "Enable photo tagging",\r
-                       'tidypics:settings:photo_ratings' => "Enable photo ratings (requires rate plugin of Miguel Montes or comptabile)",\r
+                       'tidypics:settings:photo_ratings' => "Enable photo ratings (requires rate plugin of Miguel Montes or compatible)",\r
                        'tidypics:settings:exif' => "Show EXIF data",\r
                        'tidypics:settings:grp_perm_override' => "Allow group members full access to group albums",\r
                        'tidypics:settings:maxfilesize' => "Maximum image size in megabytes (MB):",\r
index cecf5409f27b2525d3c2bc2a8790e10728d6cb8b..7bc2c29214f9e337e439364e0b9b128593dde124 100644 (file)
@@ -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 (file)
index 0000000..e69d6d3
--- /dev/null
@@ -0,0 +1,13 @@
+<?php\r
+\r
+       echo elgg_view('output/longtext', array('value' => elgg_echo("tidypics:admin:instructions")));\r
+       \r
+       global $CONFIG;  \r
+       $system_url = $CONFIG->wwwroot . 'mod/tidypics/system.php';\r
+?>\r
+<p>\r
+<a href="<?php echo $system_url; ?>">Run Server Analysis</a>\r
+</p>\r
+<?php\r
+       echo elgg_view("tidypics/forms/admin");\r
+?>
\ No newline at end of file
diff --git a/views/default/tidypics/stats.php b/views/default/tidypics/stats.php
new file mode 100644 (file)
index 0000000..8680ab0
--- /dev/null
@@ -0,0 +1,3 @@
+<?php\r
+       echo 'Stats go here';\r
+?>
\ No newline at end of file