meta. only show year

This commit is contained in:
j 2015-12-01 14:54:22 +01:00
commit 70fcd5b20c
2 changed files with 11 additions and 3 deletions

View file

@ -113,10 +113,11 @@ oml.ui.infoView = function(identifyData) {
function formatValue(value, key) {
return value ? (Ox.isArray(value) ? value : [value]).map(function(value) {
if (key == 'date' && value) {
value = value.slice(0, 4);
}
return key && !identifyData ?
'<a href="/' + key + '==' + (
key == 'date' ? value.slice(0, 4) : value
) + '">' + value + '</a>'
'<a href="/' + key + '==' + value + '">' + value + '</a>'
: value;
}).join('; ') : '';
}