Project

General

Profile

« Previous | Next » 

Revision 4feafea8

Added by Andreas Kohlbecker over 5 years ago

fix #6374 fixing messed up UUIDs and harmonizing use descriptions block creation

View differences:

modules/cdm_dataportal/includes/descriptions.inc
685 685

  
686 686
    $gallery_settings = getGallerySettings(CDM_DATAPORTAL_DESCRIPTION_GALLERY_NAME);
687 687

  
688
    $use_description_features = array(UUID_USE);
689

  
688 690

  
689 691
    RenderHints::pushToRenderStack('feature_block');
690 692
    // Create a drupal block for each feature
......
703 705
        $block->content = array();
704 706
        $block_content_is_empty = TRUE;
705 707

  
708
        if(array_search($node->feature->uuid, $use_description_features) !== false) {
709
          // do not show features which belong to the UseDescriptions, these are
710
          // handled by theme_cdm_block_Uses where the according descriptions are
711
          // fetched again separately.
712
          // UseDescriptions are a feature special to palmweb
713
          continue;
714
        }
715

  
706 716
        /*
707 717
         * Content/DISTRIBUTION.
708 718
         */
......
710 720
          $block = compose_feature_block_distribution($taxon, $node->descriptionElements, $node->feature);
711 721
          $block_content_is_empty = FALSE;
712 722
        }
723

  
713 724
        /*
714 725
         * Content/COMMON_NAME.
715 726
         */
......
719 730
          $block_content_is_empty = FALSE;
720 731
        }
721 732

  
733
        /*
734
         * Contend/Use Description (Use + UseRecord)
735
         */
722 736
        else if ($node->feature->uuid == UUID_USE_RECORD) {
723
          $block_uses_content_html = theme('cdm_block_Uses', array('taxonUuid' => $taxon->uuid));
724
          $block->content[] = markup_to_render_array($block_uses_content_html);
737
          $block->content[] = cdm_block_use_description_content($taxon->uuid);
725 738
          $block_content_is_empty = FALSE;
726 739
        }
727 740

  
......
1752 1765
  /**
1753 1766
   * Provides the merged feature tree for a taxon profile page.
1754 1767
   *
1755
   * The merging of the profile feature tree is actully done in
1768
   * The merging of the profile feature tree is actually done in
1756 1769
   * _mergeFeatureTreeDescriptions(). See this method  for details
1757 1770
   * on the structure of the merged tree.
1758 1771
   *
1759
   * This method provides t hook which can be used to modify the
1772
   * This method provides a hook which can be used to modify the
1760 1773
   * merged feature tree after it has been created, see
1761 1774
   * hook_merged_taxon_feature_tree_alter()
1762 1775
   *

Also available in: Unified diff