Project

General

Profile

« Previous | Next » 

Revision 97ff635c

Added by Andreas Kohlbecker about 8 years ago

refactoring media_metadata function

View differences:

modules/cdm_dataportal/theme/cdm_dataportal.media.theme
188 188
function theme_cdm_media_caption($variables) {
189 189
  $media = $variables['media'];
190 190
  $elements = $variables['elements'];
191
  $media_metadata = cdm_read_media_metadata($media);
191
  $media_metadata = read_media_metadata($media);
192 192

  
193 193
  $doTitle = !$elements || array_search('title', $elements) !== FALSE;
194 194
  $doDescription = !$elements || array_search('description', $elements) !== FALSE;
......
206 206
      $descriptionPrefix = "- ";
207 207
    }
208 208
    elseif (!($doDescription && $media_metadata['description'])) {
209
      // Use filename as fallbackoption if no description will be shown.
209
      // Use filename as fallback option if no description will be shown.
210 210
      $out .= '<dt class = "title">' . t('Title') . '</dt> <dd class = "title">' . $media_metadata['filename'] . '</dd>';
211 211
      $descriptionPrefix = "- ";
212 212
    }
......
274 274
      $out .= $rights . '</dt>';
275 275
    }
276 276
  }
277
  // TODO add all other metadata elemenst generically.
277
  // TODO add all other metadata elements generically.
278 278
  $out .= '</dl>';
279 279
  // Return value,
280 280
  return $out;
......
642 642
      // Do not add margins if no pass partout is shown.
643 643
      $margins = '';
644 644
    }
645
    $out .= '<div class="appication">Web Application</div>';
645
    $out .= '<div class="application">Web Application</div>';
646 646

  
647 647
    if ($addPassePartout) {
648 648
      $out .= '</div>';

Also available in: Unified diff