Exemplo n.º 1
0
<?php

use_helper('Language', 'Sections', 'Viewer', 'JavascriptQueue');
$is_connected = $sf_user->isConnected();
$is_moderator = $sf_user->hasCredential(sfConfig::get('app_credentials_moderator'));
$id = $sf_params->get('id');
$lang = $document->getCulture();
$is_not_archive = !$document->isArchive();
$is_not_merged = !$document->get('redirects_to');
$mobile_version = c2cTools::mobileVersion();
$show_link_to_delete = $is_not_archive && $is_not_merged && $is_moderator && !$mobile_version;
$show_link_tool = $is_not_archive && $is_not_merged && $is_connected && !$mobile_version;
$lat = $document->get('lat');
$lon = $document->get('lon');
$elevation = $document->get('elevation');
display_page_header('parkings', $document, $id, $metadata, $current_version, array('nav_options' => $section_list, 'item_type' => 'http://schema.org/ParkingFacility', 'nb_comments' => $nb_comments));
// lang-independent content starts here
echo start_section_tag('Information', 'data');
if ($is_not_archive && $is_not_merged) {
    $document->associated_areas = $associated_areas;
}
include_partial('data', array('document' => $document, 'nb_comments' => $nb_comments));
if ($is_not_archive) {
    echo '<div class="all_associations">';
    if ($is_not_merged) {
        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));
Exemplo n.º 2
0
<?php

