<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>
<!DOCTYPE html>
<html>
  <head>
    <title>Admin &gt; Aplikasi Android</title>
    <?php include_once(VIEWPATH.'includes/head.php'); ?>
    <style type="text/css">
    .popover{width: 100%; display: block;left: 0;right: 0;}
    .popover-content>.list-group{margin: -9px -15px;border-radius:0;}
    .popover-content>.list-group>.list-group-item{border-left:0;border-right:0;}
    .popover-content>.list-group>.list-group-item:first-child{border-top:0;}
    .popover-content>.list-group>.list-group-item:last-child{border-bottom:0;}
    .form-group > div.checkbox:nth-child(2){margin-top: 0;}
    </style>
  </head>
  <body>
    <?php include_once(VIEWPATH. 'admin/_navbar.php'); ?>
    <div class="container">
      <ul class="breadcrumb">
        <li><a href="<?php echo site_url();?>"><i class="fa fa-home"></i></a></li>
        <li><a href="<?php echo site_url('admin');?>">Admin Panel</a></li>
        <li class="active"><span>Aplikasi Android</span></li>
      </ul>
      <div class="row">
        <div class="col-sm-4 col-md-3">
          <?php include(dirname(__file__).'/_sidebar.php');?>
        </div>
        <div class="col-sm-8 col-md-9">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h3><i class="fa fa-cog"></i> Pengaturan</h3>
            </div>
            <div class="panel-body">
              <?php include(dirname(__file__).'/_tabs.php');?>
              <div class="tab-content">
                <div role="tabpanel" class="tab-pane active" id="content">
                  <?php echo form_open();?>
                  <div class="form-group">
                    <label>Tampilan Produk</label>
                    <div>
                      <div class="radio-inline"><label style="font-weight: normal;"><input type="radio" name="product_layout" value="grid" <?php echo @$app['product_layout'] == 'grid' ? 'checked="checked"' : '';?>> <span class="fa fa-th-large"></span> Grid view (Android &gt;= 7.0)</label></div>
                      <div class="radio-inline"><label style="font-weight: normal;"><input type="radio" name="product_layout" value="list" <?php echo !isset($app['product_layout']) || @$app['product_layout'] == 'list' ? 'checked="checked"' : '';?>> <span class="fa fa-list"></span> List view</label></div>
                    </div>
                  </div>
                  <div class="form-group">
                    <label>Tampilkan logo di struk pembelian?</label>
                    <div>
                      <div class="radio-inline"><label style="font-weight: normal;"><input type="radio" name="print_logo" value="1" <?php echo !isset($app['print_logo']) || @$app['print_logo'] === true ? 'checked="checked"' : '';?>> Ya</label></div>
                      <div class="radio-inline"><label style="font-weight: normal;"><input type="radio" name="print_logo" value="0" <?php echo @$app['print_logo'] === false ? 'checked="checked"' : '';?>> Tidak</label></div>
                    </div>
                  </div>
                  <div class="form-group">
                    <label>Perbolehkan pengguna untuk menampilkan atau menyembunyikan gambar produk?</label>
                    <div>
                      <div class="radio-inline"><label style="font-weight: normal;"><input type="radio" name="show_hide_image" value="1" <?php echo !isset($app['show_hide_image']) || @$app['show_hide_image'] === true ? 'checked="checked"' : '';?>> Ya</label></div>
                      <div class="radio-inline"><label style="font-weight: normal;"><input type="radio" name="show_hide_image" value="0" <?php echo @$app['show_hide_image'] === false ? 'checked="checked"' : '';?>> Tidak</label></div>
                    </div>
                  </div>
                  <div class="form-group">
                    <label>Tampilkan tombol konfirmasi pembayaran untuk daftar bank berikut</label>
                    <?php foreach ($this->payment->get() as $payment): if (substr($payment->key, 0, 5) != 'bank_') continue;?>
                    <div class="checkbox"><label><input type="checkbox" name="confirm_button[]" value="<?php echo $payment->key;?>" <?php echo in_array($payment->key, $app['confirm_button']) ? 'checked="checked"' : '';?>/> <?php echo ($payment->status == 'on' ? $payment->nama : '<span class="text-muted">'.$payment->nama.' (Tidak aktif)</span>');?></label></div>
                    <?php endforeach;?>
                  </div>
                  <div>
                    <button class="btn btn-primary" type="submit" name="submit" value="save"><i class="fa fa-check"></i> Simpan</button>
                  </div>
                  <?php echo form_close();?>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <?php include_once(VIEWPATH.'includes/foot.php'); ?>
  </body>
</html>