Project

General

Profile

« Previous | Next » 

Revision ac29da8f

Added by Patrick Plitzner almost 6 years ago

Do not show specimen table if no data available

View differences:

modules/cdm_dataportal/includes/pages.inc
222 222
                    $rowcount++;
223 223
                }
224 224
            }
225
        }
226

  
227
        $tableId = "derivate_hierarchy_table";
228
        $derivateHierarchyTable = array(
229
            "#theme" => "table",
230
            "#weight" => 2,
231
            "#header" => array(
232
                array(
233
                    'data' => "",
234
                    'class' => array('expand_column')
235
                ),
236
                "Country", "Date", "Collector + collecting number", "Herbaria", "Type", "Scan", "Derivatives"),
237
            "#rows" => $rows,
238
            "#attributes" => array(
239
                "id" => $tableId,
240
                "border" => 2
241
            )
242
        );
243 225

  
244
        //add toggle functionality to derivate hierarchy table
245
        drupal_add_js_rowToggle("#".$tableId);
246

  
247
        $render_array['derivate_hierarchy_table'] = $derivateHierarchyTable;
248
        $render_array['pager'] = markup_to_render_array(
249
            theme('cdm_pager', array(
250
                'pager' => $pagerFieldUnits,
251
                'path' => $_REQUEST['q'],
252
                'parameters' => $_REQUEST
253
            )),
254
            10 // weight
255
        );
226
            $tableId = "derivate_hierarchy_table";
227
            $derivateHierarchyTable = array(
228
                "#theme" => "table",
229
                "#weight" => 2,
230
                "#header" => array(
231
                    array(
232
                        'data' => "",
233
                        'class' => array('expand_column')
234
                    ),
235
                    "Country", "Date", "Collector + collecting number", "Herbaria", "Type", "Scan", "Derivatives"),
236
                "#rows" => $rows,
237
                "#attributes" => array(
238
                    "id" => $tableId,
239
                    "border" => 2
240
                )
241
            );
242

  
243
            //add toggle functionality to derivate hierarchy table
244
            drupal_add_js_rowToggle("#".$tableId);
245

  
246
            $render_array['derivate_hierarchy_table'] = $derivateHierarchyTable;
247
            $render_array['pager'] = markup_to_render_array(
248
                theme('cdm_pager', array(
249
                    'pager' => $pagerFieldUnits,
250
                    'path' => $_REQUEST['q'],
251
                    'parameters' => $_REQUEST
252
                )),
253
                10 // weight
254
            );
255
        }
256 256
    }
257 257
    else{
258 258
        //BOTTOM-UP-SPECIMEN-TABLE

Also available in: Unified diff