Project

General

Profile

feature request #7599

treeView for specimen data in dataportal

Added by Katja Luther 6 months ago. Updated 3 months ago.

Status:
In Progress
Priority:
Highest
Assignee:
Category:
cdm-dataportal
Target version:
Start date:
07/30/2018
Due date:
% Done:

50%

Severity:
normal

Description

The specimen tab/page section should show the tree structure of the specimen. To avoid performance problems the data should be provided by DTOs.

  • implement DTOs for FieldUnits, PreservedSpecimen/Observations, Collection, MolecularData, SequenceData
  • Superclass for FieldUnitDTO and PreservedSpecimen is DerivateDTO
  • Structure is similar to cdm classes
  • implement treeView for SpecimenData in portal
  • first only the title of the field unit should be displayed, clicking on it should open the tree view
  • in a next step the details of the derived units should be hidden, with the possibility to open it by clicking on the title.

picture852-1.png View (104 KB) Andreas Kohlbecker, 09/11/2018 08:23 AM

picture495-1.png View (17.4 KB) Andreas Kohlbecker, 09/20/2018 08:44 AM


Related issues

Related to Edit - feature request #7755: Implement detail page for field unit New 09/12/2018
Related to Edit - feature request #3749: Check if all molecular data is shown correctly in data portal [also DISCUSS] In Progress 12/19/2013

Associated revisions

Revision 6b53ead8 (diff)
Added by Katja Luther 6 months ago

first implementation for specimen page with DTOs

Revision c10f70e4 (diff)
Added by Katja Luther 6 months ago

first steps of specimen page with DTOs

Revision 98262d29 (diff)
Added by Katja Luther 6 months ago

code cleaning

Revision ff21181c (diff)
Added by Katja Luther 6 months ago

mend

ref #7599: minor

Revision fc169e34 (diff)
Added by Katja Luther 6 months ago

ref #7599: add excluded fields for specimen

Revision 267da0d1 (diff)
Added by Katja Luther 6 months ago

create an item_list for specimen page

Revision 7965ef92 (diff)
Added by Katja Luther 5 months ago

add item list to table resolves the problem of rendering the description items

Revision 416bc78f (diff)
Added by Katja Luther 5 months ago

use mediaDTO

Revision 52f57468 (diff)
Added by Katja Luther 5 months ago

smaller changes in dna part of tree view

Revision 3f6d782a (diff)
Added by Katja Luther 5 months ago

ref #7599: further improvement for specimenDtos

Revision 106e1cf9 (diff)
Added by Katja Luther 4 months ago

ref #7599: fix php problems and code cleaning

Revision a0f26798 (diff)
Added by Katja Luther 4 months ago

remove link to detail page for fieldUnits

Revision f1239704 (diff)
Added by Katja Luther 4 months ago

ref #7599: fix problem with links in descriptions

Revision 8e15d0fb (diff)
Added by Katja Luther 4 months ago

ref #7599: create link and render array when description is URL in compose_sequences

Revision 8cba0a5f (diff)
Added by Andreas Kohlbecker 14 days ago

ref #7599 updating compose_specimen_table() after renaming of render_cdm_specimenDTO_page()

History

#1 Updated by Katja Luther 6 months ago

  • Description updated (diff)

#2 Updated by Katja Luther 6 months ago

  • Status changed from New to In Progress

The current implementation provides all specimen with the whole tree with the first WS call, is it better to get first only the fieldUnit informations and when clicking for the details, getting the details or do it with the actual implementation and create the complete tree.

#3 Updated by Andreas Müller 5 months ago

  • Target version changed from Release 5.2 to Release 5.3

#4 Updated by Andreas Kohlbecker 5 months ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Katja Luther to Andreas Kohlbecker
  • % Done changed from 0 to 50

starting review

#5 Updated by Andreas Kohlbecker 5 months ago

Review Result:

1)

  • method create_cdm_specimen_or_observation() needs either be named render_cdm_specimen_or_observation() or compose_...
  • methods returning markup are render_.. methods.
  • if you think that it could make sense to use the output via AJAX you need to call it compose_
  • see also create_specimen_array()
  • compose methods are marked as * @ingroup compose per php doc, none compose functions must not be marked as such

to be continued...

#6 Updated by Andreas Kohlbecker 5 months ago

2)

diese neue Funktionalität in modules/cdm_dataportal/includes/pre-drupal8.inc

    if (strpos($description, 'http:') !== false && !is_array($description)){
        //make links for urls
        $description = l($description, $description);
    }

sollte eigentlich nicht in _description_list_group_add() hinein. Besser den link schon vorher in $description schreiben

#7 Updated by Andreas Kohlbecker 5 months ago

Andreas Kohlbecker wrote:

sollte eigentlich nicht in _description_list_group_add() hinein. Besser den link schon vorher in $description schreiben

und außerdem ist https auch wichtig!

#8 Updated by Andreas Kohlbecker 5 months ago

