Example #1
0
        include_partial('documents/association', array('associated_docs' => $associated_parkings, 'module' => 'parkings', 'document' => $document, 'show_link_to_delete' => $show_link_to_delete, 'type' => 'pp', 'strict' => false));
        // no strict looking for main_id in column main of Association table
        include_partial('documents/association', array('associated_docs' => $associated_sites, 'module' => 'sites', 'document' => $document, 'show_link_to_delete' => $show_link_to_delete, 'type' => 'pt', 'strict' => true));
        include_partial('documents/association', array('associated_docs' => $associated_huts, 'module' => 'huts', 'route_list_module' => 'parkings', 'route_list_ids' => $ids, 'route_list_linked' => true, 'document' => $document, 'show_link_to_delete' => $show_link_to_delete, 'type' => 'ph', 'strict' => true));
        // strict looking for main_id in column main of Association table
        include_partial('documents/association', array('associated_docs' => $associated_products, 'module' => 'products', 'document' => $document, 'show_link_to_delete' => $show_link_to_delete, 'type' => 'pf', 'strict' => true));
        // strict looking for main_id in column main of Association table
    }
    include_partial('areas/association', array('associated_docs' => $associated_areas, 'module' => 'areas', 'weather' => true, 'avalanche_bulletin' => true, 'lat' => $lat, 'lon' => $lon, 'elevation' => $elevation));
    include_partial('documents/association', array('associated_docs' => $associated_maps, 'module' => 'maps'));
    if ($is_not_merged) {
        include_partial('documents/association', array('associated_docs' => $associated_articles, 'module' => 'articles', 'document' => $document, 'show_link_to_delete' => $show_link_to_delete, 'type' => 'pc', 'strict' => true));
        if ($show_link_tool) {
            $modules_list = array('parkings', 'huts', 'sites', 'routes', 'products', 'articles');
            $options = array('field_prefix' => 'multi_1');
            if (check_not_empty_doc($document, 'lon')) {
                $options['suggest_near_docs'] = array('lon' => $document['lon'], 'lat' => $document['lat']);
                $options['suggest_exclude'] = array('parkings' => array_merge(array((int) $id), get_directly_linked_ids($associated_parkings)), 'sites' => get_directly_linked_ids($associated_sites), 'huts' => get_directly_linked_ids($associated_huts), 'products' => get_directly_linked_ids($associated_products));
            }
            echo c2c_form_add_multi_module('parkings', $id, $modules_list, 10, $options);
        }
    }
    echo '</div>';
    include_partial('documents/geom_warning', array('document' => $document));
}
echo end_section_tag();
// lang-dependent content
echo start_section_tag('Description', 'description');
include_partial('documents/i18n_section', array('document' => $document, 'languages' => $sf_data->getRaw('languages'), 'needs_translation' => $needs_translation, 'images' => $associated_images, 'ids' => $ids));
echo end_section_tag();
include_partial($mobile_version ? 'documents/mobile_map_section' : 'documents/map_section', array('document' => $document));
Example #2
0
<?php

use_helper('Field');
// put here meta tags for microdata which would be invalid inside ul tag
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=summits&id=' . $sf_params->get('id') . '&lang=' . $sf_params->get('lang')));
}
?>
<ul class="data">
    <?php 
li(field_data_from_list($document, 'summit_type', 'app_summits_summit_types'));
if (check_not_empty_doc($document, 'elevation') || check_not_empty_doc($document, 'lon')) {
    echo '<li><ul itemprop="geo" itemscope itemtype="http://schema.org/GeoCoordinates">';
    li(field_data_if_set($document, 'elevation', array('suffix' => 'meters', 'microdata' => 'elevation')));
    li(field_coord_data_if_set($document, 'lon', array('microdata' => 'longitude')));
    li(field_coord_data_if_set($document, 'lat', array('microdata' => 'latitude')));
    li(field_swiss_coords($document));
    echo '</ul></li>';
}
if (isset($preview) && $preview) {
    li(field_data_if_set($document, 'maps_info'));
}
if ($document->get('geom_wkt')) {
    li(field_export($document->get('module'), $sf_params->get('id'), $sf_params->get('lang'), $sf_params->get('version')));
}
?>
</ul>