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 @@ 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 new file mode 100644 index 00000000000..10bfd83c9b2 --- /dev/null +++ b/admin/apps.php @@ -0,0 +1,39 @@ +. +* +*/ + +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" )); + exit(); +} + +// We have some javascript foo! +OC_UTIL::addScript( "admin", "apps" ); + + +$tmpl = new OC_TEMPLATE( "admin", "apps", "admin" ); +$tmpl->printPage(); + +?> + 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; + }); +} ); diff --git a/files/appinfo/app.php b/files/appinfo/app.php index a3532e805d2..eff45cbe6e3 100644 --- a/files/appinfo/app.php +++ b/files/appinfo/app.php @@ -3,6 +3,6 @@ OC_APP::register( array( "order" => 2, "id" => "files", "name" => "Files" )); OC_APP::addNavigationEntry( array( "id" => "files_index", "order" => 1, "href" => OC_HELPER::linkTo( "files", "index.php" ), "icon" => OC_HELPER::imagePath( "files", "navicon.png" ), "name" => "Files" )); -OC_APP::addAdminPage( array( "order" => 1, "href" => OC_HELPER::linkTo( "files", "admin.php" ), "name" => "Files" )); +OC_APP::addSettingsPage( array( "order" => 1, "href" => OC_HELPER::linkTo( "files", "admin.php" ), "name" => "Files" )); ?> diff --git a/help/appinfo/app.php b/help/appinfo/app.php new file mode 100644 index 00000000000..184f4d345be --- /dev/null +++ b/help/appinfo/app.php @@ -0,0 +1,6 @@ + "help", "name" => "Help" )); +OC_APP::addPersonalMenuEntry( array( "order" => 2, "href" => OC_HELPER::linkTo( "help", "index.php" ), "name" => "Help" )); + +?> diff --git a/help/index.php b/help/index.php new file mode 100644 index 00000000000..0a54ddb9cf4 --- /dev/null +++ b/help/index.php @@ -0,0 +1,33 @@ +assign( "settings", $settings ); +$tmpl->printPage(); + +?> diff --git a/help/templates/index.php b/help/templates/index.php new file mode 100644 index 00000000000..945969d88c5 --- /dev/null +++ b/help/templates/index.php @@ -0,0 +1,8 @@ + +