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

Admin (bootstrap)

Bug 1465107: Use Bootstrap CSS Framework

Change-Id: Iaac575babb46a09eb246ac76b9a406124c800ab8
parent ecff21a9
......@@ -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);
......
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