php notice in http://test.e-taxonomy.eu/dataportal/preview/cichorieae/cdm_dataportal/taxon/1ad7630a-290b-464f-99e3-43c9dfb3c38b/specimens:

    Notice: Undefined property: stdClass::$_fieldObjectMedia in cdm_dataportal_taxon_page_specimens() (line 86 of /var/www/drupal-7.32/sites/_jenkins-workspace/modules/cdm_dataportal/includes/pages.inc).
    Notice: Undefined property: stdClass::$listOfMedia in cdm_dataportal_taxon_page_specimens() (line 208 of /var/www/drupal-7.32/sites/_jenkins-workspace/modules/cdm_dataportal/includes/pages.inc).
    Notice: Undefined property: stdClass::$listOfMedia in cdm_dataportal_taxon_page_specimens() (line 208 of /var/www/drupal-7.32/sites/_jenkins-workspace/modules/cdm_dataportal/includes/pages.inc).
    Notice: Undefined property: stdClass::$listOfMedia in cdm_dataportal_taxon_page_specimens() (line 208 of /var/www/drupal-7.32/sites/_jenkins-workspace/modules/cdm_dataportal/includes/pages.inc).
    Notice: Undefined variable: pager in cdm_dataportal_taxon_page_specimens() (line 308 of /var/www/drupal-7.32/sites/_jenkins-workspace/modules/cdm_dataportal/includes/pages.inc).
    Notice: Trying to get property of non-object in theme_cdm_pager() (line 370 of /var/www/drupal-7.32/sites/_jenkins-workspace/modules/cdm_dataportal/theme/cdm_dataportal.common.theme).
    Notice: Undefined variable: pager in cdm_dataportal_taxon_page_specimens() (line 317 of /var/www/drupal-7.32/sites/_jenkins-workspace/modules/cdm_dataportal/includes/pages.inc).
    Notice: Trying to get property of non-object in theme_cdm_pager() (line 370 of /var/www/drupal-7.32/sites/_jenkins-workspace/modules/cdm_dataportal/theme/cdm_dataportal.common.theme).

#9 Updated by Andreas Kohlbecker 5 months ago

further minor php problems at the example of http://test.e-taxonomy.eu/dataportal/preview/phycobank/cdm_dataportal/taxon/f48b4b22-0625-4820-ad82-abf12e20859a

1) compressed table active

    Notice: Undefined property: stdClass::$_fieldObjectMedia in cdm_dataportal_taxon_page_specimens() (line 86 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/includes/pages.inc).
    Notice: Undefined variable: pager in cdm_dataportal_taxon_page_specimens() (line 317 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/includes/pages.inc).
    Notice: Trying to get property of non-object in theme_cdm_pager() (line 370 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/theme/cdm_dataportal.common.theme).

2) default specimen view (see above for php problems at 'notice' level)

3) specimen tree

the tree view is not showing up

    Warning: Invalid argument supplied for foreach() in cdm_dataportal_taxon_page_specimens() (line 75 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/includes/pages.inc).
    Notice: Undefined variable: occurrence in cdm_dataportal_taxon_page_specimens() (line 86 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/includes/pages.inc).
    Notice: Trying to get property of non-object in cdm_dataportal_taxon_page_specimens() (line 86 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/includes/pages.inc).
    Notice: Undefined variable: map_render_array in cdm_dataportal_taxon_page_specimens() (line 119 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/includes/pages.inc).
    Notice: Undefined variable: pager in cdm_dataportal_taxon_page_specimens() (line 317 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/includes/pages.inc).
    Notice: Trying to get property of non-object in theme_cdm_pager() (line 370 of /home/andreas/workspaces/cdm/cdm-dataportal/modules/cdm_dataportal/theme/cdm_dataportal.common.theme).

#10 Updated by Katja Luther 5 months ago

the php issues should be solved and the tree view is shown now.

#11 Updated by Katja Luther 5 months ago

  • Status changed from Resolved to In Progress

#13 Updated by Andreas Kohlbecker 4 months ago

  • Assignee changed from Andreas Kohlbecker to Katja Luther

#14 Updated by Katja Luther 4 months ago

the php problems are solved and the NPE in CollectionDto as well

#15 Updated by Andreas Kohlbecker 4 months ago

thank you for fixing the issues so far. Unfortunately there are still some:

1)
on this page the Locality should be Berlin, small river Wuhle instead English is shown

2.b)
The method compose_cdm_specimen_or_observation_tree_entry() returns a markup string. since this is a compose method it should return a render array instead $occurrence_elements.

You may want to replace the $output = drupal_render($occurrence_elements); and everything below by

2.a)

TO NOT USE link targets like 'blank', etc this is discouraged!!!!!


$render_array = array();
$render_array['occurrence'] = $occurrence_elements;
$render_array['gallery'] = markup_to_render_array($gallery_html);
$render_array['specimen_page_link'] = markup_to_render_array(l("detail page", path_to_specimen($specimenOrObservation->uuid));

return $render_array;

WARNING code snipped untested!

#16 Updated by Katja Luther 4 months ago

  • Target version changed from Release 5.3 to Release 5.4

#17 Updated by Katja Luther 4 months ago

as long as the detail page for field units is not implemented the link to detail page of field unit is removed.

#18 Updated by Andreas Kohlbecker 4 months ago

#19 Updated by Andreas Kohlbecker 4 months ago

  • Description updated (diff)

#20 Updated by Andreas Kohlbecker 4 months ago

Andreas Kohlbecker wrote:

2)

diese neue Funktionalität in modules/cdm_dataportal/includes/pre-drupal8.inc

    if (strpos($description, 'http:') !== false && !is_array($description)){
        //make links for urls
        $description = l($description, $description);
    }

sollte eigentlich nicht in _description_list_group_add() hinein. Besser den link schon vorher in $description schreiben

Dieser Code verursacht auch Probleme:

http://portal.cybertaxonomy.org/salvador/cdm_dataportal/media/4bd68891-a187-456f-b123-01c38c1f654a

#21 Updated by Katja Luther 4 months ago

  • Related to feature request #3749: Check if all molecular data is shown correctly in data portal [also DISCUSS] added

#23 Updated by Andreas Müller 3 months ago

  • Target version changed from Release 5.4 to Release 5.5

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)