Commit b8f99f31 authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixed template filter in simpleManagement

parent af579a2c
......@@ -328,6 +328,19 @@ class simpleManagement extends management
$attributes[] = $i['mainAttr'];
$attributes[] = $i['nameAttr'];
}
if (!$this->skipTemplates) {
$tag = 'FILTERTEMPLATE';
$filter .= '$'.$tag;
$this->filter->elements[$tag] = array(
'type' => 'checkbox',
'tag' => $tag,
'default' => TRUE,
'unset' => array(),
'set' => '(objectClass=fdTemplate)'
);
$this->filter->elementValues[$tag] = TRUE;
$attributes[] = 'fdTemplateField';
}
$filter .= ')';
$attributes = array_values(array_unique($attributes));
$this->filter->query[0]['filter'] = '(&'.$filter.'$NAME)';
......@@ -365,6 +378,12 @@ class simpleManagement extends management
'label' => sprintf(_('Show %s'), $this->config->data['OBJECTS'][$object]['name'])
);
}
if (!$this->skipTemplates) {
$filters[] = array(
'id' => 'FILTERTEMPLATE',
'label' => sprintf(_('Show %s'), _('Template'))
);
}
$smarty->assign('objectFilters', $filters);
return parent::renderList();
}
......
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