list of variables, simplify how many attributes we see.

this is tested (at sandbox) and documented ( book of DEIMS, youtube ), ask Mike Tina for deploying in production to default view mode.

-------------

in field.inc:

You would add a formatter to the variable field (field_formatter_info hook)
( $info['deims_variable_mini_summary'] = array(
'label' => t('Minimum summary'),
'field types' => array('deims_variable'),
);

Also, you would add a view-formatter (field_formatter_view hooK)
case 'deims_variable_mini_summary':
foreach ($items as $delta => $item) {
$element[$delta] = array(
'#theme' => 'deims_variable_mini_summary',
'#variable' => $item,
);
}
break;

in theme.inc,
you would add a preprocess function.

function template_preprocess_deims_variable_mini_summary(array &$variables) {
$variable = $variables['variable'];

$variables['name'] = check_plain($variable['name']);
$variables['label'] = check_plain($variable['label']);
$variables['type'] = deims_variable_type_label($variable['type']);

$details = array();
$details[t('Label')] = check_plain($variable['label']);
$details[t('Definition')] = check_plain($variable['definition']);
$details += deims_variable_get_data_summary($variable);

$variables['details'] = $details;
}

in the .module, let's add an entry in the hook_theme
$theme['deims_variable_mini_summary'] = array(
'variables' => array('variable' => NULL),
'file' => 'deims_variable.theme.inc',
'template' => 'deims-variable-summary',
);

--the rest in UI, you may need to add a view mode that uses it.

----

list of variables, simplify how many attributes we see.

currently, perhaps too much:

NAME
Label
Definition
Type
Type-dependent-attributes
Missing Values

Could NAME- DEFINITION-TYPE_DEPT_ATTR be enough?

Status: 

Priority: 

Normal