<div class="content-wrapper">   
    <section class="content-header">
        <h1>
            <i class="fa fa-mortar-board"></i> Uniform Group <small>edit</small>        </h1>
											 <a href="<?php  echo base_url(); ?>uniformpos" class="col-md pull-right">Sale a Uniform</a>
								 <b style="padding-left:5px;padding-right:5px;"class="pull-right"> | </b>
								 <a href="<?php  echo base_url(); ?>uniformitem" class="col-md pull-right">Add Item</a>
								 <b style="padding-left:5px;padding-right:5px;"class="pull-right"> | </b>
								 <a href="<?php  echo base_url(); ?>group" class="col-md pull-right">Create Group</a> 
								 <b style="padding-left:5px;padding-right:5px;"class="pull-right"> | </b>
								 <a href="<?php  echo base_url(); ?>values" class="col-md pull-right">Create Values</a>
    </section>
    <!-- Main content -->
    <section class="content">
        <div class="row">
            <?php
            if ($this->rbac->hasPrivilege('group', 'can_add') || $this->rbac->hasPrivilege('group', 'can_edit')) {
                ?>
                <div class="col-md-4">
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title"><?php echo $this->lang->line('edit'); ?> Uniform Group</h3>
                        </div>
						<?php  
						 foreach ($groups->result() as $dep_row)  
							 {   
							?>
                        <form action="<?php echo site_url("group/edit/" . $dep_row->id) ?>"  id="employeeform" name="employeeform" method="post" accept-charset="utf-8">
                            <div class="box-body">
                                <?php if ($this->session->flashdata('msg')) { ?>
                                    <?php echo $this->session->flashdata('msg') ?>
                                <?php } ?>   
                                <?php echo $this->customlib->getCSRF(); ?>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">Uniform Group</label><small class="req"> *</small>
                                    <input autofocus="" id="groups" name="groups" placeholder="" type="text" class="form-control"  value="<?php echo $dep_row->groups; ?>" />
                                    <span class="text-danger"><?php echo form_error('groups'); ?></span>
                                </div>
							    <div class="form-group">
                                    <label for="group_type">Group Type</label><small class="req"> *</small>
										<select id="group_type" name="group_type" placeholder="" type="text" class="form-control" >
											<option  value="<?php echo $dep_row->group_type; ?>"> <?php echo $dep_row->group_type; ?></option>
											<?php 
												foreach ($typ->result() as $val) {
												?>
														<option value="<?php echo $val->group_type; ?>" >  <?php echo $val->group_type; ?></option>
											<?php }
											?>
										</select>
                                    <span class="text-danger"><?php echo form_error('group_type'); ?></span>
                                </div>
                            </div>
                            <div class="box-footer">
                                <button type="submit" class="btn btn-info pull-right"><?php echo $this->lang->line('save'); ?></button>
                            </div>
                        </form>
						<?php } ?>
                    </div>              
                </div>
            <?php } ?>
            <div class="col-md-<?php
            if ($this->rbac->hasPrivilege('group', 'can_add') || $this->rbac->hasPrivilege('group', 'can_edit')) {
                echo "8";
            } else {
                echo "12";
            }
            ?>">             
                <div class="box box-primary">
                    <div class="box-header ptbnull">
                        <h3 class="box-title titlefix">Uniform Group List</h3>
                    </div>
                    <div class="box-body ">
                        <div class="table-responsive mailbox-messages">
                            <div class="download_label">Uniform Group List</div>
                            <table class="table table-striped table-bordered table-hover example">
                                <thead>
                                    <tr>

                                        <th>Group</th>
                                        <th>Group Type</th>
                                        <th class="text-right"><?php echo $this->lang->line('action'); ?></th>
                                    </tr>
                                </thead>
                                <tbody>
                                <?php  
										 foreach ($group->result() as $row)  
										 {   
                                        ?>
                                        <tr>
                                            <td class="mailbox-name"><?php echo $row->groups;?></td>
                                            <td class="mailbox-name"><?php echo $row->group_type;?></td>
                                            <td class="mailbox-date pull-right">
                                                <?php
                                                if ($this->rbac->hasPrivilege('class', 'can_delete')) {
                                                    ?>  
                                                    <a href="<?php echo base_url(); ?>group/delete/<?php echo $row->id; ?>"class="btn btn-default btn-xs"  data-toggle="tooltip" title="<?php echo $this->lang->line('delete'); ?>" onclick="return confirm('<?php echo $this->lang->line('delete_confirm') ?>');">
                                                        <i class="fa fa-remove"></i>
                                                    </a>
                                                <?php } ?>
                                            </td>
                                        </tr>
									<?php } ?>
                                </tbody>
                            </table><!-- /.table -->
                        </div>
                    </div>
                </div>
            </div> 

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