/**
     * Displays the Projects under 'Projects' tab under group.
     * @param int $group_id The Group ID.
     * @return void
     */
    function display($group_id = null)
    {
        do_action('task_breaker_before_projects_archive');
        $group_id = bp_get_group_id();
        ?>

			<h3>
				<?php 
        esc_html_e('Projects', 'task_breaker');
        ?>
			</h3>

			<div id="task_breaker-intranet-projects">

				<?php 
        task_breaker_new_project_modal($group_id);
        ?>

				<?php 
        $args = array('meta_key' => 'task_breaker_project_group_id', 'meta_value' => absint($group_id));
        ?>

				<?php 
        task_breaker_project_loop($args);
        ?>

			</div>

		<?php 
        do_action('task_breaker_after_projects_archive');
        return;
    }
示例#2
0
 *
 * @since Task Breaker 1.0
 */
do_action('task_breaker_before_projects_directory');
?>

<div id="buddypress">

	<div id="task_breaker-intranet-projects">

		<?php 
if (bp_is_active('groups')) {
    ?>

			<?php 
    task_breaker_new_project_modal();
    ?>

			<?php 
    task_breaker_project_loop($config = array());
    ?>

		<?php 
} else {
    ?>

			<p id="message" class="info">
	        	<?php 
    _e('Please enable BuddyPress Groups Components to access the Projects.', 'task-breaker');
    ?>
	    	</p>