コード例 #1
0
 /**
  * Get projects activity
  *
  * @since 1.2
  */
 function get_projects_activity()
 {
     $projects_id = isset($_GET['projects_id']) ? $_GET['projects_id'] : 0;
     $offset = isset($_GET['offset']) ? intval($_GET['offset']) : 0;
     $activities = CPM_project::getInstance()->get_projects_activity($projects_id, array('offset' => $offset));
     if ($activities) {
         echo json_encode(array('success' => true, 'content' => cpm_projects_activity_html($activities), 'count' => count($activities)));
     } else {
         echo json_encode(array('success' => false));
     }
     exit;
 }
コード例 #2
0
ファイル: single.php プロジェクト: javalidigital/multipla
 */
cpm_get_header(__('Activity', 'cpm'), $project_id);
?>
<h3 class="cpm-nav-title">
    <?php 
_e('Project Activity', 'cpm');
if (cpm_user_can_access($project_id)) {
    cpm_project_actions($project_id);
}
?>
</h3>

<ul class="cpm-activity dash">
    <?php 
$count = get_comment_count($project_id);
$activities = CPM_project::getInstance()->get_activity($project_id, array());
if ($activities) {
    echo cpm_activity_html($activities);
}
?>
</ul>

<?php 
if ($count['approved'] > count($activities)) {
    ?>
    <a href="#" <?php 
    cpm_data_attr(array('project_id' => $project_id, 'start' => count($activities) + 1, 'total' => $count['approved']));
    ?>
 class="button cpm-load-more"><?php 
    _e('Load More...', 'cpm');
    ?>