diff options
author | Frank Karlitschek <karlitschek@kde.org> | 2011-04-16 18:50:49 +0200 |
---|---|---|
committer | Frank Karlitschek <karlitschek@kde.org> | 2011-04-16 18:50:49 +0200 |
commit | 150631849f5829eaf1f68517b1c81d4339a5f23b (patch) | |
tree | 6367ab3b09da151e3a83b0942b9bc93a333bcf94 /admin | |
parent | 1419b80d4eba7c57c79e46278a343db3d0a67b40 (diff) | |
parent | f0e59b9043292a5abfb0b0d21763a0cd7306dad7 (diff) | |
download | nextcloud-server-150631849f5829eaf1f68517b1c81d4339a5f23b.tar.gz nextcloud-server-150631849f5829eaf1f68517b1c81d4339a5f23b.zip |
Merge branch 'refactoring' of git.kde.org:owncloud into refactoring
Conflicts:
admin/apps.php
Diffstat (limited to 'admin')
-rw-r--r-- | admin/appinfo/app.php | 14 | ||||
-rw-r--r-- | admin/apps.php | 10 | ||||
-rw-r--r-- | admin/index.php | 2 | ||||
-rw-r--r-- | admin/js/users.js | 101 |
4 files changed, 113 insertions, 14 deletions
diff --git a/admin/appinfo/app.php b/admin/appinfo/app.php index 9e39a052443..2426adc9f8a 100644 --- a/admin/appinfo/app.php +++ b/admin/appinfo/app.php @@ -1,14 +1,10 @@ <?php OC_APP::register( array( "order" => 1, "id" => "admin", "name" => "Administration" )); -if( OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )) -{ - OC_APP::addNavigationEntry( array( "id" => "admin_index", "order" => 1, "href" => OC_HELPER::linkTo( "admin", "index.php" ), "icon" => OC_HELPER::imagePath( "admin", "navicon.png" ), "name" => "Administration" )); -} -OC_APP::addAdminPage( array( "id" => "core_basic", "order" => 1, "href" => OC_HELPER::linkTo( "admin", "basic.php" ), "name" => "Basic Settings" )); -OC_APP::addAdminPage( array( "id" => "core_system", "order" => 2, "href" => OC_HELPER::linkTo( "admin", "system.php" ), "name" => "System settings" )); -OC_APP::addAdminPage( array( "id" => "core_users", "order" => 3, "href" => OC_HELPER::linkTo( "admin", "users.php" ), "name" => "Users" )); -OC_APP::addAdminPage( array( "id" => "core_apps", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "apps.php" ), "name" => "Apps" )); -OC_APP::addAdminPage( array( "id" => "core_plugins", "order" => 5, "href" => OC_HELPER::linkTo( "admin", "plugins.php" ), "name" => "Plugins" )); + +OC_APP::addAdminPage( array( "id" => "core_system", "order" => 2, "href" => OC_HELPER::linkTo( "admin", "system.php" ), "name" => "System settings", "icon" => OC_HELPER::imagePath( "admin", "navicon.png" ))); +OC_APP::addAdminPage( array( "id" => "core_users", "order" => 3, "href" => OC_HELPER::linkTo( "admin", "users.php" ), "name" => "Users", "icon" => OC_HELPER::imagePath( "admin", "navicon.png" ))); +OC_APP::addAdminPage( array( "id" => "core_apps", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "apps.php" ), "name" => "Apps", "icon" => OC_HELPER::imagePath( "admin", "navicon.png" ))); +OC_APP::addAdminPage( array( "id" => "core_plugins", "order" => 5, "href" => OC_HELPER::linkTo( "admin", "plugins.php" ), "name" => "Plugins", "icon" => OC_HELPER::imagePath( "admin", "navicon.png" ))); ?> diff --git a/admin/apps.php b/admin/apps.php index cd686fadf16..dc7b51bb820 100644 --- a/admin/apps.php +++ b/admin/apps.php @@ -24,14 +24,14 @@ require_once('../lib/base.php'); require( 'template.php' ); if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )){ - header( "Location: ".OC_HELPER::linkTo( "index.php" )); + header( "Location: ".OC_HELPER::linkTo( "", "index.php" )); exit(); } // Load the files we need -OC_UTIL::addStyle( "files", "files" ); -OC_UTIL::addScript( "files", "files" ); +//OC_UTIL::addStyle( "", "files" ); +//OC_UTIL::addScript( "", "files" ); $categories=OC_OCSCLIENT::getCategories(); @@ -39,7 +39,8 @@ $apps=OC_OCSCLIENT::getApplications($categories); // return template -$tmpl = new OC_TEMPLATE( "files", "index", "user" ); +$tmpl = new OC_TEMPLATE( "admin", "apps", "admin" ); + $tmpl->assign( "categories", $categories ); $tmpl->assign( "apps", $apps ); $tmpl->printPage(); @@ -47,3 +48,4 @@ $tmpl->printPage(); ?> + diff --git a/admin/index.php b/admin/index.php index 2446ebc50aa..80e70d13f9a 100644 --- a/admin/index.php +++ b/admin/index.php @@ -24,7 +24,7 @@ require_once('../lib/base.php'); require( 'template.php' ); if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )){ - header( "Location: ".OC_HELPER::linkTo( "index.php" )); + header( "Location: ".OC_HELPER::linkTo( "","index.php" )); exit(); } diff --git a/admin/js/users.js b/admin/js/users.js new file mode 100644 index 00000000000..6d59a2efb7c --- /dev/null +++ b/admin/js/users.js @@ -0,0 +1,101 @@ +$(document).ready(function(){ + // Dialog for adding users + $( "#adduser-form" ).dialog({ + autoOpen: false, + height: 300, + width: 350, + modal: true, + buttons: { + "Create an account": function() { + $( this ).dialog( "close" ); + }, + Cancel: function() { + $( this ).dialog( "close" ); + } + }, + close: function() { + allFields.val( "" ).removeClass( "ui-state-error" ); + } + }); + + $( "#adduser-button" ) + .click(function() { + $( "#adduser-form" ).dialog( "open" ); + return false; + }); + + // Dialog for adding users + $( "#edituser-form" ).dialog({ + autoOpen: false, + height: 300, + width: 350, + modal: true, + buttons: { + "Edit password": function() { + $( this ).dialog( "close" ); + }, + Cancel: function() { + $( this ).dialog( "close" ); + } + }, + close: function() { + allFields.val( "" ).removeClass( "ui-state-error" ); + } + }); + + $( ".edituser-button" ) + .click(function() { + $( "#edituser-form" ).dialog( "open" ); + return false; + }); + + // Dialog for adding users + $( "#removeuser-form" ).dialog({ + autoOpen: false, + height: 300, + width: 350, + modal: true, + buttons: { + "Remove user": function() { + $( this ).dialog( "close" ); + }, + Cancel: function() { + $( this ).dialog( "close" ); + } + }, + close: function() { + allFields.val( "" ).removeClass( "ui-state-error" ); + } + }); + + $( ".removeuser-button" ) + .click(function() { + $( "#removeuser-form" ).dialog( "open" ); + return false; + }); + + // Dialog for adding users + $( "#removegroup-form" ).dialog({ + autoOpen: false, + height: 300, + width: 350, + modal: true, + buttons: { + "Remove group": function() { + $( this ).dialog( "close" ); + }, + Cancel: function() { + $( this ).dialog( "close" ); + } + }, + close: function() { + allFields.val( "" ).removeClass( "ui-state-error" ); + } + }); + + $( ".removegroup-button" ) + .click(function() { + $( "#removegroup-form" ).dialog( "open" ); + return false; + }); +} ); |