use_helper('Language', 'Sections', 'Viewer', 'AutoComplete', 'General', 'MyForm');
$is_connected = $sf_user->isConnected();
$is_moderator = $sf_user->hasCredential(sfConfig::get('app_credentials_moderator'));
$id = $sf_params->get('id');
$lang = $document->getCulture();
$is_not_archive = !$document->isArchive();
$is_not_merged = !$document->get('redirects_to');
$mobile_version = c2cTools::mobileVersion();
$show_link_tool = $is_not_archive && $is_not_merged && $is_connected && !$mobile_version;
display_page_header('articles', $document, $id, $metadata, $current_version, array('item_type' => 'http://schema.org/Article', 'nb_comments' => $nb_comments));
// lang-dependent content
echo start_section_tag('Article', 'description');
include_partial('documents/i18n_section', array('document' => $document, 'languages' => $sf_data->getRaw('languages'), 'needs_translation' => $needs_translation, 'images' => $associated_images, 'filter_image_type' => $document->get('article_type') == 1));
echo end_section_tag();
// lang-independent content starts here
echo start_section_tag('Information', 'data');
include_partial('data', array('document' => $document, 'nb_comments' => $nb_comments));
if ($is_not_archive) {
    echo '<div class="all_associations">';
    include_partial('areas/association', array('associated_docs' => $associated_areas, 'module' => 'areas'));
    echo '</div>';
}
echo end_section_tag();
if ($is_not_archive && $is_not_merged) {
    $is_personal_article = $document->get('article_type') == 2;
    // if the user is not a moderator, and personal article, use javascript to distinguish
    // between document author(s) and others
    $author_specific = !$is_moderator && $is_connected && $is_personal_article;
    if ($author_specific) {
Exemplo n.º 3
0
<?php

use_helper('Language', 'Sections', 'Viewer', 'Field', 'Forum', 'General');
$is_connected = $sf_user->isConnected();
$is_moderator = $sf_user->hasCredential(sfConfig::get('app_credentials_moderator'));
$id = $sf_params->get('id');
$lang = $document->getCulture();
$is_not_archive = !$document->isArchive();
$is_not_merged = !$document->get('redirects_to');
$mobile_version = c2cTools::mobileVersion();
$show_link_to_delete = $is_not_archive && $is_not_merged && $is_moderator && !$mobile_version;
$show_link_tool = $is_not_archive && $is_not_merged && $is_connected && !$mobile_version;
$section_list = array('map' => (bool) $document->get('geom_wkt'));
display_page_header('users', $document, $id, $metadata, $current_version, array('nav_options' => $section_list, 'nb_comments' => $nb_comments));
echo start_section_tag('Personal information', 'data');
// if archive, we don't display forum nickname or moderator status
if ($is_not_archive) {
    include_partial('data', array('document' => $document, 'forum_nickname' => $forum_nickname, 'is_archive' => false, 'forum_moderator' => $forum_moderator, 'topoguide_moderator' => $topoguide_moderator));
} else {
    include_partial('data', array('document' => $document, 'is_archive' => true));
}
if ($is_not_archive) {
    echo '<div class="all_associations">';
    include_partial('areas/association', array('associated_docs' => $associated_areas, 'module' => 'areas'));
    echo '</div>';
    // if the user is not a moderator, use javascript to distinguish
    // between document owner and others
    if ($is_connected && !$is_moderator && $is_not_merged) {
        echo javascript_tag('if (' . $id . ' == document.getElementById("name_to_use").getAttribute("data-user-id")) {
          document.body.setAttribute("data-user-author", true);
        }');
Exemplo n.º 4
0
use_helper('Language', 'Sections', 'Viewer', 'Ajax', 'AutoComplete', 'Pagination', 'General', 'Date');
$is_connected = $sf_user->isConnected();
$is_moderator = $sf_user->hasCredential(sfConfig::get('app_credentials_moderator'));
$id = $sf_params->get('id');
$is_not_archive = !$document->isArchive();
$is_not_merged = !$document->get('redirects_to');
$mobile_version = c2cTools::mobileVersion();
$show_link_to_delete = $is_not_archive && $is_not_merged && $is_moderator && !$mobile_version;
$show_link_tool = $is_not_archive && $is_not_merged && $is_connected;
$activities = $document->getRaw('activities');
$lang = $document->getCulture();
if (!isset($highest_summit_name)) {
    // TODO: always get summit name even in archive pages
    $highest_summit_name = '';
}
display_page_header('routes', $document, $id, $metadata, $current_version, array('prepend' => $highest_summit_name, 'separator' => __('&nbsp;:') . ' ', 'item_type' => 'http://schema.org/Article', 'nb_comments' => $nb_comments));
// lang-independent content starts here
echo start_section_tag('Information', 'data');
$has_associated_huts = count($associated_huts);
include_partial('data', array('document' => $document, 'has_associated_huts' => $has_associated_huts, 'nb_comments' => $nb_comments));
if ($is_not_archive) {
    if ($is_not_merged) {
        $summit_ids = $parking_ids = array();
        foreach ($associated_summits as $doc) {
            $summit_ids[] = $doc['id'];
        }
        foreach ($associated_parkings as $doc) {
            $parking_ids[] = $doc['id'];
        }
        $summit_ids = implode('-', $summit_ids);
        $parking_ids = implode('-', $parking_ids);
Exemplo n.º 5
0
<?php

use_helper('Language', 'Sections', 'Viewer');
$is_connected = $sf_user->isConnected();
$is_moderator = $sf_user->hasCredential(sfConfig::get('app_credentials_moderator'));
$id = $sf_params->get('id');
$is_not_archive = !$document->isArchive();
$is_not_merged = !$document->get('redirects_to');
$mobile_version = c2cTools::mobileVersion();
$show_link_to_delete = $is_not_archive && $is_not_merged && $is_moderator && !$mobile_version;
$show_link_tool = $is_not_archive && $is_not_merged && $is_connected && !$mobile_version;
display_page_header('maps', $document, $id, $metadata, $current_version, array('nb_comments' => $nb_comments));
// lang-independent content starts here
echo start_section_tag('Information', 'data');
include_partial('data', array('document' => $document));
if ($is_not_archive) {
    echo '<div class="all_associations">';
    include_partial('areas/association', array('associated_docs' => $associated_areas, 'module' => 'areas'));
    echo '</div>';
}
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));
echo end_section_tag();
include_partial($mobile_version ? 'documents/mobile_map_section' : 'documents/map_section', array('document' => $document));
if ($is_not_archive && $is_not_merged) {
    include_partial('documents/images', array('images' => $associated_images, 'document_id' => $id, 'dissociation' => 'moderator', 'is_protected' => $document->get('is_protected')));
    include_partial('documents/annex_docs', array('related_portals' => $related_portals));
}
include_partial('documents/license', array('license' => 'by-sa', 'version' => $current_version, 'created_at' => isset($created_at) ? $created_at : null, 'timer' => $timer));
Exemplo n.º 6
0
<?php

use_helper('Language', 'Sections', 'Viewer', 'MyImage', 'Link', 'AutoComplete', 'General');
$is_connected = $sf_user->isConnected();
$is_moderator = $sf_user->hasCredential(sfConfig::get('app_credentials_moderator'));
$id = $sf_params->get('id');
$is_not_archive = !$document->isArchive();
$is_not_merged = !$document->get('redirects_to');
$mobile_version = c2cTools::mobileVersion();
$show_link_to_delete = $is_not_archive && $is_not_merged && $is_moderator && !$mobile_version;
$show_link_tool = $is_not_archive && $is_not_merged && $is_connected && !$mobile_version;
$section_list = array('map' => (bool) $document->get('geom_wkt'), 'images' => (bool) count($associated_images));
$lang = $document->getCulture();
$module = $sf_context->getModuleName();
display_page_header('images', $document, $id, $metadata, $current_version, array('nav_options' => $section_list, 'item_type' => 'http://schema.org/ImageObject', 'nb_comments' => $nb_comments, 'creator_id' => $creator['id']));
echo start_section_tag('Image', 'view');
echo display_picture($document->get('filename'), 'big', null, $document->get('name'));
if (!$mobile_version) {
    ?>
<p class="tips"><?php 
    echo __('Click to display original image');
    ?>
</p>
<?php 
}
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, 'filter_image_type' => $document['image_type'] == 1));
echo end_section_tag();
// lang-independent content starts here
Exemplo n.º 7
0
use_helper('Language', 'Sections', 'Viewer', 'Pagination', 'General');
$is_connected = $sf_user->isConnected();
$is_moderator = $sf_user->hasCredential(sfConfig::get('app_credentials_moderator'));
$id = $sf_params->get('id');
$lang = $document->getCulture();
$is_not_archive = !$document->isArchive();
$is_not_merged = !$document->get('redirects_to');
$mobile_version = c2cTools::mobileVersion();
$show_link_to_delete = $is_not_archive && $is_not_merged && $is_moderator && !$mobile_version;
$show_link_tool = $is_not_archive && $is_not_merged && $is_connected;
$site_types = $document->getRaw('site_types');
$section_list = array('map' => (bool) $document->get('geom_wkt'));
$lat = $document->get('lat');
$lon = $document->get('lon');
$elevation = $document->get('elevation');
display_page_header('sites', $document, $id, $metadata, $current_version, array('nav_options' => $section_list, 'item_type' => 'http://schema.org/Landform', 'nb_comments' => $nb_comments));
// lang-independent content starts here
echo start_section_tag('Information', 'data');
if ($is_not_archive && $is_not_merged) {
    $document->associated_areas = $associated_areas;
}
include_partial('data', array('document' => $document, 'nb_comments' => $nb_comments));
if ($is_not_archive) {
    echo '<div class="all_associations">';
    if ($is_not_merged) {
        include_partial('documents/association', array('associated_docs' => $associated_summits, 'module' => 'summits', 'document' => $document, 'show_link_to_delete' => $show_link_to_delete, 'type' => 'st', 'strict' => true));
        // strict looking for main_id in column main of Association table
        include_partial('documents/association', array('associated_docs' => $associated_sites, 'module' => 'sites', 'reduce_name' => true, 'document' => $document, 'show_link_to_delete' => $show_link_to_delete, 'type' => 'tt', 'strict' => false));
        // no strict looking for main_id in column main of Association table
        // warning : strict is set to false since association can be with other sites
        include_partial('routes/association', array('associated_docs' => $associated_routes, 'module' => 'routes', 'document' => $document, 'show_link_to_delete' => $show_link_to_delete, 'type' => 'tr', 'strict' => true, 'display_info' => true));
Exemplo n.º 8
0
use_helper('Language', 'Sections', 'Viewer', 'Ajax', 'AutoComplete', 'Field', 'SmartFormat', 'sfBBCode', 'Pagination');
$is_connected = $sf_user->isConnected();
$is_moderator = $sf_user->hasCredential(sfConfig::get('app_credentials_moderator'));
$id = $sf_params->get('id');
$lang = $document->getCulture();
$date = field_semantic_date_data($document, 'date');
$is_not_archive = !$document->isArchive();
$is_not_merged = !$document->get('redirects_to');
$mobile_version = c2cTools::mobileVersion();
$show_link_to_delete = $is_not_archive && $is_not_merged && $is_moderator && !$mobile_version;
$show_link_tool = $is_not_archive && $is_not_merged && $is_connected && !$mobile_version;
$activities = $document->getRaw('activities');
$has_wkt = (bool) $document->get('geom_wkt');
$section_list = array('map' => $has_wkt, 'elevation_profile' => $has_wkt, 'images' => $is_connected || count($associated_images));
display_page_header('outings', $document, $id, $metadata, $current_version, array('prepend' => $date, 'separator' => ', ', 'nav_options' => $section_list, 'item_type' => 'http://schema.org/Article', 'nb_comments' => $nb_comments));
// lang-independent content starts here
echo start_section_tag('Information', 'data');
$participants = explode("\n", $document->get('participants'), 2);
$participants_str = trim($participants[0]);
if (!empty($participants_str)) {
    $participants_0 = parse_links(parse_bbcode_simple($participants_str));
} else {
    $participants_0 = '';
}
if (isset($participants[1])) {
    $participants_1 = _format_text_data('participants', $participants[1], null, array('needs_translation' => $needs_translation, 'show_label' => $document->isArchive(), 'show_images' => false));
} else {
    $participants_1 = '';
}
echo '<div class="all_associations col_left col_66">';
Exemplo n.º 9
0
    $row_markup = '';
    while ($row = mysql_fetch_array($result)) {
        $transaction_id = $row['transaction_id'];
        // Get the target transaction
        $transaction_data = get_transaction($transaction_id);
        // Check if this transaction replaced another
        $replaced_data = get_replaced($transaction_data['transaction_id']);
        if ($replaced_data['replaced_by'] == $transaction_data['transaction_id']) {
            $transaction_data['replaces_id'] = $replaced_data['transaction_id'];
        }
        // Get the row to display
        $row_markup .= get_transaction_row($transaction_data);
    }
    $heading_markup = get_heading_row();
    if ($method != 'ajax') {
        display_page_header();
        echo '
          <table id="adjust">' . $heading_markup . '
            <tr class="data_entry adjustment_memo">
              <td colspan="10">
                <input type="hidden" name="transaction_group_id" id="transaction_group_id" value="" form="edit_dialog">
                <label for="adjustment_message">Group adjustment memo:</label>
                <input type="text" name="adjustment_message" id="adjustment_message" value="" form="edit_dialog" onblur="reserve_transaction_group_id()">
              </td>
            </tr>' . $row_markup . '
          </table>';
        display_page_footer();
    } elseif ($method == 'ajax') {
        echo $row_markup;
    }
}