$route = "@document_by_id_lang_slug?module=routes&id={$id}&lang={$lang}&slug=" . get_slug($document);
echo make_popup_title($title, 'routes', $route);
$description = $document->getRaw('description');
if (!empty($description)) {
    $description = truncate_description($description, $route, 700, true);
} else {
    $description = '';
}
$image = make_thumbnail_slideshow($associated_images);
if (!$raw && $image) {
    echo insert_popup_js();
}
?>
<div class="popup_desc"><?php 
if ($image) {
    echo $image;
}
?>
<ul class="data">
<?php 
li(summarize_route($document, true, true));
?>
</ul>
<?php 
if ($description) {
    echo $description;
}
?>
</div>
<?php 
echo javascript_tag('C2C.init_popup();');
        echo '<div id="_' . $title . '" class="section_subtitle' . $print . '">' . __($title) . '</div>';
    }
    foreach ($associated_docs as $doc) {
        $doc_id = $doc['id'];
        $idstring = isset($type) ? $type . '_' . ($revert_ids ? $id : $doc_id) : '';
        ?>

    <div class="linked_elt" id="<?php 
        echo $idstring;
        ?>
">
        <?php 
        echo link_to($doc['name'], "@document_by_id_lang_slug?module={$module}&id=" . $doc_id . '&lang=' . $doc['culture'] . '&slug=' . make_slug($doc['name']));
        if (isset($display_info) && $display_info) {
            echo '<div class="short_data">';
            echo summarize_route($doc, true, true);
        }
        if (!isset($doc['parent_id']) and $show_link_to_delete) {
            echo c2c_link_to_delete_element($type, $revert_ids ? $id : $doc_id, $revert_ids ? $doc_id : $id, false, (int) $strict);
        }
        if (isset($display_info) && $display_info) {
            echo '</div>';
        }
        ?>
    </div>
<?php 
    }
    ?>

</div>
</div><!-- one_kind_association -->
             }
             $georef .= picto_tag('action_gps', __('has GPS track'));
         }
         $route_link = '@document_by_id_lang_slug?module=routes&id=' . $route_id . '&lang=' . $route->get('culture') . '&slug=' . make_slug($route->get('full_name'));
         $options = array();
         if (!empty($external_links)) {
             $options['target'] = '_blank';
         }
         if ($list_format) {
             echo link_to($route->get('name'), $route_link, $options) . '<div class="short_data">' . summarize_route($route, true, false, $avalaible_activities, true) . $georef;
             if ($show_link_to_delete && isset($route['directly_linked'])) {
                 echo c2c_link_to_delete_element($type, $doc_id, $route_id, true, $strict);
             }
             echo '</div>';
         } else {
             echo '<td>' . link_to($route->get('name'), $route_link, $options) . '</td>' . summarize_route($route, true, true, $avalaible_activities, false) . '<td>' . $georef . '</td>';
             if ($show_link_to_delete && isset($route['directly_linked'])) {
                 echo '<td>' . c2c_link_to_delete_element($type, $doc_id, $route_id, true, $strict) . '</td>';
             }
         }
         echo '</' . $line_tag . '>';
     }
 }
 if ($list_format) {
     echo '</ul>';
 } else {
     echo '</tbody></table>';
 }
 if (!$activity_section) {
     if (!empty($routes_list_link)) {
         echo '<p class="list_link">' . picto_tag('picto_routes') . ' ' . $routes_list_link . '</p>';