Commit 4daa7827 authored by Pat Kira's avatar Pat Kira Committed by Aaron Wells

Resume blocks - DONE (bootstrap)

Bug 1465107: Use Bootstrap CSS Framework

Change-Id: Ic3b404f438ecfb11c39acca7e832b1271ed6fc86
parent 16039897
......@@ -865,6 +865,10 @@ abstract class ArtefactTypeResumeComposite extends ArtefactTypeResume implements
$owner = $v->get('owner');
}
if (!empty($options['artefactid'])) {
$smarty->assign('artefactid', $options['artefactid']);
}
if (!$data = get_records_sql_array($sql, array($owner, $type))) {
$data = array();
}
......@@ -1880,6 +1884,9 @@ class ArtefactTypeResumeGoalAndSkill extends ArtefactTypeResume {
global $USER;
$smarty = smarty_core();
$smarty->assign('description', $this->get('description'));
if (!empty($options['artefactid'])) {
$smarty->assign('artefactid', $options['artefactid']);
}
$attachments = $this->get_attachments();
if ($attachments) {
......
<div class="list-group">
{if $coverletter}
<div class="list-group-item">
<h4>{str tag=coverletter section=artefact.resume}</h4>
{$coverletter|safe}
</div>
{/if}
{if $interest}
<div class="list-group-item">
<h4>{str tag=interest section=artefact.resume}</h4>
{$interest|safe}
</div>
{/if}
{if $contactinformation}
<div class="list-group-item">
<h4>{str tag=contactinformation section=artefact.resume}</h4>
{$contactinformation|safe}
</div>
{/if}
{if $personalinformation}
<div class="list-group-item">
<h4>{str tag=personalinformation section=artefact.resume}</h4>
{$personalinformation|safe}
</div>
{/if}
{if $personalgoal || $academicgoal || $careergoal}
<div class="list-group-item">
<h4>{str tag=goals section=artefact.resume}</h4>
{if $personalgoal}
<div class="mbxl">
<h5>{str tag=personalgoal section=artefact.resume}</h5>
{$personalgoal|safe}
</div>
{/if}
{if $academicgoal}
<div class="mbxl">
<h5>{str tag=academicgoal section=artefact.resume}</h5>
{$academicgoal|safe}
</div>
{/if}
{if $careergoal}
<div class="mbxl">
<h5>{str tag=careergoal section=artefact.resume}</h5>
{$careergoal|safe}
</div>
{/if}
</div>
{/if}
{if $personalskill || $academicskill || $workskill}
<div class="list-group-item">
<h4>{str tag=skills section=artefact.resume}</h4>
{if $personalskill}
<div class="mbxl">
<h5>{str tag=personalskill section=artefact.resume}</h5>
{$personalskill|safe}
</div>
{/if}
{if $academicskill}
<div class="mbxl">
<h5>{str tag=academicskill section=artefact.resume}</h5>
{$academicskill|safe}
</div>
{/if}
{if $workskill}
<div class="mbxl">
<h5>{str tag=workskill section=artefact.resume}</h5>
{$workskill|safe}
</div>
{/if}
</div>
{/if}
{if $employmenthistory || $educationhistory}
<div class="list-group-item">
<h4>{str tag=History section=blocktype.resume/entireresume}</h4>
{if $employmenthistory}
<div class="mbxl">
<h5>{str tag=employmenthistory section=artefact.resume}</h5>
{$employmenthistory|safe}
</div>
{/if}
{if $educationhistory}
<div class="mbxl">
<h5>{str tag=educationhistory section=artefact.resume}</h5>
{$educationhistory|safe}
</div>
{/if}
</div>
{/if}
{if $certification}
<div class="list-group-item">
<h4>{str tag=certification section=artefact.resume}</h4>
{$certification|safe}
</div>
{/if}
{if $book}
<div class="list-group-item">
<h4>{str tag=book section=artefact.resume}</h4>
{$book|safe}
</div>
{/if}
{if $membership}
<div class="list-group-item">
<h4>{str tag=membership section=artefact.resume}</h4>
{$membership|safe}
</div>
{/if}
{if $coverletter}
<div class="list-group-item">
<h4>{str tag=coverletter section=artefact.resume}</h4>
{$coverletter|safe}
</div>
{/if}
{if $interest}
<div class="list-group-item">
<h4>{str tag=interest section=artefact.resume}</h4>
{$interest|safe}
</div>
{/if}
{if $contactinformation}
<div class="list-group-item">
<h4>{str tag=contactinformation section=artefact.resume}</h4>
{$contactinformation|safe}
</div>
{/if}
{if $personalinformation}
<div class="list-group-item">
<h4>{str tag=personalinformation section=artefact.resume}</h4>
{$personalinformation|safe}
</div>
{/if}
{if $personalgoal || $academicgoal || $careergoal}
<div class="list-group-item">
<h4>{str tag=goals section=artefact.resume}</h4>
{if $personalgoal}
<div class="mbxl">
<h5>{str tag=personalgoal section=artefact.resume}</h5>
{$personalgoal|safe}
</div>
{/if}
{if $academicgoal}
<div class="mbxl">
<h5>{str tag=academicgoal section=artefact.resume}</h5>
{$academicgoal|safe}
</div>
{/if}
{if $careergoal}
<div class="mbxl">
<h5>{str tag=careergoal section=artefact.resume}</h5>
{$careergoal|safe}
</div>
{/if}
</div>
{/if}
{if $personalskill || $academicskill || $workskill}
<div class="list-group-item">
<h4>{str tag=skills section=artefact.resume}</h4>
{if $personalskill}
<div class="mbxl">
<h5>{str tag=personalskill section=artefact.resume}</h5>
{$personalskill|safe}
</div>
{/if}
{if $academicskill}
<div class="mbxl">
<h5>{str tag=academicskill section=artefact.resume}</h5>
{$academicskill|safe}
</div>
{/if}
{if $workskill}
<div class="mbxl">
<h5>{str tag=workskill section=artefact.resume}</h5>
{$workskill|safe}
</div>
{/if}
</div>
{/if}
{if $employmenthistory || $educationhistory}
<div class="list-group-item">
<h4>{str tag=History section=blocktype.resume/entireresume}</h4>
{if $employmenthistory}
<div class="mbxl">
<h5>{str tag=employmenthistory section=artefact.resume}</h5>
{$employmenthistory|safe}
</div>
{/if}
{if $educationhistory}
<div class="mbxl">
<h5>{str tag=educationhistory section=artefact.resume}</h5>
{$educationhistory|safe}
</div>
{/if}
</div>
{/if}
{if $certification}
<div class="list-group-item">
<h4>{str tag=certification section=artefact.resume}</h4>
{$certification|safe}
</div>
{/if}
{if $book}
<div class="list-group-item">
<h4>{str tag=book section=artefact.resume}</h4>
{$book|safe}
</div>
{/if}
{if $membership}
<div class="list-group-item">
<h4>{str tag=membership section=artefact.resume}</h4>
{$membership|safe}
</div>
{/if}
</div>
\ No newline at end of file
{if $controls}
<div class="panel panel-default">
{if !$hidetitle}
<h3 class="resumeh3 panel-heading">
{str tag='book' section='artefact.resume'}
{if $controls}
{contextualhelp plugintype='artefact' pluginname='resume' section='addbook'}
{/if}
</h3>{/if}
<div class="">
<table id="booklist{$suffix}" class="tablerenderer resumefour resumecomposite fullwidth table">
<thead>
<tr>
{if $controls}<th class="resumecontrols">
<span class="accessible-hidden sr-only">{str tag=move}</span>
</th>{/if}
<th>{str tag='title' section='artefact.resume'}</th>
<th class="resumeattachments text-center">
<span>{str tag=Attachments section=artefact.resume}</span>
</th>
{if $controls}<th class="resumecontrols">
<span class="accessible-hidden sr-only">{str tag=edit}</span>
</th>{/if}
</tr>
</thead>
<!-- This markup is rendered inside blockinstance on page -->
<tbody>
{foreach from=$rows item=row}
<tr>
{if $controls}<td class="control-buttons"></td>{/if}
<td>
<div class="expandable-head">
{if $row->description || $row->attachments || $row->url}<a class="toggle textonly" href="#">{else}<strong>{/if}
{$row->title}
{if $row->description || $row->attachments || $row->url}</a>{else}</strong>{/if}
<div>{$row->date}</div>
</div>
<div class="expandable-body">
<div class="compositedesc">
{$row->description}
{if $row->url}<p><a href="{$row->url}" target="_blank">{$row->url}</a></p>{/if}
</div>
{if $row->attachments}
<table class="table attachments">
<thead>
<tr>
<th colspan="2">
<span class="icon icon-paperclip prs"></span>
<span>{str tag='attachedfiles' section='artefact.blog'}</span>
</th>
</tr>
</thead>
<tbody>
{foreach from=$row->attachments item=item}
<tr>
{if $icons}
<td class="iconcell">
<img src="{$item->iconpath}" alt="">
</td>
{/if}
<td class="text-small">
<a href="{$item->viewpath}">
{$item->title}
</a> ({$item->size}) -
<strong>
<a href="{$item->downloadpath}">
{str tag=Download section=artefact.file}
</a>
</strong>
</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
</div>
</td>
<td class="text-center">
{$row->clipcount}
</td>
<table id="booklist{$suffix}" class="tablerenderer resumefour resumecomposite fullwidth table">
<thead>
<tr>
<th class="resumecontrols">
<span class="accessible-hidden sr-only">{str tag=move}</span>
</th>
<th>{str tag='title' section='artefact.resume'}</th>
<th class="resumeattachments text-center">
<span>{str tag=Attachments section=artefact.resume}</span>
</th>
<th class="resumecontrols">
<span class="accessible-hidden sr-only">{str tag=edit}</span>
</th>
</tr>
</thead>
<!-- Table body is rendered by javascript on content-> resume -->
</table>
{if $controls}
<td class="control-buttons"></td>
{/if}
</tr>
{/foreach}
</tbody>
</table>
</div>
{if $controls}
<div class="panel-footer has-form">
<div id="bookform" class="js-expanded-form collapse mtl mlm" data-action='reset-on-collapse'>
{$compositeforms.book|safe}
......@@ -109,5 +45,83 @@
</div>
{/if}
</div>
{/if}
</div>
{/if}
<!-- Render book blockinstance on page view -->
<div id="booklist{$suffix}" class="list-group list-group-lite">
{foreach from=$rows item=row}
<div class="list-group-item">
<h5 class="mt0 list-group-item-heading">
{if $row->description || $row->attachments || $row->url}
<a href="#book-content-{$row->id}{if $artefactid}-{$artefactid}{/if}" class="text-left collapsed collapsible" aria-expanded="false" data-toggle="collapse">
{$row->title}
<span class="icon pts icon-chevron-down pull-right collapse-indicator"></span>
<br />
{if $row->date}
<span class="text-small text-muted">
{$row->date}
</span>
{/if}
</a>
{else}
{$row->title}
<br />
{if $row->date}
<span class="text-small text-muted">
{$row->date}
</span>
{/if}
{/if}
</h5>
<div id="book-content-{$row->id}{if $artefactid}-{$artefactid}{/if}" class="collapse resume-content mtm">
{if $row->description}
<p class="compositedesc">
{$row->description}
</p>
{/if}
{if $row->url}
<p>
<a href="{$row->url}" target="_blank">{$row->url}</a>
</p>
{/if}
{if $row->attachments}
<h5 class="plm list-group-item-heading">
<span class="icon icon-paperclip prs"></span>
<span>{str tag='attachedfiles' section='artefact.blog'}</span>
({$row->clipcount})
</h5>
<ul class="list-group mb0">
{foreach from=$row->attachments item=item}
<li class="list-group-item">
<a href="{$item->downloadpath}" class="outer-link icon-on-hover">
<span class="sr-only">{str tag=Download section=artefact.file} {$item->title}</span>
</a>
{if $item->iconpath}
<img src="{$item->iconpath}" alt="">
{else}
<span class="icon icon-{$item->artefacttype} icon-lg text-default"></span>
{/if}
<span class="title plm text-inline">
<a href="{$item->viewpath}" class="inner-link">
{$item->title}
</a>
<span class="metadata"> -
[{$item->size}]
</span>
</span>
<span class="icon icon-download icon-lg pull-right pts text-watermark icon-action inner-link"></span>
</li>
{/foreach}
</ul>
{/if}
</div>
</div>
{/foreach}
</div>
......@@ -3,20 +3,16 @@
{if !$hidetitle}
<h3 class="resumeh3 panel-heading">
{str tag='certification' section='artefact.resume'}
{if $controls}
{contextualhelp plugintype='artefact' pluginname='resume' section='addcertification'}
{/if}
</h3>
{/if}
<table id="certificationlist{$suffix}" class="tablerenderer resumefour resumecomposite fullwidth table">
<thead>
<tr>
{if $controls}
<th class="resumecontrols">
<span class="accessible-hidden sr-only">{str tag=move}</span>
</th>
{/if}
<th>{str tag='title' section='artefact.resume'}</th>
......@@ -24,17 +20,14 @@
<span>{str tag=Attachments section=artefact.resume}</span>
</th>
{if $controls}
<th class="resumecontrols">
<span class="accessible-hidden sr-only">{str tag=edit}</span>
</th>
{/if}
</tr>
</thead>
<!-- Table body is rendered by javascript on content-> resume -->
</table>
{if $controls}
<div class="panel-footer has-form">
<div id="certificationform" class="collapse mtl mlm" data-action='reset-on-collapse'>
{$compositeforms.certification|safe}
......@@ -57,17 +50,16 @@
</div>
{/if}
</div>
{/if}
</div>
{/if}
<!-- Render certificationt blockinstance on page view -->
<div class="list-group list-group-lite">
<!-- Render certification blockinstance on page view -->
<div id="certificationlist{$suffix}" class="list-group list-group-lite">
{foreach from=$rows item=row}
<div class="list-group-item">
<h4 class="mt0 list-group-item-heading">
<h5 class="mt0 list-group-item-heading">
{if $row->description || $row->attachments}
<a href="#certification-content-{$row->id}-{$id}" class="text-left collapsed collapsible" aria-expanded="false" data-toggle="collapse">
<a href="#certification-content-{$row->id}{if $artefactid}-{$artefactid}{/if}" class="text-left collapsed collapsible" aria-expanded="false" data-toggle="collapse">
{$row->title}
<span class="icon pts icon-chevron-down pull-right collapse-indicator"></span>
<br />
......@@ -82,9 +74,9 @@
{$row->date}
</span>
{/if}
</h4>
</h5>
<div id="certification-content-{$row->id}-{$id}" class="collapse resume-content mtm">
<div id="certification-content-{$row->id}{if $artefactid}-{$artefactid}{/if}" class="collapse resume-content mtm">
{if $row->description}
<p class="compositedesc">
{$row->description}
......@@ -92,7 +84,7 @@
{/if}
{if $row->attachments}
<h5 class="plm">
<h5 class="plm list-group-item-heading">
<span class="icon icon-paperclip prs"></span>
<span>{str tag='attachedfiles' section='artefact.blog'}</span>
({$row->clipcount})
......
......@@ -3,30 +3,28 @@
{if !$hidetitle}
<h3 class="resumeh3 panel-heading">
{str tag='educationhistory' section='artefact.resume'}
{if $controls}
{contextualhelp plugintype='artefact' pluginname='resume' section='addeducationhistory'}
{/if}
{contextualhelp plugintype='artefact' pluginname='resume' section='addeducationhistory'}
</h3>
{/if}
<div>
<table id="educationhistorylist{$suffix}" class="resumefive resumecomposite fullwidth table">
<thead>
<tr>
{if $controls}<th class="resumecontrols">
<span class="accessible-hidden sr-only">{str tag=move}</span>
</th>{/if}
<th>{str tag='qualification' section='artefact.resume'}</th>
<th class="resumeattachments text-center">
<span class="">{str tag=Attachments section=artefact.resume}</span>
</th>
{if $controls}<th class="resumecontrols">
<span class="accessible-hidden sr-only">{str tag=edit}</span>
</th>{/if}
</tr>
</thead>
<table id="educationhistorylist{$suffix}" class="resumefive resumecomposite fullwidth table">
<thead>
<tr>
<th class="resumecontrols">
<span class="accessible-hidden sr-only">{str tag=move}</span>
</th>
<th>{str tag='qualification' section='artefact.resume'}</th>
<th class="resumeattachments text-center">
<span class="">{str tag=Attachments section=artefact.resume}</span>
</th>
<th class="resumecontrols">
<span class="accessible-hidden sr-only">{str tag=edit}</span>
</th>
</tr>
</thead>