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

Make sure that the filename of the image doesn't cause the artefact chooser to...

Make sure that the filename of the image doesn't cause the artefact chooser to expand too widely. The hover title now shows the full description, with an abbreviated version of it next to the image itself.
parent b3e385c0
......@@ -1169,7 +1169,19 @@ class View {
foreach ($artefacts as &$artefact) {
safe_require('artefact', get_field('artefact_installed_type', 'plugin', 'name', $artefact->artefacttype));
$artefact->icon = call_static_method(generate_artefact_class_name($artefact->artefacttype), 'get_icon', array('id' => $artefact->id));
$artefact->hovertitle = ($artefact->artefacttype == 'profileicon') ? $artefact->note : $artefact->title;
if ($artefact->artefacttype == 'profileicon') {
$artefact->hovertitle = $artefact->note;
if ($artefact->title) {
$artefact->hovertitle .= ': ' . $artefact->title;
}
}
else {
$artefact->hovertitle = $artefact->title;
if ($artefact->description) {
$artefact->hovertitle .= ': ' . $artefact->description;
}
}
$artefact->title = str_shorten($artefact->title, 20);
$artefact->description = ($artefact->artefacttype == 'profileicon') ? $artefact->title : $artefact->description;
$smarty = smarty_core();
......
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