forked from legumeinfo/tripal_phylotree
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tripal_phylotree.views_default.inc
328 lines (316 loc) · 19.8 KB
/
tripal_phylotree.views_default.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
<?php
/**
* @file
* Describe default phylotree views
*/
/**
* Implements hook_views_default_views().
*
* @ingroup tripal_phylotree
*/
function tripal_phylotree_views_default_views() {
$views = array();
// User View ("Search Biological Content")
// Remember, if you change the name/path of this view, you also want to
// change it's description in tripal_phylotree_search_biological_data_views()
$view = tripal_phylotree_defaultvalue_user_phylotrees();
$view = tripal_make_view_compatible_with_external($view);
$views[$view->name] = $view;
/// Admin view
$view = tripal_phylotree_defaultview_admin_phylotree();
$view = tripal_make_view_compatible_with_external($view);
$views[$view->name] = $view;
return $views;
}
/**
* The default phylotree administration view.
*
* @ingroup tripal_phylotree
*/
function tripal_phylotree_defaultview_admin_phylotree() {
$view = new view();
$view->name = 'tripal_phylotree_admin_phylotree';
$view->description = 'DO NOT DISABLE';
$view->tag = 'tripal admin';
$view->base_table = 'phylotree';
$view->human_name = 'Phylotree Admin';
$view->core = 0;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'phylotree_all', 'default');
$handler->display->display_options['title'] = 'Phylogeny';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['access']['perm'] = 'access chado_phylotree content';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '25';
$handler->display->display_options['style_plugin'] = 'table';
/* Header: Global: Action Links */
$handler->display->display_options['header']['action_links_area']['id'] = 'action_links_area';
$handler->display->display_options['header']['action_links_area']['table'] = 'views';
$handler->display->display_options['header']['action_links_area']['field'] = 'action_links_area';
$handler->display->display_options['header']['action_links_area']['label'] = 'Action Links';
$handler->display->display_options['header']['action_links_area']['link-1'] = array(
'label-1' => 'Add Phylogenetic Tree',
'path-1' => 'node/add/tripal-phylotree',
);
$handler->display->display_options['header']['action_links_area']['link-2'] = array(
'label-2' => '',
'path-2' => '',
);
$handler->display->display_options['header']['action_links_area']['link-3'] = array(
'label-3' => '',
'path-3' => '',
);
$handler->display->display_options['header']['action_links_area']['link-4'] = array(
'label-4' => '',
'path-4' => '',
);
/* Relationship: Phylotree: Phylotree => Node */
$handler->display->display_options['relationships']['phylotree_id']['id'] = 'phylotree_id';
$handler->display->display_options['relationships']['phylotree_id']['table'] = 'chado_phylotree';
$handler->display->display_options['relationships']['phylotree_id']['field'] = 'phylotree_id';
/* Field: Content: Nid */
$handler->display->display_options['fields']['nid']['id'] = 'nid';
$handler->display->display_options['fields']['nid']['table'] = 'node';
$handler->display->display_options['fields']['nid']['field'] = 'nid';
$handler->display->display_options['fields']['nid']['relationship'] = 'phylotree_id';
$handler->display->display_options['fields']['nid']['exclude'] = TRUE;
/* Field: Chado Phylotree: Phylotree Id */
$handler->display->display_options['fields']['phylotree_id']['id'] = 'phylotree_id';
$handler->display->display_options['fields']['phylotree_id']['table'] = 'phylotree';
$handler->display->display_options['fields']['phylotree_id']['field'] = 'phylotree_id';
$handler->display->display_options['fields']['phylotree_id']['exclude'] = TRUE;
/* Field: Chado Phylotree: Name */
$handler->display->display_options['fields']['name']['id'] = 'name';
$handler->display->display_options['fields']['name']['table'] = 'phylotree';
$handler->display->display_options['fields']['name']['field'] = 'name';
$handler->display->display_options['fields']['name']['label'] = 'Tree Name';
$handler->display->display_options['fields']['name']['alter']['make_link'] = TRUE;
$handler->display->display_options['fields']['name']['alter']['path'] = 'node/[nid]';
/* Field: Chado Phylotree: Phylotree Id */
$handler->display->display_options['fields']['phylotree_id_1']['id'] = 'phylotree_id_1';
$handler->display->display_options['fields']['phylotree_id_1']['table'] = 'phylotree';
$handler->display->display_options['fields']['phylotree_id_1']['field'] = 'phylotree_id';
$handler->display->display_options['fields']['phylotree_id_1']['exclude'] = TRUE;
/* Field: Chado Analysis: Name */
$handler->display->display_options['fields']['name_1']['id'] = 'name_1';
$handler->display->display_options['fields']['name_1']['table'] = 'analysis';
$handler->display->display_options['fields']['name_1']['field'] = 'name';
$handler->display->display_options['fields']['name_1']['label'] = 'Analysis';
/* Field: Chado Cvterm: Name */
$handler->display->display_options['fields']['name_2']['id'] = 'name_2';
$handler->display->display_options['fields']['name_2']['table'] = 'cvterm';
$handler->display->display_options['fields']['name_2']['field'] = 'name';
$handler->display->display_options['fields']['name_2']['label'] = 'Leaf Node Type';
/* Field: Chado Phylotree: Comment */
$handler->display->display_options['fields']['comment']['id'] = 'comment';
$handler->display->display_options['fields']['comment']['table'] = 'phylotree';
$handler->display->display_options['fields']['comment']['field'] = 'comment';
$handler->display->display_options['fields']['comment']['label'] = 'Description';
/* Sort criterion: Chado Phylotree: Name */
$handler->display->display_options['sorts']['name']['id'] = 'name';
$handler->display->display_options['sorts']['name']['table'] = 'phylotree';
$handler->display->display_options['sorts']['name']['field'] = 'name';
/* Filter criterion: Chado Phylotree: Name */
$handler->display->display_options['filters']['name_1']['id'] = 'name_1';
$handler->display->display_options['filters']['name_1']['table'] = 'phylotree';
$handler->display->display_options['filters']['name_1']['field'] = 'name';
$handler->display->display_options['filters']['name_1']['group'] = 1;
$handler->display->display_options['filters']['name_1']['exposed'] = TRUE;
$handler->display->display_options['filters']['name_1']['expose']['operator_id'] = 'name_1_op';
$handler->display->display_options['filters']['name_1']['expose']['label'] = 'Tree Name';
$handler->display->display_options['filters']['name_1']['expose']['description'] = 'Provide the name of a phylogenetic tree';
$handler->display->display_options['filters']['name_1']['expose']['use_operator'] = TRUE;
$handler->display->display_options['filters']['name_1']['expose']['operator'] = 'name_1_op';
$handler->display->display_options['filters']['name_1']['expose']['identifier'] = 'name_1';
$handler->display->display_options['filters']['name_1']['expose']['remember_roles'] = array(
2 => '2',
1 => 0,
3 => 0,
);
$handler->display->display_options['filters']['name_1']['max_length'] = '40';
/* Filter criterion: Chado Analysis: Name */
$handler->display->display_options['filters']['name']['id'] = 'name';
$handler->display->display_options['filters']['name']['table'] = 'analysis';
$handler->display->display_options['filters']['name']['field'] = 'name';
$handler->display->display_options['filters']['name']['value'] = array();
$handler->display->display_options['filters']['name']['group'] = 1;
$handler->display->display_options['filters']['name']['exposed'] = TRUE;
$handler->display->display_options['filters']['name']['expose']['operator_id'] = 'name_op';
$handler->display->display_options['filters']['name']['expose']['label'] = 'Analysis';
$handler->display->display_options['filters']['name']['expose']['description'] = 'Select one or more analyses to filter trees.';
$handler->display->display_options['filters']['name']['expose']['operator'] = 'name_op';
$handler->display->display_options['filters']['name']['expose']['identifier'] = 'name';
$handler->display->display_options['filters']['name']['expose']['remember_roles'] = array(
2 => '2',
1 => 0,
3 => 0,
);
$handler->display->display_options['filters']['name']['values_form_type'] = 'select';
$handler->display->display_options['filters']['name']['select_multiple'] = TRUE;
$handler->display->display_options['filters']['name']['select_optional'] = TRUE;
$handler->display->display_options['filters']['name']['max_length'] = '40';
/* Filter criterion: Chado Cvterm: Name */
$handler->display->display_options['filters']['name_2']['id'] = 'name_2';
$handler->display->display_options['filters']['name_2']['table'] = 'cvterm';
$handler->display->display_options['filters']['name_2']['field'] = 'name';
$handler->display->display_options['filters']['name_2']['exposed'] = TRUE;
$handler->display->display_options['filters']['name_2']['expose']['operator_id'] = 'name_2_op';
$handler->display->display_options['filters']['name_2']['expose']['label'] = 'Leaf node type';
$handler->display->display_options['filters']['name_2']['expose']['description'] = 'Provide the type of leaf node (e.g. polypeptide, taxonomic, etc).';
$handler->display->display_options['filters']['name_2']['expose']['operator'] = 'name_2_op';
$handler->display->display_options['filters']['name_2']['expose']['identifier'] = 'name_2';
$handler->display->display_options['filters']['name_2']['expose']['remember_roles'] = array(
2 => '2',
1 => 0,
3 => 0,
);
$handler->display->display_options['filters']['name_2']['max_length'] = '40';
/* Filter criterion: Chado Phylotree: Comment */
$handler->display->display_options['filters']['comment']['id'] = 'comment';
$handler->display->display_options['filters']['comment']['table'] = 'phylotree';
$handler->display->display_options['filters']['comment']['field'] = 'comment';
$handler->display->display_options['filters']['comment']['exposed'] = TRUE;
$handler->display->display_options['filters']['comment']['expose']['operator_id'] = 'comment_op';
$handler->display->display_options['filters']['comment']['expose']['label'] = 'Description';
$handler->display->display_options['filters']['comment']['expose']['description'] = 'Find a tree using words in the tree description.';
$handler->display->display_options['filters']['comment']['expose']['use_operator'] = TRUE;
$handler->display->display_options['filters']['comment']['expose']['operator'] = 'comment_op';
$handler->display->display_options['filters']['comment']['expose']['identifier'] = 'comment';
$handler->display->display_options['filters']['comment']['expose']['remember_roles'] = array(
2 => '2',
1 => 0,
3 => 0,
);
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'admin/tripal/chado/tripal_phylotree/phylotree';
$handler->display->display_options['menu']['type'] = 'default tab';
$handler->display->display_options['menu']['title'] = 'Phylogenetic Tree';
$handler->display->display_options['menu']['weight'] = '0';
$handler->display->display_options['menu']['context'] = 0;
$handler->display->display_options['menu']['context_only_inline'] = 0;
$handler->display->display_options['tab_options']['weight'] = '0';
return $view;
}
/**
* Defines the phylotree user search default view.
*
* @ingroup tripal_phylotree
*/
function tripal_phylotree_defaultvalue_user_phylotrees() {
$view = new view();
$view->name = 'tripal_phylotree_user_phylotree';
$view->description = 'Allows users to search phylotree data';
$view->tag = 'tripal search';
$view->base_table = 'phylotree_count';
$view->human_name = 'Phylogeny User Search';
$view->core = 0;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: phylotrees_all */
$handler = $view->new_display('default', 'phylotrees_all', 'default');
$handler->display->display_options['title'] = 'Phylogeny User Search';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['access']['perm'] = 'access chado_phylotree content';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '15';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['quantity'] = '9';
$handler->display->display_options['style_plugin'] = 'table';
/* Header: Global: Text area */
$handler->display->display_options['header']['area']['id'] = 'area';
$handler->display->display_options['header']['area']['table'] = 'views';
$handler->display->display_options['header']['area']['field'] = 'area';
$handler->display->display_options['header']['area']['empty'] = TRUE;
$handler->display->display_options['header']['area']['content'] = 'Search for a gene family by submitting annotation terms, PFAM IDs, or GO terms in the "Tree Description" field (e.g.cytochrome, IPR008914, homeobox leucine zipper, or GO:0003677) ... or by "Family ID" (e.g. 54689426; these IDs correspond to the Phytozome v10 gene families).
';
$handler->display->display_options['header']['area']['format'] = 'filtered_html';
/* Header: Global: Result summary */
$handler->display->display_options['header']['result']['id'] = 'result';
$handler->display->display_options['header']['result']['table'] = 'views';
$handler->display->display_options['header']['result']['field'] = 'result';
/* Footer: Global: Result summary */
$handler->display->display_options['footer']['result']['id'] = 'result';
$handler->display->display_options['footer']['result']['table'] = 'views';
$handler->display->display_options['footer']['result']['field'] = 'result';
$handler->display->display_options['footer']['result']['content'] = 'Displaying @start - @end of @total records found.';
/* Field: phylotree_count: Family ID */
$handler->display->display_options['fields']['phylotree_name']['id'] = 'phylotree_name';
$handler->display->display_options['fields']['phylotree_name']['table'] = 'phylotree_count';
$handler->display->display_options['fields']['phylotree_name']['field'] = 'phylotree_name';
/* Field: phylotree_count: Description */
$handler->display->display_options['fields']['phylotree_comment']['id'] = 'phylotree_comment';
$handler->display->display_options['fields']['phylotree_comment']['table'] = 'phylotree_count';
$handler->display->display_options['fields']['phylotree_comment']['field'] = 'phylotree_comment';
/* Field: phylotree_count: Total count */
$handler->display->display_options['fields']['total_count']['id'] = 'total_count';
$handler->display->display_options['fields']['total_count']['table'] = 'phylotree_count';
$handler->display->display_options['fields']['total_count']['field'] = 'total_count';
/* Filter criterion: phylotree_count: Family ID */
$handler->display->display_options['filters']['phylotree_name']['id'] = 'phylotree_name';
$handler->display->display_options['filters']['phylotree_name']['table'] = 'phylotree_count';
$handler->display->display_options['filters']['phylotree_name']['field'] = 'phylotree_name';
$handler->display->display_options['filters']['phylotree_name']['exposed'] = TRUE;
$handler->display->display_options['filters']['phylotree_name']['expose']['operator_id'] = 'phylotree_name_op';
$handler->display->display_options['filters']['phylotree_name']['expose']['label'] = 'Family ID';
$handler->display->display_options['filters']['phylotree_name']['expose']['use_operator'] = TRUE;
$handler->display->display_options['filters']['phylotree_name']['expose']['operator'] = 'phylotree_name_op';
$handler->display->display_options['filters']['phylotree_name']['expose']['identifier'] = 'phylotree_name';
$handler->display->display_options['filters']['phylotree_name']['expose']['remember_roles'] = array(
2 => '2',
1 => 0,
4 => 0,
);
$handler->display->display_options['filters']['phylotree_name']['max_length'] = '40';
/* Filter criterion: phylotree_count: Description */
$handler->display->display_options['filters']['phylotree_comment']['id'] = 'phylotree_comment';
$handler->display->display_options['filters']['phylotree_comment']['table'] = 'phylotree_count';
$handler->display->display_options['filters']['phylotree_comment']['field'] = 'phylotree_comment';
$handler->display->display_options['filters']['phylotree_comment']['operator'] = 'allwords';
$handler->display->display_options['filters']['phylotree_comment']['exposed'] = TRUE;
$handler->display->display_options['filters']['phylotree_comment']['expose']['operator_id'] = 'phylotree_comment_op';
$handler->display->display_options['filters']['phylotree_comment']['expose']['label'] = 'Tree Description';
$handler->display->display_options['filters']['phylotree_comment']['expose']['use_operator'] = TRUE;
$handler->display->display_options['filters']['phylotree_comment']['expose']['operator'] = 'phylotree_comment_op';
$handler->display->display_options['filters']['phylotree_comment']['expose']['identifier'] = 'phylotree_comment';
$handler->display->display_options['filters']['phylotree_comment']['expose']['remember_roles'] = array(
2 => '2',
1 => 0,
4 => 0,
);
$handler->display->display_options['filters']['phylotree_comment']['max_length'] = '40';
/* Filter criterion: phylotree_count: Total count */
$handler->display->display_options['filters']['total_count']['id'] = 'total_count';
$handler->display->display_options['filters']['total_count']['table'] = 'phylotree_count';
$handler->display->display_options['filters']['total_count']['field'] = 'total_count';
$handler->display->display_options['filters']['total_count']['exposed'] = TRUE;
$handler->display->display_options['filters']['total_count']['expose']['operator_id'] = 'total_count_op';
$handler->display->display_options['filters']['total_count']['expose']['label'] = 'Total count';
$handler->display->display_options['filters']['total_count']['expose']['use_operator'] = TRUE;
$handler->display->display_options['filters']['total_count']['expose']['operator'] = 'total_count_op';
$handler->display->display_options['filters']['total_count']['expose']['identifier'] = 'total_count';
$handler->display->display_options['filters']['total_count']['expose']['remember_roles'] = array(
2 => '2',
1 => 0,
4 => 0,
);
/* Display: Phylogeny */
$handler = $view->new_display('page', 'Phylogeny', 'page');
$handler->display->display_options['path'] = 'chado/phylotree';
$handler->display->display_options['menu']['type'] = 'normal';
$handler->display->display_options['menu']['title'] = 'Phylogeny';
$handler->display->display_options['menu']['description'] = 'Gene trees, species trees, etc.';
$handler->display->display_options['menu']['weight'] = '-10';
return $view;
}