deploy awal
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>assets/app/css/style.css">
|
||||
<?php if ($this->session->flashdata('message')) { ?>
|
||||
<div class="col-lg-12 alerts">
|
||||
<div class="alert alert-dismissible alert-danger">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<h4> <i class="icon fa fa-ban"></i> Error</h4>
|
||||
<p><?php echo $this->session->flashdata('message'); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else { } ?>
|
||||
<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'>Edit Data Supplier</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<?php echo form_open_multipart('suplier/edit', array('role' => "form", 'id' => "myForm", 'data-toggle' => "validator")); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="nama_perusahaan" class="control-label">Nama Supplier</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="nama_perusahaan" id="nama_perusahaan"
|
||||
data-error="Nama perusahaan harus diisi" placeholder="nama supplier"
|
||||
value="<?php echo $record['nama_perusahaan'] ?>" required />
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-cube"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="alamat" class="control-label">Alamat</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="alamat" id="alamat"
|
||||
data-error="Alamat harus diisi" placeholder="alamat"
|
||||
value="<?php echo $record['alamat'] ?>" required />
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-cube"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="no_tlp" class="control-label">No. Telp</label>
|
||||
<div class="input-group">
|
||||
<input type="number" class="form-control" name="no_tlp" id="no_tlp"
|
||||
data-error="No. Telp harus diisi" placeholder="no_tlp"
|
||||
value="<?php echo $record['no_tlp'] ?>" required />
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-cube"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="control-label">E-Mail</label>
|
||||
<div class="input-group">
|
||||
<input type="email" class="form-control" name="email" id="email"
|
||||
data-error="E-Mail harus diisi" placeholder="email"
|
||||
value="<?php echo $record['email'] ?>" required />
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-cube"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="box-footer">
|
||||
<input type="hidden" name="id" value="<?php echo $record['id_suplier'] ?>">
|
||||
<button type="submit" name="submit" class="btn btn-primary ">Simpan</button>
|
||||
<a href="<?php echo base_url() ?>suplier" class="btn btn-default ">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,72 @@
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>assets/app/css/style.css">
|
||||
<?php if ($this->session->flashdata('message')) { ?>
|
||||
<div class="col-lg-12 alerts">
|
||||
<div class="alert alert-dismissible alert-danger">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<h4> <i class="icon fa fa-ban"></i> Error</h4>
|
||||
<p><?php echo $this->session->flashdata('message'); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else { } ?>
|
||||
<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'>Tambah Data Suplier</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
<?php echo form_open_multipart('suplier/post', array('role' => "form", 'id' => "myForm", 'data-toggle' => "validator")); ?>
|
||||
<div class="form-group">
|
||||
<label for="nama_perusahaan" class="control-label">Nama Supplier</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="nama_perusahaan" id="nama_perusahaan" data-error="nama perusahaan harus diisi" placeholder="nama supplier" value="" required />
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-cube"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="alamat" class="control-label">Alamat</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="alamat" id="alamat" data-error="alamat harus diisi" placeholder="alamat" value="" required />
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-cube"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="no_tlp" class="control-label">No. Telp</label>
|
||||
<div class="input-group">
|
||||
<input type="number" class="form-control" name="no_tlp" id="no_tlp" data-error="no. tlp harus diisi" placeholder="no. tlp" value="" required />
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-cube"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="control-label">E-Mail</label>
|
||||
<div class="input-group">
|
||||
<input type="email" class="form-control" name="email" id="email" data-error="email harus diisi" placeholder="email" value="" required />
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-cube"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="box-footer">
|
||||
<button type="submit" name="submit" class="btn btn-primary ">Simpan</button>
|
||||
<a href="<?php echo base_url() ?>suplier" class="btn btn-default ">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,134 @@
|
||||
<style type="text/css">
|
||||
table,
|
||||
th,
|
||||
tr,
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.swal2-popup {
|
||||
font-family: inherit;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
</style>
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Data Supplier</h3>
|
||||
<div class="pull-right">
|
||||
<?php
|
||||
echo anchor('suplier/post', 'Tambah Data', array('class' => 'btn btn-success'));
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table id="myTable" class="table table-bordered table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No.</th>
|
||||
<th>Nama Supplier</th>
|
||||
<th>Alamat </th>
|
||||
<th>No. Telp</th>
|
||||
<th>E-Mail</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$no = 0;
|
||||
foreach ($record as $suplier) { ?>
|
||||
<tr>
|
||||
<td><?php echo ++$no; ?></td>
|
||||
<td><?php echo $suplier->nama_perusahaan ?></td>
|
||||
<td><?php echo $suplier->alamat ?></td>
|
||||
<td><?php echo $suplier->no_tlp ?></td>
|
||||
<td><?php echo $suplier->email ?></td>
|
||||
<td>
|
||||
<?php
|
||||
echo anchor(site_url('suplier/edit/' . $suplier->id_suplier), '<i class="fa fa-pencil-square-o fa-lg"></i> Edit', array('title' => 'edit', 'class' => 'btn btn-sm btn-warning'));
|
||||
echo ' ';
|
||||
echo anchor(site_url('suplier/hapus/' . $suplier->id_suplier), '<i class="fa fa-trash fa-lg"></i> Hapus', 'title="delete" class="btn btn-sm btn-danger "');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script src="<?php echo base_url() ?>assets/app/js/alert.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#myTable').DataTable({
|
||||
|
||||
"dom": '<"top row"<"col-md-4" l ><"col-md-4" B ><"col-md-4" and f>>rt<"bottom row"<"col-md-6" i> <"col-md-6" p>>',
|
||||
|
||||
buttons: [{
|
||||
extend: 'csvHtml5',
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4, ],
|
||||
},
|
||||
},
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
title: 'DATA SUPPLIER',
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4],
|
||||
},
|
||||
},
|
||||
{
|
||||
extend: 'copyHtml5',
|
||||
title: 'DATA SUPPLIER',
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4],
|
||||
},
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
oriented: 'portrait',
|
||||
pageSize: 'legal',
|
||||
title: 'DATA SUPPLIER',
|
||||
download: 'open',
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4],
|
||||
},
|
||||
customize: function (doc) {
|
||||
doc.content[1].table.widths = Array(doc.content[1].table.body[0].length +
|
||||
1).join('*').split('');
|
||||
doc.styles.tableBodyEven.alignment = 'center';
|
||||
doc.styles.tableBodyOdd.alignment = 'center';
|
||||
},
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
oriented: 'portrait',
|
||||
pageSize: 'A4',
|
||||
title: 'DATA SUPPLIER',
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4],
|
||||
},
|
||||
},
|
||||
],
|
||||
"fnDrawCallback": function () {
|
||||
$('.image-link').magnificPopup({
|
||||
type: 'image',
|
||||
closeOnContentClick: true,
|
||||
closeBtnInside: false,
|
||||
fixedContentPos: true,
|
||||
image: {
|
||||
verticalFit: true
|
||||
},
|
||||
zoom: {
|
||||
enabled: true,
|
||||
duration: 300 // don't foget to change the duration also in CSS
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,73 @@
|
||||
<style>
|
||||
.image {
|
||||
cursor: crosshair;
|
||||
}
|
||||
</style>
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
</div>
|
||||
<div class="modal-body modal-spa">
|
||||
<div class="col-md-12 span-2">
|
||||
<div class="image-container">
|
||||
<div class="image detail-view" style="background-image: url(<?php echo base_url('uploads/operator/') . $detail->foto; ?>);" class="img-responsive" alt=""></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"> </div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
// Get all images with the `detail-view` class
|
||||
var zoomBoxes = document.querySelectorAll('.detail-view');
|
||||
|
||||
// Extract the URL
|
||||
zoomBoxes.forEach(function(image) {
|
||||
var imageCss = window.getComputedStyle(image, false),
|
||||
imageUrl = imageCss.backgroundImage
|
||||
.slice(4, -1).replace(/['"]/g, '');
|
||||
|
||||
// Get the original source image
|
||||
var imageSrc = new Image();
|
||||
imageSrc.onload = function() {
|
||||
var imageWidth = imageSrc.naturalWidth,
|
||||
imageHeight = imageSrc.naturalHeight,
|
||||
ratio = imageHeight / imageWidth;
|
||||
|
||||
// Adjust the box to fit the image and to adapt responsively
|
||||
var percentage = ratio * 100 + '%';
|
||||
image.style.paddingBottom = percentage;
|
||||
|
||||
// Zoom and scan on mousemove
|
||||
image.onmousemove = function(e) {
|
||||
// Get the width of the thumbnail
|
||||
var boxWidth = image.clientWidth,
|
||||
// Get the cursor position, minus element offset
|
||||
x = e.pageX - this.offsetLeft,
|
||||
y = e.pageY - this.offsetTop,
|
||||
// Convert coordinates to % of elem. width & height
|
||||
xPercent = x / (boxWidth / 100) + '%',
|
||||
yPercent = y / (boxWidth * ratio / 100) + '%';
|
||||
|
||||
// Update styles w/actual size
|
||||
Object.assign(image.style, {
|
||||
backgroundPosition: xPercent + ' ' + yPercent,
|
||||
backgroundSize: imageWidth + 'px'
|
||||
});
|
||||
};
|
||||
|
||||
// Reset when mouse leaves
|
||||
image.onmouseleave = function(e) {
|
||||
Object.assign(image.style, {
|
||||
backgroundPosition: 'center',
|
||||
backgroundSize: 'cover'
|
||||
});
|
||||
};
|
||||
}
|
||||
imageSrc.src = imageUrl;
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
Reference in New Issue
Block a user