示例#1
0
        $link_text = __('The other conditions the same day in the same ' . $area_type);
        $date = format_date($document->get('date'), 'yyyyMMdd');
        $url = "outings/conditions?areas=" . implode('-', $area_ids) . "&date={$date}";
        $other_conditions = '<p class="tips">' . link_to($link_text, $url) . "</p>\n";
    }
}
if ($has_outing_route_desc || $has_conditions || $has_conditions_levels || $has_avalanche_date) {
    $outing_route_desc_string = field_text_data_if_set($document, 'outing_route_desc', null, array('needs_translation' => $needs_translation, 'images' => $images, 'filter_image_type' => false));
    $condition_name = 'conditions';
    if ($has_conditions && (array_intersect($activities, array(3, 4, 5)) || in_array(2, $activities) && !array_intersect($activities, array(1, 6, 7)))) {
        $condition_name = 'conditions_and_equipment';
    }
    $lang = $needs_translation ? ' lang="' . $needs_translation . '"' : '';
    $conditions_title = content_tag('div', __($condition_name), array('class' => 'section_subtitle htext', 'id' => '_' . $condition_name, 'data-tooltip' => '')) . '<div class="field_value"' . $lang . '>';
    if ($has_conditions_levels) {
        $conditions_levels_string = conditions_levels_data($conditions_levels);
    }
    $avalanche_string = '';
    if ($has_avalanche_date) {
        $avalanche_desc_string = '';
        if ($has_avalanche_desc) {
            $avalanche_desc_string .= parse_links(parse_bbcode($avalanche_desc, $images, false));
        }
        $avalanche_title = content_tag('div', __('avalanche_infos'), array('class' => 'section_subtitle htext', 'id' => '_avalanche_infos', 'data-tooltip' => '')) . '<div class="field_value"' . $lang . '>';
        $avalanche_date_string = field_data_from_list_if_set($document, 'avalanche_date', 'mod_outings_avalanche_date_list', array('multiple' => true, 'raw' => true));
        $avalanche_date_string = '<p class="avalanche_date">' . c2cTools::multibyte_ucfirst(trim($avalanche_date_string)) . '.' . '</p>';
        $avalanche_string = $avalanche_title . $avalanche_date_string . $avalanche_desc_string . '</div>';
    }
    $conditions_string = '';
    if ($has_conditions) {
        $conditions_string = parse_links(parse_bbcode($conditions, $images, false));
示例#2
0
    ?>
            </li><?php 
}
?>
    </ul>
<?php 
$activities = BaseDocument::convertStringToArray($item['activities']);
if (!array_intersect(array(1, 2, 5), $activities)) {
    $conditions_levels = NULL;
}
echo '<div class="col_left col_66">';
if (!empty($conditions) || !empty($conditions_levels)) {
    echo '<div class="section_subtitle htext" id="_conditions">' . __('conditions') . '</div><div class="field_value">';
    $conditions_levels = $item['conditions_levels'];
    if (!empty($conditions_levels) && count($conditions_levels)) {
        conditions_levels_data($conditions_levels);
    }
    echo parse_links(parse_bbcode($conditions, null, false));
    echo $other_conditions;
    echo '</div>';
    if ($needs_translation) {
        echo '</div>';
    }
}
echo '</div>';
echo '<div class="col_right col_33">';
echo _format_text_data('weather', $item['weather'], null, array('show_images' => false));
echo _format_text_data('timing', $item['timing'], null, array('show_images' => false));
echo '</div>';
echo '<div class="col_left col_66">';
echo _format_text_data('access_comments', $item['access_comments'], null, array('show_images' => false));