|
@@ -82,7 +82,7 @@ function tripal_field_formatter_info_alter(&$info) {
|
|
*/
|
|
*/
|
|
function tripal_bundle_create($bundle) {
|
|
function tripal_bundle_create($bundle) {
|
|
$field_type = 'rdfs__type';
|
|
$field_type = 'rdfs__type';
|
|
- $field_name = $bundle->name . '_' . $field_type;
|
|
|
|
|
|
+ $field_name = 'rdfs__type';
|
|
|
|
|
|
// Add the field, unless it already exists.
|
|
// Add the field, unless it already exists.
|
|
if (!field_info_field($field_name)) {
|
|
if (!field_info_field($field_name)) {
|
|
@@ -94,8 +94,6 @@ function tripal_bundle_create($bundle) {
|
|
'storage' => array(
|
|
'storage' => array(
|
|
'type' => 'tripal_no_storage'
|
|
'type' => 'tripal_no_storage'
|
|
),
|
|
),
|
|
- 'settings' => array(
|
|
|
|
- ),
|
|
|
|
));
|
|
));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -111,6 +109,9 @@ function tripal_bundle_create($bundle) {
|
|
'required' => FALSE,
|
|
'required' => FALSE,
|
|
'settings' => array(
|
|
'settings' => array(
|
|
'auto_attach' => TRUE,
|
|
'auto_attach' => TRUE,
|
|
|
|
+ 'term_vocabulary' => 'rdfs',
|
|
|
|
+ 'term_accession' => 'type',
|
|
|
|
+ 'term_name' => 'type',
|
|
),
|
|
),
|
|
'widget' => array(
|
|
'widget' => array(
|
|
'type' => 'rdfs__type_widget',
|
|
'type' => 'rdfs__type_widget',
|
|
@@ -174,18 +175,10 @@ function tripal_form_field_ui_field_overview_form_alter(&$form, &$form_state, $f
|
|
$form['fields']['#header'][] = 'Term';
|
|
$form['fields']['#header'][] = 'Term';
|
|
$form['fields']['#header'][] = 'Supported By * ';
|
|
$form['fields']['#header'][] = 'Supported By * ';
|
|
|
|
|
|
- // TODO: remove widgets that aren't appropriate for this entity, if the
|
|
|
|
- // type is 'tripal_key_value'.
|
|
|
|
- // Why is this sort not working!!??
|
|
|
|
- $options = $form['fields']['_add_new_field']['widget_type']['#options']['Tripal complex field'];
|
|
|
|
- asort($options);
|
|
|
|
- $form['fields']['_add_new_field']['widget_type']['#options']['Tripal complex field'] = $options;
|
|
|
|
-
|
|
|
|
// Add the storage location as the final column for each field.
|
|
// Add the storage location as the final column for each field.
|
|
$storage_info = module_invoke_all('field_storage_info');
|
|
$storage_info = module_invoke_all('field_storage_info');
|
|
foreach (element_children($form['fields']) as $field_name) {
|
|
foreach (element_children($form['fields']) as $field_name) {
|
|
|
|
|
|
-
|
|
|
|
$field = field_info_field($field_name);
|
|
$field = field_info_field($field_name);
|
|
$instance = field_info_instance('TripalEntity', $field_name, $form['#bundle']);
|
|
$instance = field_info_instance('TripalEntity', $field_name, $form['#bundle']);
|
|
// For rows in the tables that aren't fields, just add an empty value
|
|
// For rows in the tables that aren't fields, just add an empty value
|