<?php /* Template Name: Support Template */

get_header();

if ( have_posts() ) {

	while ( have_posts() ) { the_post(); ?>

		<div class="main-content">

			<!-- Title -->
			<div class="ui basic notpadded cf">

				<?php wpj_display_title([ 'title' => get_the_title() . ( ! empty( $_GET['ticket_id'] ) ? ' #' . $_GET['ticket_id'] : '' ), 'title_class' => 'left' ]); ?>

				<div class="right wpj-group">

					<?php if ( wpj_is_page( 'wpjobster_ticket_list_page_id' ) ) {

						wpj_display_button( __( 'New Ticket', 'wpjobster' ), 'link', get_permalink( wpj_get_option( 'wpjobster_new_ticket_page_id' ) ), 'primary' );

					} else {

						wpj_display_button( __( 'All Tickets', 'wpjobster' ), 'link', get_permalink( wpj_get_option( 'wpjobster_ticket_list_page_id' ) ), 'primary' );

					} ?>

				</div>

			</div>

			<!-- Separator -->
			<div class="ui hidden divider"></div>

			<!-- Content -->
			<?php the_content(); ?>

		</div>

	<?php }
}

get_footer();
