<body id="page-top">

  <!-- Sidebar -->
  <?php $this->load->view('restricted/layout/sidebar_editor'); ?>
  <!-- Sidebar -->

  <div id="content-wrapper" class="d-flex flex-column">
    <div id="content">

      <!-- NavBar -->
      <?php $this->load->view('restricted/layout/navbar'); ?>
      <!-- Navbar -->

      <!-- Container Fluid-->
      <div class="container-fluid" id="container-wrapper">
        <div class="d-sm-flex align-items-center justify-content-between mb-4">
          <h1 class="h3 m-0 text-purple"><?php echo $title; ?></h1>
          <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="./">Home</a></li>
            <li class="breadcrumb-item active" aria-current="page"><?php echo $title; ?></li>
          </ol>
        </div>


        <div class="card p-5 col-6" style="margin: 0 auto;">

          <div class="row justify-content-center">
            <div class="col-10 col-sm-10">
              <h6 class="mb-5 font-weight-bold text-primary"><?php echo $title; ?></h6>
              
              <?php $attributes = array('class' => 'required-form'); ?>
              <?php echo form_open('restricted/editor/home/assign_reviewer/', $attributes); ?>
              
              <div class="form-group">
                <label for="user_id">Usuário</span> </label>
                <select class="form-control select_user" data-select2-id="select_user" name="user_id" id="user_id" required>
                  <?php if($users): ?>
                  <?php foreach($users as $user): ?>
                    <option value="<?php echo $user->id; ?>"><?php echo $user->first_name.' '.$user->last_name; ?></option>
                  <?php endforeach; ?>
                  <?php else: ?>
                    <option>Nenum registro encontrado...</option>
                  <?php endif; ?>
                </select>
              </div>

              <div class="form-group">
                <label for="user_id">Capítulo</span> </label>
                <select class="form-control select_chapter" data-select2-id="select_chapter" name="chapter_id" id="chapter_id" required>
                  <?php if($chapters): ?>
                  <?php foreach($chapters as $chapter): ?>
                    <option></option>
                    <option value="<?php echo $chapter->id; ?>"><?php echo $chapter->title; ?></option>
                  <?php endforeach; ?>
                  <?php else: ?>
                    <option value="">Nenum registro encontrado...</option>
                  <?php endif; ?>
                </select>
              </div>
              
              <button class="btn btn-primary">Salvar</button>
            <?php echo form_close(); ?>
          </div>
        </div>
      </div>
        
        
        <!-- Modal Logout -->
        <?php $this->load->view('restricted/layout/modal_logout'); ?>
        <!-- /Modal -->

      </div>
      <!--- /Container Fluid-->
    </div><!-- /Content -->
