Commit 56e6d6c6 authored by Muhamad's avatar Muhamad

user_layout,dll

parent d943372a
......@@ -2276,7 +2276,6 @@ def createbang(request):
tb = tibang
except:
tb = 0
print(tb)
try:
if ltbang == "" and tibang != "":
......@@ -2288,21 +2287,24 @@ def createbang(request):
ltb = ltbang
except:
ltb = 0
print(ltb)
if kilimep == "":
pemilik = "unnamed"
else:
pemilik = kilimep
print(pemilik)
# try:
with conn.cursor() as kel:
kel.execute("SELECT desa, kecamatan, kab_kota, provinsi FROM geo_data_kelurahan WHERE st_intersects(geom, 'SRID=4326;POINT(%s)'::geometry)"% latlng)
adm = kel.fetchall()
administrasi = adm[0]
print(adm)
if adm == []:
administrasi = ["", "", "", ""]
else:
administrasi = adm[0]
with conn.cursor() as buldings:
buldings.execute("""INSERT INTO geo_bangunan(geom, name, information, sumber, alamat, address_1, address_2, address_3, provinsi, no, luas_bangunan, luas_tanah, tinggi_bangunan, lantai, gambar, pemilik, point_id, point_name, type_id, remark, db_tipe) VALUES (ST_GeomFromEWKT('SRID=0;MULTIPOLYGON(((%s)))'), '%s', '%s', 'new', '%s', '%s', '%s', '%s', '%s', '0', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '1', '%s', '%s')"""% (p_create, name, info, alamat, administrasi[0], administrasi[1], administrasi[2], administrasi[3], lb, lt, tb, ltb, namafile, pemilik, pointopeto, napoi, rem, tdb))
......
......@@ -126,7 +126,26 @@ class Usermanagement(generic.TemplateView):
ag.id = aug.group_id AND
ag.id IN("""+ars+")"
else:
print('not staff')
sql = """
SELECT
au.id,
au.username,
au.first_name,
au.last_name,
au.is_active,
au.last_login,
au.email,
ag.name,
au.is_staff,
au.is_superuser
FROM
auth_user au,
auth_user_groups aug,
auth_group ag
WHERE
au.id = aug.user_id AND
ag.id = aug.group_id AND
ag.id IN("""+ars+")"
userlist_.execute(sql)
allUser = userlist_.fetchall()
......@@ -279,7 +298,7 @@ def addUser(request):
}
# data = {'sukses':'sukses'}
return Response(data)
return Response(data)
@api_view(('POST',))
def listGroup(request):
......
var map = L.map('map', { editable: true, zoomControl: false, drawControl: true }).setView([-4.125826277307029, 104.1881561279297], 10);
var map = L.map('map', { editable: true, zoomControl: false, drawControl: true }).setView([-4.117012285203445, 104.0673065185547], 10);
var pool = [];
......@@ -594,7 +594,7 @@ jQuery(document).ajaxSend(function(event, xhr, settings) {
// <input type="text" class="form-control" name="info_create" id="info_create" value=""><br>
// <div class="row">
// <div class="col-md-2">
// </div>
// <div class="col-md-7">
// </div>
......
......@@ -240,6 +240,7 @@
content = `
<a href="#" data-target="#modal_detail_kel" id="btn_detail_kelurahan" data-toggle="modal" data-target="#modal-edit-tuplah" data-backdrop="static" data-keyboard="false" style="right: 10px;position: absolute;margin-top: 375px;">Detail</a>
<table class="table tasks-list">
<thead style="text-align: center;">
<tr>
......@@ -680,6 +681,10 @@
}
});
};
$(document).on("click", "#btn_detail_kelurahan", function() {
});
$(document).on("click", "#btn_edit_kelurahan", function() {
......
......@@ -709,6 +709,141 @@
</div>
</div>
</div>
<div id="modal_detail_kel" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h6 class="modal-title">Informasi Umum</h6>
</div>
<div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<div class="tab-pane has-padding" id="panel-tab2">
<div class="tab-pane" id="bottom-justified-data">
<div class="tabbable">
<ul class="nav nav-tabs nav-tabs-bottom nav-justified">
<li onclick="changetabs(this)" class="active"><a href="#left-tab1-feas-upl" data-toggle="tab">Koordinat</a></li>
<li onclick="changetabs(this)"><a href="#right-tab2-feas-upl" data-toggle="tab">Informasi Umum</a></li>
</ul>
<div class="tab-content">
<div class="row">
<div class="col-md-5">
</div>
<div class="col-md-7">
<div class="tab-pane active" id="left-tab1-feas-upl">
<input type="text" class="hidden" id="poly_create_input_bang">
<input type="text" class="hidden" id="id_bang_perbaikan">
<input type="text" class="hidden" id="type_id_bang">
<div id="map-insert-renov-bang" style="height: 375px;width: 100%">
</div>
</div>
<div class="tab-pane" id="right-tab2-feas-upl">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>Nama :</label>
<input type="text" id="nama_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Type :</label>
<input type="text" id="type_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Kelurahan :</label>
<input type="text" id="kelurahan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Kecamatan :</label>
<input type="text" id="kecamatan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Tanggal Disetujui :</label>
<input type="date" id="tgldisetujui_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Tanggal Mulai Perbaikan :</label>
<input type="date" id="tglmulaiperbaikan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Tanggal Selesai Perbaikan :</label>
<input type="date" id="tglselesaiperbaikan_bang" class="form-control" value="">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Anggaran :</label>
<input type="text" id="anggaran_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Pihak yang Mengesahkan :</label>
<input type="text" id="pihakpengesahan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Penanggung Jawab Lapangan :</label>
<input type="text" id="pjlapangan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Kontraktor :</label>
<input type="text" id="kontraktor_bang" class="form-control" value="">
</div>
<!-- <div class="form-group">
<label>Panjang Jalan Keseluruhan :</label>
<input type="text" id="panjangjalanall" class="form-control" value="">
</div>
<div class="form-group">
<label>Panjang Jalan Perbaikan :</label>
<input type="text" id="panjangjalanperbaikan" class="form-control" value="">
</div>
<div class="form-group">
<label>Lebar Jalan Perbaikan :</label>
<input type="text" id="lebarjalanperbaikan" class="form-control" value="">
</div> -->
<div class="form-group">
<label>Jenis Perbaikan :</label>
<input type="text" id="jenisperbaikan_bang" class="form-control" value="">
</div>
<div class="form-group">
<label>Proposal (.pdf):</label>
<input type="file" id="proposal_bang">
</div>
<div class="form-group">
<label>Bukti Selesai Perbaikan (.png/.jpg/.jpeg/):</label>
<input type="file" id="buktiselesai_bang">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal">Close</button>
<button type="button" id="btnsavevalidasi" class="btn btn-info">Save changes</button>
</div>
</div>
</div>
</div>
<!--
<script>
$("#tipe_point").change(function() {
......
......@@ -33,6 +33,8 @@
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="{% url 'usermanagement' %}?page=userprofile"><i class="icon-user-tie"></i>User Profile</a></li>
{% if user.is_superuser or user.is_staff %}
<li><a href="{% url 'usermanagement' %}"><i class="icon-user"></i>User Management</a></li>
<li><a href="{% url 'apps:perbaikan' %}"><i class="icon-list"></i>Repair & Renovation</a></li>
......
This diff is collapsed.
......@@ -74,7 +74,8 @@
.leaflet-control-container {
display: none;
}
.modal-backdrop{
.modal-backdrop {
display: none;
}
</style>
......@@ -225,7 +226,7 @@
</div>
<div class="panel-body form-horizontal form-validate-jquery">
<div class="row">
<div class="row" style="margin-bottom: 20px;">
<div class="col-lg-7">
<div>
<div id="map" class="map-container" style="padding-top: -100px; max-width:600px; max-height:385px;margin-bottom: 15px;"></div>
......@@ -319,8 +320,15 @@
</div>
<div class="panel-body form-horizontal form-validate-jquery">
<div class="row">
<div class="row" style="margin-bottom: 20px;">
<div class="col-md-4" style="max-width: 335px;">
<div class="form-group text-center">
<h5 style="margin-top: 0px;margin-bottom: 10px;">
<b>
Informasi Umum
</b>
</h5>
</div>
<fieldset>
<div class="form-group">
<label class="col-lg-3 control-label">Jumlah Penduduk:</label>
......@@ -380,6 +388,13 @@
</div>
<div class="col-md-4" style="max-width: 400px;">
<div class="form-group text-center">
<h5 style="margin-top: 0px;margin-bottom: 10px;">
<b>
Agama
</b>
</h5>
</div>
<fieldset>
<div class="form-group">
......@@ -430,6 +445,13 @@
<div class="col-md-4" style="max-width: 400px;">
<div class="row">
<div class="form-group text-center">
<h5 style="margin-top: 0px;margin-bottom: 10px;">
<b>
Umur (Usia)
</b>
</h5>
</div>
<div class="col-md-6">
<fieldset>
<div class="form-group">
......@@ -586,7 +608,7 @@
</div>
<div class="panel-body form-horizontal form-validate-jquery">
<div class="row">
<div class="row" style="margin-bottom: 20px;">
<div class="col-md-6" style="max-width: 500px;">
<fieldset>
<div class="form-group">
......@@ -710,7 +732,7 @@
<div class="panel-body form-horizontal form-validate-jquery">
<div class="row">
<div class="row" style="margin-bottom: 20px;">
<div class="col-md-4" style="max-width: 400px;">
<fieldset>
<div class="form-group">
......@@ -985,7 +1007,7 @@
<div class="panel-body form-horizontal form-validate-jquery">
<div class="row">
<div class="row" style="margin-bottom: 20px;">
<div class="col-md-6" style="margin-left: 30px;max-width: 500px;">
<fieldset>
<div class="form-group">
......@@ -1040,9 +1062,9 @@
<div id="modal_theme_DEL" class="modal fade">
<div class="modal-dialog">
<div class="modal-content" style="width: 400px;margin-left: 100px;">
<div class="modal-header bg-info">
<div class="modal-header bg-info" style="background-color: #37474F;border-color: #37474F;">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h6 class="modal-title">Info header</h6>
<h6 class="modal-title">Informasi Umum</h6>
</div>
<div class="modal-body" style="max-height: 450px;overflow-y: auto;">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment