Commit c55e73aa authored by Pat Kira's avatar Pat Kira Committed by Aaron Wells
Browse files

Dashboard (bootstrap)

Bug 1465107: Use Bootstrap CSS Framework
Dashboard widgets styling
Style dashboard and user's setting

Change-Id: I2ca8f561117daa7d4e6b1fd6b163a2a6421751c5
parent 3edfb01d
...@@ -110,12 +110,14 @@ if ($blogcount != 1 && $prefs->multipleblogs == 1) { ...@@ -110,12 +110,14 @@ if ($blogcount != 1 && $prefs->multipleblogs == 1) {
$elements['submit'] = array( $elements['submit'] = array(
'type' => 'submit', 'type' => 'submit',
'class' => 'btn btn-success',
'value' => get_string('save') 'value' => get_string('save')
); );
$prefsform = array( $prefsform = array(
'name' => 'accountprefs', 'name' => 'accountprefs',
'renderer' => 'table', 'renderer' => 'div',
'class' => 'form-group',
'method' => 'post', 'method' => 'post',
'jsform' => true, 'jsform' => true,
'plugintype' => 'core', 'plugintype' => 'core',
......
...@@ -63,7 +63,7 @@ function displaymenuitems(itemlist) { ...@@ -63,7 +63,7 @@ function displaymenuitems(itemlist) {
var rows = map(formatrow,itemlist); var rows = map(formatrow,itemlist);
var form = FORM({'id':'form','method':'post','enctype':'multipart/form-data', var form = FORM({'id':'form','method':'post','enctype':'multipart/form-data',
'encoding':'multipart/form-data'}, 'encoding':'multipart/form-data'},
TABLE({'class':'nohead'},TBODY(null,[thead,rows,addform()]))); TABLE({'class':'nohead table table-striped'},TBODY(null,[thead,rows,addform()])));
replaceChildNodes($('menuitemlist'),form); replaceChildNodes($('menuitemlist'),form);
} }
......
...@@ -242,7 +242,7 @@ $elements['submit'] = array( ...@@ -242,7 +242,7 @@ $elements['submit'] = array(
$siteform = pieform(array( $siteform = pieform(array(
'name' => 'edituser_site', 'name' => 'edituser_site',
'renderer' => 'table', 'renderer' => 'div',
'plugintype' => 'core', 'plugintype' => 'core',
'pluginname' => 'admin', 'pluginname' => 'admin',
'elements' => $elements, 'elements' => $elements,
...@@ -753,7 +753,7 @@ if ($USER->get('admin') ...@@ -753,7 +753,7 @@ if ($USER->get('admin')
$institutionform = pieform(array( $institutionform = pieform(array(
'name' => 'edituser_institution', 'name' => 'edituser_institution',
'renderer' => 'table', 'renderer' => 'div',
'plugintype' => 'core', 'plugintype' => 'core',
'pluginname' => 'admin', 'pluginname' => 'admin',
'elements' => $elements, 'elements' => $elements,
......
...@@ -586,7 +586,7 @@ if ($institution || $add) { ...@@ -586,7 +586,7 @@ if ($institution || $add) {
$institutionform = pieform(array( $institutionform = pieform(array(
'name' => 'institution', 'name' => 'institution',
'renderer' => 'table', 'renderer' => 'div',
'plugintype' => 'core', 'plugintype' => 'core',
'pluginname' => 'admin', 'pluginname' => 'admin',
'elements' => $elements 'elements' => $elements
...@@ -621,6 +621,7 @@ else { ...@@ -621,6 +621,7 @@ else {
), ),
'submit' => array( 'submit' => array(
'type' => 'submit', 'type' => 'submit',
'class' => 'btn btn-success',
'value' => get_string('search') 'value' => get_string('search')
) )
) )
......
...@@ -218,7 +218,7 @@ function formGlobalError(form, data) { ...@@ -218,7 +218,7 @@ function formGlobalError(form, data) {
// Message related functions // Message related functions
function makeMessage(message, type) { function makeMessage(message, type) {
return DIV({'class': type}, message); return DIV({'class': type +' alert alert-success'}, message);
} }
/* Appends a status message to the end of elemid */ /* Appends a status message to the end of elemid */
......
...@@ -225,7 +225,6 @@ function general_account_prefs_form_elements($prefs) { ...@@ -225,7 +225,6 @@ function general_account_prefs_form_elements($prefs) {
'type' => 'radio', 'type' => 'radio',
'defaultvalue' => $prefs->friendscontrol, 'defaultvalue' => $prefs->friendscontrol,
'title' => get_string('friendsdescr', 'account'), 'title' => get_string('friendsdescr', 'account'),
'separator' => '<br>',
'options' => array( 'options' => array(
'nobody' => get_string('friendsnobody', 'account'), 'nobody' => get_string('friendsnobody', 'account'),
'auth' => get_string('friendsauth', 'account'), 'auth' => get_string('friendsauth', 'account'),
...@@ -261,7 +260,6 @@ function general_account_prefs_form_elements($prefs) { ...@@ -261,7 +260,6 @@ function general_account_prefs_form_elements($prefs) {
'type' => 'radio', 'type' => 'radio',
'defaultvalue' => $prefs->messages, 'defaultvalue' => $prefs->messages,
'title' => get_string('messagesdescr', 'account'), 'title' => get_string('messagesdescr', 'account'),
'separator' => '<br>',
'options' => array( 'options' => array(
'nobody' => get_string('messagesnobody', 'account'), 'nobody' => get_string('messagesnobody', 'account'),
'friends' => get_string('messagesfriends', 'account'), 'friends' => get_string('messagesfriends', 'account'),
...@@ -2071,6 +2069,7 @@ function friends_control_sideblock($returnto='myfriends') { ...@@ -2071,6 +2069,7 @@ function friends_control_sideblock($returnto='myfriends') {
), ),
'submit' => array( 'submit' => array(
'type' => 'submit', 'type' => 'submit',
'class' => 'btn btn-success',
'value' => get_string('save') 'value' => get_string('save')
), ),
'returnto' => array( 'returnto' => array(
...@@ -2185,6 +2184,7 @@ function addfriend_form($friendid) { ...@@ -2185,6 +2184,7 @@ function addfriend_form($friendid) {
'elements' => array( 'elements' => array(
'addfriend_submit' => array( 'addfriend_submit' => array(
'type' => 'submit', 'type' => 'submit',
'class' => 'btn btn-success',
'value' => get_string('addtofriendslist', 'group'), 'value' => get_string('addtofriendslist', 'group'),
), ),
'id' => array( 'id' => array(
......
...@@ -6077,6 +6077,7 @@ function create_view_form($group=null, $institution=null, $template=null, $colle ...@@ -6077,6 +6077,7 @@ function create_view_form($group=null, $institution=null, $template=null, $colle
), ),
'submit' => array( 'submit' => array(
'type' => 'submit', 'type' => 'submit',
'class' => 'btn btn-success',
'value' => get_string('createview', 'view'), 'value' => get_string('createview', 'view'),
), ),
) )
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
{/if} {/if}
</span> </span>
{if $post.files} {if $post.files}
<div id="postfiles"> <div id="postfiles" class="table-responsive">
<table class="cb attachments fullwidth"> <table class="cb attachments fullwidth">
<thead class="expandable-head"> <thead class="expandable-head">
<tr> <tr>
......
{include file="header.tpl"} {include file="header.tpl"}
<div class="rbuttons"> <div class="text-right">
<a class="btn" href="{$WWWROOT}artefact/blog/new/index.php">{str section="artefact.blog" tag="addblog"}</a> <a class="btn btn-success" href="{$WWWROOT}artefact/blog/new/index.php">{str section="artefact.blog" tag="addblog"}</a>
</div> </div>
<div id="myblogs" class="rel"> <div id="myblogs" class="rel">
{if !$blogs->data} {if !$blogs->data}
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</div> </div>
{if $post->tags}<div id="posttags_{$post->id}" class="tags">{str tag=tags}: {list_tags owner=$post->author tags=$post->tags}</div>{/if} {if $post->tags}<div id="posttags_{$post->id}" class="tags">{str tag=tags}: {list_tags owner=$post->author tags=$post->tags}</div>{/if}
{if $post->files} {if $post->files}
<div id="postfiles_{$post->id}"> <div id="postfiles_{$post->id}" class="table-responsive">
<table class="cb attachments fullwidth table table-striped"> <table class="cb attachments fullwidth table table-striped">
<thead class="expandable-head"> <thead class="expandable-head">
<tr> <tr>
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
{$artefactdescription|clean_html|safe} {$artefactdescription|clean_html|safe}
{if isset($attachments)} {if isset($attachments)}
{if $artefact->get('tags')}<div class="tags">{str tag=tags}: {list_tags owner=$artefact->get('owner') tags=$artefact->get('tags')}</div>{/if} {if $artefact->get('tags')}<div class="tags">{str tag=tags}: {list_tags owner=$artefact->get('owner') tags=$artefact->get('tags')}</div>{/if}
<table class="cb attachments fullwidth"> <div class="table-responsive">
<table class="attachments fullwidth">
<thead class="expandable-head"> <thead class="expandable-head">
<tr> <tr>
<td colspan="2"> <td colspan="2">
...@@ -31,6 +32,7 @@ ...@@ -31,6 +32,7 @@
{/foreach} {/foreach}
</tbody> </tbody>
</table> </table>
</div>
{/if} {/if}
{if $license} {if $license}
<div class="postlicense"> <div class="postlicense">
......
{include file="header.tpl"} {include file="header.tpl"}
<div id="myblogs" class="rel"> <div id="myblogs" class="rel">
<div class="pull-right"> <div class="text-right">
<a class="btn btn-success addpost" href="{$WWWROOT}artefact/blog/post.php?blog={$blog->get('id')}">{str section="artefact.blog" tag="addpost"}</a> <a class="btn btn-success addpost" href="{$WWWROOT}artefact/blog/post.php?blog={$blog->get('id')}">{str section="artefact.blog" tag="addpost"}</a>
{if !$blog->get('locked')} {if !$blog->get('locked')}
<a class="btn btn-success settings" href="{$WWWROOT}artefact/blog/settings/index.php?id={$blog->get('id')}">{str section="artefact.blog" tag="settings"}</a> <a class="btn btn-success settings" href="{$WWWROOT}artefact/blog/settings/index.php?id={$blog->get('id')}">{str section="artefact.blog" tag="settings"}</a>
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
<div class="tags">{str tag=tags}: {list_tags owner=$post->owner tags=$post->tags}</div> <div class="tags">{str tag=tags}: {list_tags owner=$post->owner tags=$post->tags}</div>
{/if}</div> {/if}</div>
{if $post->files} {if $post->files}
<table class="cb attachments fullwidth"> <div class="table-responsive">
<table class="cb attachments fullwidth table">
<thead class="expandable-head"> <thead class="expandable-head">
<tr> <tr>
<td colspan="2"> <td colspan="2">
...@@ -34,6 +35,7 @@ ...@@ -34,6 +35,7 @@
{/foreach} {/foreach}
</tbody> </tbody>
</table> </table>
</div>
{/if} {/if}
{if $options.viewid && ($post->commentcount || $post->commentcount === 0)} {if $options.viewid && ($post->commentcount || $post->commentcount === 0)}
<div class="comments"> <div class="comments">
......
{if $feedback} {if $feedback}
<div class="viewfooter"> <div class="viewfooter table-responsive">
<table id="feedbacktable" class="feedbacktable fullwidth table"> <table id="feedbacktable" class="feedbacktable fullwidth table">
<tbody> <tbody>
{$feedback->tablerows|safe} {$feedback->tablerows|safe}
......
{if $images} {if $images}
<div class="slideshow" id="slideshow{$instanceid}"> <div class="slideshow table-responsive" id="slideshow{$instanceid}">
<table class="images fullwidth"> <table class="images fullwidth table table-striped">
<tr> <tr>
<td class="control"> <td class="control">
<span class="prev disabled">&lsaquo;</span> <span class="prev disabled">&lsaquo;</span>
......
{if !$filelist} {if !$filelist}
<p>{str tag=nofilesfound section=artefact.file}</p> <p>{str tag=nofilesfound section=artefact.file}</p>
{else} {else}
<div class="table-responsive">
<table id="{$prefix}_filelist" class="tablerenderer filelist fullwidth table table-striped"> <table id="{$prefix}_filelist" class="tablerenderer filelist fullwidth table table-striped">
<thead> <thead>
<tr> <tr>
...@@ -100,6 +101,7 @@ ...@@ -100,6 +101,7 @@
{/foreach} {/foreach}
</tbody> </tbody>
</table> </table>
</div>
<div id="downloadfolder"> <div id="downloadfolder">
<a href="{$WWWROOT}artefact/file/downloadfolder.php?{$folderparams|safe}">{str tag=downloadfolderziplink section=artefact.file}</a> <a href="{$WWWROOT}artefact/file/downloadfolder.php?{$folderparams|safe}">{str tag=downloadfolderziplink section=artefact.file}</a>
</div> </div>
......
{$text|clean_html|safe} {$text|clean_html|safe}
{if isset($attachments)} {if isset($attachments)}
<table class="cb attachments fullwidth"> <table class="attachments fullwidth table table-striped">
<thead class="expandable-head"> <thead class="expandable-head">
<tr> <tr>
<td colspan="2"> <td colspan="2">
......
{include file="header.tpl"} {include file="header.tpl"}
<p>{str tag=notesdescription1 section=artefact.internal}</p> <p>{str tag=notesdescription1 section=artefact.internal}</p>
<div class="table-responsive">
<table id="notes" class="table table-striped"> <table id="notes" class="table table-striped">
<thead> <thead>
<tr> <tr>
...@@ -92,5 +93,6 @@ ...@@ -92,5 +93,6 @@
{/foreach} {/foreach}
</tbody> </tbody>
</table> </table>
</div>
{$pagination.html|safe} {$pagination.html|safe}
{include file="footer.tpl"} {include file="footer.tpl"}
<br /><div class="rbuttons"> <br /><div class="rbuttons">
<a class="btn" href="{$WWWROOT}artefact/internal/socialprofile.php">{str tag=newsocialprofile section=artefact.internal}</a> <a class="btn" href="{$WWWROOT}artefact/internal/socialprofile.php">{str tag=newsocialprofile section=artefact.internal}</a>
</div> </div>
<table id="socialprofilelist" class="tablerenderer fullwidth table"> <div class="table-responsive">
<table id="socialprofilelist" class="tablerenderer fullwidth table table-striped">
<thead> <thead>
<tr> <tr>
<th class="icons"></th> <th class="icons"></th>
...@@ -34,4 +35,5 @@ ...@@ -34,4 +35,5 @@
{/foreach} {/foreach}
</tbody> </tbody>
</table> </table>
</div>
{$pagination.html|safe} {$pagination.html|safe}
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</form> </form>
{$deleteall|safe} {$deleteall|safe}
<form name="notificationlist" method="post" onSubmit="markread(this, 'read'); return false;"> <form name="notificationlist" method="post" onSubmit="markread(this, 'read'); return false;">
<table id="activitylist" class="fullwidth"> <table id="activitylist" class="fullwidth table table-striped">
<thead> <thead>
<tr> <tr>
<th><span class="accessible-hidden sr-only">{str section='activity' tag='messagetype'}</span></th> <th><span class="accessible-hidden sr-only">{str section='activity' tag='messagetype'}</span></th>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</table> </table>
<div class="right activity-buttons"> <div class="right activity-buttons">
<input class="submit btn btn-success" type="submit" value="{str tag='markasread' section='activity'}" /> <input class="submit btn btn-success" type="submit" value="{str tag='markasread' section='activity'}" />
<input class="submit btn-del" type="button" value="{str tag='delete'}" onClick="markread(document.notificationlist, 'del'); return false;" /> <input class="submit btn btn-danger" type="button" value="{str tag='delete'}" onClick="markread(document.notificationlist, 'del'); return false;" />
</div> </div>
</form> </form>
{$activitylist['pagination']|safe} {$activitylist['pagination']|safe}
......
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