<?=$this->view(sett('cp_view_dir').'/'.'breadcrumb', $bc,true)?> 

<div class="uk-grid  uk-grid-medium uk-child-width-1-2 uk-child-width-1-2@m uk-child-width-1-3@xl uk-grid-match uk-margin-top uk-margin-bottom" data-uk-grid>
<div>
	<div class="uk-card uk-card-default uk-card-small uk-card-hover">
	<div class="uk-card-header">
		<div class="uk-grid uk-grid-small">
			<div class="uk-width-auto"><h4 class="uk-margin-remove-bottom"><?= $role["name"]?></h4></div>
			<div class="uk-width-expand uk-text-left">
				<a onclick="return confirm('هل تريد الحذف حقا؟')"  href="<?=site_url("admin/users/roles/del/$role[id]")?>" class="uk-icon-link uk-text-danger uk-margin-small-left" data-uk-icon="icon: trash"></a>
				<a href="<?=site_url("admin/users/roles/edit/$role[id]")?>" class="uk-icon-link uk-margin-small-left" data-uk-icon="icon: cog"></a>
				
			</div>
		</div>
	</div>
	
	
	
	
	
	
	<div class="uk-card-body">
		 <ul class="uk-list uk-list-divider">
					<li ><b><?=lang('number')?> </b>: <?=$role['id']?> </li>
					<li ><b><?=lang('code')?></b> : <?=$role['code']?> </li>
					<li ><b><?=lang('role')?> </b>:  <?=lang('role.'.$role['name'])?></li>
					<li ><b><?=lang('details')?></b> : <?=$role['des']?> </li>
				</ul>						
							
	</div>
</div>
</div>
						
						


<?php if(is_right("user_roles_table")):?>
<div>
	<div class="uk-card uk-card-default uk-card-small uk-card-hover">
		<div class="uk-card-header">
			<h4 > <?=lang('rights')?> </h4>
		</div>
		<div class="uk-card-body">
<?php $rights=$this->user_model->get_rights();
			echo form_open();			
			foreach ($rights as $r):?>
			
				
					<label >
					<input type="checkbox" name="id[]" value="<?=$r["id"]?>" class="uk-checkbox"   <?= is(in_array($r["code"],$role['rights']),'checked=""')?>> <?=lang('rht.'.$r["code"])?>
					
				</label><br>

				
			
			<?php endforeach;?>
<br>			<center>
			<?=form_submit('submit', lang('save'),'class="uk-button uk-button-primary"')?>		
			</center>
			<?= form_close()?>	
	</div>
	</div>
</div>
<?php endif ?>




</div>

