Commit 11d3ec22 authored by Richard Mansfield's avatar Richard Mansfield

Raw theme: admin section

parent 779060b6
...@@ -65,6 +65,7 @@ $smarty = smarty(); ...@@ -65,6 +65,7 @@ $smarty = smarty();
$smarty->assign('reloadform', $reloadform); $smarty->assign('reloadform', $reloadform);
$smarty->assign('newfiltersdescription', get_string('newfiltersdescription', 'admin', get_config('libroot') . 'htmlpurifiercustom')); $smarty->assign('newfiltersdescription', get_string('newfiltersdescription', 'admin', get_config('libroot') . 'htmlpurifiercustom'));
$smarty->assign('filters', $filters); $smarty->assign('filters', $filters);
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/extensions/filters.tpl'); $smarty->display('admin/extensions/filters.tpl');
?> ?>
...@@ -192,7 +192,7 @@ $smarty = smarty(); ...@@ -192,7 +192,7 @@ $smarty = smarty();
$smarty->assign('INLINEJAVASCRIPT', $javascript); $smarty->assign('INLINEJAVASCRIPT', $javascript);
$smarty->assign('plugins', $plugins); $smarty->assign('plugins', $plugins);
$smarty->assign('installlink', 'installplugin'); $smarty->assign('installlink', 'installplugin');
$smarty->assign('heading', get_string('pluginadmin', 'admin')); $smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/extensions/plugins.tpl'); $smarty->display('admin/extensions/plugins.tpl');
?> ?>
...@@ -277,7 +277,7 @@ $smarty = smarty(array(), array($style)); ...@@ -277,7 +277,7 @@ $smarty = smarty(array(), array($style));
$smarty->assign('INLINEJAVASCRIPT', $ijs); $smarty->assign('INLINEJAVASCRIPT', $ijs);
$smarty->assign('MENUS', $menulist); $smarty->assign('MENUS', $menulist);
$smarty->assign('descriptionstrargs', array('<a href="' . get_config('wwwroot') . 'artefact/file/sitefiles.php">', '</a>')); $smarty->assign('descriptionstrargs', array('<a href="' . get_config('wwwroot') . 'artefact/file/sitefiles.php">', '</a>'));
$smarty->assign('heading', get_string('linksandresourcesmenu', 'admin')); $smarty->assign('PAGEHEADING', hsc(get_string('linksandresourcesmenu', 'admin')));
$smarty->display('admin/site/menu.tpl'); $smarty->display('admin/site/menu.tpl');
?> ?>
...@@ -202,6 +202,7 @@ function networkingform_submit(Pieform $form, $values) { ...@@ -202,6 +202,7 @@ function networkingform_submit(Pieform $form, $values) {
$smarty = smarty(); $smarty = smarty();
$smarty->assign('networkingform', $networkingform); $smarty->assign('networkingform', $networkingform);
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/site/networking.tpl'); $smarty->display('admin/site/networking.tpl');
?> ?>
...@@ -249,6 +249,7 @@ function siteoptions_submit(Pieform $form, $values) { ...@@ -249,6 +249,7 @@ function siteoptions_submit(Pieform $form, $values) {
$thispage = json_encode(get_config('wwwroot') . 'admin/site/options.php'); $thispage = json_encode(get_config('wwwroot') . 'admin/site/options.php');
$smarty = smarty(array('adminsiteoptions')); $smarty = smarty(array('adminsiteoptions'));
$smarty->assign('siteoptionform', $siteoptionform); $smarty->assign('siteoptionform', $siteoptionform);
$smarty->assign('PAGEHEADING', hsc(get_string('siteoptions', 'admin')));
$smarty->display('admin/site/options.tpl'); $smarty->display('admin/site/options.tpl');
?> ?>
...@@ -95,7 +95,7 @@ function editsitepage_submit(Pieform $form, $values) { ...@@ -95,7 +95,7 @@ function editsitepage_submit(Pieform $form, $values) {
$smarty = smarty(array('adminsitepages'), array(), array('admin' => array('discardpageedits'))); $smarty = smarty(array('adminsitepages'), array(), array('admin' => array('discardpageedits')));
$smarty->assign('pageeditform', $form); $smarty->assign('pageeditform', $form);
$smarty->assign('heading', get_string('editsitepages', 'admin')); $smarty->assign('PAGEHEADING', hsc(get_string('editsitepages', 'admin')));
$smarty->display('admin/site/pages.tpl'); $smarty->display('admin/site/pages.tpl');
?> ?>
...@@ -44,7 +44,7 @@ define('TITLE', $title); ...@@ -44,7 +44,7 @@ define('TITLE', $title);
$createviewform = pieform(create_view_form(null, 'mahara')); $createviewform = pieform(create_view_form(null, 'mahara'));
$smarty = smarty(); $smarty = smarty();
$smarty->assign('heading', $title); $smarty->assign('PAGEHEADING', hsc(TITLE));
$data = View::get_myviews_data($limit, $offset, null, 'mahara'); $data = View::get_myviews_data($limit, $offset, null, 'mahara');
......
...@@ -245,6 +245,7 @@ function adduser_submit(Pieform $form, $values) { ...@@ -245,6 +245,7 @@ function adduser_submit(Pieform $form, $values) {
$smarty = smarty(); $smarty = smarty();
$smarty->assign('form', $form); $smarty->assign('form', $form);
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/add.tpl'); $smarty->display('admin/users/add.tpl');
?> ?>
...@@ -85,7 +85,7 @@ function adminusers_submit(Pieform $form, $values) { ...@@ -85,7 +85,7 @@ function adminusers_submit(Pieform $form, $values) {
$smarty = smarty(); $smarty = smarty();
$smarty->assign('adminusersform', $form); $smarty->assign('adminusersform', $form);
$smarty->assign('heading', get_string('adminusers', 'admin')); $smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/admin.tpl'); $smarty->display('admin/users/admin.tpl');
?> ?>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
define('INTERNAL', 1); define('INTERNAL', 1);
define('INSTITUTIONALADMIN', 1); define('INSTITUTIONALADMIN', 1);
require(dirname(dirname(dirname(__FILE__))) . '/init.php'); require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('adminusers', 'admin')); define('TITLE', get_string('institutionadmins', 'admin'));
require_once('pieforms/pieform.php'); require_once('pieforms/pieform.php');
define('MENUITEM', 'manageinstitutions/institutionadmins'); define('MENUITEM', 'manageinstitutions/institutionadmins');
...@@ -105,6 +105,7 @@ function adminusers_submit(Pieform $form, $values) { ...@@ -105,6 +105,7 @@ function adminusers_submit(Pieform $form, $values) {
$smarty->assign('institutionselector', $s['institutionselector']); $smarty->assign('institutionselector', $s['institutionselector']);
$smarty->assign('INLINEJAVASCRIPT', $s['institutionselectorjs']); $smarty->assign('INLINEJAVASCRIPT', $s['institutionselectorjs']);
$smarty->assign('adminusersform', pieform($form)); $smarty->assign('adminusersform', pieform($form));
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/institutionadmins.tpl'); $smarty->display('admin/users/institutionadmins.tpl');
?> ?>
...@@ -571,7 +571,7 @@ if ($institution && $institution != 'mahara') { ...@@ -571,7 +571,7 @@ if ($institution && $institution != 'mahara') {
} }
} }
$smarty->assign('heading', get_string('admininstitutions', 'admin')); $smarty->assign('PAGEHEADING', hsc(get_string('admininstitutions', 'admin')));
$smarty->display('admin/users/institutions.tpl'); $smarty->display('admin/users/institutions.tpl');
function theme_sort($a, $b) { function theme_sort($a, $b) {
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
define('INTERNAL', 1); define('INTERNAL', 1);
define('INSTITUTIONALADMIN', 1); define('INSTITUTIONALADMIN', 1);
require(dirname(dirname(dirname(__FILE__))) . '/init.php'); require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('staffusers', 'admin')); define('TITLE', get_string('institutionstaff', 'admin'));
require_once('pieforms/pieform.php'); require_once('pieforms/pieform.php');
define('MENUITEM', 'manageinstitutions/institutionstaff'); define('MENUITEM', 'manageinstitutions/institutionstaff');
...@@ -103,6 +103,7 @@ function staffusers_submit(Pieform $form, $values) { ...@@ -103,6 +103,7 @@ function staffusers_submit(Pieform $form, $values) {
$smarty->assign('institutionselector', $s['institutionselector']); $smarty->assign('institutionselector', $s['institutionselector']);
$smarty->assign('INLINEJAVASCRIPT', $s['institutionselectorjs']); $smarty->assign('INLINEJAVASCRIPT', $s['institutionselectorjs']);
$smarty->assign('staffusersform', pieform($form)); $smarty->assign('staffusersform', pieform($form));
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/institutionstaff.tpl'); $smarty->display('admin/users/institutionstaff.tpl');
?> ?>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
define('INTERNAL', 1); define('INTERNAL', 1);
define('INSTITUTIONALADMIN', 1); define('INSTITUTIONALADMIN', 1);
require(dirname(dirname(dirname(__FILE__))) . '/init.php'); require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('adminusers', 'admin')); define('TITLE', get_string('institutionmembers', 'admin'));
define('SECTION_PLUGINTYPE', 'core'); define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin'); define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'institutionusers'); define('SECTION_PAGE', 'institutionusers');
...@@ -232,6 +232,7 @@ $smarty->assign('INLINEJAVASCRIPT', $js); ...@@ -232,6 +232,7 @@ $smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('usertypeselector', $usertypeselector); $smarty->assign('usertypeselector', $usertypeselector);
$smarty->assign('instructions', get_string('institutionusersinstructions'.$usertype, 'admin')); $smarty->assign('instructions', get_string('institutionusersinstructions'.$usertype, 'admin'));
$smarty->assign('institutionusersform', $userlistform); $smarty->assign('institutionusersform', $userlistform);
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/institutionusers.tpl'); $smarty->display('admin/users/institutionusers.tpl');
?> ?>
...@@ -87,7 +87,7 @@ if ($userinstitutions) { ...@@ -87,7 +87,7 @@ if ($userinstitutions) {
$smarty = smarty(); $smarty = smarty();
$smarty->assign('users', $users); $smarty->assign('users', $users);
$smarty->assign('types', $types); $smarty->assign('types', $types);
$smarty->assign('heading', get_string('adminnotifications', 'admin')); $smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/notifications.tpl'); $smarty->display('admin/users/notifications.tpl');
......
...@@ -58,7 +58,7 @@ $smarty->assign('search', $search); ...@@ -58,7 +58,7 @@ $smarty->assign('search', $search);
$smarty->assign('alphabet', explode(',', get_string('alphabet'))); $smarty->assign('alphabet', explode(',', get_string('alphabet')));
$smarty->assign('institutions', $institutions); $smarty->assign('institutions', $institutions);
$smarty->assign('results', build_admin_user_search_results($search, $offset, $limit, $sortby, $sortdir)); $smarty->assign('results', build_admin_user_search_results($search, $offset, $limit, $sortby, $sortdir));
$smarty->assign('heading', get_string('usersearch', 'admin')); $smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/search.tpl'); $smarty->display('admin/users/search.tpl');
?> ?>
...@@ -82,7 +82,7 @@ function staffusers_submit(Pieform $form, $values) { ...@@ -82,7 +82,7 @@ function staffusers_submit(Pieform $form, $values) {
$smarty = smarty(); $smarty = smarty();
$smarty->assign('staffusersform', $form); $smarty->assign('staffusersform', $form);
$smarty->assign('heading', get_string('staffusers', 'admin')); $smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/staff.tpl'); $smarty->display('admin/users/staff.tpl');
?> ?>
...@@ -78,7 +78,7 @@ $form = new Pieform(array( ...@@ -78,7 +78,7 @@ $form = new Pieform(array(
)); ));
$smarty->assign('buttonformopen', $form->get_form_tag()); $smarty->assign('buttonformopen', $form->get_form_tag());
$smarty->assign('buttonform', $form->build(false)); $smarty->assign('buttonform', $form->build(false));
$smarty->assign('heading', get_string('suspendedusers', 'admin')); $smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/suspended.tpl'); $smarty->display('admin/users/suspended.tpl');
function buttons_submit_unsuspend(Pieform $form, $values) { function buttons_submit_unsuspend(Pieform $form, $values) {
......
...@@ -366,6 +366,7 @@ $form = pieform($form); ...@@ -366,6 +366,7 @@ $form = pieform($form);
$smarty = smarty(); $smarty = smarty();
$smarty->assign('uploadcsvpagedescription', $uploadcsvpagedescription); $smarty->assign('uploadcsvpagedescription', $uploadcsvpagedescription);
$smarty->assign('uploadcsvform', $form); $smarty->assign('uploadcsvform', $form);
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/uploadcsv.tpl'); $smarty->display('admin/users/uploadcsv.tpl');
?> ?>
...@@ -63,7 +63,7 @@ $smarty->assign('institution', $institution); ...@@ -63,7 +63,7 @@ $smarty->assign('institution', $institution);
$smarty->assign('institutionselector', $s['institutionselector']); $smarty->assign('institutionselector', $s['institutionselector']);
$smarty->assign('form', $form); $smarty->assign('form', $form);
$smarty->assign('INLINEJAVASCRIPT', $s['institutionselectorjs'] . $js); $smarty->assign('INLINEJAVASCRIPT', $s['institutionselectorjs'] . $js);
$smarty->assign('heading', TITLE); $smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('artefact:file:files.tpl'); $smarty->display('artefact:file:files.tpl');
?> ?>
...@@ -40,7 +40,7 @@ $js = ArtefactTypeFileBase::files_js(); ...@@ -40,7 +40,7 @@ $js = ArtefactTypeFileBase::files_js();
$smarty = smarty(); $smarty = smarty();
$smarty->assign('descriptionstrargs', array('<a href="' . get_config('wwwroot') . 'admin/site/menu.php">', '</a>')); $smarty->assign('descriptionstrargs', array('<a href="' . get_config('wwwroot') . 'admin/site/menu.php">', '</a>'));
$smarty->assign('heading', get_string('sitefiles', 'admin')); $smarty->assign('PAGEHEADING', hsc(get_string('sitefiles', 'admin')));
$smarty->assign('institution', 'mahara'); $smarty->assign('institution', 'mahara');
$smarty->assign('form', $form); $smarty->assign('form', $form);
$smarty->assign('INLINEJAVASCRIPT', $js); $smarty->assign('INLINEJAVASCRIPT', $js);
......
...@@ -820,6 +820,7 @@ class PluginAuthXmlrpc extends PluginAuth { ...@@ -820,6 +820,7 @@ class PluginAuthXmlrpc extends PluginAuth {
$elements['weimportcontent'] = array( $elements['weimportcontent'] = array(
'type' => 'checkbox', 'type' => 'checkbox',
'title' => get_string('weimportcontent', 'auth'), 'title' => get_string('weimportcontent', 'auth'),
'description' => get_string('weimportcontentdescription', 'auth'),
'defaultvalue' => self::$default_config['weimportcontent'], 'defaultvalue' => self::$default_config['weimportcontent'],
'help' => true, 'help' => true,
); );
......
...@@ -52,7 +52,8 @@ $string['weautocreateusers'] = 'We auto-create users'; ...@@ -52,7 +52,8 @@ $string['weautocreateusers'] = 'We auto-create users';
$string['theyautocreateusers'] = 'They auto-create users'; $string['theyautocreateusers'] = 'They auto-create users';
$string['parent'] = 'Parent authority'; $string['parent'] = 'Parent authority';
$string['wessoout'] = 'We SSO out'; $string['wessoout'] = 'We SSO out';
$string['weimportcontent'] = 'We import content (some applications only)'; $string['weimportcontent'] = 'We import content';
$string['weimportcontentdescription'] = '(some applications only)';
$string['theyssoin'] = 'They SSO in'; $string['theyssoin'] = 'They SSO in';
$string['authloginmsg'] = "Enter a message to display when a user tries to log in via Mahara's login form"; $string['authloginmsg'] = "Enter a message to display when a user tries to log in via Mahara's login form";
$string['application'] = 'Application'; $string['application'] = 'Application';
......
...@@ -414,7 +414,7 @@ EOF; ...@@ -414,7 +414,7 @@ EOF;
// ---------- sideblock stuff ---------- // ---------- sideblock stuff ----------
if (!defined('INSTALLER') && (!defined('MENUITEM') || substr(MENUITEM, 0, 5) != 'admin')) { if (!defined('INSTALLER') && (!defined('MENUITEM') || substr(MENUITEM, 0, 5) != 'admin')) {
if (get_config('installed')) { if (get_config('installed') && !defined('ADMIN') && !defined('INSTITUTIONALADMIN')) {
$data = site_menu(); $data = site_menu();
if (!empty($data)) { if (!empty($data)) {
$smarty->assign('SITEMENU', site_menu()); $smarty->assign('SITEMENU', site_menu());
...@@ -434,7 +434,7 @@ EOF; ...@@ -434,7 +434,7 @@ EOF;
); );
} }
if($USER->is_logged_in()) { if($USER->is_logged_in() && !defined('ADMIN') && !defined('INSTITUTIONALADMIN')) {
$SIDEBLOCKS[] = array( $SIDEBLOCKS[] = array(
'name' => 'profile', 'name' => 'profile',
'id' => 'sb-profile', 'id' => 'sb-profile',
......
...@@ -156,6 +156,7 @@ table.tablerenderer th.desc { ...@@ -156,6 +156,7 @@ table.tablerenderer th.desc {
} }
/* MANAGE USERS > EDIT USER */ /* MANAGE USERS > EDIT USER */
#edituser hr { #edituser hr {
border-top: 1px dotted #d1d1d1; border-top: 1px dotted #d1d1d1;
...@@ -175,11 +176,12 @@ table.tablerenderer th.desc { ...@@ -175,11 +176,12 @@ table.tablerenderer th.desc {
/* MANAGE USERS > SITE STAFF */ /* MANAGE USERS > SITE STAFF */
/* MANAGE USERS > SITE ADMINS */ /* MANAGE USERS > SITE ADMINS */
.userlistform table {
width: 100%;
* width: 98%;
}
/* MANAGE USERS > ADMIN NOTIFICATIONS */ /* MANAGE USERS > ADMIN NOTIFICATIONS */
......
...@@ -259,6 +259,12 @@ div.ok, div.error, div.info { ...@@ -259,6 +259,12 @@ div.ok, div.error, div.info {
border: 1px solid #ddd; border: 1px solid #ddd;
text-align: center; text-align: center;
} }
.message p {
margin: 0;
}
div.section {
padding-top: .75em;
}
/* Tabbed pages */ /* Tabbed pages */
...@@ -512,6 +518,43 @@ div.pagination { ...@@ -512,6 +518,43 @@ div.pagination {
text-align: center; text-align: center;
} }
/* Fieldset */
fieldset {
padding: 1em 1.5em;
margin: 5px 0;
}
fieldset.collapsible {
padding: 1em 1.5em;
}
fieldset.collapsed {
border: 0 !important;
padding: 0;
margin: 0;
}
fieldset.collapsed table {
position: absolute;
visibility: hidden;
padding: 0;
border: 0;
margin: 0;
}
fieldset legend a {
padding-left: 1em;
background: url(../images/icon_fieldset_down.gif) 2px center no-repeat;
}
fieldset legend a:hover {
text-decoration: none;
}
fieldset.collapsed legend a {
background: url(../images/icon_fieldset_left.gif) 2px center no-repeat;
}
/* fieldset.collapsed .mceEditor {
display: none;
}
fieldset.collapsed .mceEditor td {
border: 0;
}*/
/* Footer */ /* Footer */
#footer-wrap { #footer-wrap {
clear: both; clear: both;
...@@ -577,7 +620,7 @@ ul.groupuserstatus li { ...@@ -577,7 +620,7 @@ ul.groupuserstatus li {
ul.groupuserstatus li.last { ul.groupuserstatus li.last {
border-bottom: none; border-bottom: none;
} }
form#search, form#filter { form#search, form#filter, div.searchform {
/* Also applies to Find Friends */ /* Also applies to Find Friends */
margin-bottom: 1em; margin-bottom: 1em;
} }
...@@ -1315,9 +1358,6 @@ div.sidebar ul ul a { ...@@ -1315,9 +1358,6 @@ div.sidebar ul ul a {
border: 1px solid #ddd; border: 1px solid #ddd;
text-align: center; text-align: center;
} }
.message p {
margin: 0;
}
.message a { .message a {
} }
...@@ -1402,43 +1442,6 @@ legend { ...@@ -1402,43 +1442,6 @@ legend {
font-weight: bold; font-weight: bold;
font-size: 1.3em; font-size: 1.3em;
} }
/* Fieldset */
/*
fieldset {
padding: 1em 1.5em;
margin: 5px 0;
}
fieldset.collapsible {
padding: 1em 1.5em;
}
fieldset.collapsed {
border: 0 !important;
padding: 0;
margin: 0;
}
fieldset.collapsed table {
position: absolute;
visibility: hidden;
padding: 0;
border: 0;
margin: 0;
}
fieldset legend a {
padding-left: 1em;
background: url(../images/icon_fieldset_down.gif) 2px center no-repeat;
}
fieldset legend a:hover {
text-decoration: none;
}
fieldset.collapsed legend a {
background: url(../images/icon_fieldset_left.gif) 2px center no-repeat;
}
fieldset.collapsed .mceEditor {
display: none;
}
fieldset.collapsed .mceEditor td {
border: 0;
}
......
{include file='header.tpl'} {include file='header.tpl'}
{include file="columnfullstart.tpl"}
<h2>{$heading}</h2>
<p>{str tag=htmlfiltersdescription section=admin}</p> <p>{str tag=htmlfiltersdescription section=admin}</p>
{if $filters} {if $filters}
...@@ -20,6 +16,4 @@ ...@@ -20,6 +16,4 @@
<p>{$newfiltersdescription}</p> <p>{$newfiltersdescription}</p>
<div>{$reloadform}</div> <div>{$reloadform}</div>
{include file="columnfullend.tpl"}
{include file='footer.tpl'} {include file='footer.tpl'}
{include file='header.tpl'} {include file='header.tpl'}
{include file="columnfullstart.tpl"}
<div id="adminplugin"> <div id="adminplugin">
<ul class="adminpluginstypes"> <ul class="adminpluginstypes">
{foreach from=$plugins key='plugintype' item='plugins'} {foreach from=$plugins key='plugintype' item='plugins'}
...@@ -50,6 +48,5 @@ ...@@ -50,6 +48,5 @@
{/foreach} {/foreach}
</ul> </ul>
</div> </div>
{include file="columnfullend.tpl"}
{include file='footer.tpl'} {include file='footer.tpl'}
{include file="header.tpl"} {include file="header.tpl"}
{include file="columnfullstart.tpl"}
<p>{str tag=linksandresourcesmenupagedescription section=admin args=$descriptionstrargs}</p> <p>{str tag=linksandresourcesmenupagedescription section=admin args=$descriptionstrargs}</p>