Commit 1d22297b authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Show tags in my views block


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent db5f0fea
......@@ -95,6 +95,12 @@ class PluginBlocktypeMyviews extends SystemBlocktype {
}
}
}
$tags = get_records_select_array('view_tag', 'view IN (' . $viewidlist . ')');
if ($tags) {
foreach ($tags as &$tag) {
$views[$tag->view]->tags[] = $tag->tag;
}
}
}
$smarty->assign('VIEWS',$views);
return $smarty->fetch('blocktype:myviews:myviews.tpl');
......
......@@ -4,16 +4,18 @@
<tr>
<td class="r{cycle values=0,1}">
<h4><a href="{$WWWROOT}view/view.php?id={$item->id}">{$item->title|escape}</a></h4>
<span>
{if $item->description}
{$item->description}
<div>{$item->description}</div>
{/if}
{if $item->tags}
<div class="tags"><strong>{str tag=tags}:</strong> {list_tags owner=$item->owner tags=$item->tags}</div>
{/if}
{if $item->description && $item->artefacts}<br>{/if}
{if $item->artefacts}
<div>
<strong>{str tag="artefacts" section="view"}:</strong>
{foreach from=$item->artefacts item=artefact name=artefacts}<a href="{$WWWROOT}view/artefact.php?artefact={$artefact.id}&amp;view={$item->id}" class="link-artefacts">{$artefact.title|escape}</a>{if !$smarty.foreach.artefacts.last}, {/if}{/foreach}
</div>
{/if}
</span>
</td>
</tr>
{/foreach}
......
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