Commit 7ccf0af5 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Simplify layout of Resume composite tables (Bug #1271779)"

parents dc9d2d6a 70295037
......@@ -33,7 +33,7 @@ $compositetypes = array(
$inlinejs = ArtefactTypeResumeComposite::get_js($compositetypes);
$compositeforms = ArtefactTypeResumeComposite::get_forms($compositetypes);
$smarty = smarty(array('tablerenderer'));
$smarty = smarty(array('tablerenderer', 'expandable'));
$smarty->assign('compositeforms', $compositeforms);
$smarty->assign('INLINEJAVASCRIPT', $inlinejs);
$smarty->assign('PAGEHEADING', TITLE);
......
......@@ -28,7 +28,7 @@ $compositetypes = array('employmenthistory', 'educationhistory');
$inlinejs = ArtefactTypeResumeComposite::get_js($compositetypes);
$compositeforms = ArtefactTypeResumeComposite::get_forms($compositetypes);
$smarty = smarty(array('tablerenderer'));
$smarty = smarty(array('tablerenderer', 'expandable'));
$smarty->assign('compositeforms', $compositeforms);
$smarty->assign('INLINEJAVASCRIPT', $inlinejs);
$smarty->assign('PAGEHEADING', TITLE);
......
......@@ -542,6 +542,10 @@ abstract class ArtefactTypeResumeComposite extends ArtefactTypeResume {
public static abstract function get_tablerenderer_title_js_string();
public static function get_tablerenderer_extra_js_string() {
return '';
}
public static abstract function get_tablerenderer_body_js_string();
public static function get_tablerenderer_attachments_js_string(){
......@@ -970,18 +974,19 @@ EOF;
return $js;
}
static function get_tablerenderer_title_js($titlestring, $bodystring, $attachstring) {
static function get_tablerenderer_title_js($titlestring, $extrastring, $bodystring, $attachstring) {
return "
function (r, d) {
if (!{$bodystring} && !{$attachstring}) {
return TD(null, {$titlestring});
return TD(null, STRONG(null, {$titlestring}), DIV(null, {$extrastring}));
}
var link = A({'href': ''}, {$titlestring});
var link = A({'class': 'toggle textonly', 'href': ''}, {$titlestring});
connect(link, 'onclick', function (e) {
e.stop();
return showhideComposite(r, {$bodystring}, {$attachstring});
});
return TD({'id': 'composite-' + r.artefact + '-' + r.id}, link);
var extra = DIV(null, {$extrastring});
return TD({'id': 'composite-' + r.artefact + '-' + r.id}, DIV({'class': 'expandable-head'}, link, extra));
},
";
}
......@@ -1009,7 +1014,8 @@ EOF;
var newNode = DIV({'id': 'composite-body-' + r.artefact + '-' + r.id},
DIV({'class':'compositedesc'}, content));
}
appendChildNodes(titleTD, newNode);
insertSiblingNodesAfter(getFirstElementByTagAndClassName(null, 'expandable-head', titleTD), newNode);
setupExpanders(jQuery(newNode));
}
";
}
......@@ -1086,21 +1092,31 @@ EOF;
}
static function get_composite_js() {
$attachmentsstr = json_encode(get_string('Attachments', 'artefact.resume').': ');
$attachmentsstr = json_encode(get_string('Attachments', 'artefact.resume'));
$downloadstr = json_encode(get_string('Download', 'artefact.file'));
return <<<EOF
function formatSize(size) {
size = parseInt(size);
if (size < 1024) {
return size <= 0 ? '0' : size.toFixed(1).replace(/\.0$/, '') + 'b';
}
if (size < 1048576) {
return (size / 1024).toFixed(1).replace(/\.0$/, '') + 'K';
}
return (size / 1048576).toFixed(1).replace(/\.0$/, '') + 'M';
}
function listAttachments(attachments) {
if (attachments.length > 0) {
list = DIV({'class': 'attachments'}, SPAN({'class': 'composite-attachments'}, STRONG({$attachmentsstr})));
var togglelink = A({'class': 'toggle', 'href': '#'}, {$attachmentsstr});
var thead = THEAD({'class': 'expandable-head'}, TR(null, TH(null, togglelink)));
var tbody = TBODY({'class': 'expandable-body'});
for (var i=0; i < attachments.length; i++) {
var link = self.config.wwwroot + 'artefact/file/download.php?file=' + attachments[i].id;
if (i+1 < attachments.length) {
appendChildNodes(list, A({'href': link}, attachments[i].title), ', ');
}
else {
appendChildNodes(list, A({'href': link}, attachments[i].title));
}
var item = attachments[i];
var href = self.config.wwwroot + 'artefact/file/download.php?file=' + attachments[i].id;
var link = A({'href': href}, {$downloadstr});
appendChildNodes(tbody, TR(null, TD(null, item.title + ' (' + formatSize(item.size) + ') - ', STRONG(null, link))));
}
return list;
return TABLE({'class': 'cb attachments fullwidth'}, thead, tbody);
}
else {
// No attachments
......@@ -1146,11 +1162,9 @@ class ArtefactTypeEmploymenthistory extends ArtefactTypeResumeComposite {
protected $employer;
public static function get_tablerenderer_js() {
return "
'startdate',
'enddate',
" . ArtefactTypeResumeComposite::get_tablerenderer_title_js(
return ArtefactTypeResumeComposite::get_tablerenderer_title_js(
self::get_tablerenderer_title_js_string(),
self::get_tablerenderer_date_js_string(),
self::get_tablerenderer_body_js_string(),
self::get_tablerenderer_attachments_js_string()
) . ",
......@@ -1164,6 +1178,10 @@ class ArtefactTypeEmploymenthistory extends ArtefactTypeResumeComposite {
return " r.jobtitle + ': ' + r.employer";
}
public static function get_tablerenderer_date_js_string() {
return " r.startdate + (r.enddate ? ' - ' + r.enddate : '')";
}
public static function get_tablerenderer_body_js_string() {
return " r.positiondescription";
}
......@@ -1281,11 +1299,9 @@ class ArtefactTypeEducationhistory extends ArtefactTypeResumeComposite {
public static function get_tablerenderer_js() {
return "
'startdate',
'enddate',
" . ArtefactTypeResumeComposite::get_tablerenderer_title_js(
return ArtefactTypeResumeComposite::get_tablerenderer_title_js(
self::get_tablerenderer_title_js_string(),
self::get_tablerenderer_date_js_string(),
self::get_tablerenderer_body_js_string(),
self::get_tablerenderer_attachments_js_string()
) . ",
......@@ -1299,6 +1315,10 @@ class ArtefactTypeEducationhistory extends ArtefactTypeResumeComposite {
return " formatQualification(r.qualname, r.qualtype, r.institution)";
}
public static function get_tablerenderer_date_js_string() {
return " r.startdate + (r.enddate ? ' - ' + r.enddate : '')";
}
public static function format_render_self_data($data) {
$at = get_string('at');
foreach ($data as &$row) {
......@@ -1459,10 +1479,9 @@ class ArtefactTypeCertification extends ArtefactTypeResumeComposite {
protected $date;
public static function get_tablerenderer_js() {
return "
'date',
" . ArtefactTypeResumeComposite::get_tablerenderer_title_js(
return ArtefactTypeResumeComposite::get_tablerenderer_title_js(
self::get_tablerenderer_title_js_string(),
self::get_tablerenderer_date_js_string(),
self::get_tablerenderer_body_js_string(),
self::get_tablerenderer_attachments_js_string()
) . ",
......@@ -1476,6 +1495,10 @@ class ArtefactTypeCertification extends ArtefactTypeResumeComposite {
return "r.title";
}
public static function get_tablerenderer_date_js_string() {
return " r.date";
}
public static function get_tablerenderer_body_js_string() {
return "r.description";
}
......@@ -1570,10 +1593,9 @@ class ArtefactTypeBook extends ArtefactTypeResumeComposite {
protected $contribution;
public static function get_tablerenderer_js() {
return "
'date',
" . ArtefactTypeResumeComposite::get_tablerenderer_title_js(
return ArtefactTypeResumeComposite::get_tablerenderer_title_js(
self::get_tablerenderer_title_js_string(),
self::get_tablerenderer_date_js_string(),
self::get_tablerenderer_body_js_string(),
self::get_tablerenderer_attachments_js_string()
) . ",
......@@ -1587,6 +1609,10 @@ class ArtefactTypeBook extends ArtefactTypeResumeComposite {
return "r.title + ' (' + r.contribution + ')'";
}
public static function get_tablerenderer_date_js_string() {
return " r.date";
}
public static function get_tablerenderer_body_js_string() {
return "DIV(r.description, DIV({'id':'composite-book-url'}, A({'href':r.url, 'target':'_blank'}, r.url)))";
}
......@@ -1694,11 +1720,9 @@ class ArtefactTypeMembership extends ArtefactTypeResumeComposite {
protected $enddate;
public static function get_tablerenderer_js() {
return "
'startdate',
'enddate',
" . ArtefactTypeResumeComposite::get_tablerenderer_title_js(
return ArtefactTypeResumeComposite::get_tablerenderer_title_js(
self::get_tablerenderer_title_js_string(),
self::get_tablerenderer_date_js_string(),
self::get_tablerenderer_body_js_string(),
self::get_tablerenderer_attachments_js_string()
) . ",
......@@ -1712,6 +1736,10 @@ class ArtefactTypeMembership extends ArtefactTypeResumeComposite {
return "r.title";
}
public static function get_tablerenderer_date_js_string() {
return " r.startdate + (r.enddate ? ' - ' + r.enddate : '')";
}
public static function get_tablerenderer_body_js_string() {
return "r.description";
}
......
......@@ -9,7 +9,6 @@
{if $controls}<th class="resumecontrols">
<span class="accessible-hidden">{str tag=move}</span>
</th>{/if}
<th class="resumedate">{str tag='date' section='artefact.resume'}</th>
<th>{str tag='title' section='artefact.resume'}</th>
<th class="resumeattachments center"><img src="{theme_url filename="images/attachment.png"}" title="{str tag=Attachments section=artefact.resume}" alt="{str tag=Attachments section=artefact.resume}" /></th>
{if $controls}<th class="resumecontrols">
......@@ -19,35 +18,41 @@
</thead>
<tbody>
{foreach from=$rows item=row}
<tr class="{cycle values='r0,r0,r1,r1'} expandable-head">
<tr class="{cycle values='r0,r1'}">
{if $controls}<td class="buttonscell"></td>{/if}
<td>{$row->date}</td>
<td><a class="toggle textonly" href="#">{$row->title}</a></td>
<td class="center">{$row->clipcount}</td>
{if $controls}<td class="buttonscell"></td>{/if}
</tr>
<tr class="{cycle values='r0,r0,r1,r1'} expandable-body">
{if $controls}<td class="buttonscell"></td>{/if}
<td colspan="3">
<div class="compositedesc">
{$row->description}
{if $row->url}<p><a href="{$row->url}" target="_blank">{$row->url}</a></p>{/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="cb attachments fullwidth">
<thead class="expandable-head">
<tr>
<th colspan="2"><a class="toggle" href="#">{str tag='attachedfiles' section='artefact.blog'}</a></th>
</tr>
</thead>
<tbody class="expandable-body">
{foreach from=$row->attachments item=item}
<tr>
{if $icons}<td class="iconcell"><img src="{$item->iconpath}" alt=""></td>{/if}
<td><a href="{$item->viewpath}">{$item->title}</a> ({$item->size}) - <strong><a href="{$item->downloadpath}">{str tag=Download section=artefact.file}</a></strong>
<br>{$item->description}</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
</div>
{if $row->attachments}
<table class="cb attachments fullwidth">
<tbody>
<tr><th colspan="2">{str tag='attachedfiles' section='artefact.blog'}:</th></tr>
{foreach from=$row->attachments item=item}
<tr class="{cycle values='r0,r1'}">
{if $icons}<td class="iconcell"><img src="{$item->iconpath}" alt=""></td>{/if}
<td><a href="{$item->viewpath}">{$item->title}</a> ({$item->size}) - <strong><a href="{$item->downloadpath}">{str tag=Download section=artefact.file}</a></strong>
<br>{$item->description}</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
</td>
<td class="center">{$row->clipcount}</td>
{if $controls}<td class="buttonscell"></td>{/if}
</tr>
{/foreach}
......
......@@ -9,7 +9,6 @@
{if $controls}<th class="resumecontrols">
<span class="accessible-hidden">{str tag=move}</span>
</th>{/if}
<th class="resumedate">{str tag='date' section='artefact.resume'}</th>
<th>{str tag='title' section='artefact.resume'}</th>
<th class="resumeattachments center"><img src="{theme_url filename="images/attachment.png"}" title="{str tag=Attachments section=artefact.resume}" alt="{str tag=Attachments section=artefact.resume}" /></th>
{if $controls}<th class="resumecontrols">
......@@ -19,31 +18,38 @@
</thead>
<tbody>
{foreach from=$rows item=row}
<tr class="{cycle values='r0,r0,r1,r1'} expandable-head">
<tr class="{cycle values='r0,r1'}">
{if $controls}<td class="buttonscell"></td>{/if}
<td>{$row->date}</td>
<td><a class="toggle textonly" href="#">{$row->title}</a></td>
<td class="center">{$row->clipcount}</td>
{if $controls}<td class="buttonscell"></td>{/if}
</tr>
<tr class="{cycle values='r0,r0,r1,r1'} expandable-body">
{if $controls}<td class="buttonscell"></td>{/if}
<td colspan="3"><div class="compositedesc">{$row->description}</div>
{if $row->attachments}
<table class="cb attachments fullwidth">
<tbody>
<tr><th colspan="2">{str tag='attachedfiles' section='artefact.blog'}:</th></tr>
{foreach from=$row->attachments item=item}
<tr class="{cycle values='r0,r1'}">
{if $icons}<td class="iconcell"><img src="{$item->iconpath}" alt=""></td>{/if}
<td><a href="{$item->viewpath}">{$item->title}</a> ({$item->size}) - <strong><a href="{$item->downloadpath}">{str tag=Download section=artefact.file}</a></strong>
<br>{$item->description}</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
<td>
<div class="expandable-head">
{if $row->description || $row->attachments}<a class="toggle textonly" href="#">{else}<strong>{/if}
{$row->title}
{if $row->description || $row->attachments}</a>{else}</strong>{/if}
<div>{$row->date}</div>
</div>
<div class="expandable-body">
<div class="compositedesc">{$row->description}</div>
{if $row->attachments}
<table class="cb attachments fullwidth">
<thead class="expandable-head">
<tr>
<th colspan="2"><a class="toggle" href="#">{str tag='attachedfiles' section='artefact.blog'}</a></th>
</tr>
</thead>
<tbody class="expandable-body">
{foreach from=$row->attachments item=item}
<tr>
{if $icons}<td class="iconcell"><img src="{$item->iconpath}" alt=""></td>{/if}
<td><a href="{$item->viewpath}">{$item->title}</a> ({$item->size}) - <strong><a href="{$item->downloadpath}">{str tag=Download section=artefact.file}</a></strong>
<br>{$item->description}</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
</div>
</td>
<td class="center">{$row->clipcount}</td>
{if $controls}<td class="buttonscell"></td>{/if}
</tr>
{/foreach}
......
......@@ -9,8 +9,6 @@
{if $controls}<th class="resumecontrols">
<span class="accessible-hidden">{str tag=move}</span>
</th>{/if}
<th class="resumedate">{str tag='startdate' section='artefact.resume'}</th>
<th class="resumedate">{str tag='enddate' section='artefact.resume'}</th>
<th>{str tag='qualification' section='artefact.resume'}</th>
<th class="resumeattachments center"><img src="{theme_url filename="images/attachment.png"}" title="{str tag=Attachments section=artefact.resume}" alt="{str tag=Attachments section=artefact.resume}" /></th>
{if $controls}<th class="resumecontrols">
......@@ -20,32 +18,38 @@
</thead>
<tbody>
{foreach from=$rows item=row}
<tr class="{cycle values='r0,r0,r1,r1'} expandable-head">
<tr class="{cycle values='r0,r1'}">
{if $controls}<td class="buttonscell"></td>{/if}
<td>{$row->startdate}</td>
<td>{$row->enddate}</td>
<td><a class="toggle textonly" href="#">{$row->qualification}</a></td>
<td class="center">{$row->clipcount}</td>
{if $controls}<td class="buttonscell"></td>{/if}
</tr>
<tr class="{cycle values='r0,r0,r1,r1'} expandable-body">
{if $controls}<td class="buttonscell"></td>{/if}
<td colspan="4"><div class="compositedesc">{$row->qualdescription}</div>
{if $row->attachments}
<table class="cb attachments fullwidth">
<tbody>
<tr><th colspan="2">{str tag='attachedfiles' section='artefact.blog'}:</th></tr>
{foreach from=$row->attachments item=item}
<tr class="{cycle values='r0,r1'}">
{if $icons}<td class="iconcell"><img src="{$item->iconpath}" alt=""></td>{/if}
<td><a href="{$item->viewpath}">{$item->title}</a> ({$item->size}) - <strong><a href="{$item->downloadpath}">{str tag=Download section=artefact.file}</a></strong>
<br>{$item->description}</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
<td>
<div class="expandable-head">
{if $row->qualdescription || $row->attachments}<a class="toggle textonly" href="#">{else}<strong>{/if}
{$row->qualification}
{if $row->qualdescription || $row->attachments}</a>{else}</strong>{/if}
<div>{$row->startdate}{if $row->enddate} - {$row->enddate}{/if}</div>
</div>
<div class="expandable-body">
<div class="compositedesc">{$row->qualdescription}</div>
{if $row->attachments}
<table class="cb attachments fullwidth">
<thead class="expandable-head">
<tr>
<th colspan="2"><a class="toggle" href="#">{str tag='attachedfiles' section='artefact.blog'}</a></th>
</tr>
</thead>
<tbody class="expandable-body">
{foreach from=$row->attachments item=item}
<tr>
{if $icons}<td class="iconcell"><img src="{$item->iconpath}" alt=""></td>{/if}
<td><a href="{$item->viewpath}">{$item->title}</a> ({$item->size}) - <strong><a href="{$item->downloadpath}">{str tag=Download section=artefact.file}</a></strong>
<br>{$item->description}</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
</div>
</td>
<td class="center">{$row->clipcount}</td>
{if $controls}<td class="buttonscell"></td>{/if}
</tr>
{/foreach}
......
......@@ -9,8 +9,6 @@
{if $controls}<th class="resumecontrols">
<span class="accessible-hidden">{str tag=move}</span>
</th>{/if}
<th class="resumedate">{str tag='startdate' section='artefact.resume'}</th>
<th class="resumedate">{str tag='enddate' section='artefact.resume'}</th>
<th>{str tag='position' section='artefact.resume'}</th>
<th class="resumeattachments center"><img src="{theme_url filename="images/attachment.png"}" title="{str tag=Attachments section=artefact.resume}" alt="{str tag=Attachments section=artefact.resume}" /></th>
{if $controls}<th class="resumecontrols">
......@@ -20,32 +18,38 @@
</thead>
<tbody>
{foreach from=$rows item=row}
<tr class="{cycle values='r0,r0,r1,r1'} expandable-head">
<tr class="{cycle values='r0,r1'}">
{if $controls}<td class="buttonscell"></td>{/if}
<td class="toggle">{$row->startdate}</td>
<td>{$row->enddate}</td>
<td><a class="toggle textonly" href="#">{$row->jobtitle}: {$row->employer}</a></td>
<td class="center">{$row->clipcount}</td>
{if $controls}<td class="buttonscell"></td>{/if}
</tr>
<tr class="{cycle values='r0,r0,r1,r1'} expandable-body">
{if $controls}<td class="buttonscell"></td>{/if}
<td colspan="4"><div class="compositedesc">{$row->positiondescription}</div>
{if $row->attachments}
<table class="cb attachments fullwidth">
<tbody>
<tr><th colspan="2">{str tag='attachedfiles' section='artefact.blog'}:</th></tr>
{foreach from=$row->attachments item=item}
<tr class="{cycle values='r0,r1'}">
{if $icons}<td class="iconcell"><img src="{$item->iconpath}" alt=""></td>{/if}
<td><a href="{$item->viewpath}">{$item->title}</a> ({$item->size}) - <strong><a href="{$item->downloadpath}">{str tag=Download section=artefact.file}</a></strong>
<br>{$item->description}</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
<td>
<div class="expandable-head">
{if $row->positiondescription || $row->attachments}<a class="toggle textonly" href="#">{else}<strong>{/if}
{$row->jobtitle}: {$row->employer}
{if $row->positiondescription || $row->attachments}</a>{else}</strong>{/if}
<div>{$row->startdate}{if $row->enddate} - {$row->enddate}{/if}</div>
</div>
<div class="expandable-body">
<div class="compositedesc">{$row->positiondescription}</div>
{if $row->attachments}
<table class="cb attachments fullwidth">
<thead class="expandable-head">
<tr>
<th colspan="2"><a class="toggle" href="#">{str tag='attachedfiles' section='artefact.blog'}</a></th>
</tr>
</thead>
<tbody class="expandable-body">
{foreach from=$row->attachments item=item}
<tr>
{if $icons}<td class="iconcell"><img src="{$item->iconpath}" alt=""></td>{/if}
<td><a href="{$item->viewpath}">{$item->title}</a> ({$item->size}) - <strong><a href="{$item->downloadpath}">{str tag=Download section=artefact.file}</a></strong>
<br>{$item->description}</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
</div>
</td>
<td class="center">{$row->clipcount}</td>
{if $controls}<td class="buttonscell"></td>{/if}
</tr>
{/foreach}
......
......@@ -9,8 +9,6 @@
{if $controls}<th class="resumecontrols">
<span class="accessible-hidden">{str tag=move}</span>
</th>{/if}
<th class="resumedate">{str tag='startdate' section='artefact.resume'}</th>
<th class="resumedate">{str tag='enddate' section='artefact.resume'}</th>
<th>{str tag='title' section='artefact.resume'}</th>
<th class="resumeattachments center"><img src="{theme_url filename="images/attachment.png"}" title="{str tag=Attachments section=artefact.resume}" alt="{str tag=Attachments section=artefact.resume}" /></th>
{if $controls}<th class="resumecontrols">
......@@ -20,33 +18,38 @@
</thead>
<tbody>
{foreach from=$rows item=row}
<tr class="{cycle values='r0,r0,r1,r1'} expandable-head">
<tr class="{cycle values='r0,r1'}">
{if $controls}<td class="buttonscell"></td>{/if}
<td class="toggle">{$row->startdate}</td>
<td>{$row->enddate}</td>
<td><a class="toggle textonly" href="#">{$row->title}</a></td>
<td class="center">{$row->clipcount}</td>
{if $controls}<td class="buttonscell"></td>{/if}
</tr>
<tr class="{cycle values='r0,r0,r1,r1'} expandable-body">
{if $controls}<td class="buttonscell"></td>{/if}
<td colspan="4"><div class="compositedesc">{$row->description}</div>
{if $row->attachments}
<table class="cb attachments fullwidth">
<tbody>
<tr><th colspan="2">{str tag='attachedfiles' section='artefact.blog'}:</th></tr>
{foreach from=$row->attachments item=item}
<tr class="{cycle values='r0,r1'}">
{if $icons}<td class="iconcell"><img src="{$item->iconpath}" alt=""></td>{/if}
<td><a href="{$item->viewpath}">{$item->title}</a> ({$item->size}) - <strong><a href="{$item->downloadpath}">{str tag=Download section=artefact.file}</a></strong>
<br>{$item->description}</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
<td>
<div class="expandable-head">
{if $row->description || $row->attachments}<a class="toggle textonly" href="#">{else}<strong>{/if}
{$row->title}
{if $row->description || $row->attachments}</a>{else}</strong>{/if}
<div>{$row->startdate}{if $row->enddate} - {$row->enddate}{/if}</div>
</div>
<div class="expandable-body">
<div class="compositedesc">{$row->description}</div>
{if $row->attachments}
<table class="cb attachments fullwidth">
<thead class="expandable-head">
<tr>
<th colspan="2"><a class="toggle" href="#">{str tag='attachedfiles' section='artefact.blog'}</a></th>
</tr>
</thead>
<tbody class="expandable-body">