<?php
/**
 * Implementation of Bulletin_Board
 *
 * Registers the group extension and provides a display method
 *
 * @since 1.0
 */
class Bulletin_Board extends BP_Group_Extension {

	var $enable_create_step = false;
	var $enable_nav_item = true;
	var $enable_edit_item = false;

	/**
	 * Constructor
	 *
	 * @since 1.0
	 * */
	function __construct() {

		// extension variables
		$this->name = __( 'Bulletin Board' );
		$this->slug = __( 'bulletin-board' );

		$this->nav_item_position = 3;
		//$this->template_file = 'wrc/templates/bulletin-board/home.php';

	}

	/**
	 * Display the content of the Bulletin Board tab
	 *
	 * @since 1.0
	 */
	function display() {
			//locate_template( array( 'wrc/templates/bulletin-board/home.php'), true);
			//bp_get_template_part( 'wrc/templates/bulletin-board/home' );

		echo "BULLETIN BOARD";

	}
}

/**
 * Implementation of eBin
 *
 * Registers the group extension and provides a display method
 *
 * @since 1.0
 */
class eBin extends BP_Group_Extension {

	var $enable_create_step = false;
	var $enable_nav_item = true;
	var $enable_edit_item = false;

	/**
	 * Constructor
	 *
	 * @since 1.0
	 * */
	public function __construct() {

		// extension variables
		$this->name = __( 'eBin', 'wrc' );
		$this->slug = __( 'ebin', 'wrc' );

		$this->nav_item_position = 2;

	}

	/**
	 * Display the content of the eBin tab
	 *
	 * @since 1.0
	 */
	public function display() {

		locate_template( array( 'groups/single/ebin.php'), true );
	}

}

/**
 * Implementation of Help_Desk
 *
 * Registers the group extension and provides a display method
 *
 * @since 1.0
 */
class Help_Desk extends BP_Group_Extension {

	var $enable_create_step = false;
	var $enable_nav_item = true;
	var $enable_edit_item = false;

	/**
	 * Constructor
	 *
	 * @since 1.0
	 * */
	public function __construct() {

		// extension variables
		$this->name = __( 'Help Desk', 'wrc' );
		$this->slug = __( 'help-desk', 'wrc' );

		$this->nav_item_position = 7;

	}

	/**
	 * Display the content of the Help Desk tab
	 *
	 * @since 1.0
	 */
	public function display() {

		locate_template( array( 'groups/single/help-desk.php'), true );
	}

}

/**
 * Implementation of Library
 *
 * Registers the group extension and provides a display method
 *
 * @since 1.0
 */
class Library extends BP_Group_Extension {

	var $enable_create_step = false;
	var $enable_nav_item = true;
	var $enable_edit_item = false;

	/**
	 * Constructor
	 *
	 * @since 1.0
	 * */
	public function __construct() {

		// extension variables
		$this->name = __( 'Library', 'wrc' );
		$this->slug = __( 'library', 'wrc' );

		$this->nav_item_position = 5;

	}

	/**
	 * Display the content of the Library tab
	 *
	 * @since 1.0
	 */
	public function display() {

		locate_template( array( 'groups/single/library.php'), true );
	}

}

/**
 * Implementation of Mission_Control
 *
 * Registers the group extension and provides a display method
 *
 * @since 1.0
 */
class Mission_Control extends BP_Group_Extension {

	var $enable_create_step = false;
	var $enable_nav_item = true;
	var $enable_edit_item = false;

	/**
	 * Constructor
	 *
	 * @since 1.0
	 * */
	public function __construct() {

		// extension variables
		$this->name = __( 'Mission Control', 'wrc' );
		$this->slug = __( 'mission-control', 'wrc' );

		$this->nav_item_position = 1;

	}

	/**
	 * Display the content of the Mission Control tab
	 *
	 * @since 1.0
	 */
	public function display() {

		?>
		Mission Control
		<?php
		
	}

}


/**
 * Implementation of Reports
 *
 * Registers the group extension and provides a display method
 *
 * @since 1.0
 */
class Reports extends BP_Group_Extension {

	var $enable_create_step = false;
	var $enable_nav_item = true;
	var $enable_edit_item = false;

	/**
	 * Constructor
	 *
	 * @since 1.0
	 * */
	public function __construct() {

		// extension variables
		$this->name = __( 'Reports', 'wrc' );
		$this->slug = __( 'reports', 'wrc' );

		$this->nav_item_position = 4;

	}

	/**
	 * Display the content of the Reports tab
	 *
	 * @since 1.0
	 */
	public function display() {

		locate_template( array( 'groups/single/reports.php'), true );
	}

}

/**
 * Implementation of Training
 *
 * Registers the group extension and provides a display method
 *
 * @since 1.0
 */
class Training extends BP_Group_Extension {

	var $enable_create_step = false;
	var $enable_nav_item = true;
	var $enable_edit_item = false;

	/**
	 * Constructor
	 *
	 * @since 1.0
	 * */
	public function __construct() {

		// extension variables
		$this->name = __( 'Training', 'wrc' );
		$this->slug = __( 'training', 'wrc' );

		$this->nav_item_position = 6;

	}

	/**
	 * Display the content of the Training tab
	 *
	 * @since 1.0
	 */
	public function display() {

		locate_template( array( 'groups/single/training.php'), true );
	}

}

/**
 * Bootstrap the WRC Components extension
 */
function wrc_bootstrap() {
	bp_register_group_extension( 'Mission_Control' );
	bp_register_group_extension( 'eBin' );
	bp_register_group_extension( 'Bulletin_Board' );
	bp_register_group_extension( 'Reports' );
	bp_register_group_extension( 'Library' );
	bp_register_group_extension( 'Training' );
	bp_register_group_extension( 'Help_Desk' );
}
add_action( 'bp_init', 'wrc_bootstrap' );

?>