Project

General

Profile

« Previous | Next » 

Revision f56b1626

Added by Andreas Kohlbecker over 10 years ago

solving #3377 (search results on only one classification should never show the classifiation information)

View differences:

7.x/modules/cdm_dataportal/theme/cdm_dataportal.taxon.theme
171 171
 */
172 172
function theme_cdm_list_of_taxa($variables) {
173 173

  
174
  $unclassified_snippet = '<span class="unclassified">' . t('unclassified') . '</span>';
175

  
174 176
  $records = $variables['records'];
175 177
  $freetextSearchResults = $variables['freetextSearchResults'];
176 178
  $show_classification = $variables['show_classification'];
......
264 266
              $classification_titles[] = $classification->titleCache;
265 267
            }
266 268
          }
269
          if(count($classification_titles) == 0){
270
            $classification_titles[] = $unclassified_snippet;
271
          }
267 272
          $out .= ' : <span class="classifications">' . implode(', ', $classification_titles) . '</span>';
268 273
        }
269 274
        $out .= theme('cdm_annotations_as_footnotekeys', array('cdmBase_list' => $taxon));
......
309 314
          if (isset($classification->titleCache)) {
310 315
            $classification_titles[] = $classification->titleCache;
311 316
          }
317
        }
318
        if(count($classification_titles) == 0){
319
          $classification_titles[] = $unclassified_snippet;
312 320
        }
313 321
        $out .= ' : <span class="classifications">' . implode(', ', $classification_titles) . '</span>';
314 322
      }

Also available in: Unified diff