<?php
/**
 * Admin style main view
 *
 * @package wp-video-attention
 * @author InstaProduct
 * @link http://insta-product.com/
 */
?>
<div id="ipvisc-manage" class="wrap ipvisc-wrap ipvisc-admin">
  <div class="ipvisc-inner">
    <?php
    if ( $this->style ) {
        $this->title = $this->style->post_title;
        $this->info  = '<i class="ipvisc-fa ipvisc-fa-calendar"></i> Created: ' .
            '<strong>' . mysql2date( 'd F Y, h:i', $this->style->post_date ) . '</strong>';

        $this->view( 'manage/general/header' );
    } else {
        $this->view( 'manage/general/header' );
    }
    ?>
    <div class="ipvisc-main">
      <div class="ipvisc-main-info"></div>

      <div class="ipvisc-primary">
        <div class="ipvisc-manage-wrap ipvisc-manage-sidebar">
          <form id="<?php echo $this->formId; ?>" class="ipvisc-form-container ipvisc-form" method="post" action="<?php echo $this->formAction; ?>" enctype="multipart/form-data">
            <input type="hidden" name="style_id" id="ipvisc-value-styleid" value="<?php echo $this->styleId; ?>" />

            <div class="container-fluid container">
              <div class="ipvisc-clear ipvisc-tab">
                <?php
                $this->view( 'style/main/nav' );
                ?>

                <div class="ipvisc-manage-content">
                  <div class="ipvisc-manage-info">
                    <div class="row">
                      <div class="col-md-8">
                        <div class="ipvisc-tab-title">
                          <i class="ipvisc-fa ipvisc-fa-cogs"></i>
                          <div class="ipvisc-title-text">
                            <h3> <?php _e( 'General', IPVISC_SLUG ); ?></h3>
                            <p> <?php _e( 'Basic settings and info of your widget', IPVISC_SLUG ); ?></p>
                          </div>
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="ipvisc-top-submit">
                          <button type="submit" class="ipvisc-form-submit ipvisc-btn ipvisc-btn-secondary ipvisc-btn-lg <?php echo $this->submitId; ?>" id="do-update-top" name="update_top">
                            <i class="ipvisc-fa ipvisc-fa-<?php echo $this->submitIcon; ?>"></i>
                            <strong> <?php echo $this->submitLabel; ?></strong>
                          </button>
                          <?php
                          if ( $this->style ) {
                            echo '<p class="ipvisc-update-info">' .
                              __( 'Last Update', IPVISC_SLUG ) .
                              ': <strong>' . mysql2date( 'd F Y, h:i:s', $this->style->post_date ) . '</strong>' .
                            '</p>';
                          }
                          ?>
                        </div>
                      </div>
                    </div>
                  </div>

                  <?php
                  $this->view( 'style/main/content' );
                  ?>

                  <div class="ipvisc-manage-footer">
                    <div class="row">
                      <div class="col-md-6">
                        <div class="ipvisc-bottom-submit">
                          <button type="submit" class="ipvisc-form-submit ipvisc-btn ipvisc-btn-secondary ipvisc-btn-lg <?php echo $this->submitId; ?>" id="do-update-bottom" name="update_bottom">
                            <i class="ipvisc-fa ipvisc-fa-<?php echo $this->submitIcon; ?>"></i>
                            <strong><?php echo $this->submitLabel; ?></strong>
                          </button>
                        </div>
                      </div>
                      <div class="col-md-6">
                        <div class="ipvisc-bottom-action text-right">
                          <?php
                          if ( $this->style ) :
                          ?>
                          <a href="#" class="ipvisc-btn ipvisc-btn-danger ipvisc-btn-lg ipvisc-item-delete ipvisc-delete-edit" data-id="<?php echo $this->style->ID; ?>">
                              <i class="ipvisc-fa ipvisc-fa-trash"></i>
                              <?php _e( 'Delete', IPVISC_SLUG ); ?>
                          </a>
                          <?php
                          endif;
                          ?>
                        </div>
                      </div>
                    </div>

                  </div>
                </div>
              </div>
            </div>

          </form>
        </div>
      </div>
    </div>
  </div>
</div>
