示例#1
0
<?php

use_helper('Popup');
$id = $sf_params->get('id');
$lang = $document->getCulture();
$editor_list = sfConfig::get('app_maps_editors');
$title = $editor_list[$document->get('editor')] . ' ' . $document->get('code') . ' ' . $document->get('name');
$route = "@document_by_id_lang_slug?module=maps&id={$id}&lang={$lang}&slug=" . get_slug($document);
echo make_popup_title($title, 'maps', $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(field_data_from_list_if_set($document, 'scale', 'mod_maps_scales_list'));
?>
</ul>
<?php 
示例#2
0
<?php

use_helper('Popup');
$id = $sf_params->get('id');
$lang = $document->getCulture();
$title = $document->get('name');
$route = "@document_by_id_lang?module=users&id={$id}&lang={$lang}";
echo make_popup_title($title, 'users', $route);
$description = $document->getRaw('description');
if (!empty($description)) {
    $description = truncate_description($description, $route, 700, true);
} else {
    $description = '';
}
$image = make_thumbnail_slideshow($associated_images);
?>
<div class="popup_desc"><?php 
if ($image) {
    echo $image;
}
?>
<ul class="data">
<?php 
li(field_activities_data_if_set($document));
li(field_data_from_list_if_set($document, 'category', 'mod_users_category_list'));
?>
</ul>
<?php 
if ($description) {
    echo $description;
}
示例#3
0
<?php

use_helper('Popup');
$id = $sf_params->get('id');
$lang = $document->getCulture();
$nb_routes = count($associated_routes);
$title = $document->get('name') . ' - ' . $document->get('elevation') . '&nbsp;m';
$route = "@document_by_id_lang_slug?module=summits&id={$id}&lang={$lang}&slug=" . get_slug($document);
echo make_popup_title($title, 'summits', $route);
$description = $document->getRaw('description');
if (!empty($description)) {
    $description = truncate_description($description, $route, 800, true);
} else {
    $description = '';
}
$image = make_thumbnail_slideshow($associated_images);
if (!$raw && $image) {
    echo insert_popup_js();
}
if ($description || $image) {
    $desc_class = 'popup_desc';
    if ($nb_routes > 0) {
        $desc_class .= ' popup_iti';
    }
    ?>
<div class="<?php 
    echo $desc_class;
    ?>
"><?php 
    echo $image . $description;
    ?>
示例#4
0
<?php

use_helper('Popup');
$id = $sf_params->get('id');
$lang = $document->getCulture();
$title = $document->get('name');
$route = "@document_by_id_lang?module=images&id={$id}&lang={$lang}";
echo make_popup_title($title, 'images', $route);
$image = image_tag(image_url($document->get('filename'), 'medium'), array('alt' => $title));
?>
<div class="popup_desc"><?php 
echo $image;
?>
</div>
示例#5
0
<?php

use_helper('Popup');
$id = $sf_params->get('id');
$lang = $document->getCulture();
$nb_routes = count($associated_routes);
$title = $document->get('name') . ' - ' . $document->get('elevation') . '&nbsp;m';
$route = "@document_by_id_lang_slug?module=parkings&id={$id}&lang={$lang}&slug=" . get_slug($document);
echo make_popup_title($title, 'parkings', $route);
$data_list = array();
if ($document->get('snow_clearance_rating') != 4) {
    $data = array();
    if ($document->get('lowest_elevation') != $document->get('elevation')) {
        $data_temp = field_data_if_set($document, 'lowest_elevation', array('suffix' => 'meters'));
        if (!empty($data_temp)) {
            $data[] = $data_temp;
        }
    }
    $data_temp = field_data_from_list_if_set($document, 'snow_clearance_rating', 'mod_parkings_snow_clearance_ratings_list', array('raw' => true));
    if (!empty($data_temp)) {
        $data[] = $data_temp;
    }
    $data = implode(' - ', $data);
    if (!empty($data)) {
        $data_list[] = $data;
    }
}
$data = field_data_from_list_if_set($document, 'public_transportation_rating', 'app_parkings_public_transportation_ratings', array('title' => __('public_transportation_rating short')));
$data .= field_pt_picto_if_set($document, true, ' - ');
if (!empty($data)) {
    $data_list[] = $data;
示例#6
0
<?php

use_helper('Popup');
$id = $sf_params->get('id');
$lang = $document->getCulture();
$title = $document->get('name');
$route = "@document_by_id_lang_slug?module=areas&id={$id}&lang={$lang}&slug=" . get_slug($document);
echo make_popup_title($title, 'areas', $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(field_data_from_list($document, 'area_type', 'mod_areas_area_types_list'));
?>
</ul>
<?php 
if ($description) {
示例#7
0
<?php

use_helper('Popup');
$id = $sf_params->get('id');
$lang = $document->getCulture();
$title = $document->get('name') . ' - ' . $document->get('elevation') . '&nbsp;m';
$route = "@document_by_id_lang_slug?module=products&id={$id}&lang={$lang}&slug=" . get_slug($document);
echo make_popup_title($title, 'products', $route);
$description = $document->getRaw('description');
if (!empty($description)) {
    $description = truncate_description($description, $route, 800, true);
} else {
    $description = '';
}
$image = make_thumbnail_slideshow($associated_images);
if (!$raw && $image) {
    echo insert_popup_js();
}
if ($description || $image) {
    $desc_class = 'popup_desc';
    ?>
<div class="<?php 
    echo $desc_class;
    ?>
"><?php 
    echo $image . $description;
    ?>
</div>
<?php 
}
echo javascript_tag('C2C.init_popup();');
示例#8
0
<?php

use_helper('Popup');
$id = $sf_params->get('id');
$lang = $document->getCulture();
$title = $title_prefix . __(' :') . ' ' . $document->get('name');
$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) {
示例#9
0
<?php

use_helper('Popup');
$id = $sf_params->get('id');
$lang = $document->getCulture();
$title = $document->get('name');
$route = "@document_by_id_lang_slug?module=portals&id={$id}&lang={$lang}&slug=" . get_slug($document);
echo make_popup_title($title, 'portals', $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;
}
if ($description) {
    echo $description;
}
?>
</div>
<?php 
echo javascript_tag('C2C.init_popup();');
示例#10
0
<?php

use_helper('Popup');
$id = $sf_params->get('id');
$lang = $document->getCulture();
$title = $document->get('name');
$elevation = $document->get('max_elevation');
if (!empty($elevation)) {
    $title .= " - {$elevation}&nbsp;m";
}
$route = "@document_by_id_lang_slug?module=outings&id={$id}&lang={$lang}&slug=" . get_slug($document);
echo make_popup_title($title, 'outings', $route);
$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 
$activities = $document->getRaw('activities');
li(field_activities_data($document));
li(field_bool_data($document, 'partial_trip'));
li(field_data_range_if_set($document, 'min_elevation', 'max_elevation', array('separator' => 'elevation separator', 'suffix' => 'meters')));
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)));
li(field_bool_data($document, 'outing_with_public_transportation'));
$access_elevation = field_data_if_set($document, 'access_elevation', array('suffix' => 'meters'));
示例#11
0
<?php

use_helper('Popup');
echo make_popup_title(__('not available'), 'users');
?>
<div class="popup_desc">
<?php 
echo __('user information not available');
?>
</div>
示例#12
0
<?php

use_helper('Popup', 'Field');
$id = $sf_params->get('id');
$lang = $document->getCulture();
$nb_routes = count($associated_routes);
$title = $document->get('name') . ' - ' . $document->get('elevation') . '&nbsp;m';
$route = "@document_by_id_lang_slug?module=huts&id={$id}&lang={$lang}&slug=" . get_slug($document);
echo make_popup_title($title, 'huts', $route);
$data_list = $data = array();
$data_temp = field_data_if_set($document, 'phone');
if (!empty($data_temp)) {
    $data[] = $data_temp;
}
$data_temp = field_url_data_if_set($document, 'url', true, 'www');
if (!empty($data_temp)) {
    $data[] = $data_temp;
}
if (!empty($data)) {
    $data_list[] = implode(' - ', $data);
}
$data = array();
$suffix = ' ' . __('bedding places');
$data_temp = field_data_if_set($document, 'staffed_capacity', '', $suffix, __('staffed_capacity short') . __('&nbsp;:'));
if (!empty($data_temp)) {
    $data[] = $data_temp;
}
$data_temp = field_data_if_set($document, 'unstaffed_capacity', '', $suffix, __('unstaffed_capacity short') . __('&nbsp;:'));
if (!empty($data_temp)) {
    $data[] = $data_temp;
}