$mode = 'editions';
}
if ($mode == 'editions') {
    $uri = "@document_by_id_lang_version?module={$module_name}&id={$id}&lang={$lang}&version={$version}";
} else {
    $uri = "@document_by_id_lang?module={$module_name}&id={$id}&lang={$lang}";
}
$link = '@document_by_id?module=users&id=' . $item['history_metadata']['user_private_data']['id'];
?>
<td>
<?php 
echo link_to($item[$model_i18n]['name'], $uri, array('hreflang' => $lang));
?>
</td><td>
<?php 
echo smart_date($item['created_at']);
?>
</td><td>
<?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']);
    ?>
        <tr class="<?php 
    echo $table_class;
    if ($item['is_creation']) {
        echo ' creation';
    } else {
        echo ' deletion';
    }
    ?>
">
            <td> <?php 
    echo $item['is_creation'] ? $added_pic : $deleted_pic;
    ?>
 </td>
            <td> <?php 
    echo smart_date($item['written_at']);
    ?>
 </td>
            <td> <?php 
    echo '<div class="assoc_img picto_' . $main_module . '" title="' . __($main_module) . '"></div>' . (!empty($main_item) ? link_to($main_item['name'], $main_link) : __('deleted document'));
    ?>
 </td>
            <td> <?php 
    echo '<div class="assoc_img picto_' . $linked_module . '" title="' . __($linked_module) . '"></div>' . (!empty($linked_item) ? link_to($linked_item['name'], $linked_link) : __('deleted document'));
    ?>
 </td>
            <td> <?php 
    echo link_to($item['user_private_data']['topo_name'], $user_link);
    ?>
 </td>
        </tr>
예제 #3
0
    ?>
</p>
<?php 
} else {
    ?>
    <ul id="recent-changes">
    <?php 
    foreach ($items as $item) {
        ?>
        <li><?php 
        $module_name = $item[$archive]['module'];
        $id = $item['document_id'];
        $lang = $item['culture'];
        $version = $item['version'];
        $link = '@document_by_id?module=users&id=' . $item['document_id'];
        echo picto_tag('picto_' . $module_name, __($module_name)), ' ', link_to($item[$i18n_archive]['name'], "@document_by_id_lang_version?module={$module_name}&id={$id}&lang={$lang}&version={$version}"), ' - ', smart_date($item['created_at']), ' - ';
        if ($needs_username) {
            echo link_to($item['history_metadata']['user_private_data']['topo_name'], $link) . ' - ';
        }
        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)));
        }
        if ($comment = $item['history_metadata']['comment']) {
            ?>
                - <em><?php 
            echo parse_bbcode_simple(smart_format($comment));
            ?>
</em>
            <?php 
        }