Commit 18d57d4d authored by Liam Sharpe's avatar Liam Sharpe Committed by Aaron Wells

Added white panel-bodies to the admin area, fixed a few seachbars, removed and...

Added white panel-bodies to the admin area, fixed a few seachbars, removed and tidyed unnecessary code (Bootstrap)

Bug 1465107: Use Bootstrap CSS Framework

Change-Id: I469b2295e7d8408c29ad329c859775ecd41b31ea
parent 9fc5216c
......@@ -29,7 +29,7 @@ $data = build_grouplist_html($query, $limit, $offset);
$searchform = pieform(array(
'name' => 'search',
'renderer' => 'div',
'class' => 'form-inline',
'class' => 'form-inline mbl',
'elements' => array(
'inputgroup' => array(
'type' => 'fieldset',
......
......@@ -139,6 +139,7 @@ unset($prefs);
$form = pieform(array(
'name' => 'adduser',
'class' => 'panel panel-body pts',
'autofocus' => false,
'template' => 'adduser.php',
'templatedir' => pieform_template_dir('adduser.php'),
......
......@@ -28,6 +28,7 @@ $query = param_variable('query', '');
$offset = param_integer('offset', 0);
$limit = 20;
$customthemedefaults = array(
'background' => array('type' => 'color', 'value' => '#182768'),
'backgroundfg' => array('type' => 'color', 'value' => '#FFFFFF'),
......@@ -613,19 +614,28 @@ else {
/*search institution form*/
$searchform = pieform(array(
'name' => 'search',
'renderer' => 'oneline',
'name' => 'search',
'renderer' => 'div',
'class' => 'form-inline mbl',
'elements' => array(
'query' => array(
'type' => 'text',
'defaultvalue' => $query
'inputgroup' => array(
'type' => 'fieldset',
'title' => get_string('Query') . ': ',
'class' => 'input-group form-inline',
'elements' => array(
'query' => array(
'type' => 'text',
'defaultvalue' => $query,
),
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn btn-success input-group-btn',
'value' => get_string('search'),
)
),
),
'submit' => array(
'type' => 'submit',
'class' => 'btn btn-success',
'value' => get_string('search')
)
)
),
));
$smarty->assign('searchform', $searchform);
......
......@@ -27,6 +27,7 @@ $staffusers = get_column('usr', 'id', 'staff', 1, 'deleted', 0);
$form = pieform(array(
'name' => 'staffusers',
// 'class' => 'panel panel-body',
'elements' => array(
'users' => array(
'type' => 'userlist',
......
......@@ -109,10 +109,6 @@ function getstylesheets($stylesheets){
return $stylesheets;
}
/**
* This function creates a Smarty object and sets it up for use within our
* podclass app, setting up some variables.
......
{include file='header.tpl'}
<div class="panel panel-body">
<p>{str tag=htmlfiltersdescription section=admin}</p>
<p>{str tag=htmlfiltersdescription section=admin}</p>
{if $filters}
<h3>{str tag=installed section=admin}:</h3>
<ul>
{foreach from=$filters item=filter}
<li>{$filter->site}</li>
{/foreach}
</ul>
{else}
<p>{str tag=nofiltersinstalled section=admin}</p>
{/if}
<p>{$newfiltersdescription}</p>
<div>{$reloadform|safe}</div>
{include file='footer.tpl'}
{if $filters}
<h3>{str tag=installed section=admin}:</h3>
<ul>
{foreach from=$filters item=filter}
<li>{$filter->site}</li>
{/foreach}
</ul>
{else}
<p>{str tag=nofiltersinstalled section=admin}</p>
{/if}
<p>{$newfiltersdescription}</p>
<div>{$reloadform|safe}</div>
</div>
{include file='footer.tpl'}
\ No newline at end of file
{include file="header.tpl"}
<p>{str tag=allowediframesitesdescription section=admin}</p>
<p>{str tag=allowediframesitesdescriptiondetail section=admin}</p>
{if $editurls}
<table class="iframesources fullwidth">
<thead>
<tr>
<th>{str tag=Site}</th>
<th>{str tag=displayname}</th>
<th><span class="accessible-hidden sr-only">{str tag=edit}</span></th>
</tr>
</thead>
<tbody>
{foreach from=$editurls item=item name=urls}
<tr class="{cycle values='r0,r1' advance=false}">
<td><strong>{$item.url}</strong></td>
<td><img src="{$item.icon}" alt="{$item.name}" title="{$item.name}">&nbsp;{$item.name}</td>
<td class="right buttonscell control-buttons">
<a id="edit-{$item.id}" class="url-open-editform nojs-hidden-inline" title="{str tag=edit}" href="">
<img src="{theme_url filename="images/btn_edit.png"}" alt="{str(tag=editspecific arg1=$item.name)|escape:html|safe}">
</a>
{$item.deleteform|safe}
</td>
</tr>
<tr class="editrow {cycle} url-editform js-hidden" id="edit-{$item.id}-form">
<td colspan=3>{$item.editform|safe}</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
{$newform|safe}
<div class="panel panel-body">
<p>{str tag=allowediframesitesdescription section=admin}</p>
<p>{str tag=allowediframesitesdescriptiondetail section=admin}</p>
{if $editurls}
<table class="iframesources fullwidth">
<thead>
<tr>
<th>{str tag=Site}</th>
<th>{str tag=displayname}</th>
<th><span class="accessible-hidden sr-only">{str tag=edit}</span></th>
</tr>
</thead>
<tbody>
{foreach from=$editurls item=item name=urls}
<tr class="{cycle values='r0,r1' advance=false}">
<td><strong>{$item.url}</strong></td>
<td><img src="{$item.icon}" alt="{$item.name}" title="{$item.name}">&nbsp;{$item.name}</td>
<td class="right buttonscell control-buttons">
<a id="edit-{$item.id}" class="url-open-editform nojs-hidden-inline" title="{str tag=edit}" href="">
<img src="{theme_url filename="images/btn_edit.png"}" alt="{str(tag=editspecific arg1=$item.name)|escape:html|safe}">
</a>
{$item.deleteform|safe}
</td>
</tr>
<tr class="editrow {cycle} url-editform js-hidden" id="edit-{$item.id}-form">
<td colspan=3>{$item.editform|safe}</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
{$newform|safe}
</div>
{include file="footer.tpl"}
{include file='header.tpl'}
<div class="panel panel-body">
<div id="adminplugin">
<b>{str tag='pluginexplainaddremove'}
<br/><br/>{str tag='pluginexplainartefactblocktypes'}<br/><br/></b>
<ul class="adminpluginstypes">
{foreach from=$plugins key='plugintype' item='plugins'}
<li><h4>{str tag='plugintype'}: {$plugintype}</h4>
{assign var="installed" value=$plugins.installed}
{assign var="notinstalled" value=$plugins.notinstalled}
<ul>
{if $notinstalled}
<li class="notinstalled"><b>{str tag='notinstalledplugins'}</b>
<ul id="{$plugintype}.notinstalled">
{foreach from=$notinstalled key='plugin' item='data'}
<li id="{$plugintype}.{$plugin}">{$plugin}
{if $data.notinstallable}
{str tag='notinstallable'}: {$data.notinstallable}
{else}
<span id="{$plugintype}.{$plugin}.install">(<a href="" onClick="{$installlink}('{$plugintype}.{$plugin}'); return false;">{str tag='install' section='admin'} <span class="accessible-hidden sr-only">{$plugintype} {$plugin}</span></a>)</span>
{/if}
<span id="{$plugintype}.{$plugin}.message"></span>
</li>
{/foreach}
</ul>
</li>
{/if}
<div id="adminplugin">
<b>{str tag='pluginexplainaddremove'}
<br/><br/>{str tag='pluginexplainartefactblocktypes'}<br/><br/></b>
<ul class="adminpluginstypes">
{foreach from=$plugins key='plugintype' item='plugins'}
<li><h4>{str tag='plugintype'}: {$plugintype}</h4>
{assign var="installed" value=$plugins.installed}
{assign var="notinstalled" value=$plugins.notinstalled}
<ul>
{if $notinstalled}
<li class="notinstalled"><b>{str tag='notinstalledplugins'}</b>
<ul id="{$plugintype}.notinstalled">
{foreach from=$notinstalled key='plugin' item='data'}
<li id="{$plugintype}.{$plugin}">{$plugin}
{if $data.notinstallable}
{str tag='notinstallable'}: {$data.notinstallable}
{else}
<span id="{$plugintype}.{$plugin}.install">(<a href="" onClick="{$installlink}('{$plugintype}.{$plugin}'); return false;">{str tag='install' section='admin'} <span class="accessible-hidden sr-only">{$plugintype} {$plugin}</span></a>)</span>
{/if}
<span id="{$plugintype}.{$plugin}.message"></span>
</li>
{/foreach}
</ul>
</li>
{/if}
<li><b>{str tag='installedplugins'}</b>
<ul id="{$plugintype}.installed">
{foreach from=$installed key='plugin' item='data'}
<li id="{$plugintype}.{$plugin}">{$plugin}
{if $data.activateform}
[ {$data.activateform|safe}
{/if}
{if $data.config}
{if !$data.activateform} [ {else} | {/if}
<a href="pluginconfig.php?plugintype={$plugintype}&amp;pluginname={$plugin}">{str tag='config'} <span class="accessible-hidden sr-only ">{str tag='configfor'} {$plugintype} {$plugin}</span></a>
{/if}
{if $data.config || $data.activateform} ] {/if}
</li>
{if $data.types}
<li>
<ul>
{foreach from=$data.types key='type' item='config'}
<li>{$type}
{if $config} [ <a href="pluginconfig.php?plugintype={$plugintype}&amp;pluginname={$plugin}&amp;type={$type}">{str tag='config'} <span class="accessible-hidden sr-only">{str tag='configfor'} {$plugintype} {$plugin}</span></a> ]{/if}</li>
{/foreach}
</ul>
</li>
{/if}
{/foreach}
</ul>
</li>
</ul>
</li>
{/foreach}
</ul>
<div class="cb"></div>
<li><b>{str tag='installedplugins'}</b>
<ul id="{$plugintype}.installed">
{foreach from=$installed key='plugin' item='data'}
<li id="{$plugintype}.{$plugin}">{$plugin}
{if $data.activateform}
[ {$data.activateform|safe}
{/if}
{if $data.config}
{if !$data.activateform} [ {else} | {/if}
<a href="pluginconfig.php?plugintype={$plugintype}&amp;pluginname={$plugin}">{str tag='config'} <span class="accessible-hidden sr-only ">{str tag='configfor'} {$plugintype} {$plugin}</span></a>
{/if}
{if $data.config || $data.activateform} ] {/if}
</li>
{if $data.types}
<li>
<ul>
{foreach from=$data.types key='type' item='config'}
<li>{$type}
{if $config} [ <a href="pluginconfig.php?plugintype={$plugintype}&amp;pluginname={$plugin}&amp;type={$type}">{str tag='config'} <span class="accessible-hidden sr-only">{str tag='configfor'} {$plugintype} {$plugin}</span></a> ]{/if}</li>
{/foreach}
</ul>
</li>
{/if}
{/foreach}
</ul>
</li>
</ul>
</li>
{/foreach}
</ul>
<div class="cb"></div>
</div>
</div>
{include file='footer.tpl'}
{include file="header.tpl"}
<div class="panel panel-body">
<form action="{$WWWROOT}admin/groups/archive.php" method="post">
{if $search->sortby}
<input type="hidden" name="sortby" id="sortby" value="{$search->sortby}">
......@@ -79,5 +79,5 @@
<div>{str tag="noresultsfound"}</div>
{/if}
</div>
</div>
{include file="footer.tpl"}
{include file="header.tpl"}
<div class="panel panel-body">
{$optionform|safe}
<h3>{str tag=addcategories section=admin}</h3>
<p>{str tag=groupcategoriespagedescription section=admin}</p>
<div id="editmenus">
<div id="menuitemlist"></div>
</div>
</div>
{include file="footer.tpl"}
{include file="header.tpl"}
<div class="panel panel-body">
{$searchform|safe}
<table id="admgroupslist" class="fullwidth table table-striped">
<thead>
<tr>
<th>{str tag="groupname" section="admin"}</th>
<th class="center">{str tag="groupmembers" section="admin"}</th>
<th class="center">{str tag="groupadmins" section="admin"}</th>
<th>{str tag="grouptype" section="admin"}</th>
{if get_config('allowgroupcategories')}
<th>{str tag="groupcategory" section="group"}</th>
{/if}
<th>{str tag="groupvisible" section="admin"}</th>
<th><span class="accessible-hidden sr-only">{str tag=edit}</span></th>
</tr>
</thead>
<tbody>
{$results.tablerows|safe}
</tbody>
</table>
<table id="admgroupslist" class="fullwidth table table-striped mbm">
<thead>
<tr>
<th>{str tag="groupname" section="admin"}</th>
<th class="center">{str tag="groupmembers" section="admin"}</th>
<th class="center">{str tag="groupadmins" section="admin"}</th>
<th>{str tag="grouptype" section="admin"}</th>
{if get_config('allowgroupcategories')}
<th>{str tag="groupcategory" section="group"}</th>
{/if}
<th>{str tag="groupvisible" section="admin"}</th>
<th><span class="accessible-hidden sr-only">{str tag=edit}</span></th>
</tr>
</thead>
<tbody>
{$results.tablerows|safe}
</tbody>
</table>
{$results.pagination|safe}
</div>
{include file="footer.tpl"}
{include file="header.tpl"}
<div class="panel panel-body">
{$uploadcsvpagedescription|safe}
{$uploadcsvform|safe}
{include file="progress_meter.tpl"}
</div>
{include file="footer.tpl"}
{include file="header.tpl"}
<p>{str tag="adminuserspagedescription1" section="admin"}</p>
<div class="userlistform">
{$adminusersform|safe}
</div>
<div class="panel panel-body">
<p>{str tag="adminuserspagedescription1" section="admin"}</p>
<div class="userlistform">
{$adminusersform|safe}
</div>
</div>
{include file="footer.tpl"}
{include file="header.tpl"}
<div class="panel panel-body">
<form action="{$WWWROOT}admin/users/exportqueue.php" method="post">
{if $search->sortby}
<input type="hidden" name="sortby" id="sortby" value="{$search->sortby}">
......@@ -63,5 +63,6 @@
<div>{str tag="noresultsfound"}</div>
{/if}
</div>
</div>
{include file="footer.tpl"}
{include file="header.tpl"}
<p>{str tag="institutionadminuserspagedescription1" section="admin"}</p>
{$institutionselector|safe}
<div class="userlistform">
{$adminusersform|safe}
</div>
<div class="panel panel-body">
<p>{str tag="institutionadminuserspagedescription1" section="admin"}</p>
{$institutionselector|safe}
<div class="userlistform">
{$adminusersform|safe}
</div>
</div>
{include file="footer.tpl"}
......@@ -2,10 +2,10 @@
{if $delete_form}
<h3>{str tag="deleteinstitution" section="admin"}</h3>
<p><strong>{$institutionname}</strong></p>
<p>{str tag="deleteinstitutionconfirm" section="admin"}</p>
{$delete_form|safe}
<h3>{str tag="deleteinstitution" section="admin"}</h3>
<p><strong>{$institutionname}</strong></p>
<p>{str tag="deleteinstitutionconfirm" section="admin"}</p>
{$delete_form|safe}
{elseif $institution_form}
{if $suspended}
<div class="">
......@@ -29,53 +29,55 @@
<div class="detail">{$suspendform|safe}</div>
</div>
{/if}
{$institution_form|safe}
{$institution_form|safe}
{else}
{$searchform|safe}
<div class="table-responsive">
<table id="adminstitutionslist" class="fullwidth table table-striped">
<thead>
<tr>
<th>{str tag="institution"}</th>
<th class="center">{str tag="Members" section="admin"}</th>
<th class="center">{str tag="Maximum" section="admin"}</th>
<th class="center">{str tag="Staff" section="admin"}</th>
<th class="center">{str tag="Admins" section="admin"}</th>
<th></th>
<th><span class="accessible-hidden sr-only">{str tag=edit}</span></th>
</tr>
</thead>
<tfoot>
<tr>
<td>
{if $siteadmin}
<form action="" method="post">
<input class="submit btn btn-success" type="submit" name="add" value="{str tag="addinstitution" section="admin"}" id="admininstitution_add">
</form>
{/if}
</td>
<td colspan="6" class="institutionedituserbuttons right">{if $countinstitutions > 1}
<form action="{$WWWROOT}admin/users/institutionusers.php" method="post">
<input class="submit btn btn-success" type="submit" name="editmembers" value="{str tag="editmembers" section="admin"}">
</form>
<form action="{$WWWROOT}admin/users/institutionstaff.php" method="post">
<input class="submit btn btn-success" type="submit" name="editstaff" value="{str tag="editstaff" section="admin"}">
</form>
<form action="{$WWWROOT}admin/users/institutionadmins.php" method="post">
<input class="submit btn btn-success" type="submit" name="editadmins" value="{str tag="editadmins" section="admin"}">
</form>
{/if}</td>
<td></td>
</tr>
</tfoot>
<tbody>
{$results.tablerows|safe}
</tbody>
</table>
</div>
<div class="center">
{$results.pagination|safe}
<div class="panel panel-body">
{$searchform|safe}
<div class="table-responsive">
<table id="adminstitutionslist" class="fullwidth table table-striped">
<thead>
<tr>
<th>{str tag="institution"}</th>
<th class="center">{str tag="Members" section="admin"}</th>
<th class="center">{str tag="Maximum" section="admin"}</th>
<th class="center">{str tag="Staff" section="admin"}</th>
<th class="center">{str tag="Admins" section="admin"}</th>
<th></th>
<th><span class="accessible-hidden sr-only">{str tag=edit}</span></th>
</tr>
</thead>
<tfoot>
<tr>
<td>
{if $siteadmin}
<form action="" method="post">
<input class="submit btn btn-success" type="submit" name="add" value="{str tag="addinstitution" section="admin"}" id="admininstitution_add">
</form>
{/if}
</td>
<td colspan="6" class="institutionedituserbuttons right">{if $countinstitutions > 1}
<form action="{$WWWROOT}admin/users/institutionusers.php" method="post">
<input class="submit btn btn-success" type="submit" name="editmembers" value="{str tag="editmembers" section="admin"}">
</form>
<form action="{$WWWROOT}admin/users/institutionstaff.php" method="post">
<input class="submit btn btn-success" type="submit" name="editstaff" value="{str tag="editstaff" section="admin"}">
</form>
<form action="{$WWWROOT}admin/users/institutionadmins.php" method="post">
<input class="submit btn btn-success" type="submit" name="editadmins" value="{str tag="editadmins" section="admin"}">
</form>
{/if}</td>
<td></td>
</tr>
</tfoot>
<tbody>
{$results.tablerows|safe}
</tbody>
</table>
</div>
</div>
<div class="center">
{$results.pagination|safe}
</div>
{/if}
{include file="footer.tpl"}
......@@ -24,17 +24,22 @@
<td class="center">{if $institution->suspended}<span class="suspended">{str tag="suspendedinstitution" section=admin}</span>{/if}</td>
<td class="controls">
<form action="" method="post">
<input type="hidden" name="i" value="{$institution->name}">
<input type="hidden" name="edit" value=1>
<input type="image" name="edit" title="{str tag="edit"}" src="{theme_url filename="images/btn_edit.png"}" alt="{str(tag=editspecific arg1=$institution->displayname)|escape:html|safe}">
</form>
<input type="hidden" name="i" value="{$institution->name}">
<button type="submit" name="edit" value="1" class="btn-link btn btn-xs pull-right" alt="{str(tag=editspecific arg1=$institution->displayname)|escape:html|safe}">
<span class="icon icon-cog icon-lg text-default"></span>
<span class="sr-only">
{str tag="edit"}
</span>
</button>
{if $siteadmin && !$institution->members && $institution->name != 'mahara'}
<form action="" method="post">
<input type="hidden" name="i" value="{$institution->name}">
<input type="hidden" name="delete" value="1">
<input type="image" name="delete" title="{str tag="delete"}" src="{theme_url filename="images/btn_deleteremove.png"}" alt="{str(tag=deletespecific arg1=$institution->displayname)|escape:html|safe}">
</form>
<button type="submit" name="delete" value="1" class="btn-link btn btn-xs pull-right" alt="{str(tag=deletespecific arg1=$institution->displayname)|escape:html|safe}">
<span class="icon icon-trash text-danger icon-lg"></span>
<span class="sr-only">
{str tag="delete"}
</span>
</button>
{/if}
</form>
</td>
</tr>
{/foreach}
\ No newline at end of file
{/foreach}
{include file="header.tpl"}
<p>{str tag="institutionstaffuserspagedescription1" section="admin"}</p>
{$institutionselector|safe}