Commit 62fa49e7 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Add all pages into the admin nav bar, even though it ends up too big

parent 714984eb
......@@ -26,9 +26,9 @@
define('INTERNAL', 1);
define('INSTITUTIONALADMIN', 1);
define('MENUITEM', 'configusers/addusers');
define('MENUITEM', 'configusers/adduser');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('addusers', 'admin'));
define('TITLE', get_string('adduser', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
require_once('pieforms/pieform.php');
......
......@@ -33,8 +33,7 @@ define('TITLE', get_string('adminusers', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'adminusers');
global $USER;
define('MENUITEM', $USER->get('admin') ? 'configusers/institutions' : 'configusers/institutionadmins');
define('MENUITEM', 'configusers/institutionadmins');
require_once('pieforms/pieform.php');
$smarty = smarty();
......
......@@ -33,8 +33,7 @@ define('TITLE', get_string('staffusers', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'staffusers');
global $USER;
define('MENUITEM', $USER->get('admin') ? 'configusers/institutions' : 'configusers/institutionstaff');
define('MENUITEM', 'configusers/institutionstaff');
require_once('pieforms/pieform.php');
$smarty = smarty();
......
......@@ -33,11 +33,10 @@ define('TITLE', get_string('adminusers', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'institutionusers');
global $USER;
define('MENUITEM', $USER->get('admin') ? 'configusers/institutions' : 'configusers/institutionusers');
define('MENUITEM', 'configusers/institutionusers');
require_once('pieforms/pieform.php');
require_once('institution.php');
global $USER;
$institutionelement = get_institution_selector(false);
$institution = param_alphanum('institution', false);
......
......@@ -26,7 +26,7 @@
define('INTERNAL', 1);
define('INSTITUTIONALADMIN', 1);
define('MENUITEM', 'configusers/addusers');
define('MENUITEM', 'configusers/uploadcsv');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('uploadcsv', 'admin'));
require_once('pieforms/pieform.php');
......@@ -345,7 +345,6 @@ $fields .= "</ul>\n";
$smarty = smarty();
$smarty->assign('uploadcsvpagedescription', get_string('uploadcsvpagedescription', 'admin',
get_config('wwwroot') . 'admin/users/add.php',
get_config('wwwroot') . 'admin/extensions/pluginconfig.php?plugintype=artefact&pluginname=internal&type=profile',
get_config('wwwroot') . 'admin/users/institutions.php',
$fields
......
......@@ -199,7 +199,7 @@ $string['uploadcsverrorinvalidusername'] = 'Error on line %s of your file: The u
$string['uploadcsverrormandatoryfieldnotspecified'] = 'Line %s of the file does not have the required "%s" field';
$string['uploadcsverroruseralreadyexists'] = 'Line %s of the file specifies the username "%s" that already exists';
$string['uploadcsverroremailaddresstaken'] = 'Line %s of the file specifies the e-mail address "%s" that is already taken by another user';
$string['uploadcsvpagedescription'] = '<p>You may use this facility to upload new users via a <acronym title="Comma Separated Values">CSV</acronym> file. You may also add users one at a time <a href="%s">here</a>.</p>
$string['uploadcsvpagedescription'] = '<p>You may use this facility to upload new users via a <acronym title="Comma Separated Values">CSV</acronym> file.</p>
<p>The first row of your CSV file should specify the format of your CSV data. For example, it should look like this:</p>
......@@ -271,10 +271,7 @@ $string['confirmremoveuserfrominstitution'] = 'Are you sure you want to remove t
// Add User
$string['adduser'] = 'Add User';
$string['addusers'] = 'Add Users';
$string['createuser'] = 'Create User';
$string['adduserspagedescription'] = 'Otherwise you can create a single user using the form below.';
$string['adduserspagedescriptioncsv'] = 'If you have many users to add, you can import users in bulk from a CSV file by clicking on the button.';
// Login as
$string['loginasuser'] = 'Login as %s';
......
......@@ -1354,11 +1354,17 @@ function admin_nav() {
'weight' => 70,
),
array(
'path' => 'configusers/addusers',
'path' => 'configusers/adduser',
'url' => 'admin/users/add.php',
'title' => get_string('addusers', 'admin'),
'title' => get_string('adduser', 'admin'),
'weight' => 80,
),
array(
'path' => 'configusers/uploadcsv',
'url' => 'admin/users/uploadcsv.php',
'title' => get_string('uploadcsv', 'admin'),
'weight' => 90,
),
);
}
......@@ -1448,11 +1454,35 @@ function admin_nav() {
'weight' => 50,
),
array(
'path' => 'configusers/addusers',
'url' => 'admin/users/add.php',
'title' => get_string('addusers', 'admin'),
'path' => 'configusers/institutionusers',
'url' => 'admin/users/institutionusers.php',
'title' => get_string('institutionmembers', 'admin'),
'weight' => 60,
),
array(
'path' => 'configusers/institutionstaff',
'url' => 'admin/users/institutionstaff.php',
'title' => get_string('institutionstaff', 'admin'),
'weight' => 70,
),
array(
'path' => 'configusers/institutionadmins',
'url' => 'admin/users/institutionadmins.php',
'title' => get_string('institutionadmins', 'admin'),
'weight' => 80,
),
array(
'path' => 'configusers/adduser',
'url' => 'admin/users/add.php',
'title' => get_string('adduser', 'admin'),
'weight' => 90,
),
array(
'path' => 'configusers/uploadcsv',
'url' => 'admin/users/uploadcsv.php',
'title' => get_string('uploadcsv', 'admin'),
'weight' => 100,
),
array(
'path' => 'configextensions',
'url' => 'admin/extensions/plugins.php',
......
......@@ -2,11 +2,7 @@
{include file="columnfullstart.tpl"}
<div id="edituser">
<h2>{str tag=addusers section=admin}</h2>
<p>{str tag=adduserspagedescriptioncsv section=admin}</p>
<form action="{$WWWROOT}admin/users/uploadcsv.php"><input type="submit" class="submit" value="{str tag=uploadcsv section=admin}" /></form>
<p>{str tag=adduserspagedescription section=admin}</p>
<h3>{str tag=adduser section=admin}</h3>
<h2>{str tag=adduser section=admin}</h2>
{$form}
</div>
{include file="columnfullend.tpl"}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment