Project

General

Profile

« Previous | Next » 

Revision bbeade6a

Added by Andreas Kohlbecker over 5 years ago

ref #7947 more reliable positioning of registration page elements

View differences:

modules/cdm_dataportal/cdm_dataportal.module
1925 1925

  
1926 1926
  $registration_identifier = urldecode($registration_identifier_encoded);
1927 1927

  
1928

  
1929

  
1930 1928
  $render_array = array();
1931 1929
  $registration_dto = cdm_ws_get(CDM_WS_REGISTRATION_DTO_BY_IDENTIFIER . $registration_identifier_encoded);
1932 1930
  if($registration_dto){
......
1937 1935
    if($registration_dto->nameRef){
1938 1936
      $name_relations = cdm_ws_fetch_all(str_replace("$0", $registration_dto->nameRef->uuid, CDM_WS_PORTAL_NAME_NAME_RELATIONS));
1939 1937
      $render_array['name_relations'] = markup_to_render_array(render_name_relationships_of($name_relations, $registration_dto->nameRef->uuid, null, false));
1938
      $render_array['name_relations']['#weight'] = 11;
1940 1939
    }
1941 1940

  
1942 1941
    if(is_object($registration_dto->orderdTypeDesignationWorkingSets)){
......
1955 1954
      }
1956 1955
      if(count($name_type_designation_refs) > 0){
1957 1956
        $render_array['name_type_designations'] = compose_name_type_designations($name_type_designation_refs);
1957
        $render_array['name_type_designations']['#weight'] = 12;
1958 1958
      }
1959 1959
      if(count($field_unit_uuids) > 0){
1960 1960
        $render_array['specimen_table'] = compose_specimen_table($field_unit_uuids);
1961
        // below citation (weight=20)
1962
        $render_array['specimen_table']['#weight'] = 30;
1961 1963
      }
1962 1964
    }
1963 1965

  
......
1986 1988
 * @param $registration_dto
1987 1989
 *
1988 1990
 * @return array
1989
 *    A drupal render array
1991
 *    A drupal render array with the elements:
1992
 *    - 'publication_date_and_office' (weight=-100)
1993
 *    - 'summary' (weight=0)
1994
 *    - 'citation'(weight=20)
1990 1995
 *
1991 1996
 * @ingroup compose
1992 1997
 */
......
2028 2033
  if($with_identifier){
2029 2034
    $registation_markup .= " " . l ($registration_dto->identifier, $registration_dto->identifier);
2030 2035
  }
2031
  $render_array['summary'] = markup_to_render_array("<div>" . $registation_markup . "</div>");
2036
  $render_array['summary'] = markup_to_render_array("<div>" . $registation_markup . "</div>", 0);
2032 2037

  
2033 2038
  if ($with_citation) {
2034
    $render_array['citation'] = markup_to_render_array("<div class=\"" . html_class_attribute_ref(new TypedEntityReference("Reference", $registration_dto->citationUuid)) . "\">"
2039
    $render_array['citation'] = markup_to_render_array(
2040
      "<div class=\"citation " . html_class_attribute_ref(new TypedEntityReference("Reference", $registration_dto->citationUuid)) . "\">"
2035 2041
      . l($registration_dto->bibliographicCitationString, path_to_reference($registration_dto->citationUuid))
2036
      . "</br>&nbsp;</div>");
2042
      . "</div>",
2043
      20);
2037 2044
  }
2038 2045

  
2039 2046
  return $render_array;

Also available in: Unified diff