Skip to content

Commit 0a85468

Browse files
author
Andreas Kohlbecker
committed
Merge branch 'occurrences-in-tables' into develop
2 parents d7d8ad9 + e809ac5 commit 0a85468

6 files changed

Lines changed: 435 additions & 301 deletions

File tree

modules/cdm_dataportal/cdm_dataportal.css

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,9 @@ table.cdm\:Reference {
734734
/*
735735
* ======= specimens =======
736736
*/
737+
738+
/* -------- compressed specimen table view -------- */
739+
737740
#specimens table.specimens {
738741
width: 100%;
739742
}
@@ -753,7 +756,6 @@ table.cdm\:Reference {
753756
padding: 0;
754757
}
755758

756-
757759
#specimens .item-list ul{
758760
list-style-type: none;
759761
list-style-image: none;
@@ -794,6 +796,41 @@ table.cdm\:Reference {
794796
font-weight: bold;
795797
}
796798

799+
/* -------- derivation tree view -------- */
800+
801+
table.derivate_tree {
802+
margin-top: 0;
803+
margin-bottom: 0;
804+
}
805+
806+
table.derivate_tree .icon_cell {
807+
width: 15px;
808+
}
809+
810+
table.derivate_tree thead th {
811+
height: 2em;
812+
}
813+
814+
/* EXPERIMENTAL
815+
table.derivate_tree tr.derivative_row {
816+
background-color-XXX: #0e758b;
817+
}
818+
819+
table.derivate_tree td.derivative_cell .table_wrapper {
820+
border: dashed 1px red;
821+
position: relative;
822+
left: -10px;
823+
top: 10px;
824+
}
825+
826+
table.derivate_tree td.derivative_cell table.derivate_tree {
827+
left: 20px;
828+
position: relative;
829+
top: -35px;
830+
}
831+
832+
*/
833+
797834

798835
/*
799836
* ======= Identification keys =======

modules/cdm_dataportal/cdm_dataportal.module

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,21 @@
7575
, 'inline');
7676
}
7777

78-
/**
79-
*/
80-
function drupal_add_js_rowToggle($tableId){
78+
function _add_js_table_row_toggle($tableId){
8179

82-
drupal_add_js(drupal_get_path('module', 'cdm_dataportal') . '/js/table_modification.js');
80+
drupal_add_js(drupal_get_path('module', 'cdm_dataportal') . '/js/table_row_toggle.js');
8381
drupal_add_js('jQuery(document).ready(function(){
8482
addRowToggle("' . $tableId . '");
8583
});
8684
', array('type' => 'inline'));
8785
}
8886

89-
/**
87+
function _add_js_table_body_collapse(){
88+
// the table_body_collapse plugin aill autoattach to all tables with class attribute 'table_body_collapse'
89+
drupal_add_js(drupal_get_path('module', 'cdm_dataportal') . '/js/table_body_collapse.js');
90+
}
91+
92+
/**
9093
* @param unknown_type $link_element_selector
9194
* @param unknown_type $progress_element_selector
9295
*/
@@ -438,27 +441,27 @@ function _add_js_universalviewer($jquery_selector, $manifest_uri){
438441
);
439442
}
440443

441-
/**
442-
* Provides the markup for an font awesome icon.
443-
*
444-
* The icons is created in default size without any extra features.
445-
*
446-
* The available icons are listed here http://fontawesome.io/cheatsheet/
447-
* fontawesome icons have much more features than implemented here in this function,
448-
* for spinning icons, fixed width icons, rotation, etc please checkout the
449-
* examples at http://fontawesome.io/examples/
450-
*
451-
* @parameter $icon_name
452-
* The name of the icon which starts with 'fa-'
453-
*
454-
* @return String
455-
* the markup for the icon in an <i> tag
456-
*
457-
*/
444+
/**
445+
* Provides the markup for an font awesome icon.
446+
*
447+
* The icons is created in default size without any extra features.
448+
*
449+
* The available icons are listed here http://fontawesome.io/cheatsheet/
450+
* fontawesome icons have much more features than implemented here in this function,
451+
* for spinning icons, fixed width icons, rotation, etc please checkout the
452+
* examples at http://fontawesome.io/examples/
453+
*
454+
* @param $icon_name
455+
* The name of the icon which starts with 'fa-'
456+
*
457+
* @param array $attributes
458+
*
459+
* @return String
460+
* the markup for the icon in an <i> tag
461+
*/
458462
function font_awesome_icon_markup($icon_name = NULL, $attributes = array()){
459463
_add_font_awesome_font();
460464

461-
462465
if($icon_name){
463466
if(!isset($attributes['class'])){
464467
$attributes['class'] = array();
@@ -1788,18 +1791,7 @@ function specimen_by_accession_number_view($accession_number = null) {
17881791

17891792
// Display the page for the specimen defined by $uuid.
17901793
if (isset($field_unit_dto)){
1791-
$dto_array = array($field_unit_dto);
1792-
$specimen_array = specimen_render_array_items($dto_array);
1793-
$specimen_table = array(
1794-
'#theme' => 'table',
1795-
'#weight' => 2,
1796-
// prefix attributes and rows with '#' to let it pass toF the theme function,
1797-
// otherwise it is handled as child render array
1798-
'#attributes' => array('class' => 'specimens'),
1799-
'#rows' => array(),
1800-
'#prefix' => '<div id="specimens">',
1801-
'#suffix' => '</div>',
1802-
);
1794+
$specimen_array = compose_cdm_specimen_or_observation_tree_entry($field_unit_dto);
18031795
foreach($specimen_array as $value){
18041796
$renderArray = array(
18051797
'#theme' => 'item_list',

0 commit comments

Comments
 (0)