Exemplo n.º 1
0
    <div id="post-count" class="pag-count">
        <?php 
bp_gtm_project_terms($project['0']->id, 'tag', true);
?>
 | <?php 
bp_gtm_project_terms($project['0']->id, 'cat', true);
?>
    </div>
    <div class="pagination-links" id="topic-pag">
        <p><?php 
_e('Deadline', 'bp_gtm');
echo ': ' . bp_gtm_get_format_date($project['0']->deadline);
?>
 |
            <?php 
$count_tasks = BP_GTM_Projects::get_count_tasks($project['0']->id, $bp->groups->current_group->id);
if ($count_tasks['all'] > 0) {
    $percent = round($count_tasks['done'] * 100 / $count_tasks['all'], 2) . '%';
    echo sprintf(_n('%d task left out of %d: %s done', '%d tasks left out of %d: %s done', $count_tasks['undone'], $count_tasks['all'], $percent, 'bp_gtm'), $count_tasks['undone'], $count_tasks['all'], $percent);
} else {
    _e('There are no tasks yet.', 'bp_gtm');
}
?>
        </p>
    </div>
</div>

    <?php 
if ($bp_gtm_group_settings['discuss'] == 'on' && bp_gtm_check_access('discuss_view')) {
    ?>
    <ul id="topic-post-list" class="item-list discussions">
Exemplo n.º 2
0
function bp_gtm_get_done_undone_links($project_id, $project_group_id, $gtm_link)
{
    $count = BP_GTM_Projects::get_count_tasks($project_id, $project_group_id);
    echo '<a href="' . $gtm_link . 'tasks?project=' . $project_id . '" 
             title="' . __('Pending tasks', 'bp_gtm') . '">' . $count['undone'] . '</a> 
            / <a href="' . $gtm_link . 'tasks?project=' . $project_id . '&filter=done" 
             title="' . __('Completed tasks', 'bp_gtm') . '">' . $count['done'] . '</a>';
}