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

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) {
$elements['submit'] = array(
'type' => 'submit',
'class' => 'btn btn-success',
'value' => get_string('save')
);
$prefsform = array(
'name' => 'accountprefs',
'renderer' => 'table',
'renderer' => 'div',
'class' => 'form-group',
'method' => 'post',
'jsform' => true,
'plugintype' => 'core',
......
......@@ -63,7 +63,7 @@ function displaymenuitems(itemlist) {
var rows = map(formatrow,itemlist);
var form = FORM({'id':'form','method':'post','enctype':'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);
}
......
......@@ -242,7 +242,7 @@ $elements['submit'] = array(
$siteform = pieform(array(
'name' => 'edituser_site',
'renderer' => 'table',
'renderer' => 'div',
'plugintype' => 'core',
'pluginname' => 'admin',
'elements' => $elements,
......@@ -753,7 +753,7 @@ if ($USER->get('admin')
$institutionform = pieform(array(
'name' => 'edituser_institution',
'renderer' => 'table',
'renderer' => 'div',
'plugintype' => 'core',
'pluginname' => 'admin',
'elements' => $elements,
......
......@@ -586,7 +586,7 @@ if ($institution || $add) {
$institutionform = pieform(array(
'name' => 'institution',
'renderer' => 'table',
'renderer' => 'div',
'plugintype' => 'core',
'pluginname' => 'admin',
'elements' => $elements
......@@ -621,6 +621,7 @@ else {
),
'submit' => array(
'type' => 'submit',
'class' => 'btn btn-success',
'value' => get_string('search')
)
)
......
......@@ -218,7 +218,7 @@ function formGlobalError(form, data) {
// Message related functions
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 */
......
......@@ -225,7 +225,6 @@ function general_account_prefs_form_elements($prefs) {
'type' => 'radio',
'defaultvalue' => $prefs->friendscontrol,
'title' => get_string('friendsdescr', 'account'),
'separator' => '<br>',
'options' => array(
'nobody' => get_string('friendsnobody', 'account'),
'auth' => get_string('friendsauth', 'account'),
......@@ -261,7 +260,6 @@ function general_account_prefs_form_elements($prefs) {
'type' => 'radio',
'defaultvalue' => $prefs->messages,
'title' => get_string('messagesdescr', 'account'),
'separator' => '<br>',
'options' => array(
'nobody' => get_string('messagesnobody', 'account'),
'friends' => get_string('messagesfriends', 'account'),
......@@ -2071,6 +2069,7 @@ function friends_control_sideblock($returnto='myfriends') {
),
'submit' => array(
'type' => 'submit',
'class' => 'btn btn-success',
'value' => get_string('save')
),
'returnto' => array(
......@@ -2185,6 +2184,7 @@ function addfriend_form($friendid) {
'elements' => array(
'addfriend_submit' => array(
'type' => 'submit',
'class' => 'btn btn-success',
'value' => get_string('addtofriendslist', 'group'),
),
'id' => array(
......
......@@ -6077,6 +6077,7 @@ function create_view_form($group=null, $institution=null, $template=null, $colle
),
'submit' => array(
'type' => 'submit',
'class' => 'btn btn-success',
'value' => get_string('createview', 'view'),
),
)
......
......@@ -68,7 +68,7 @@
{/if}
</span>
{if $post.files}
<div id="postfiles">
<div id="postfiles" class="table-responsive">
<table class="cb attachments fullwidth">
<thead class="expandable-head">
<tr>
......
{include file="header.tpl"}
<div class="rbuttons">
<a class="btn" href="{$WWWROOT}artefact/blog/new/index.php">{str section="artefact.blog" tag="addblog"}</a>
<div class="text-right">
<a class="btn btn-success" href="{$WWWROOT}artefact/blog/new/index.php">{str section="artefact.blog" tag="addblog"}</a>
</div>
<div id="myblogs" class="rel">
{if !$blogs->data}
......
......@@ -34,7 +34,7 @@
</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->files}
<div id="postfiles_{$post->id}">
<div id="postfiles_{$post->id}" class="table-responsive">
<table class="cb attachments fullwidth table table-striped">
<thead class="expandable-head">
<tr>
......
......@@ -7,7 +7,8 @@
{$artefactdescription|clean_html|safe}
{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}
<table class="cb attachments fullwidth">
<div class="table-responsive">
<table class="attachments fullwidth">
<thead class="expandable-head">
<tr>
<td colspan="2">
......@@ -31,6 +32,7 @@
{/foreach}
</tbody>
</table>
</div>
{/if}
{if $license}
<div class="postlicense">
......
{include file="header.tpl"}
<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>
{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>
......
......@@ -7,7 +7,8 @@
<div class="tags">{str tag=tags}: {list_tags owner=$post->owner tags=$post->tags}</div>
{/if}</div>
{if $post->files}
<table class="cb attachments fullwidth">
<div class="table-responsive">
<table class="cb attachments fullwidth table">
<thead class="expandable-head">
<tr>
<td colspan="2">
......@@ -34,6 +35,7 @@
{/foreach}
</tbody>
</table>
</div>
{/if}
{if $options.viewid && ($post->commentcount || $post->commentcount === 0)}
<div class="comments">
......
{if $feedback}
<div class="viewfooter">
<div class="viewfooter table-responsive">
<table id="feedbacktable" class="feedbacktable fullwidth table">
<tbody>
{$feedback->tablerows|safe}
......
{if $images}
<div class="slideshow" id="slideshow{$instanceid}">
<table class="images fullwidth">
<div class="slideshow table-responsive" id="slideshow{$instanceid}">
<table class="images fullwidth table table-striped">
<tr>
<td class="control">
<span class="prev disabled">&lsaquo;</span>
......
{if !$filelist}
<p>{str tag=nofilesfound section=artefact.file}</p>
{else}
<div class="table-responsive">
<table id="{$prefix}_filelist" class="tablerenderer filelist fullwidth table table-striped">
<thead>
<tr>
......@@ -100,6 +101,7 @@
{/foreach}
</tbody>
</table>
</div>
<div id="downloadfolder">
<a href="{$WWWROOT}artefact/file/downloadfolder.php?{$folderparams|safe}">{str tag=downloadfolderziplink section=artefact.file}</a>
</div>
......
{$text|clean_html|safe}
{if isset($attachments)}
<table class="cb attachments fullwidth">
<table class="attachments fullwidth table table-striped">
<thead class="expandable-head">
<tr>
<td colspan="2">
......
{include file="header.tpl"}
<p>{str tag=notesdescription1 section=artefact.internal}</p>
<div class="table-responsive">
<table id="notes" class="table table-striped">
<thead>
<tr>
......@@ -92,5 +93,6 @@
{/foreach}
</tbody>
</table>
</div>
{$pagination.html|safe}
{include file="footer.tpl"}
<br /><div class="rbuttons">
<a class="btn" href="{$WWWROOT}artefact/internal/socialprofile.php">{str tag=newsocialprofile section=artefact.internal}</a>
</div>
<table id="socialprofilelist" class="tablerenderer fullwidth table">
<div class="table-responsive">
<table id="socialprofilelist" class="tablerenderer fullwidth table table-striped">
<thead>
<tr>
<th class="icons"></th>
......@@ -34,4 +35,5 @@
{/foreach}
</tbody>
</table>
</div>
{$pagination.html|safe}
......@@ -11,7 +11,7 @@
</form>
{$deleteall|safe}
<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>
<tr>
<th><span class="accessible-hidden sr-only">{str section='activity' tag='messagetype'}</span></th>
......@@ -46,7 +46,7 @@
</table>
<div class="right activity-buttons">
<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>
</form>
{$activitylist['pagination']|safe}
......
......@@ -11,7 +11,7 @@
</form>
{$deleteall|safe}
<form name="notificationlist" method="post" onSubmit="markread(this, 'read'); return false;">
<table id="activitylist" class="fullwidth">
<table id="activitylist" class="fullwidth table">
<thead>
<tr>
<th><span class="accessible-hidden sr-only">{str section='activity' tag='messagetype'}</span></th>
......
{include file="header.tpl"}
<div id="planswrap">
<div class="align-right">
<div class="text-right">
<a class="btn btn-success" href="{$WWWROOT}artefact/plans/new.php">{str section="artefact.plans" tag="newplan"}</a>
</div>
{if !$plans.data}
......
{include file="header.tpl"}
<div id="planswrap">
<div class="rbuttons">
<a class="btn" href="{$WWWROOT}artefact/plans/new.php?id={$plan}">{str section="artefact.plans" tag="newtask"}</a>
<div class="text-right">
<a class="btn btn-success" href="{$WWWROOT}artefact/plans/new.php?id={$plan}">{str section="artefact.plans" tag="newtask"}</a>
</div>
{if $tags}<p class="tags s"><strong>{str tag=tags}:</strong> {list_tags owner=$owner tags=$tags}</p>{/if}
{if !$tasks.data}
......
{include file="header.tpl"}
<div id="planswrap">
<div class="rbuttons">
<a class="btn" href="{$WWWROOT}artefact/plans/new/task.php">{str section="artefact.plans" tag="newtask"}</a>
<div class="text-right">
<a class="btn btn-success" href="{$WWWROOT}artefact/plans/new/task.php">{str section="artefact.plans" tag="newtask"}</a>
</div>
{if !$tasks.data}
<div class="message">{$strnotasksaddone|safe}</div>
......
......@@ -3,6 +3,7 @@
{contextualhelp plugintype='artefact' pluginname='resume' section='mygoals'}
{/if}
</legend>{/if}
<div class="table-responsive">
<table id="goalslist{$suffix}" class="tablerenderer fullwidth table table-striped">
<thead>
<tr>
......@@ -63,6 +64,7 @@
{/foreach}
</tbody>
</table>
</div>
{if $license}
<div class="resumelicense">
{$license|safe}
......
......@@ -3,6 +3,7 @@
{contextualhelp plugintype='artefact' pluginname='resume' section='myskills'}
{/if}
</legend>{/if}
<div class="table-responsive">
<table id="skillslist{$suffix}" class="tablerenderer fullwidth table table-striped">
<thead>
<tr>
......@@ -63,6 +64,7 @@
{/foreach}
</tbody>
</table>
</div>
{if $license}
<div class="resumelicense">
{$license|safe}
......
{if !$items}
{str tag=nomessages section=blocktype.inbox}
{else}
<table id="inboxblock" class="fullwidth fixwidth">
<table id="inboxblock" class="fullwidth fixwidth table table-striped">
{foreach from=$items item=i}
<tr class="{cycle values='r0,r1'}">
<td class="icon-container">
......
{if !$items}
{str tag=nomessages section=blocktype.inbox}
{else}
<table id="inboxblock" class="fullwidth fixwidth">
<div id="inboxblock" class="inbox viewlist listing">
{foreach from=$items item=i}
<tr class="{cycle values='r0,r1'}">
<td class="icon-container">
<div class="{cycle values='r0,r1'} listrow">
<div class="icon-container pull-left pls prm">
{if $i->read}
<img src="{theme_url filename=cat('images/' $i->type '.png')}" alt="{$i->strtype}" />
{else}
<img src="{theme_url filename=cat('images/' $i->type '.png')}" class="unreadmessage" alt="{$i->strtype}" />
{/if}
</td>
<td>
</div>
<div>
{if $i->message}
<a href="{if $i->url}{$WWWROOT}{$i->url}{else}{$WWWROOT}account/activity/index.php{/if}" class="inbox-showmessage{if !$i->read} unread{/if}">
{if !$i->read}<span class="accessible-hidden sr-only">{str tag=unread section=activity}: </span>{/if}{$i->subject|truncate:50}
......@@ -24,13 +24,12 @@
{else}
{$i->subject}
{/if}
</td>
</tr>
</div>
</div>
{/foreach}
</table>
</div>
{if $desiredtypes}
<div class="morelinkwrap"><a class="morelink" href="{$WWWROOT}account/activity/index.php?type={$desiredtypes}">{str tag=More section=blocktype.inbox} &raquo;</a></div>
<div class="cb"></div>
{/if}
<script>
{literal}
......
......@@ -2,12 +2,12 @@
<div id="userviewstable" class="viewlist fullwidth listing">
{foreach from=$VIEWS item=item name=view}
<div class="{cycle values='r0,r1'} listrow">
<h3 class="title"><a href="{$item.fullurl}">{$item.title}</a></h3>
<h3 class="title pls"><a href="{$item.fullurl}">{$item.title}</a></h3>
{if $item.description}
<div class="detail">{$item.description|str_shorten_html:100:true|strip_tags|safe}</div>
<div class="detail pls prs">{$item.description|str_shorten_html:100:true|strip_tags|safe}</div>
{/if}
{if $item.tags}
<div class="tags"><strong>{str tag=tags}:</strong> {list_tags owner=$item.owner tags=$item.tags}</div>
<div class="tags pls prs"><strong>{str tag=tags}:</strong> {list_tags owner=$item.owner tags=$item.tags}</div>
{/if}
</div>
{/foreach}
......
<div class="textblock">
{$text|clean_html|safe}
</div>
\ No newline at end of file
......@@ -32,6 +32,7 @@ jQuery(function($) {
tabnav.find('li:first-child').addClass('active');
// Remove extra padding when there is no site message
if ($('.site-messages').length === 0) {
$('.header').addClass('no-site-messages');
$('.main-nav').addClass('no-site-messages');
......
.blockinstance {
&.panel {
border-radius: 0;
box-shadow: none;
}
.panel-heading {
background-color: transparent;
h2 {
margin: 0;
font-size: $font-size-large;
font-weight: bold;
text-transform: uppercase;
}
.detail-link {
font-size: $font-size-base;
font-weight: normal;
}
}
}
.blockinstance-content {
padding: 10px 15px;
.image {
img {
width: 100%;
}
}
.listing {
margin: -10px -15px;
}
.table {
margin: 0;
}
}
\ No newline at end of file
......@@ -2,6 +2,8 @@
font-weight: bold;
vertical-align: top;
width: 200px;
margin: 10px 0;
padding-right: 10px;
display: inline-block;
}
......@@ -10,6 +12,7 @@
color: $gray;
margin-left: 20px;
}
.pieform-fieldset {
.html {
@include clearfix;
......@@ -18,12 +21,12 @@
.main form {
margin:20px 0;
label,
.pseudolabel {
@extend .control-label;
@media (min-width: $screen-sm-min) {
width:200px;
}
width: 200px;
padding-right: 10px;
}
.stacked-label {
......@@ -60,9 +63,45 @@ select {
&.radio,
&.checkbox {
@extend .radio-inline;
// @extend .radio-inline;
margin-left:0;
padding: 0 15px 20px 20px;
// padding: 0 15px 20px 20px;
> label {
padding-left: 0;
font-weight: bold;
}
> input {
// @extend .align-with-input;
display: inline-block;
margin-left: 0;
}
.radio {
display: inline-block;
&:nth-child(n+3) {
@extend .align-with-input;
}
.radio {
margin-left: 0;
}
label {
width: auto;
}
}
.checkbox {
.checkbox {
margin-top: 12px;
}
}
.help {
padding-left: 20px;
}
}
input[type=text],
......@@ -74,10 +113,10 @@ select {
@media (min-width: $screen-sm-min) {
width: 500px;
}
}
}
// remove styles on outer element as class is duplicated to form element
.form-group.btn,
.form-group-inline.btn {
......@@ -139,3 +178,20 @@ select {
margin-left: 0;
}
}
.form-group .description {
color: $mahara-blue;
font-size: $font-size-base - 1;
display: block;
padding-top: 10px;
@extend .align-with-input;
}
.form-group {
h3 {
font-size: $font-size-large;
padding-bottom: 10px;
margin-bottom: 20px;
border-bottom: 1px solid $gray-lighter;
}
}
......@@ -8,6 +8,7 @@
float: left;
padding-left: 5px;
margin-top: 21px;
max-height: 45px;
a {
float:left
}
......
// global styles for list elements such a list of pages, collections
.listing {
div.listrow:nth-child(odd) {
background-color: #f9f9f9;
}
.listrow {