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

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