removed EVA stuff from template, plus misc
This commit is contained in:
@ -23,15 +23,12 @@ function template_preprocess_oc_case(array &$variables) {
|
||||
// Separate the fields into two sections to be displayed in two columns.
|
||||
// Remove the name (title) field as this is displayed anyway.
|
||||
$variables['id'] = $variables['elements']['#oc_case']->get('id')[0]->get('value')->getValue();
|
||||
$variables['eva_fields'] = array(); // if the installation has any "EVA" (embedded view) fields this should catch them.
|
||||
$variables['base_fields'] = array();
|
||||
$variables['other_fields'] = array();
|
||||
foreach (Element::children($variables['elements']) as $key) {
|
||||
$variables['content'][$key] = $variables['elements'][$key];
|
||||
if (in_array($key, ['created', 'changed', 'files', 'actors_involved', 'status', 'user_id'])) {
|
||||
$variables['base_fields'][$key] = $variables['elements'][$key];
|
||||
} else if (strpos($key, "entity_view") !== false) {
|
||||
$variables['eva_fields'][$key] = $variables['elements'][$key];
|
||||
} else {
|
||||
$variables['other_fields'][$key] = $variables['elements'][$key];
|
||||
unset($variables['other_fields']['name']);
|
||||
|
@ -29,10 +29,5 @@
|
||||
{{ field }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="eva_fields">
|
||||
{% for field in eva_fields %}
|
||||
{{ field }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user