<?php
/**
 * Admin dashboard view
 *
 * @package wp-viral-click
 * @author InstaProduct
 * @link http://insta-product.com/
 */
?>
<div id="ipjck-page-index" class="wrap ipjck-wrap ipjck-admin">
  <div class="ipjck-inner">

    <?php
    $this->view( 'admin/general/header' );
    ?>

    <div class="ipjck-main">
      <div class="ipjck-main-info">
        <?php
        if ( isset( $_GET['create'] )) :
        ?>
        <div class="ipjck-alert ipjck-alert-success" style="display: block;">
          <?php _e( 'Successfully add a page.', IPJCK_SLUG ); ?>
        </div>
        <?php
        elseif ( isset( $_GET['delete'] )) :
        ?>
        <div class="ipjck-alert ipjck-alert-success" style="display: block;">
          <?php _e( 'Successfully deleting a page.', IPJCK_SLUG ); ?>
        </div>
        <?php
        endif;
        ?>
      </div>

      <div class="ipjck-primary">
        <div class="_add-button mb30">
          <?php
          $link = admin_url() . 'admin.php?page=' . 
            IPJCK_PAGENAME . '-page&action=create';
          ?>
          <a href="<?php echo $link; ?>" class="ipjck-btn ipjck-btn-success ipjck-btn-sm _add-page">
            <i class="ipjck-fa ipjck-fa-plus-circle"></i>
            <?php _e( 'Add New Page', IPJCK_SLUG ); ?>
          </a>
        </div>

        <?php
        require_once( IPJCK_LIB . 'list/page.php' );
        $list = new IPJck_List_Page();
        $list->render();
        ?>
      </div>
    </div>

  </div>

</div>
