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

Plans and tasks (bootstrap)

Bug 1465107: Use Bootstrap CSS Framework
Style plans and tasks pages
Style resume pages excluding collapsible elements
Style plans and tasks pages

Change-Id: Ied782c101b231d919cf1dcd6b267a70d18d39c70
parent cfde5745
......@@ -26,12 +26,14 @@ if (!$USER->can_edit_artefact($todelete)) {
$deleteform = array(
'name' => 'deleteplanform',
'class' => 'form-delete',
'plugintype' => 'artefact',
'pluginname' => 'plan',
'renderer' => 'div',
'elements' => array(
'submit' => array(
'type' => 'submitcancel',
'class' => 'btn btn-danger',
'value' => array(get_string('deleteplan','artefact.plans'), get_string('cancel')),
'goto' => get_config('wwwroot') . '/artefact/plans/index.php',
),
......
......@@ -26,12 +26,14 @@ if (!$USER->can_edit_artefact($todelete)) {
$deleteform = array(
'name' => 'deletetaskform',
'class' => 'form-delete',
'plugintype' => 'artefact',
'pluginname' => 'plans',
'renderer' => 'div',
'elements' => array(
'submit' => array(
'type' => 'submitcancel',
'class' => 'btn btn-danger',
'value' => array(get_string('deletetask','artefact.plans'), get_string('cancel')),
'goto' => get_config('wwwroot') . '/artefact/plans/plan.php?id='.$todelete->get('parent'),
),
......
......@@ -130,7 +130,7 @@ class ArtefactTypePlan extends ArtefactType {
$plans['tablerows'] = $smarty->fetch('artefact:plans:planslist.tpl');
$pagination = build_pagination(array(
'id' => 'planlist_pagination',
'class' => 'center',
'class' => 'text-center',
'url' => get_config('wwwroot') . 'artefact/plans/index.php',
'jsonscript' => 'artefact/plans/plans.json.php',
'datatable' => 'planslist',
......@@ -205,6 +205,7 @@ class ArtefactTypePlan extends ArtefactType {
$elements = call_static_method(generate_artefact_class_name('plan'), 'get_planform_elements', $plan);
$elements['submit'] = array(
'type' => 'submitcancel',
'class' => 'btn btn-success',
'value' => array(get_string('saveplan','artefact.plans'), get_string('cancel')),
'goto' => get_config('wwwroot') . 'artefact/plans/index.php',
);
......@@ -445,6 +446,7 @@ class ArtefactTypeTask extends ArtefactType {
$elements = call_static_method(generate_artefact_class_name('task'), 'get_taskform_elements', $parent, $task);
$elements['submit'] = array(
'type' => 'submitcancel',
'class' => 'btn btn-success',
'value' => array(get_string('savetask','artefact.plans'), get_string('cancel')),
'goto' => get_config('wwwroot') . 'artefact/plans/plan.php?id=' . $parent,
);
......
......@@ -52,7 +52,7 @@ $smarty->assign_by_ref('tags', $plan->get('tags'));
$smarty->assign_by_ref('owner', $plan->get('owner'));
$smarty->assign('strnotasksaddone',
get_string('notasksaddone', 'artefact.plans',
'<a href="' . get_config('wwwroot') . 'artefact/plans/new.php?id='.$plan->get('id').'">', '</a>'));
'<a class="addtask" href="' . get_config('wwwroot') . 'artefact/plans/new.php?id='.$plan->get('id').'">', '</a>'));
$smarty->assign('planstasksdescription', get_string('planstasksdescription', 'artefact.plans', get_string('newtask', 'artefact.plans')));
$smarty->assign('PAGEHEADING', get_string("planstasks", "artefact.plans",$plan->get('title')));
$smarty->assign('INLINEJAVASCRIPT', $js);
......
......@@ -1088,7 +1088,7 @@ EOF;
if (r._rownumber > 1) {
var up =
A({'href': '', 'class': 'btn btn-default btn-xs'},
SPAN({'class': 'fa fa-arrow-up'}),
SPAN({'class': 'fa fa-caret-up'}),
SPAN({'class': 'sr-only'}, '{$upstr}'));
connect(up, 'onclick', function (e) {
e.stop();
......@@ -1099,7 +1099,7 @@ EOF;
if (!r._last) {
var down =
A({'href': '', 'class':'btn btn-default btn-xs movedown'},
SPAN({'class': 'fa fa-arrow-down'}),
SPAN({'class': 'fa fa-caret-down'}),
SPAN({'class': 'sr-only'}, '{$downstr}'));
connect(down, 'onclick', function (e) {
e.stop();
......
......@@ -41,6 +41,7 @@ $form = array(
'license_advanced' => license_form_el_advanced($personalinformation),
'submit' => array(
'type' => 'submit',
'class' => 'btn btn-success',
'value' => get_string('save')
),
),
......
......@@ -113,9 +113,9 @@ function pieform_element_filebrowser(Pieform $form, $element) {
$config['simpleupload'] = 1;
}
$licensing = '<table class="fileuploadlicense"><tbody>'
$licensing = '<div class="fileuploadlicense">'
. license_form_files($prefix)
. '</tbody></table>';
. '</div>';
$smarty->assign('licenseform', $licensing);
if ($config['resizeonuploaduseroption'] == 1) {
......
......@@ -235,8 +235,8 @@ function license_form_files($prefix, $prefix2=null) {
$rendered['license_advanced']['elements'][$prefix . '_licensorurl'],
) as $e) {
$helphtml = preg_replace('/files_filebrowser_(edit_)?licens/', 'licens', $e['helphtml']);
$html .= '<tr ' . $rowattr . '><th>' . $e['labelhtml'] . '</th>' .
'<td>' . $e['html'] . $helphtml . '</td></tr>';
$html .= '<div class="form-group">' . $rowattr . '' . $e['labelhtml'] . '' .
'' . $e['html'] . $helphtml . '</div>';
$rowattr = '';
}
$html = str_replace(
......
......@@ -59,14 +59,13 @@
<input type="hidden" name="MAX_FILE_SIZE" value="{$phpmaxfilesize}" />
<div id="{$prefix}_upload_messages"></div>
{if $config.uploadagreement}
<div id="{$prefix}_agreement" class="uploadform">
<div id="{$prefix}_agreement" class="uploadform clearfix">
<label for="{$prefix}_notice">{str tag='uploadfile' section='artefact.file'}</label>
<input type="checkbox" name="{$prefix}_notice" id="{$prefix}_notice" />
{$agreementtext|clean_html|safe}
</div>
{/if}
{$licenseform|safe}
<div class="uploadform userfile">
<div class="uploadform userfile clearfix">
<label for="{$prefix}_userfile">{if $config.simpleupload}{str tag='uploadfile' section='artefact.file'}{else}{str tag='File' section='artefact.file'}{/if}</label>
<span id="{$prefix}_userfile_container"><input type="file" class="file" id="{$prefix}_userfile" name="userfile[]" multiple size="20" /></span>
<span id="{$prefix}_userfile_maxuploadsize" class="description">({str tag=maxuploadsize section=artefact.file} {$maxuploadsize})</span>
......@@ -84,7 +83,7 @@
<div class="dz-message">{str tag=dragdrophere section=artefact.file}</div>
</div>
</div>
<div class="uploadform">
<div class="uploadform clearfix pbl">
<div id="{$prefix}_uploadsubmit_container">{* filebrowser.js may add a submit button in here even if config.submitbutton is off *}
{if $config.submitbutton}
<input type="submit" class="submit nojs-hidden-block" name="{$prefix}_uploadsubmit" id="{$prefix}_uploadsubmit" value="{str tag=upload section=artefact.file}" />
......@@ -92,7 +91,7 @@
<noscript><input class="submit btn btn-success" type="submit" name="{$prefix}_upload" id="{$prefix}_upload" value="{str tag=upload section=artefact.file}" /></noscript>
</div>
</div>
{$licenseform|safe}
</div>
{/if}
{if $config.upload}
......
......@@ -15,7 +15,8 @@
<tfoot>
<tr>
<td colspan="4" class="text-right">
<span class="fa fa-ok prs"></span>
<button id="settings_default" type="submit" class="submit btn btn-success" name="default">
<span class="fa fa-check prs"></span>
{str tag="setdefault" section=artefact.file}
</button>
<button id="settings_delete" type="submit" class="delete btn btn-danger" name="delete">
......
{include file="header.tpl"}
<div class="message">
<h3>{$subheading}</h3>
<p>{$message}</p>
{$form|safe}
<div class="delete-wrapper">
<div class="message">
<h3>{$subheading}</h3>
<p>{$message}</p>
{$form|safe}
</div>
</div>
{include file="footer.tpl"}
{include file="header.tpl"}
<div id="planswrap">
<div id="planswrap" class="plan-wrapper">
{$editform|safe}
</div>
{include file="footer.tpl"}
......@@ -2,7 +2,7 @@
<div class="text-right btn-top-right">
<a class="btn btn-success" href="{$WWWROOT}artefact/plans/new.php">{str section="artefact.plans" tag="newplan"}</a>
</div>
<div id="planswrap">
<div id="planswrap" class="plan-wrapper">
{if !$plans.data}
<div class="message">{$strnoplansaddone|safe}</div>
{else}
......
......@@ -2,12 +2,18 @@
<div class="text-right btn-top-right">
<a class="btn btn-success" href="{$WWWROOT}artefact/plans/new.php?id={$plan}">{str section="artefact.plans" tag="newtask"}</a>
</div>
<div id="planswrap">
{if $tags}<p class="tags s"><strong>{str tag=tags}:</strong> {list_tags owner=$owner tags=$tags}</p>{/if}
<div id="planswrap" class="plan-wrapper">
{if $tags}
<p class="tags">
<strong>{str tag=tags}:</strong>
{list_tags owner=$owner tags=$tags}
</p>
{/if}
{if !$tasks.data}
<div>{$planstasksdescription}</div>
<div class="message">{$strnotasksaddone|safe}</div>
{else}
<div class="table-responsive">
<table id="taskslist" class="fullwidth listing table table-striped">
<thead>
<tr>
......@@ -22,6 +28,7 @@
{$tasks.tablerows|safe}
</tbody>
</table>
</div>
{$tasks.pagination|safe}
{/if}
</div>
......
{foreach from=$plans.data item=plan}
<div class="{cycle values='r0,r1'} listrow">
<div class="post">
<div class="post-heading">
<h3 class="title pull-left"><a href="{$WWWROOT}artefact/plans/plan.php?id={$plan->id}">{$plan->title}</a></h3>
<div class="pull-right planstatus">
......@@ -16,11 +17,13 @@
<span class="sr-only">{str(tag=deletespecific arg1=$plan->title)|escape:html|safe}</span>
</a>
</div>
</div>
<div class="detail">{$plan->description|clean_html|safe}</div>
<div class="content postdetails">
{$plan->description|clean_html|safe}
</div>
{if $plan->tags}
<div>{str tag=tags}: {list_tags tags=$plan->tags owner=$plan->owner}</div>
<div><strong>{str tag=tags}</strong>: {list_tags tags=$plan->tags owner=$plan->owner}</div>
{/if}
<div class="cb"></div>
</div>
{/foreach}
......@@ -4,25 +4,33 @@
<td class="completiondate">{$task->completiondate}</td>
<td class="plantasktitle">{$task->title}</td>
<td class="plantaskdescription">{$task->description|clean_html|safe}</td>
<td class="incomplete"><img src="{$WWWROOT}theme/raw/static/images/failure_small.png" alt="{str tag=overdue section=artefact.plans}" /></td>
<td class="incomplete">
<span class="fa fa-exclamation-triangle"></span>
<span class="sr-only">{str tag=overdue section=artefact.plans}</span>
</td>
{else}
<tr class="{cycle values='r0,r1'}">
<td class="completiondate">{$task->completiondate}</td>
<td class="plantasktitle">{$task->title}</td>
<td class="plantaskdescription">{$task->description|clean_html|safe}</td>
{if $task->completed == 1}
<td class="completed"><img src="{$WWWROOT}theme/raw/static/images/success_small.png" alt="{str tag=completed section=artefact.plans}" /></td>
<td class="completed">
<span class="fa fa-check"></span>
<span class="sr-only">{str tag=completed section=artefact.plans}</span>
</td>
{else}
<td><span class="accessible-hidden sr-only">{str tag=incomplete section=artefact.plans}</span></td>
{/if}
{/if}
<td class="buttonscell btns2 planscontrols">
<a href="{$WWWROOT}artefact/plans/edit/task.php?id={$task->task}" title="{str tag=edit}">
<img src="{theme_url filename='images/btn_edit.png'}" alt="{str(tag=editspecific arg1=$task->title)|escape:html|safe}">
<td class="planscontrols">
<a href="{$WWWROOT}artefact/plans/edit/task.php?id={$task->task}" title="{str tag=edit}" class="btn btn-default btn-xs">
<span class="fa fa-pencil"></span>
<span class="sr-only">{str(tag=editspecific arg1=$task->title)|escape:html|safe}</span>
</a>
<a href="{$WWWROOT}artefact/plans/delete/task.php?id={$task->task}" title="{str tag=delete}">
<img src="{theme_url filename='images/btn_deleteremove.png'}" alt="{str(tag=deletespecific arg1=$task->title)|escape:html|safe}">
<a href="{$WWWROOT}artefact/plans/delete/task.php?id={$task->task}" title="{str tag=delete}" class="btn btn-danger btn-xs">
<span class="fa fa-trash"></span>
<span class="sr-only">{str(tag=deletespecific arg1=$task->title)|escape:html|safe}</span>
</a>
</td>
</tr>
......
......@@ -26,7 +26,7 @@
<td>
<div class="expandable-head">
{if $row->qualdescription || $row->attachments}<a class="toggle textonly" href="#">{else}<strong>{/if}
{$row->qualification}
{$row->qualification}git
{if $row->qualdescription || $row->attachments}</a>{else}</strong>{/if}
<div>{$row->startdate}{if $row->enddate} - {$row->enddate}{/if}</div>
</div>
......
......@@ -81,4 +81,10 @@
white-space: normal;
}
}
}
.attachments.table {
> thead > tr > th {
border-bottom: none;
}
}
\ No newline at end of file
......@@ -13,13 +13,17 @@
margin-left: 20px;
}
.pieform-fieldset {
.html {
@include clearfix;
}
}
label.sr-only + div.mce-tinymce {
max-width: 100%;
width: 100%;
}
.main form {
margin: 20px 0;
......@@ -90,10 +94,9 @@ select {
textarea,
select {
max-width: 85%;
display: block;
display: inline-block;
@media (min-width: $screen-sm-min) {
display: inline-block;
width: 450px;
width: 420px;
}
@media (min-width: $screen-lg-min) {
width: 500px;
......@@ -180,6 +183,12 @@ select {
vertical-align: top;
}
}
.message {
font-size: 0.9em;
color: $gray;
margin-left: 20px;
}
}
// remove styles on outer element as class is duplicated to form element
......@@ -233,24 +242,53 @@ select {
color: $brand-danger;
}
.form-group .errmsg {
.sidebar-content {
.errmsg {
margin-left: 0;
}
}
.calendar .calendar,
.tag .description,
.form-group .description {
@extend .align-with-input;
color: $brand-danger;
color: $gray-light;
font-size: $font-size-base - 1;
display: block;
padding-top: 10px;
@media (min-width: $screen-md-min) {
margin-left: 200px;
}
}
.sidebar-content {
.errmsg {
margin-left: 0;
.resizable-textarea {
display: inline-block;
width: 85%;
@media (min-width: $screen-sm-min) {
width: 450px;
}
@media (min-width: $screen-lg-min) {
width: 500px;
}
.textarea {
@media (min-width: $screen-sm-min) {
max-width: 100%;
}
}
}
.form-group .errmsg {
@extend .align-with-input;
color: $brand-danger;
font-size: $font-size-base - 1;
display: block;
padding-top: 10px;
@media (min-width: $screen-md-min) {
margin-left: 200px;
}
}
.form-group {
&.checkbox {
.description {
......@@ -277,36 +315,24 @@ select {
}
}
.calendar .calendar,
.tag .description,
.form-group .description {
@extend .align-with-input;
color: $gray-light;
font-size: $font-size-base - 1;
display: block;
padding-top: 10px;
@media (min-width: $screen-md-min) {
margin-left: 200px;
}
}
.resizable-textarea {
display: inline-block;
width: 85%;
@media (min-width: $screen-sm-min) {
width: 450px;
}
@media (min-width: $screen-lg-min) {
width: 500px;
}
.textarea {
.form-group.tags {
.tag-wrapper {
display: block;
@media (min-width: $screen-sm-min) {
max-width: 100%;
display: inline-block;
}
input {
max-width: 85%;
display: inline-block;
@media (min-width: $screen-sm-min) {
max-width: 100%;
}
}
}
}
.form-notifications {
.form-group .select {
width: 250px;
......@@ -361,20 +387,3 @@ select {
}
}
.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%;
}
}
}
}
......@@ -9,8 +9,7 @@
background-color: #f9f9f9;
}
h2,
h3 {
.title {
font-size: $font-size-large;
margin: 0;
}
......
.plan-wrapper {
.message {
background-color: $alert-info-bg;
color: $gray-light;
text-align: center;
padding: 10px 0;
margin: 10px 0 0 0;
.addtask {
font-weight: bold;
}
}
.planstatus {
a {
margin-left: 0;
}
}
.content {
padding-top: 10px;
clear: both;
}
.table {
.completiondate {
font-weight: bold;
}
}
}
.delete-wrapper {
background-color: $alert-danger-bg;
padding: 15px;
h3 {
margin-top: 0;
}
.form-delete {
margin-bottom: 0;
}
}
\ No newline at end of file
.post {
margin: 20px 0;
margin: 10px 0;
padding: 10px;
border-bottom: 1px solid $gray-lighter;
&.published {
......@@ -16,12 +16,10 @@
.post-heading {
@include clearfix;
margin: -10px;
background-color: #f9f9f9;
padding: 10px 0;
padding: 10px 10px 0 0;
h3,
h2 {
font-size: $font-size-large;
font-weight: bold;
margin: 0 0 0 10px;
@media (min-width: $screen-xs-min) {
float: left;
......@@ -51,6 +49,7 @@
clear: both;
font-size: $font-size-small;
color: $gray-light;
padding-top: 7px;
margin: 0 0 0 10px;
}
}
......
......@@ -11,14 +11,15 @@
margin: 0 auto;
display: block;
}
td {
&:first-child {
min-width: 60px;
}
white-space: normal;
max-width: 200px;
min-width: 90px;
h3 {
font-size: $font-size-base;
margin: 0;
}
}
}
\ No newline at end of file
......@@ -7,7 +7,6 @@ h1 {
.admin & {
@include text-shadow(1px 1px 0 rgba(#fff, 0.5));
color: #555;
}
}
......
......@@ -111,9 +111,7 @@
@import "components/pieform-fieldset";
@import "components/input-as-icon";
@import "components/ui-draggable";
@import "components/plan";
// Keep these files last to override all other style sheets
@import "components/custom";
......