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

Export view descriptions as <summary>s for their entries.

This is legal, I'd previously thought otherwise.
parent 1bb13d12
......@@ -210,8 +210,8 @@ class PluginExportLeap extends PluginExport {
$this->smarty->assign('id', 'portfolio:view' . $view->get('id'));
$this->smarty->assign('updated', self::format_rfc3339_date(strtotime($view->get('mtime'))));
$this->smarty->assign('created', self::format_rfc3339_date(strtotime($view->get('ctime'))));
// TODO this is wrong - view description is HTML, summary should be text
//$this->smarty->assign('summary', $view->get('description'));
$this->smarty->assign('summarytype', 'html');
$this->smarty->assign('summary', $view->get('description'));
$this->smarty->assign('contenttype', 'html');
$this->smarty->assign('content', $view->build_columns());
$this->smarty->assign('leaptype', 'selection');
......
......@@ -9,7 +9,7 @@
{/if}
{if $created} <published>{$created}</published>
{/if}
{if $summary} <summary>{$summary}</summary>
{if $summary} <summary{if $summarytype != 'text'} type="{$summarytype}"{/if}>{if $summarytype == 'xhtml'}<div xmlns="http://www.w3.org/1999/xhtml">{/if}{if $summarytype == 'xhtml'}{$summary|clean_html|export_leap_rewrite_links}{elseif $summarytype == 'html'}{$summary|clean_html|export_leap_rewrite_links|escape}{else}{$summary|escape}{/if}{if $summarytype == 'xhtml'}</div>{/if}</summary>
{/if}
<content{if $contenttype != 'text'} type="{$contenttype}"{/if}{if $contentsrc} src="{$contentsrc}"{/if}>{if $contenttype == 'xhtml'}<div xmlns="http://www.w3.org/1999/xhtml">{/if}{if $contenttype == 'xhtml'}{$content|clean_html|export_leap_rewrite_links}{elseif $contenttype == 'html'}{$content|clean_html|export_leap_rewrite_links|escape}{else}{$content|escape}{/if}{if $contenttype == 'xhtml'}</div>{/if}</content>
<rdf:type rdf:resource="leaptype:{$leaptype}"/>
......
Supports Markdown
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