예제 #1
0
function truncate_description($description, $route, $length = 500, $has_abstract = false)
{
    if ($has_abstract) {
        $description = extract_abstract($description);
    }
    $more = '... <span class="more_text">' . link_to('[' . __('Read more') . ']', $route) . '</span>';
    return parse_links(parse_bbcode_simple(truncate_text($description, $length, $more)));
}
예제 #2
0
    ?>
"><?php 
    echo format_datetime($version['created_at']);
    ?>
</time></td>

    <td><?php 
    echo link_to($version['history_metadata']['user_private_data']['topo_name'], 'users/view?id=' . $version['history_metadata']['user_private_data']['id']);
    ?>
</td>
    <td><?php 
    display_revision_nature($version['nature'], $version['history_metadata']['is_minor']);
    ?>
</td>
    <td><?php 
    echo parse_bbcode_simple(smart_format($version['history_metadata']['comment']));
    ?>
</td>
  </tr>
<?php 
    $table_list_even_odd++;
}
?>
</table>

<?php 
echo compare_submit($versions_nb, $submit_options);
?>
</form>

<?php 
예제 #3
0
$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">';
if ($is_not_archive && $is_not_merged) {
    include_partial('documents/association', array('associated_docs' => $associated_users, 'extra_docs' => array($participants_1), 'module' => 'users', 'document' => $document, 'inline' => true, 'merge_inline' => $participants_0, 'show_link_to_delete' => $show_link_to_delete, 'type' => 'uo', 'strict' => true));
    include_partial('routes/association', array('associated_docs' => $associated_routes, 'module' => 'routes', 'document' => $document, 'show_link_to_delete' => $show_link_to_delete, 'type' => 'ro', 'strict' => true, 'display_info' => true));
    include_partial('documents/association', array('associated_docs' => $associated_sites, 'module' => 'sites', 'document' => $document, 'show_link_to_delete' => $show_link_to_delete, 'type' => 'to', 'strict' => false));
    // no strict looking for main_id in column main of Association table
} else {
<?php 
if ($needs_username) {
    ?>
    <?php 
    echo link_to($item['history_metadata']['user_private_data']['topo_name'], $link);
    ?>
    </td><td>
<?php 
}
?>

<?php 
display_revision_nature($item['nature'], $item['history_metadata']['is_minor']);
if ($version > 1) {
    printf(' (%s)', link_to(__('diff'), "@document_diff?module={$module_name}&id={$id}&lang={$lang}&new={$version}&old=" . ($version - 1)));
}
?>
</td>

<?php 
if ($comment = $item['history_metadata']['comment']) {
    ?>
<td><em><?php 
    echo parse_bbcode_simple(smart_format($comment));
    ?>
</em></td>
<?php 
}
?>
    
예제 #5
0
      <br />
      <?php 
    if ($metadata->get('is_minor')) {
        ?>
      <strong><?php 
        echo __('minor_tag');
        ?>
</strong>
      <?php 
    }
    ?>
      <?php 
    if (trim($metadata->get('comment'))) {
        ?>
      <em>(<?php 
        echo parse_bbcode_simple(smart_format(__($metadata->get('comment'))));
        ?>
)</em>
      <?php 
    }
    ?>
      <br />
      <?php 
    if ($rank == 'old' && $document->getVersion() > 1) {
        echo link_to('&larr;&nbsp;' . __('previous difference'), "@document_diff?module={$module}&id={$id}" . '&lang=' . $document->getCulture() . '&new=' . $document->getVersion() . '&old=' . ($document->getVersion() - 1));
    } elseif ($rank == 'new' && $document->getVersion() != $current_version) {
        echo link_to(__('next difference') . '&nbsp;&rarr;', "@document_diff?module={$module}&id={$id}" . '&lang=' . $document->getCulture() . '&new=' . ($document->getVersion() + 1) . '&old=' . $document->getVersion());
    }
    ?>
  
    </td>
예제 #6
0
<p class="important_message">
<?php 
echo __('Warning: archived version:') . ' ' . __('version %1%', array('%1%' => $document->getVersion())) . ' (' . format_language_c2c($document->getCulture()) . ')' . ' - ' . format_datetime($metadata->get('written_at')) . ' ' . __('by') . ' ' . link_to($metadata->get('user_private_data')->get('topo_name'), '@document_by_id?module=users&id=' . $metadata->get('user_id'));
?>
<br />
<?php 
if ($metadata->get('is_minor')) {
    $change_comment = '<strong>' . __('minor modification') . '</strong>';
} else {
    $change_comment = '';
}
if (trim($metadata->get('comment'))) {
    if (!$metadata->get('is_minor')) {
        $change_comment = '<strong>' . __('modification') . '</strong>';
    }
    $change_comment .= __(' :') . ' ' . parse_bbcode_simple(smart_format(__($metadata->get('comment'))));
}
echo $change_comment;
?>
<br />
    <?php 
if ($document->getVersion() > 1) {
    echo link_to('&laquo; ' . __('version %1%', array('%1%' => $document->getVersion() - 1)), "@document_by_id_lang_version?module={$module}&id=" . $id . '&version=' . ($document->getVersion() - 1) . '&lang=' . $document->getCulture());
    echo ' | ';
}
echo link_to(__('current version'), "@document_by_id_lang?module={$module}&id=" . $id . '&lang=' . $document->getCulture());
echo ' | ';
echo link_to(__('version %1%', array('%1%' => $document->getVersion() + 1)) . ' &raquo;', "@document_by_id_lang_version?module={$module}&id=" . $id . '&version=' . ($document->getVersion() + 1) . '&lang=' . $document->getCulture());
?>
</p>