Commit 3015027a authored by Naomi Guyer's avatar Naomi Guyer Committed by Aaron Wells

Admin (bootstrap)

Bug 1465107: Use Bootstrap CSS Framework

Change-Id: Iaac575babb46a09eb246ac76b9a406124c800ab8
parent ecff21a9
......@@ -46,6 +46,7 @@ $smarty->assign('cleanurls', get_config('cleanurls'));
$smarty->assign('cleanurlconfig', $cleanurlconfig);
$smarty->assign('regenerateform', $regenerateform);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-puzzle-piece');
$smarty->display('admin/extensions/cleanurls.tpl');
// Regenerates urlids for users, groups, and portfolio pages.
......
......@@ -51,4 +51,5 @@ $smarty->assign('reloadform', $reloadform);
$smarty->assign('newfiltersdescription', get_string('newfiltersdescription', 'admin', get_config('libroot') . 'htmlpurifiercustom'));
$smarty->assign('filters', $filters);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-puzzle-piece');
$smarty->display('admin/extensions/filters.tpl');
......@@ -257,6 +257,7 @@ EOF;
$smarty = smarty();
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-puzzle-piece');
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('editurls', $editurls);
$smarty->assign('newform', $newform);
......
......@@ -191,4 +191,5 @@ $smarty->assign('INLINEJAVASCRIPT', $javascript);
$smarty->assign('plugins', $plugins);
$smarty->assign('installlink', 'installplugin');
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-puzzle-piece');
$smarty->display('admin/extensions/plugins.tpl');
......@@ -67,4 +67,5 @@ $smarty->assign('sortby', $search['sortby']);
$smarty->assign('sortdir', $search['sortdir']);
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-users');
$smarty->display('admin/groups/archives.tpl');
\ No newline at end of file
......@@ -201,6 +201,7 @@ EOJS;
$smarty = smarty();
$smarty->assign('PAGEHEADING', hsc(get_string('groupcategories', 'admin')));
$smarty->assign('PAGEICON', 'fa fa-users');
$smarty->assign('INLINEJAVASCRIPT', $ijs);
$smarty->assign('optionform', $optionform);
$smarty->display('admin/groups/groupcategories.tpl');
......@@ -55,6 +55,7 @@ EOF;
$smarty = smarty(array('paginator'));
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-users');
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('searchform', $searchform);
$smarty->assign('results', $data);
......
......@@ -125,6 +125,7 @@ function groupadminsform_submit(Pieform $form, $values) {
$smarty = smarty();
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-users');
$smarty->assign('quotasform', $quotasform);
$smarty->assign('groupname', $group->name);
$smarty->assign('managegroupform', $groupadminsform);
......
......@@ -380,4 +380,5 @@ $smarty = smarty(array('adminuploadcsv'));
$smarty->assign('uploadcsvpagedescription', $uploadcsvpagedescription);
$smarty->assign('uploadcsvform', $form);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-users');
$smarty->display('admin/groups/uploadcsv.tpl');
......@@ -241,4 +241,5 @@ $smarty = smarty(array('adminuploadcsv'));
$smarty->assign('uploadcsvpagedescription', $uploadcsvpagedescription);
$smarty->assign('uploadcsvform', $form);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-users');
$smarty->display('admin/groups/uploadcsv.tpl');
......@@ -361,4 +361,5 @@ function adduser_submit(Pieform $form, $values) {
$smarty = smarty(array('adminadduser'));
$smarty->assign('form', $form);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-user-plus');
$smarty->display('admin/users/add.tpl');
......@@ -70,4 +70,5 @@ function adminusers_submit(Pieform $form, $values) {
$smarty = smarty();
$smarty->assign('adminusersform', $form);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-user');
$smarty->display('admin/users/admin.tpl');
......@@ -171,4 +171,5 @@ $smarty->assign('sortby', $search['sortby']);
$smarty->assign('sortdir', $search['sortdir']);
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-user');
$smarty->display('admin/users/exportqueue.tpl');
......@@ -95,4 +95,5 @@ addLoadEvent(function() {
});');
$smarty->assign('adminusersform', pieform($form));
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-university');
$smarty->display('admin/users/institutionadmins.tpl');
......@@ -153,4 +153,5 @@ $smarty = smarty(array('adminsitepages'), array(), array('admin' => array('disca
$smarty->assign('noinstitutionsadmin', (($USER->admin) ? get_string('noinstitutionstaticpagesadmin', 'admin', get_config('wwwroot') . 'admin/site/pages.php') : false));
$smarty->assign('pageeditform', $form);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-university');
$smarty->display('admin/site/pages.tpl');
......@@ -642,6 +642,7 @@ EOF;
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('siteadmin', $USER->get('admin'));
$smarty->assign('PAGEICON', 'fa fa-university');
$smarty->assign('PAGEHEADING', get_string('admininstitutions', 'admin'));
$smarty->display('admin/users/institutions.tpl');
exit;
......@@ -1141,6 +1142,7 @@ if (isset($suspended)) {
}
$smarty->assign('PAGEHEADING', get_string('admininstitutions', 'admin'));
$smarty->assign('PAGEICON', 'fa fa-university');
$smarty->display('admin/users/institutions.tpl');
function theme_sort($a, $b) {
......
......@@ -93,4 +93,5 @@ addLoadEvent(function() {
});');
$smarty->assign('staffusersform', pieform($form));
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-university');
$smarty->display('admin/users/institutionstaff.tpl');
......@@ -294,4 +294,5 @@ $smarty->assign('usertypeselector', $usertypeselector);
$smarty->assign('instructions', get_string('institutionusersinstructions' . $usertype . '1', 'admin', $userlistelement['lefttitle'], $userlistelement['righttitle']));
$smarty->assign('institutionusersform', $userlistform);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-university');
$smarty->display('admin/users/institutionusers.tpl');
......@@ -74,4 +74,5 @@ $smarty = smarty();
$smarty->assign('users', $users);
$smarty->assign('types', $types);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-university');
$smarty->display('admin/users/notifications.tpl');
......@@ -76,6 +76,7 @@ EOF;
$smarty = smarty();
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-university');
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('data', $data);
$smarty->assign('institutionselector', $institutionselector);
......
......@@ -154,7 +154,7 @@ $elements['submit'] = array(
$form = pieform(array(
'name' => 'progressbarform',
'renderer' => 'table',
'renderer' => 'div',
'plugintype' => 'core',
'pluginname' => 'admin',
'elements' => $elements,
......@@ -232,4 +232,5 @@ $smarty->assign('institutionselector', $institutionselector);
$smarty->assign('enabled', get_config('showprogressbar'));
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-university');
$smarty->display('admin/users/progressbar.tpl');
......@@ -105,5 +105,5 @@ $smarty->assign('sortby', $search['sortby']);
$smarty->assign('sortdir', $search['sortdir']);
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-search');
$smarty->assign('PAGEICON', 'fa fa-user');
$smarty->display('admin/users/search.tpl');
......@@ -67,4 +67,5 @@ function staffusers_submit(Pieform $form, $values) {
$smarty = smarty();
$smarty->assign('staffusersform', $form);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-user');
$smarty->display('admin/users/staff.tpl');
......@@ -101,6 +101,7 @@ EOF;
$smarty = smarty(array('paginator'));
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-university');
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('institutiondata', $institutiondata);
......
......@@ -108,6 +108,7 @@ $form = new Pieform(array(
$smarty->assign('buttonformopen', $form->get_form_tag());
$smarty->assign('buttonform', $form->build(false));
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-user-times');
$smarty->display('admin/users/suspended.tpl');
function buttons_submit_unsuspend(Pieform $form, $values) {
......
......@@ -633,4 +633,5 @@ $smarty = smarty(array('adminuploadcsv'));
$smarty->assign('uploadcsvpagedescription', $uploadcsvpagedescription);
$smarty->assign('uploadcsvform', $form);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-user');
$smarty->display('admin/users/uploadcsv.tpl');
......@@ -49,4 +49,5 @@ $smarty->assign('institutionselector', $s['institutionselector']);
$smarty->assign('form', $form);
$smarty->assign('INLINEJAVASCRIPT', $s['institutionselectorjs'] . $js);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-university');
$smarty->display('artefact:file:files.tpl');
......@@ -2185,7 +2185,7 @@ function auth_generate_registration_form($formname, $authname='internal', $goto)
'method' => 'post',
'action' => '',
'showdescriptiononerror' => false,
'renderer' => 'table',
'renderer' => 'div',
'elements' => $elements,
'spam' => array(
'secret' => get_config('formsecret'),
......
......@@ -26,6 +26,8 @@ $owner = null;
$groupid = param_integer('group', 0);
$institutionname = param_alphanum('institution', false);
$urlparams = array();
$pageIcon = 'fa fa-folder';
if (!empty($groupid)) {
define('MENUITEM', 'groups/collections');
define('GROUP', $groupid);
......@@ -56,6 +58,8 @@ else if (!empty($institutionname)) {
define('INSTITUTIONALADMIN', 1);
define('MENUITEM', 'manageinstitutions/institutioncollections');
define('TITLE', get_string('institutioncollections', 'collection'));
$pageIcon = 'fa fa-university';
// Check if user is a institution admin
$canedit = $USER->get('admin') || $USER->is_institutional_admin();
if (!$canedit) {
......@@ -130,6 +134,6 @@ $smarty->assign('urlparamsstr', $urlparamsstr);
$smarty->assign('collections', $data->data);
$smarty->assign('pagination', $pagination['html']);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-folder-open');
$smarty->assign('PAGEICON', $pageIcon);
$smarty->assign('PAGESUBHEADING', SUBTITLE);
$smarty->display('collection/index.tpl');
......@@ -1537,7 +1537,7 @@ EOF;
'elements' => array(),
// The form renderer (see the pieform/renderers directory)
'renderer' => 'table',
'renderer' => 'div',
// The directory (relative to the include path) to search for templates
'templatedir' => '',
......
......@@ -71,15 +71,87 @@ select {
padding: 20px 0;
position: relative;
&.login {
input {
&[type=text],
&[type=password] {
max-width:100%;
}
}
}
&.input-small,
&:last-child {
border: 0;
}
&.tab-pane,
&.collapsible-group {
border: 0;
padding: 0;
}
&.checkbox {
label {
padding-left: 0;
}
.checkbox {
display: inline-block;
}
input[type=checkbox] {
margin-left: 0;
}
}
&.calendar {
.calendar {
margin-left: 0;
width: 165px;
}
}
// reset bootstrap button style for cancel button
&.submitcancel {
.cancel {
background-color: transparent;
border: none;
text-decoration: underline;
color: $link-color;
&:hover {
color: $link-hover-color;
}
}
}
&.filebrowser {
label {
vertical-align: top;
}
}
&.checkbox {
.description {
margin-left:0;
max-width: 700px;
}
}
&.tags {
.tag-wrapper {
display: block;
@media (min-width: $screen-sm-min) {
display: inline-block;
}
input {
max-width: 85%;
display: inline-block;
@media (min-width: $screen-sm-min) {
max-width: 100%;
}
}
}
}
h3 {
font-size: $font-size-large;
padding-bottom: 10px;
......@@ -107,16 +179,6 @@ select {
}
}
@media (min-width: $screen-sm-min) {
&.input-small {
max-width: 100%;
width: 25%;
.input-small {
margin:0;
}
}
}
.pseudolabel ~ .radio:not(.form-group){
&:nth-child(n+3) {
@extend .align-with-input;
......@@ -135,18 +197,6 @@ select {
}
}
&.checkbox {
label {
padding-left: 0;
}
.checkbox {
display: inline-block;
}
input[type=checkbox] {
margin-left: 0;
}
}
.help {
position: absolute;
right: 0;
......@@ -154,32 +204,6 @@ select {
margin-top:-20px;
}
&.calendar {
.calendar {
margin-left: 0;
width: 165px;
}
}
// reset bootstrap button style for cancel button
&.submitcancel {
.cancel {
background-color: transparent;
border: none;
text-decoration: underline;
color: $link-color;
&:hover {
color: $link-hover-color;
}
}
}
&.filebrowser {
label {
vertical-align: top;
}
}
.errmsg {
@extend .align-with-input;
color: $brand-danger;
......@@ -191,12 +215,7 @@ select {
margin-left: 230px;
}
}
&.checkbox {
.description {
margin-left:0;
max-width: 700px;
}
}
.description {
@extend .align-with-input;
color: $gray-light;
......@@ -214,24 +233,19 @@ select {
margin-left: 0;
}
}
&.tags {
.tag-wrapper {
display: block;
@media (min-width: $screen-sm-min) {
display: inline-block;
}
input {
max-width: 85%;
display: inline-block;
@media (min-width: $screen-sm-min) {
max-width: 100%;
}
}
}
}
.requiredmarker {
color: $brand-danger;
}
@media (min-width: $screen-sm-min) {
&.input-small {
max-width: 100%;
width: 25%;
.input-small {
margin:0;
}
}
}
}
// remove styles on outer element as class is duplicated to form element
......
......@@ -84,3 +84,15 @@
}
}
}
.list-group {
.user-panel & {
min-height: 41px;
}
a {
color: inherit;
&:hover {
}
}
}
......@@ -13,6 +13,7 @@
overflow: hidden;
cursor: pointer;
padding: 0;
min-width:0;
}
.switch-inner {
......
......@@ -11,6 +11,11 @@ h1 {
}
}
// Add padding if there is no navigation
.header + .container h1 {
padding-top: 20px;
}
h2 {
font-size: $font-size-h2 * 0.88;
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{include file="header.tpl"}
{dynamic}{insert_messages placement='loginbox'}{/dynamic}
<div id="loginform_container"><noscript><p>{str tag="javascriptnotenabled"}</p></noscript>
{$login_form|safe}
</div>
<div class="row">
<div class="col-md-3">
<div class="panel panel-default">
<h3 class="panel-heading">
{str tag="login"}
<span class="pull-right">{contextualhelp plugintype='core' pluginname='core' section='loginbox'}</span>
</h3>
<div class="panel-body">
<noscript><p>{str tag="javascriptnotenabled"}</p></noscript>
{dynamic}{insert_messages placement='loginbox'}{/dynamic}
<div id="loginform_container">
{$login_form|safe}
</div>
</div>
</div>
</div>
</div>
{include file="footer.tpl"}
......@@ -13,16 +13,20 @@
</div>
{/if}
{if $sbdata.invitedgroups}
<div id="invitedgroups" class="list-group-item pts"><a href="{$WWWROOT}group/mygroups.php?filter=invite" class="btn-group">
<span id="invitedgroupsmessage">{$sbdata.invitedgroupsmessage}</span>
<span id="invitedgroupscount">{$sbdata.invitedgroups}</span>
</a></div>
<div id="invitedgroups" class="list-group-item list-group-item-warning pts">
<a href="{$WWWROOT}group/mygroups.php?filter=invite" class="btn-group">
<span id="invitedgroupsmessage" class="label label-warning mrs">{$sbdata.invitedgroupsmessage}</span>
<span id="invitedgroupscount">{$sbdata.invitedgroups}</span>
</a>
</div>
{/if}
{if $sbdata.pendingfriends}
<div id="pendingfriends" class="list-group-item pts"><a href="{$WWWROOT}user/myfriends.php?filter=pending" class="btn-friend">
<span id="pendingfriendscount" class="badge pull-right">{$sbdata.pendingfriends}</span>
<span id="pendingfriendsmessage">{$sbdata.pendingfriendsmessage}</span>
</a></div>
<div id="pendingfriends" class="list-group-item list-group-item-warning pts">
<a href="{$WWWROOT}user/myfriends.php?filter=pending">
<span id="pendingfriendscount" class="label label-warning mrs">{$sbdata.pendingfriends}</span>
<span id="pendingfriendsmessage">{$sbdata.pendingfriendsmessage}</span>
</a>
</div>
{/if}
{if $sbdata.groups}
<div id="groups" class="list-group-item pts">
......
......@@ -160,7 +160,7 @@ $addform = pieform(array(
'name' => 'addblock',
'method' => 'post',
'jsform' => true,
'renderer' => 'table',
'renderer' => 'div',
'autofocus' => false,
'elements' => array(
'cellchooser' => array(
......
......@@ -40,6 +40,7 @@ $accesslists = View::get_accesslists(null, null, $institution);
$smarty = smarty();
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-university');
$smarty->assign('institutionselector', $s['institutionselector']);
$smarty->assign('INLINEJAVASCRIPT', $s['institutionselectorjs']);
$smarty->assign('accesslists', $accesslists);
......
......@@ -73,6 +73,7 @@ $createviewform = pieform(create_view_form(null, $institution));
$smarty = smarty(array('paginator'));
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-university');
$smarty->assign('institutionselector', $s['institutionselector']);
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('views', $data->data);
......
......@@ -75,6 +75,8 @@ $smarty->assign('opened', param_alphanumext('open', ''));
$smarty->assign('TERTIARYMENU', $webservice_menu);
$smarty->assign('PAGEHEADING', $heading);
$smarty->assign('INLINEJAVASCRIPT', $inlinejs);
$smarty->assign('PAGEICON', 'fa fa-puzzle-piece');
$smarty->assign('pagedescription', get_string('webservicesconfigdesc', 'auth.webservice'));
$smarty->display('auth:webservice:configform.tpl');
......
......@@ -138,6 +138,7 @@ safe_require('auth', 'webservice');
PluginAuthWebservice::menu_items($smarty, 'webservice/oauthconfig');
$smarty->assign('form', $form);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEICON', 'fa fa-puzzle-piece');
$smarty->display('form.tpl');
function webservice_main_submit(Pieform $form, $values) {
......@@ -254,7 +255,7 @@ function webservice_server_edit_form($dbserver, $sopts, $iopts) {
);
$form = array(
'renderer' => 'table',
'renderer' => 'div',
'type' => 'div',
'id' => 'maintable',
'name' => 'tokenconfig',
......@@ -475,7 +476,7 @@ function webservice_server_list_form($sopts, $iopts) {
);