Commit bd8dcda3 authored by Nigel McNie's avatar Nigel McNie
Browse files

Basic display of resume data in HTML export.

Needs cleanup for sure, but for now it's there and it works.
parent fba08ae7
......@@ -36,6 +36,19 @@ class HtmlExportResume extends HtmlExportArtefactPlugin {
$smarty->assign('breadcrumbs', array(
array('text' => get_string('resume', 'artefact.resume'), 'path' => 'index.html'),
));
if ($artefacts = get_column_sql("SELECT id
FROM {artefact}
WHERE owner = ?
AND artefacttype IN
(SELECT name FROM {artefact_installed_type} WHERE plugin = 'resume')",
array($this->exporter->get('user')->get('id')))) {
foreach ($artefacts as $id) {
$artefact = artefact_instance_from_id($id);
$rendered = $artefact->render_self(array());
$smarty->assign($artefact->get('artefacttype'), $rendered['html']);
}
}
$content = $smarty->fetch('export:html/resume:index.tpl');
if (false === file_put_contents($this->fileroot . 'index.html', $content)) {
......
{include file="export:html:header.tpl"}
<p>Insert resume here</p>
<h2>{str tag=coverletter section=artefact.resume}</h2>
{$coverletter}
<h2>{str tag=interest section=artefact.resume}</h2>
{$interest}
<h2>{str tag=contactinformation section=artefact.resume}</h2>
{$contactinformation}
<h2>{str tag=personalinformation section=artefact.resume}</h2>
{$personalinformation}
<h2>{str tag=employmenthistory section=artefact.resume}</h2>
{$employmenthistory}
<h2>{str tag=educationhistory section=artefact.resume}</h2>
{$educationhistory}
<h2>{str tag=certification section=artefact.resume}</h2>
{$certification}
<h2>{str tag=book section=artefact.resume}</h2>
{$book}
<h2>{str tag=membership section=artefact.resume}</h2>
{$membership}
<h2>{str tag=myskills section=artefact.resume}</h2>
<h3>{str tag=personalgoal section=artefact.resume}</h3>
{$personalgoal}
<h3>{str tag=academicgoal section=artefact.resume}</h3>
{$academicgoal}
<h3>{str tag=careergoal section=artefact.resume}</h3>
{$careergoal}
<h2>{str tag=mygoals section=artefact.resume}</h2>
<h3>{str tag=personalskill section=artefact.resume}</h3>
{$personalskill}
<h3>{str tag=academicskill section=artefact.resume}</h3>
{$academicskill}
<h3>{str tag=workskill section=artefact.resume}</h3>
{$workskill}
{include file="export:html:footer.tpl"}
TODOs for export HTML plugin
============================
* Resume data export
* blogs - render without javascript
* rewrite all links and images to point to the right places
- blog attachments
- smilies
* views - render in proper structure
* resume display tidyup
* i18n
* G&D
* Documentation
......
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