if ($mobile_version) { echo '<ul class="children_docs">'; } else { echo '<table class="children_docs"><tbody>'; } $culture = $sf_user->getCulture(); $date = 0; foreach ($associated_outings_group as $outing) { echo !$mobile_version ? '<tr><td>' : '<li>'; $timedate = $outing->get('date'); if ($timedate != $date || $mobile_version) { echo '<time datetime="' . $timedate . '">' . format_date($timedate, 'D') . '</time>'; $date = $timedate; } echo !$mobile_version ? '</td><td>' : ' - '; echo field_activities_data($outing, array('raw' => true)); echo !$mobile_version ? '</td><td>' : ' - '; $author_info =& $outing['versions'][0]['history_metadata']['user_private_data']; $georef = ''; if (!$outing->getRaw('geom_wkt') instanceof Doctrine_Null) { $georef = ($mobile_version ? ' - ' : '') . picto_tag('action_gps', __('has GPS track')); } $images = ''; if (isset($outing['nb_images'])) { if ($mobile_version) { $images = ' - ' . picto_tag('picto_images_light') . ' ' . $outing['nb_images']; } else { $images = picto_tag('picto_images_light', format_number_choice('[1]1 image|(1,+Inf]%1% images', array('%1%' => $outing['nb_images']), $outing['nb_images'])); } } $outing_lang = $outing->get('culture');
<?php use_helper('Field'); $activities = $document->getRaw('activities'); // put here meta tags for microdata that cannot be inside ul tags echo microdata_meta('name', $document->getName()); if (isset($nb_comments) && $nb_comments) { echo microdata_meta('interactionCount', $nb_comments . ' UserComments'); echo microdata_meta('discussionUrl', url_for('@document_comment?module=routes&id=' . $sf_params->get('id') . '&lang=' . $sf_params->get('lang'))); } ?> <ul class="data col_left col_33"> <?php li(field_activities_data($document)); li(field_data_range_if_set($document, 'min_elevation', 'max_elevation', array('separator' => 'elevation separator', 'suffix' => 'meters'))); $min_elevation = $document->get('min_elevation'); $difficulties_start_elevation = $document->get('elevation'); $has_approach_height = !empty($min_elevation) && !empty($difficulties_start_elevation); if (array_intersect(array(1, 2, 3, 6, 7), $activities) || !$has_approach_height) { li(field_data_range_if_set($document, 'height_diff_up', 'height_diff_down', array('separator' => 'height diff separator', 'prefix_min' => '+', 'prefix_max' => '-', 'suffix' => 'meters', 'range_only' => true))); } if (array_intersect(array(1, 2, 3, 4, 6, 7), $activities)) { li(field_data_if_set($document, 'route_length', array('suffix' => 'kilometers'))); } if (array_intersect(array(1, 2, 3, 4, 5), $activities)) { li(field_data_arg_if_set('difficulties_start_elevation', $difficulties_start_elevation, array('suffix' => 'meters'))); li(field_data_if_set($document, 'difficulties_height', array('suffix' => 'meters'))); if ($has_approach_height) { li(field_data_arg('approach_height', $difficulties_start_elevation - $min_elevation, array('suffix' => 'meters'))); } }
if (count($associated_documents)) { echo '<ul id="' . $id_list_associated_docs . '">'; foreach ($associated_documents as $doc) { $doc_id = $doc->get('id'); $module = $doc['module']; if (empty($fixed_type)) { $type = c2cTools::Module2Letter($module) . 'c'; } else { $type = $fixed_type; } $idstring = $type . '_' . $doc_id; echo '<li id="' . $idstring . '">'; echo picto_tag('picto_' . $module, __($module)); echo ' ' . list_link($doc, $module); if ($module == 'outings') { echo ' - ' . field_activities_data($doc, array('raw' => true)) . ' - ' . field_semantic_date_data($doc, 'date'); } if ($show_link_to_delete) { $strict = $type == 'cc' ? 0 : 1; if (empty($fixed_type)) { echo c2c_link_to_delete_element($type, $doc_id, $id, false, $strict); } else { echo c2c_link_to_delete_element($type, $id, $doc_id, true, $strict); } } echo '</li>'; } echo '</ul>'; } elseif ($show_link_tool) { echo '<ul id="' . $id_list_associated_docs . '"><li style="display:none"></li></ul>'; }