Commit 0dae27cd authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Show view tags in views submitted/shared to group


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 1d22297b
......@@ -2207,11 +2207,12 @@ class View {
$institutions[$v->institution] = $v->institution;
}
}
$viewidlist = join(',', array_keys($viewdata));
$artefacts = get_records_sql_array('SELECT va.view, va.artefact, a.title, a.artefacttype, t.plugin
FROM {view_artefact} va
INNER JOIN {artefact} a ON va.artefact = a.id
INNER JOIN {artefact_installed_type} t ON a.artefacttype = t.name
WHERE va.view IN (' . join(',', array_keys($viewdata)) . ')
WHERE va.view IN (' . $viewidlist . ')
GROUP BY va.view, va.artefact, a.title, a.artefacttype, t.plugin
ORDER BY a.title, va.artefact', '');
if ($artefacts) {
......@@ -2230,6 +2231,12 @@ class View {
}
}
}
$tags = get_records_select_array('view_tag', 'view IN (' . $viewidlist . ')');
if ($tags) {
foreach ($tags as &$tag) {
$viewdata[$tag->view]->tags[] = $tag->tag;
}
}
if (!empty($owners)) {
$owners = get_records_select_assoc('usr', 'id IN (' . join(',', $owners) . ')', null, '',
'id,username,firstname,lastname,preferredname,admin,staff,studentid');
......
......@@ -50,6 +50,7 @@
{/if}
{/if}
<div>{$view.shortdescription}</div>
{if $view.tags}<div class="tags">{str tag=tags}: {list_tags owner=$view.owner tags=$view.tags}</div>{/if}
{if $view.template}
<div><a href="">{str tag=copythisview section=view}</a></div>
{/if}
......@@ -80,6 +81,7 @@
{/if}
{/if}
<div>{$view.shortdescription}</div>
{if $view.tags}<div class="tags">{str tag=tags}: {list_tags owner=$view.owner tags=$view.tags}</div>{/if}
</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