-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add options to disable genes and transcripts tarcks
- Loading branch information
Nick Booher
committed
Jan 16, 2020
1 parent
1f41188
commit 2cba79c
Showing
2 changed files
with
92 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
require_once 'includes/tripal_jbrowse_api.queries.inc'; | ||
|
||
/** | ||
* @file | ||
* Admin page callbacks for the tripal_jbrowse_api module. | ||
*/ | ||
|
||
function tripal_jbrowse_api_settings() { | ||
|
||
$results = chado_query(TRIPAL_JBROWSE_API_QUERY_ALL_ORGANISMS)->fetchAll(PDO::FETCH_ASSOC); | ||
|
||
foreach ($results as $row) { | ||
$prefix = 'tripal_jbrowse_api_' . $row['organism_id'] . '_'; | ||
$form['organism_' . $row['organism_id']] = array( | ||
'#type' => 'fieldset', | ||
'#title' => sprintf('%s %s (%s)', $row['genus'], $row['species'], $row['common_name']) | ||
); | ||
$form['organism_' . $row['organism_id']][$prefix . 'show_genes'] = array( | ||
'#type' => 'checkbox', | ||
'#title' => t('Expose genes as an available track for this organism'), | ||
'#default_value' => variable_get($prefix . 'show_genes', TRUE), | ||
); | ||
$form['organism_' . $row['organism_id']][$prefix . 'genes_is_default'] = array( | ||
'#type' => 'checkbox', | ||
'#title' => t('Load genes track by default when viewing this organism'), | ||
'#default_value' => variable_get($prefix . 'genes_is_default', TRUE), | ||
); | ||
$form['organism_' . $row['organism_id']][$prefix . 'show_transcripts'] = array( | ||
'#type' => 'checkbox', | ||
'#title' => t('Expose transcripts as an available track for this organism'), | ||
'#default_value' => variable_get($prefix . 'show_transcripts', TRUE), | ||
); | ||
$form['organism_' . $row['organism_id']][$prefix . 'transcripts_is_default'] = array( | ||
'#type' => 'checkbox', | ||
'#title' => t('Load transcripts track by default when viewing this organism'), | ||
'#default_value' => variable_get($prefix . 'transcripts_is_default', TRUE), | ||
); | ||
} | ||
|
||
return system_settings_form($form); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters