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

Raw theme: admin section

parent 779060b6
......@@ -65,6 +65,7 @@ $smarty = smarty();
$smarty->assign('reloadform', $reloadform);
$smarty->assign('newfiltersdescription', get_string('newfiltersdescription', 'admin', get_config('libroot') . 'htmlpurifiercustom'));
$smarty->assign('filters', $filters);
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/extensions/filters.tpl');
?>
......@@ -192,7 +192,7 @@ $smarty = smarty();
$smarty->assign('INLINEJAVASCRIPT', $javascript);
$smarty->assign('plugins', $plugins);
$smarty->assign('installlink', 'installplugin');
$smarty->assign('heading', get_string('pluginadmin', 'admin'));
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/extensions/plugins.tpl');
?>
......@@ -277,7 +277,7 @@ $smarty = smarty(array(), array($style));
$smarty->assign('INLINEJAVASCRIPT', $ijs);
$smarty->assign('MENUS', $menulist);
$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');
?>
......@@ -202,6 +202,7 @@ function networkingform_submit(Pieform $form, $values) {
$smarty = smarty();
$smarty->assign('networkingform', $networkingform);
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/site/networking.tpl');
?>
......@@ -249,6 +249,7 @@ function siteoptions_submit(Pieform $form, $values) {
$thispage = json_encode(get_config('wwwroot') . 'admin/site/options.php');
$smarty = smarty(array('adminsiteoptions'));
$smarty->assign('siteoptionform', $siteoptionform);
$smarty->assign('PAGEHEADING', hsc(get_string('siteoptions', 'admin')));
$smarty->display('admin/site/options.tpl');
?>
......@@ -95,7 +95,7 @@ function editsitepage_submit(Pieform $form, $values) {
$smarty = smarty(array('adminsitepages'), array(), array('admin' => array('discardpageedits')));
$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');
?>
......@@ -44,7 +44,7 @@ define('TITLE', $title);
$createviewform = pieform(create_view_form(null, 'mahara'));
$smarty = smarty();
$smarty->assign('heading', $title);
$smarty->assign('PAGEHEADING', hsc(TITLE));
$data = View::get_myviews_data($limit, $offset, null, 'mahara');
......
......@@ -245,6 +245,7 @@ function adduser_submit(Pieform $form, $values) {
$smarty = smarty();
$smarty->assign('form', $form);
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/add.tpl');
?>
......@@ -85,7 +85,7 @@ function adminusers_submit(Pieform $form, $values) {
$smarty = smarty();
$smarty->assign('adminusersform', $form);
$smarty->assign('heading', get_string('adminusers', 'admin'));
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/admin.tpl');
?>
......@@ -29,7 +29,7 @@
define('INTERNAL', 1);
define('INSTITUTIONALADMIN', 1);
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('adminusers', 'admin'));
define('TITLE', get_string('institutionadmins', 'admin'));
require_once('pieforms/pieform.php');
define('MENUITEM', 'manageinstitutions/institutionadmins');
......@@ -105,6 +105,7 @@ function adminusers_submit(Pieform $form, $values) {
$smarty->assign('institutionselector', $s['institutionselector']);
$smarty->assign('INLINEJAVASCRIPT', $s['institutionselectorjs']);
$smarty->assign('adminusersform', pieform($form));
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/institutionadmins.tpl');
?>
......@@ -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');
function theme_sort($a, $b) {
......
......@@ -29,7 +29,7 @@
define('INTERNAL', 1);
define('INSTITUTIONALADMIN', 1);
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('staffusers', 'admin'));
define('TITLE', get_string('institutionstaff', 'admin'));
require_once('pieforms/pieform.php');
define('MENUITEM', 'manageinstitutions/institutionstaff');
......@@ -103,6 +103,7 @@ function staffusers_submit(Pieform $form, $values) {
$smarty->assign('institutionselector', $s['institutionselector']);
$smarty->assign('INLINEJAVASCRIPT', $s['institutionselectorjs']);
$smarty->assign('staffusersform', pieform($form));
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/institutionstaff.tpl');
?>
......@@ -29,7 +29,7 @@
define('INTERNAL', 1);
define('INSTITUTIONALADMIN', 1);
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_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'institutionusers');
......@@ -232,6 +232,7 @@ $smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('usertypeselector', $usertypeselector);
$smarty->assign('instructions', get_string('institutionusersinstructions'.$usertype, 'admin'));
$smarty->assign('institutionusersform', $userlistform);
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/institutionusers.tpl');
?>
......@@ -87,7 +87,7 @@ if ($userinstitutions) {
$smarty = smarty();
$smarty->assign('users', $users);
$smarty->assign('types', $types);
$smarty->assign('heading', get_string('adminnotifications', 'admin'));
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/notifications.tpl');
......
......@@ -58,7 +58,7 @@ $smarty->assign('search', $search);
$smarty->assign('alphabet', explode(',', get_string('alphabet')));
$smarty->assign('institutions', $institutions);
$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');
?>
......@@ -82,7 +82,7 @@ function staffusers_submit(Pieform $form, $values) {
$smarty = smarty();
$smarty->assign('staffusersform', $form);
$smarty->assign('heading', get_string('staffusers', 'admin'));
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/staff.tpl');
?>
......@@ -78,7 +78,7 @@ $form = new Pieform(array(
));
$smarty->assign('buttonformopen', $form->get_form_tag());
$smarty->assign('buttonform', $form->build(false));
$smarty->assign('heading', get_string('suspendedusers', 'admin'));
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/suspended.tpl');
function buttons_submit_unsuspend(Pieform $form, $values) {
......
......@@ -366,6 +366,7 @@ $form = pieform($form);
$smarty = smarty();
$smarty->assign('uploadcsvpagedescription', $uploadcsvpagedescription);
$smarty->assign('uploadcsvform', $form);
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('admin/users/uploadcsv.tpl');
?>
......@@ -63,7 +63,7 @@ $smarty->assign('institution', $institution);
$smarty->assign('institutionselector', $s['institutionselector']);
$smarty->assign('form', $form);
$smarty->assign('INLINEJAVASCRIPT', $s['institutionselectorjs'] . $js);
$smarty->assign('heading', TITLE);
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->display('artefact:file:files.tpl');
?>
......@@ -40,7 +40,7 @@ $js = ArtefactTypeFileBase::files_js();
$smarty = smarty();
$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('form', $form);
$smarty->assign('INLINEJAVASCRIPT', $js);
......
......@@ -820,6 +820,7 @@ class PluginAuthXmlrpc extends PluginAuth {
$elements['weimportcontent'] = array(
'type' => 'checkbox',
'title' => get_string('weimportcontent', 'auth'),
'description' => get_string('weimportcontentdescription', 'auth'),
'defaultvalue' => self::$default_config['weimportcontent'],
'help' => true,
);
......
......@@ -52,7 +52,8 @@ $string['weautocreateusers'] = 'We auto-create users';
$string['theyautocreateusers'] = 'They auto-create users';
$string['parent'] = 'Parent authority';
$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['authloginmsg'] = "Enter a message to display when a user tries to log in via Mahara's login form";
$string['application'] = 'Application';
......
......@@ -414,7 +414,7 @@ EOF;
// ---------- sideblock stuff ----------
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();
if (!empty($data)) {
$smarty->assign('SITEMENU', site_menu());
......@@ -434,7 +434,7 @@ EOF;
);
}
if($USER->is_logged_in()) {
if($USER->is_logged_in() && !defined('ADMIN') && !defined('INSTITUTIONALADMIN')) {
$SIDEBLOCKS[] = array(
'name' => 'profile',
'id' => 'sb-profile',
......
......@@ -156,6 +156,7 @@ table.tablerenderer th.desc {
}
/* MANAGE USERS > EDIT USER */
#edituser hr {
border-top: 1px dotted #d1d1d1;
......@@ -175,11 +176,12 @@ table.tablerenderer th.desc {
/* MANAGE USERS > SITE STAFF */
/* MANAGE USERS > SITE ADMINS */
.userlistform table {
width: 100%;
* width: 98%;
}
/* MANAGE USERS > ADMIN NOTIFICATIONS */
......
......@@ -259,6 +259,12 @@ div.ok, div.error, div.info {
border: 1px solid #ddd;
text-align: center;
}
.message p {
margin: 0;
}
div.section {
padding-top: .75em;
}
/* Tabbed pages */
......@@ -512,6 +518,43 @@ div.pagination {
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-wrap {
clear: both;
......@@ -577,7 +620,7 @@ ul.groupuserstatus li {
ul.groupuserstatus li.last {
border-bottom: none;
}
form#search, form#filter {
form#search, form#filter, div.searchform {
/* Also applies to Find Friends */
margin-bottom: 1em;
}
......@@ -1315,9 +1358,6 @@ div.sidebar ul ul a {
border: 1px solid #ddd;
text-align: center;
}
.message p {
margin: 0;
}
.message a {
}
......@@ -1402,43 +1442,6 @@ legend {
font-weight: bold;
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="columnfullstart.tpl"}
<h2>{$heading}</h2>
<p>{str tag=htmlfiltersdescription section=admin}</p>
{if $filters}
......@@ -20,6 +16,4 @@
<p>{$newfiltersdescription}</p>
<div>{$reloadform}</div>
{include file="columnfullend.tpl"}
{include file='footer.tpl'}
{include file='header.tpl'}
{include file="columnfullstart.tpl"}
<div id="adminplugin">
<ul class="adminpluginstypes">
{foreach from=$plugins key='plugintype' item='plugins'}
......@@ -50,6 +48,5 @@
{/foreach}
</ul>
</div>
{include file="columnfullend.tpl"}
{include file='footer.tpl'}
{include file="header.tpl"}
{include file="columnfullstart.tpl"}
<p>{str tag=linksandresourcesmenupagedescription section=admin args=$descriptionstrargs}</p>
<div id="editmenus">
......@@ -17,6 +16,4 @@
</div>
{include file="columnfullend.tpl"}
{include file="footer.tpl"}
{include file='header.tpl'}
{include file="columnfullstart.tpl"}
<h2>{str section=admin tag=networking}</h2>
{if $missingextensions}
<p>{str section=admin tag=networkingextensionsmissing}</p>
......@@ -13,5 +11,5 @@
<p>{str tag=networkingpagedescription section=admin}</p>
{$networkingform}
{/if}
{include file="columnfullend.tpl"}
{include file='footer.tpl'}
{include file="header.tpl"}
{include file="columnfullstart.tpl"}
<h2>{str tag=siteoptions section=admin}</h2>
<p>{str tag=siteoptionspagedescription section=admin}</p>
{$siteoptionform}
{include file="columnfullend.tpl"}
{include file="footer.tpl"}
{include file="header.tpl"}
{include file="columnfullstart.tpl"}
<p>{str tag=editsitepagespagedescription section=admin}</p>
{$pageeditform}
{include file="columnfullend.tpl"}
{include file="footer.tpl"}
{include file="header.tpl"}
{include file="columnfullstart.tpl"}
<div id="edituser">
<h2>{str tag=adduser section=admin}</h2>
{str tag=adduserpagedescription section=admin}
{$form}
</div>
{include file="columnfullend.tpl"}
{str tag=adduserpagedescription section=admin}
{$form}
{include file="footer.tpl"}
{include file="microheader.tpl"}
<h2>{str tag="adminauthorities" section="admin"}</h2>
<h3>{str tag="adminauthorities" section="admin"}</h3>
{$auth_imap_form}
{include file="microfooter.tpl"}
\ No newline at end of file
{include file="header.tpl"}
{include file="columnfullstart.tpl"}
<p>{str tag="adminuserspagedescription" section="admin"}</p>
<div class="userlistform">
{$adminusersform}
{include file="columnfullend.tpl"}
</div>
{include file="footer.tpl"}
{include file="header.tpl"}
{include file="columnfullstart.tpl"}
<h2>{str tag="institutionadmins" section="admin"}</h2>
<p>{str tag="institutionadminuserspagedescription" section="admin"}</p>
{$institutionselector}
<div class="userlistform">
{$adminusersform}
{include file="columnfullend.tpl"}
</div>
{include file="footer.tpl"}
{include file="header.tpl"}
{include file="columnfullstart.tpl"}
{if $delete_form}
<h3>{str tag="deleteinstitution" section="admin"}</h3>
<p>{str tag="deleteinstitutionconfirm" section="admin"}</p>
......@@ -92,6 +91,5 @@
{/if}
{include file="columnfullend.tpl"}
{include file="footer.tpl"}
{include file="header.tpl"}
{include file="columnfullstart.tpl"}
<h2>{str tag="institutionstaff" section="admin"}</h2>
<p>{str tag="institutionstaffuserspagedescription" section="admin"}</p>
{$institutionselector}
<div class="userlistform">
{$staffusersform}
{include file="columnfullend.tpl"}
</div>
{include file="footer.tpl"}
{include file="header.tpl"}
{include file="columnfullstart.tpl"}
<h2>{str tag="institutionmembers" section="admin"}</h2>
<p>{str tag="institutionmemberspagedescription" section="admin"}</p>
<p>{$instructions}</p>
{$usertypeselector}
<div class="userlistform">
{$institutionusersform}
{include file="columnfullend.tpl"}
</div>
{include file="footer.tpl"}
{include file="header.tpl"}
{include file="columnfullstart.tpl"}
<table id="notificationstable" class="fullwidth">
<thead>
<tr>
......@@ -29,6 +28,5 @@
{/foreach}
</tbody>
</table>
{include file="columnfullend.tpl"}
{include file="footer.tpl"}
{include file="header.tpl"}
{include file="columnfullstart.tpl"}
<p>{str tag="usersearchinstructions" section="admin"}</p>
<div id="initials">
<label>{str tag="firstname"}:</label>
......@@ -45,11 +44,10 @@
{/if}
<button id="query-button" type="submit">{str tag="go"}</button>
</div>
<div id="results">
<div id="results" class="section">
{$results}
</div>
</form>
{include file="columnfullend.tpl"}
{include file="footer.tpl"}