add rssa-pintar to git
This commit is contained in:
No files matched your search
@@ -0,0 +1,125 @@
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<small></small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo base_url()?>index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li>Master</li>
|
||||
<li><a href="<?php echo base_url()?>index.php/ps_ruangan">Ruang</a></li>
|
||||
<li class="active"><?php echo $title;?></li>
|
||||
</ol>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><?php echo $title; ?></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<?php if(validation_errors()){ ?>
|
||||
<div id="mydivs" class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-ban"></i> Alert!</h4>
|
||||
<?php echo validation_errors() ?>
|
||||
</div>
|
||||
<script>
|
||||
setTimeout(function() {
|
||||
$('#mydivs').hide('fast');
|
||||
}, 5000);
|
||||
</script>
|
||||
<?php }
|
||||
|
||||
$setdisabled ="";
|
||||
$setidedit ="";
|
||||
$setnama ="";
|
||||
$setkode ="";
|
||||
$setpelayanan ="";
|
||||
$setstatus =1;
|
||||
|
||||
if ($actionform=="prosesview"){
|
||||
$setdisabled="disabled=''";
|
||||
}
|
||||
if ($actionform!="prosesadd"){
|
||||
$setidedit =$ru->row('mr_id');
|
||||
$setnama =$ru->row('mr_nama');
|
||||
$setkode =$ru->row('mr_kode');
|
||||
$setstatus =$ru->row('mr_status');
|
||||
$setpelayanan =$ru->row('mr_pelayanan');
|
||||
}
|
||||
|
||||
?>
|
||||
<form class="form-horizontal" id="form" action="<?php echo(base_url()); ?>index.php/ps_ruangan/<?php echo $actionform; ?>" method="post" autocomplete="off">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="nama" class="col-sm-2 control-label">Nama</label>
|
||||
<div class="col-sm-3">
|
||||
<input id="nama" class="form-control" <?php echo $setdisabled; ?> name="nama" type="text" placeholder="Masukan Nama Ruang" autocomplete="off" value="<?php echo $setnama;?>"/>
|
||||
<input type="hidden" name="id" value="<?php echo $setidedit;?>"/>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<input id="kode" class="form-control" <?php echo $setdisabled; ?> name="kode" type="text" placeholder="Masukan Kode Ruang" autocomplete="off" value="<?php echo $setkode;?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pelayanan" class="col-sm-2 control-label">Pelayanan</label>
|
||||
<div class="col-sm-3">
|
||||
<select <?php echo $setdisabled; ?> id="pelayanan" name="pelayanan" class="form-control select" >
|
||||
<option >Pilih Jenis Pelayanan</option>
|
||||
<option <?php if($setpelayanan==1){echo $select="selected='selected'";}?> value="1">IGD (Instalasi Gawat Darurat)</option>
|
||||
<option <?php if($setpelayanan==2){echo $select="selected='selected'";}?> value="2">RAJAL (Rawat Jalan)</option>
|
||||
<option <?php if($setpelayanan==3){echo $select="selected='selected'";}?> value="3">RANAP (Rawat INAP)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<div class="col-sm-2">
|
||||
<select onchange="colorchange()" <?php echo $setdisabled; if($setstatus==0){echo "style='background: #feb9b9;'";}else{echo "style='background: #d9fdd3;'";}?> id="status" name="status" class="form-control select" >
|
||||
<option style="background: #d9fdd3;" <?php if($setstatus==1){echo $select="selected='selected'";}?> value="1">Active</option>
|
||||
<option style="background: #feb9b9;" <?php if($setstatus==0){echo $select="selected='selected'";}?> value="0">Disabled</option>
|
||||
</select>
|
||||
<script>
|
||||
function colorchange(){
|
||||
var colsat = document.getElementById('status').value;
|
||||
if(colsat==1){
|
||||
document.getElementById("status").style.background = "#d9fdd3";
|
||||
}else{
|
||||
document.getElementById("status").style.background = "#feb9b9";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<a href="<?php echo base_url();?>index.php/ps_ruangan" class="btn btn-default">Cancel</a>
|
||||
<?php if ($actionform!="prosesview"){ ?>
|
||||
<button type="submit" class="btn btn-warning">Submit</button>
|
||||
<?php }
|
||||
if ($actionform!="prosesview" && $actionform!="prosesadd"){
|
||||
if(!empty($this->vardelete)){
|
||||
echo "<a onclick='del(".$setidedit.")' class='btn btn-danger pull-right'>Delete</a><input type='hidden' id='isi".$setidedit."' value='".$setnama."'> ";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script type="text/javascript">
|
||||
var url="<?php echo base_url();?>";
|
||||
function del(id){
|
||||
var r=confirm("Apakah anda ingin menghapus Ruang ini?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_ruangan/delete/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,133 @@
|
||||
<body class="hold-transition skin-blue sidebar-mini">
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<?php
|
||||
//---------------------start check access action TAMBAH-------------------//
|
||||
if(!empty($this->vartambah)){ echo "<small> <a href='".base_url()."index.php/ps_ruangan/add' class='btn btn-block bg-blue btn-sm'>Tambah Baru</a> </small>";
|
||||
}else{ echo "<small></small>";}
|
||||
//---------------------end check access action TAMBAH-------------------//
|
||||
?>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo base_url()?>index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li>Master</li>
|
||||
<li class="active"><?php echo $title ?></li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title info-box-number"><?php echo $title ?></h3>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<?php if($this->session->flashdata('message')){?>
|
||||
<div id="mydivs" class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4> <i class="icon fa fa-check"></i> Alert!</h4>
|
||||
<?php echo $this->session->flashdata('message');?>
|
||||
</div>
|
||||
<script>
|
||||
setTimeout(function() {
|
||||
$('#mydivs').hide('fast');
|
||||
}, 5000);
|
||||
</script>
|
||||
<?php }?>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table id="example1" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">No</th>
|
||||
<th>Nama</th>
|
||||
<th>Kode</th>
|
||||
<th>Pelayanan</th>
|
||||
<th>Status</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$no=0;
|
||||
foreach ($ru as $ruangan) {
|
||||
$no++;
|
||||
//---------------------start check access action-------------------//
|
||||
$editbutton ="";
|
||||
$edithakakses ="";
|
||||
$viewbutton ="";
|
||||
$disabledbutton ="";
|
||||
$aktifbutton ="";
|
||||
|
||||
if(!empty($this->varedit)){
|
||||
$editbutton="<a href='".base_url()."index.php/ps_ruangan/edit/".$ruangan->mr_id."' class='btn btn-warning btn-xs'><i class='fa fa-edit'></i> Edit</a> ";
|
||||
}
|
||||
if(!empty($this->varview)){
|
||||
$viewbutton="<a href='".base_url()."index.php/ps_ruangan/view/".$ruangan->mr_id."' class='btn btn-primary btn-xs'><i class='fa fa-eye'></i> View</a> ";
|
||||
}
|
||||
|
||||
$setstatus = "<span class='badge bg-green'> Active</span>";
|
||||
if($ruangan->mr_status==0){
|
||||
$setstatus = "<span class='badge bg-red'> Disabled</span>";
|
||||
if(!empty($this->varedit)){
|
||||
$aktifbutton="<a onclick='aktif(".$ruangan->mr_id.")' class='btn btn-success btn-xs'><i class='fa fa-check-square-o'></i> On</a><input type='hidden' id='isi".$ruangan->mr_id."' value='".$ruangan->mr_nama."'> ";
|
||||
}
|
||||
}else{
|
||||
if(!empty($this->varedit)){
|
||||
$disabledbutton="<a onclick='disabled(".$ruangan->mr_id.")' class='btn btn-danger btn-xs'><i class='fa fa-ban'></i> Off</a><input type='hidden' id='isi".$ruangan->mr_id."' value='".$ruangan->mr_nama."'> ";
|
||||
}
|
||||
}
|
||||
|
||||
$pelayanan = "";
|
||||
if($ruangan->mr_pelayanan==1){
|
||||
$pelayanan = "IGD";
|
||||
}elseif($ruangan->mr_pelayanan==2){
|
||||
$pelayanan = "RAJAL";
|
||||
}elseif($ruangan->mr_pelayanan==3){
|
||||
$pelayanan = "RANAP";
|
||||
}
|
||||
//---------------------end check access action-------------------//
|
||||
echo("
|
||||
<tr>
|
||||
<td>".$no."</td>
|
||||
<td>".$ruangan->mr_nama."</td>
|
||||
<td>".$ruangan->mr_kode."</td>
|
||||
<td>".$pelayanan."</td>
|
||||
<td style='text-align: center;'>".$setstatus."</td>
|
||||
<td>".$viewbutton.$editbutton.$disabledbutton.$aktifbutton.$edithakakses."</td>
|
||||
</tr>
|
||||
");
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</section>
|
||||
<div class="control-sidebar-bg"></div>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
var url="<?php echo base_url();?>";
|
||||
function disabled(id){
|
||||
var isi=document.getElementById('isi'+id).value;
|
||||
var r=confirm("Apakah anda ingin disabled Ruang "+isi+"?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_ruangan/disabled/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function aktif(id){
|
||||
var isi=document.getElementById('isi'+id).value;
|
||||
var r=confirm("Apakah anda ingin aktifkan Ruang "+isi+"?")
|
||||
if (r==true)
|
||||
window.location = url+"index.php/ps_ruangan/aktif/"+id;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user