Commit e68cf74c authored by Manggar Mahardhika's avatar Manggar Mahardhika

Merge branch 'master' of http://git.khansia.co.id/Nahrowi/oku-gis

Conflicts:
templates/includes/js-o.html
parents 0ee76cde d288374b
...@@ -80,6 +80,7 @@ urlpatterns = [ ...@@ -80,6 +80,7 @@ urlpatterns = [
path('search_lanjut', views.search_lanjut, name='search_lanjut'), path('search_lanjut', views.search_lanjut, name='search_lanjut'),
path('load_point_id', views.load_point_id), path('load_point_id', views.load_point_id),
path('edit_detail_poin', views.edit_detail_poin), path('edit_detail_poin', views.edit_detail_poin),
path('dpoint', views.dpoint, name='dpoint'),
path('download_perbaikan_data', views.download_perbaikan_data) path('download_perbaikan_data', views.download_perbaikan_data)
] ]
\ No newline at end of file
...@@ -2934,35 +2934,57 @@ def createpoint(request): ...@@ -2934,35 +2934,57 @@ def createpoint(request):
def filt_perbaikan_kecamatan(request): def filt_perbaikan_kecamatan(request):
id_kec = request.GET.get('id_kec') id_kec = request.GET.get('id_kec')
with conn.cursor() as kel: if id_kec == 'all_kecamatan':
kel.execute("""SELECT ID, res_kel = 'all_kecamatan'
desa
FROM with conn.cursor() as data_per:
geo_data_kelurahan gd data_per.execute("""
WHERE SELECT
kecamatan = ( SELECT kecamatan FROM geo_data_kecamatan WHERE ID = %s ) gl.NAME,
"""% int(id_kec)) tp.id_object,
res_kel = kel.fetchall() tp.NAME,
tp.TYPE,
with conn.cursor() as data_per: tp.tgl_perbaikan,
data_per.execute(""" tp.anggaran,
SELECT tp.tgl_selesai
gl.NAME, FROM
tp.id_object, ( SELECT tbl_perbaikan.*, ROW_NUMBER ( ) OVER ( PARTITION BY id_object ORDER BY tgl_selesai DESC ) AS rn FROM tbl_perbaikan ) tp
tp.NAME, JOIN geo_label gl ON gl.ID = tp.type_id
tp.TYPE, JOIN geo_data_kecamatan gdk on st_intersects(st_setsrid(gdk.geom, 4326), st_setsrid(tp.geom, 4326))
tp.tgl_perbaikan, WHERE
tp.anggaran, rn = 1
tp.tgl_selesai """)
FROM res_perbaikan = data_per.fetchall()
( SELECT tbl_perbaikan.*, ROW_NUMBER ( ) OVER ( PARTITION BY id_object ORDER BY tgl_selesai DESC ) AS rn FROM tbl_perbaikan ) tp else:
JOIN geo_label gl ON gl.ID = tp.type_id with conn.cursor() as kel:
JOIN geo_data_kecamatan gdk on st_intersects(st_setsrid(gdk.geom, 4326), st_setsrid(tp.geom, 4326)) kel.execute("""SELECT ID,
WHERE desa
rn = 1 and gdk.ID = %s FROM
LIMIT 10 geo_data_kelurahan gd
"""% int(id_kec)) WHERE
res_perbaikan = data_per.fetchall() kecamatan = ( SELECT kecamatan FROM geo_data_kecamatan WHERE ID = %s )
"""% int(id_kec))
res_kel = kel.fetchall()
with conn.cursor() as data_per:
data_per.execute("""
SELECT
gl.NAME,
tp.id_object,
tp.NAME,
tp.TYPE,
tp.tgl_perbaikan,
tp.anggaran,
tp.tgl_selesai
FROM
( SELECT tbl_perbaikan.*, ROW_NUMBER ( ) OVER ( PARTITION BY id_object ORDER BY tgl_selesai DESC ) AS rn FROM tbl_perbaikan ) tp
JOIN geo_label gl ON gl.ID = tp.type_id
JOIN geo_data_kecamatan gdk on st_intersects(st_setsrid(gdk.geom, 4326), st_setsrid(tp.geom, 4326))
WHERE
rn = 1 and gdk.ID = %s
"""% int(id_kec))
res_perbaikan = data_per.fetchall()
res_all = [] res_all = []
for j in res_perbaikan: for j in res_perbaikan:
...@@ -3040,7 +3062,8 @@ def user_data(request): ...@@ -3040,7 +3062,8 @@ def user_data(request):
ag.name, ag.name,
au.is_staff, au.is_staff,
au.is_superuser, au.is_superuser,
au.file_path au.file_path,
au.phone
FROM FROM
auth_user au, auth_user au,
auth_user_groups aug, auth_user_groups aug,
...@@ -3064,7 +3087,8 @@ def user_data(request): ...@@ -3064,7 +3087,8 @@ def user_data(request):
ag.name, ag.name,
au.is_staff, au.is_staff,
au.is_superuser, au.is_superuser,
au.file_path au.file_path,
au.phone
FROM FROM
auth_user au, auth_user au,
auth_user_groups aug, auth_user_groups aug,
...@@ -3081,6 +3105,13 @@ def user_data(request): ...@@ -3081,6 +3105,13 @@ def user_data(request):
user_res = [] user_res = []
for rows in allUser: for rows in allUser:
if rows[8] == True and rows[9] == True:
jabatan = 'Super user'
elif rows[8] == True and rows[9] == False:
jabatan = 'Staff'
elif rows[8] == False and rows[9] == False:
jabatan = 'User'
datas = { datas = {
"id": rows[0], "id": rows[0],
"username": rows[1], "username": rows[1],
...@@ -3089,7 +3120,9 @@ def user_data(request): ...@@ -3089,7 +3120,9 @@ def user_data(request):
"isactive": rows[4], "isactive": rows[4],
"last": rows[5], "last": rows[5],
"group": rows[7], "group": rows[7],
"filepath": rows[10] "filepath": rows[10],
"phone": rows[11],
"jabatan": jabatan
} }
user_res.append(datas) user_res.append(datas)
...@@ -3633,4 +3666,27 @@ def download_perbaikan_data(request): ...@@ -3633,4 +3666,27 @@ def download_perbaikan_data(request):
respon = { respon = {
'data' : per_res, 'data' : per_res,
} }
return Response(respon)
@api_view(('POST',))
def dpoint(request):
id = request.POST.get('id')
db = request.POST.get('db')
try:
with conn.cursor() as editka:
editka.execute("""update %s set is_deleted = 1 where id = %s"""%(db, id))
conn.commit()
data = {'status':'Success'}
data = 'SUCCESS'
info = 'data telah diperbaharui, akan terupdate setelah reload'
status = 0
except:
data = 'Sorry'
info = 'Gagal diperbaharui, hubungi developer'
status = 1
respon={'data':data, 'info': info, 'status':status}
return Response(respon) return Response(respon)
\ No newline at end of file
...@@ -49,7 +49,7 @@ class HomeView(View): ...@@ -49,7 +49,7 @@ class HomeView(View):
class CustomLogoutView(LogoutView): class CustomLogoutView(LogoutView):
template_name = 'user/login.html' template_name = 'user/login.html'
next_page = 'login' next_page = '/'
class Userprofile(generic.TemplateView): class Userprofile(generic.TemplateView):
template_name = 'user/user_profile.html' template_name = 'user/user_profile.html'
...@@ -364,7 +364,7 @@ def deactivateUser(request): ...@@ -364,7 +364,7 @@ def deactivateUser(request):
# # print(type(status)+status) # # print(type(status)+status)
# # print(type(True)) # # print(type(True))
# print(status == 'True') # print(status == 'True')
if status == 'True': if status == 'true':
sql = "f" sql = "f"
else: else:
sql = "t" sql = "t"
......
...@@ -816,6 +816,22 @@ input#change_stat { ...@@ -816,6 +816,22 @@ input#change_stat {
border-top: 20px solid white; border-top: 20px solid white;
} }
#create,
#create-jal {
border: transparent;
border-radius: 5px;
margin: 10px;
}
#map-create-all>div.leaflet-control-container>div.leaflet-top.leaflet-left>div:nth-child(1)>div>div>a.leaflet-draw-draw-marker {
width: 100%!important;
padding: 0px!important;
}
#informasi_create>div {
margin: 10px;
}
@media (max-width: 1025px) { @media (max-width: 1025px) {
.dock { .dock {
position: absolute; position: absolute;
......
#map-jalan>div.leaflet-control-container>div.leaflet-top.leaflet-left>div>div {
display: none;
}
#tbody_user_list>tr>td.text-center>div>div.col-md-6.text-right>a>i {
font-size: 16px!important;
top: -3px;
}
.switch_custom {
position: relative;
display: inline-block;
width: 36px;
height: 20px;
}
.switch_custom input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgb(59, 62, 71);
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 18px;
width: 18px;
left: 1px;
bottom: 1px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:checked+.slider {
background-color: #2196F3;
}
input:focus+.slider {
box-shadow: 0 0 1px #2196F3;
}
input:checked+.slider:before {
-webkit-transform: translateX(16px);
-ms-transform: translateX(16px);
transform: translateX(16px);
}
/* Rounded sliders */
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
#user_profile>.table-sm>thead>tr>th,
.table-sm>tbody>tr>th,
.table-sm>tfoot>tr>th,
.table-sm>thead>tr>td,
.table-sm>tbody>tr>td,
.table-sm>tfoot>tr>td {
padding: 13px 20px;
}
\ No newline at end of file
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 23L4 25V7L12 5" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M9.75 18.6875L3.25 20.3125V5.6875L9.75 4.0625" stroke="#E86250" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M20 27L12 23V5L20 9V27Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M16.25 21.9375L9.75 18.6875V4.0625L16.25 7.3125V21.9375Z" stroke="#E86250" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M20 9L28 7V25L20 27" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M16.25 7.3125L22.75 5.6875V20.3125L16.25 21.9375" stroke="#E86250" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg> </svg>
<svg width="24" height="19" viewBox="0 0 24 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.07985 17.7188L20.6739 17.7188C21.6456 17.7188 22.4333 16.931 22.4333 15.9593V3.64348C22.4333 2.67179 21.6456 1.88407 20.6739 1.88407L3.07985 1.88407C2.10816 1.88407 1.32045 2.67179 1.32045 3.64348V15.9593C1.32045 16.931 2.10816 17.7188 3.07985 17.7188Z" stroke="#212232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
...@@ -168,8 +168,8 @@ function load_manage() { ...@@ -168,8 +168,8 @@ function load_manage() {
var last = data['data'][i]['last']; var last = data['data'][i]['last'];
var isactive = data['data'][i]['isactive']; var isactive = data['data'][i]['isactive'];
var no_telp = +6281234567890 var no_telp = data['data'][i]['phone'];
var jabatan = 'Support' var jabatan = data['data'][i]['jabatan'];
if (isactive == true) { if (isactive == true) {
var isac = 'checked' var isac = 'checked'
...@@ -186,13 +186,14 @@ function load_manage() { ...@@ -186,13 +186,14 @@ function load_manage() {
<td>` + last + `</td> <td>` + last + `</td>
<td class="text-center" style='padding:0px;'> <td class="text-center" style='padding:0px;'>
<div class='row'> <div class='row'>
<div class='col-md-6 text-right' style='margin-top:5px'> <div class='col-md-6 text-right' style='margin-top:8px'>
<a onclick="loaduserbyid('` + id + `')"><i class=" icon-pencil7"></i>Edit</a> <a onclick="loaduserbyid('` + id + `')"><i class=" icon-pencil7"></i>Edit</a>
</div> </div>
<div class='col-md-6 text-left'> <div class='col-md-6 text-left'>
<div class="checkbox checkbox-switchery"> <div class="checkbox switch_custom">
<label> <label>
<input type="checkbox" class="switchery-custom-x" id="checkbox` + id + `" onclick="switchuserstatus('` + id + `, ` + isactive + `','` + id + `')" ` + isac + ` > <input type="checkbox" class="slider round" id="checkbox` + id + `" onclick="switchuserstatus('` + id + `, ` + isactive + `','` + id + `')" ` + isac + ` >
<span class="slider round"></span>
</label> </label>
</div> </div>
</div> </div>
...@@ -481,7 +482,7 @@ function download_point_list(type, fn, dl) { ...@@ -481,7 +482,7 @@ function download_point_list(type, fn, dl) {
function loadGroups(isSelect) { function loadGroups(isSelect) {
var isObject = {} var isObject = {}
console.log(isSelect)
isObject.func_name = "loadGroups"; isObject.func_name = "loadGroups";
$.ajax({ $.ajax({
...@@ -492,7 +493,7 @@ function loadGroups(isSelect) { ...@@ -492,7 +493,7 @@ function loadGroups(isSelect) {
success: function(data) { success: function(data) {
let response = data; let response = data;
console.log(response)
if (response.code == 0) { if (response.code == 0) {
var groups = response.data; var groups = response.data;
var html = `<option value="null" selected disabled>-- Pilih Group --</option>`; var html = `<option value="null" selected disabled>-- Pilih Group --</option>`;
...@@ -502,7 +503,7 @@ function loadGroups(isSelect) { ...@@ -502,7 +503,7 @@ function loadGroups(isSelect) {
for (j in isSelect) { for (j in isSelect) {
if (isSelect[j] == groups[i]) { if (isSelect[j] == groups[i]) {
html += `<option value="` + groups[i] + `" selected>` + groups[i] + `</option>`; html += `<option value="` + groups[i] + `" selected>` + groups[i] + `</option>`;
console.log(groups[i])
} else { } else {
html += `<option value="` + groups[i] + `">` + groups[i] + `</option>`; html += `<option value="` + groups[i] + `">` + groups[i] + `</option>`;
} }
...@@ -521,7 +522,7 @@ function loadGroups(isSelect) { ...@@ -521,7 +522,7 @@ function loadGroups(isSelect) {
$("#select_group").html(html); $("#select_group").html(html);
$("#select_group_parent").html(html); $("#select_group_parent").html(html);
console.log(html)
} else { } else {
$("#select_group").html("group tidak tersedia"); $("#select_group").html("group tidak tersedia");
$("#select_group_parent").html("group tidak tersedia"); $("#select_group_parent").html("group tidak tersedia");
...@@ -531,8 +532,15 @@ function loadGroups(isSelect) { ...@@ -531,8 +532,15 @@ function loadGroups(isSelect) {
}); });
} }
function swal_switch(isConfirm) { function swal_switch(isConfirm, c, isObject) {
var checkbox = document.getElementById("checkbox" + c);
if (isConfirm == true) { if (isConfirm == true) {
if (checkbox.checked == true) {
checkbox.checked = true
} else {
checkbox.checked = false
}
$.ajax({ $.ajax({
url: "/switchStatus/", url: "/switchStatus/",
...@@ -543,7 +551,7 @@ function swal_switch(isConfirm) { ...@@ -543,7 +551,7 @@ function swal_switch(isConfirm) {
let response = data; let response = data;
if (isObject.stat == "True") { if (isObject.stat == "true") {
var inf = "dinonaktifkan" var inf = "dinonaktifkan"
} else { } else {
var inf = "diaktifkan" var inf = "diaktifkan"
...@@ -570,6 +578,11 @@ function swal_switch(isConfirm) { ...@@ -570,6 +578,11 @@ function swal_switch(isConfirm) {
} }
}); });
} else { } else {
if (checkbox.checked == true) {
checkbox.checked = false
} else {
checkbox.checked = true
}
swal("Dibatalkan", "User status tidak berubah", "error"); swal("Dibatalkan", "User status tidak berubah", "error");
} }
} }
...@@ -578,13 +591,13 @@ function swal_switch(isConfirm) { ...@@ -578,13 +591,13 @@ function swal_switch(isConfirm) {
function switchuserstatus(id, c) { function switchuserstatus(id, c) {
var isObject = {} var isObject = {}
var params = id.split(","); var params = id.split(",");
var checkbox = document.getElementById("checkbox" + c);
console.log(checkbox);
isObject.id = params[0]; isObject.id = params[0];
isObject.stat = params[1].replace(" ", ""); isObject.stat = params[1].replace(" ", "");
if (isObject.stat == "True") {
if (isObject.stat == "true") {
var title = "Nonaktifkan"; var title = "Nonaktifkan";
var text = "User tidak akan bisa login jika dinonaktifkan!"; var text = "User tidak akan bisa login jika dinonaktifkan!";
} else { } else {
...@@ -592,7 +605,6 @@ function switchuserstatus(id, c) { ...@@ -592,7 +605,6 @@ function switchuserstatus(id, c) {
var text = "User dapat kembali login jika diaktifkan!"; var text = "User dapat kembali login jika diaktifkan!";
} }
swal({ swal({
title: title + " user?", title: title + " user?",
text: text, text: text,
...@@ -604,26 +616,7 @@ function switchuserstatus(id, c) { ...@@ -604,26 +616,7 @@ function switchuserstatus(id, c) {
closeOnConfirm: false, closeOnConfirm: false,
closeOnCancel: false closeOnCancel: false
}, function(isConfirm) { }, function(isConfirm) {
swal_switch(isConfirm) swal_switch(isConfirm, c, isObject)
// if (cb == 'b') {
// alert('b')
//check it
// if (cb == true) {
// checkbox.checked = false;
// } else {
// checkbox.checked = true
// }
// } else {
// alert('a')
// if (cb == true) {
// checkbox.checked = true;
// } else {
// checkbox.checked = false;
// }
// }
}); });
} }
...@@ -649,7 +642,7 @@ function loaduserbyid(id) { ...@@ -649,7 +642,7 @@ function loaduserbyid(id) {
if (response.code == 0) { if (response.code == 0) {
var user = response.data; var user = response.data;
console.log(user)
$("#inUsername").val(user.username); $("#inUsername").val(user.username);
$("#inNameF").val(user.firstname); $("#inNameF").val(user.firstname);
$("#inNameL").val(user.lastname); $("#inNameL").val(user.lastname);
......
...@@ -24,14 +24,18 @@ $("#sidebar").hide() ...@@ -24,14 +24,18 @@ $("#sidebar").hide()
maps = L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', { id: 'mapbox/light-v9', tileSize: 512, zoomOffset: -1 }).addTo(map); maps = L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', { id: 'mapbox/light-v9', tileSize: 512, zoomOffset: -1 }).addTo(map);
OpenStreetMap.onclick = function() { OpenStreetMap.onclick = function() {
maps = L.tileLayer("https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}&s=Gal&apistyle=s.t:0|s.e:l|p.v:off", { map.removeLayer(maps)
//maps = L.tileLayer("https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}&s=Gal&apistyle=s.t:0|s.e:l|p.v:off", {
maps = L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
maxZoom: 22, maxZoom: 22,
minZoom: 3, minZoom: 3,
}).addTo(map); }).addTo(map);
}; };
WorldImagery.onclick = function() { WorldImagery.onclick = function() {
// https://{s}.tiles.wmflabs.org/osm-no-labels/{z}/{x}/{y}.png map.removeLayer(maps)
// https://{s}.tiles.wmflabs.org/osm-no-labels/{z}/{x}/{y}.png
maps = L.tileLayer("https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", { maps = L.tileLayer("https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", {
maxZoom: 22, maxZoom: 22,
minZoom: 3, minZoom: 3,
...@@ -39,6 +43,7 @@ WorldImagery.onclick = function() { ...@@ -39,6 +43,7 @@ WorldImagery.onclick = function() {
}; };
BingSatellite.onclick = function() { BingSatellite.onclick = function() {
map.removeLayer(maps)
maps = L.tileLayer.bing({ bingMapsKey: BING_KEY, maxNativeZoom: 22 }).addTo(map); maps = L.tileLayer.bing({ bingMapsKey: BING_KEY, maxNativeZoom: 22 }).addTo(map);
setTimeout(function() { setTimeout(function() {
$('.leaflet-bottom.leaflet-right>.leaflet-control-attribution.leaflet-control').html(`Powered by <a href="https://khansia.co.id" target="_blank">Khansia</a> with <a href="https://leafletjs.com" target="_blank">Leaflet</a>`) $('.leaflet-bottom.leaflet-right>.leaflet-control-attribution.leaflet-control').html(`Powered by <a href="https://khansia.co.id" target="_blank">Khansia</a> with <a href="https://leafletjs.com" target="_blank">Leaflet</a>`)
...@@ -48,6 +53,7 @@ BingSatellite.onclick = function() { ...@@ -48,6 +53,7 @@ BingSatellite.onclick = function() {
GoogleSatellite.onclick = function() { GoogleSatellite.onclick = function() {
map.removeLayer(maps)
maps = L.tileLayer('http://mt0.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}&s=Gal&apistyle=s.t:0|s.e:l|p.v:off', { maps = L.tileLayer('http://mt0.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}&s=Gal&apistyle=s.t:0|s.e:l|p.v:off', {
maxZoom: 22, maxZoom: 22,
minZoom: 4, minZoom: 4,
......
...@@ -67,7 +67,6 @@ ...@@ -67,7 +67,6 @@
.active { .active {
display: block; display: block;
} }
/* #button_hide { /* #button_hide {
line-height: 15px; line-height: 15px;
width: 40px; width: 40px;
...@@ -139,10 +138,134 @@ ...@@ -139,10 +138,134 @@
display: none!important; display: none!important;
} }
</style> </style>
{% if user.is_authenticated %}
<style>
#btn_perbaikan_jalan {
display: block;
}
.btn_action {
display: block;
}
#btn_edit_bangunan {
display: block;
}
#btn_delete_bangunan {
display: block;
}
#btn_edit_kelurahan {
display: block;
top: 5px;
}
#btn_edit_kelurahan :hover {
border-color: #DADCE0;
background-color: #F1F3F4;
}
#btn_edit_tuplah {
display: block;
}
#btn_jalan {
display: block;
}
#btn_edit_gl {
display: block;
}
#btn_edit_lk {
display: block;
}
#btn_edit_puskes {
display: block;
}
#btn_edit_adm {
display: block;
}
#btn_delete_adm {
display: block;
}
#btn_edit_rs {
display: block;
}
#btn_edit_si {
display: block;
}
#btn_edit_sp {
display: block;
}
#btn_edit_spbu {
display: block;
}
#btn_edit_st {
display: block;
}
#btn_edit_tr {
display: block;
}
#btn_edit_cb {
display: block;
}
#btn_detail_per_bang {
display: block;
}
#btn_perbaikan_bangunan {
display: block;
}
#btn_upload_tampak {
display: block;
}
#map>div.leaflet-control-container>div.leaflet-bottom.leaflet-right {
right: 65px;
}
#map>div.leaflet-control-container>div.leaflet-bottom.leaflet-right>div.leaflet-control-attribution.leaflet-control {
right: 0px;
}
</style>
{% else %}
<style> <style>
.tombol_save_create {
display: none;
}
.tombol-edit {
display: none;
}
#btn_perbaikan_jalan {
display: none;
}
.btn_action {
display: none;
}
#btn_edit_bangunan { #btn_edit_bangunan {
display: none; display: none;
} }
#btn_delete_bangunan { #btn_delete_bangunan {
display: none; display: none;
} }
...@@ -151,8 +274,8 @@ ...@@ -151,8 +274,8 @@
display: none; display: none;
top: 5px; top: 5px;
} }
#btn_edit_kelurahan :hover{ #btn_edit_kelurahan :hover {
border-color: #DADCE0; border-color: #DADCE0;
background-color: #F1F3F4; background-color: #F1F3F4;
} }
...@@ -184,6 +307,7 @@ ...@@ -184,6 +307,7 @@
#btn_edit_adm { #btn_edit_adm {
display: none; display: none;
} }
#btn_delete_adm { #btn_delete_adm {
display: none; display: none;
} }
...@@ -215,20 +339,22 @@ ...@@ -215,20 +339,22 @@
#btn_edit_cb { #btn_edit_cb {
display: none; display: none;
} }
#btn_detail_per_bang { #btn_detail_per_bang {
display: none; display: none;
} }
#btn_perbaikan_bangunan { #btn_perbaikan_bangunan {
display: none; display: none;
} }
#btn_upload_tampak { #btn_upload_tampak {
display: none; display: none;
} }
.leaflet-popup{ .leaflet-popup {
display: none; display: none;
} }
</style> </style>
\ No newline at end of file
{% endif %}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
...@@ -130,13 +130,13 @@ ...@@ -130,13 +130,13 @@
<div class="tabbable"> <div class="tabbable">
<ul class="nav nav-tabs nav-tabs-bottom nav-justified"> <ul class="nav nav-tabs nav-tabs-bottom nav-justified">
<li onclick="changetabs(this)" class="active"><a href="#left-tab1-feas-upl-j" data-toggle="tab">Koordinat</a></li> <li onclick="changetabs(this)" id="koordinat_cek" class="active"><a href="#left-tab1-feas-upl-j" data-toggle="tab">Koordinat</a></li>
<li onclick="changetabs(this)"><a href="#right-tab2-feas-upl-j" data-toggle="tab">Informasi Umum</a></li> <li onclick="changetabs(this)" id="info_umum"><a href="#right-tab2-feas-upl-j" data-toggle="tab">Informasi Umum</a></li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="left-tab1-feas-upl-j"> <div class="tab-pane active" id="left-tab1-feas-upl-j">
<div id="map-jalan" style="width: 400px;height: 300px;position: relative;margin-left: 100px;"></div> <div id="map-jalan" style="height: 300px;position: relative;"></div>
<div class="form-group"> <div class="form-group">
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label> <label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
...@@ -663,7 +663,7 @@ ...@@ -663,7 +663,7 @@
<div class="col-md-4 text-center"> <div class="col-md-4 text-center">
<a href="#" class="btn btn_cek_KDBKLB"> <a href="#" class="btn btn_cek_KDBKLB">
<div> <div>
<img src="{% static 'img/icon-1/Vectorpoint.svg' %}" alt="" style="width: 35px; <img src="{% static 'img/icon-1/kelurahan.svg' %}" alt="" style="width: 35px;
height: 35px;"> height: 35px;">
</div> </div>
<div style="margin-top: 10px;"> <div style="margin-top: 10px;">
...@@ -689,8 +689,8 @@ ...@@ -689,8 +689,8 @@
<div class="modal-body" id="create_all"> <div class="modal-body" id="create_all">
<div class="tabbable" style="height:450px!important;width: 560px!important;"> <div class="tabbable" style="height:450px!important;width: 560px!important;">
<ul class="nav nav-tabs nav-tabs-bottom nav-justified"> <ul class="nav nav-tabs nav-tabs-bottom nav-justified">
<li onclick="changetabs(this)" class="active"><a href=".koordinatjalan" data-toggle="tab" class="tab_1">Koordinat</a></li> <li onclick="changetabs(this)" id="tab_koor" class="active"><a href=".koordinatjalan" data-toggle="tab" class="tab_1">Koordinat</a></li>
<li onclick="changetabs(this)"><a href="#informasi_create" data-toggle="tab" class="tab_2">Informasi Jalan</a></li> <li onclick="changetabs(this)" id="tab_info"><a href="#informasi_create" data-toggle="tab" id="informasi_poo" class="tab_2">Informasi Jalan</a></li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
...@@ -715,7 +715,7 @@ ...@@ -715,7 +715,7 @@
<div class="modal fade" id="user_profile" tabindex="-1" role="dialog" style="margin-left: 50px;padding-left:0px;"> <div class="modal fade" id="user_profile" tabindex="-1" role="dialog" style="margin-left: 50px;padding-left:0px;">
<div class="modal-dialog" style="width: 100%; <div class="modal-dialog" style="width: 100%;
margin: 0px; margin: 0px;
height: 100vh;"> height: 100vh;overflow-y: scroll;">
<div class="modal-content"> <div class="modal-content">
<div class="modal-body"> <div class="modal-body">
...@@ -879,10 +879,7 @@ ...@@ -879,10 +879,7 @@
</div> </div>
<div style="border-bottom: 1pt solid #E2E2E2;"> <div style="border-bottom: 1pt solid #E2E2E2;">
<div class="tab_personal_information" style="margin:0px;"> <div class="tab_personal_information" style="margin:0px;">
<div class="alert alert-danger" id="notificationsprop" style="display: none;margin: 0px; <div class="alert alert-danger" id="notificationsprop" style="display: none;margin: 0px;padding-top: 0px;padding-bottom: 0px;">
padding-top: 0px;
padding-bottom: 0px;">
</div> </div>
<form class="form-horizontal" id="formmen" method="post" enctype="multipart/form-data"> <form class="form-horizontal" id="formmen" method="post" enctype="multipart/form-data">
<div class="panel-body"> <div class="panel-body">
...@@ -1650,9 +1647,9 @@ ...@@ -1650,9 +1647,9 @@
<!-- Main charts --> <!-- Main charts -->
<div class="panel panel-flat" style="display: none;width: 1000px;"> <div class="panel panel-flat" style="display: none;width: 1000px;">
<div class="panel-header" style="height: 50px;background: #1E2233;border-top-left-radius: 10px;border-top-right-radius: 10px;"> <div class="panel-header" style="height: 50px;background: #1E2233;border-top-left-radius: 10px;border-top-right-radius: 10px;">
<!-- <button type="button" class="close" onclick="destroyWraper()" style=" width: 30px; <button type="button" class="close" onclick="destroyWraper()" style=" width: 30px;
color: white; color: white;
height: 30px;">&times;</button> --> height: 30px;">&times;</button>
<h5 class="modal-title title-create" style="color: white;margin-left: 25px;padding-top: 10px;">Input Perbaikan</h5> <h5 class="modal-title title-create" style="color: white;margin-left: 25px;padding-top: 10px;">Input Perbaikan</h5>
</div> </div>
<div class="panel-body" style="padding-top: 10px;"> <div class="panel-body" style="padding-top: 10px;">
...@@ -1987,14 +1984,14 @@ ...@@ -1987,14 +1984,14 @@
<div class="tabbable"> <div class="tabbable">
<ul class="nav nav-tabs nav-tabs-bottom nav-justified"> <ul class="nav nav-tabs nav-tabs-bottom nav-justified">
<li onclick="changetabs(this)" class="active"><a href="#left-tab1-feas-upli" data-toggle="tab">Koordinat</a></li> <li onclick="changetabs(this)" id="koordinat_cek" class="active"><a href="#left-tab1-feas-upli" data-toggle="tab">Koordinat</a></li>
<li onclick="changetabs(this)"><a href="#right-tab2-feas-upli" data-toggle="tab">Informasi Umum</a></li> <li onclick="changetabs(this)" id="info_umum"><a href="#right-tab2-feas-upli" data-toggle="tab">Informasi Umum</a></li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="left-tab1-feas-upli"> <div class="tab-pane active" id="left-tab1-feas-upli">
<div id="map-for-edit" style="width: 400px;height: 300px;position: relative;margin-left: 100px;"></div> <div id="map-for-edit" style="height: 300px;position: relative;margin:10px"></div>
<div class="form-group"> <div class="form-group">
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label> <label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px"> <div class="col-lg-9" style="margin-top:10px">
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
<div class="dropdown show-dropdown"> <div class="dropdown show-dropdown">
<a href="#" type="checkbox"> <a href="#" type="checkbox">
<input type="checkbox" name="checkbox" onclick="mapsganti()" id="mapschange" style="position: absolute;opacity: 0;width: 40px;height: 40px;margin-top: -5px;"> <input type="checkbox" name="checkbox" onclick="mapsganti()" id="mapschange" style="position: absolute;opacity: 0;width: 50px;height: 50px;margin-top: 0px;z-index:2;cursor: pointer;">
<div id="labelchange"> <div id="labelchange">
<img src="{% static 'img/icon-1/Vector3d.svg' %}" alt="" style="height: 50px; <img src="{% static 'img/icon-1/Vector3d.svg' %}" alt="" style="height: 50px;
width: 50px;"> width: 50px;">
</div> </div>
</a> </a>
</div> </div>
<span class="tooltiptext tooltip-left" style="font-family: 'gilroysemibold'; <span class="tooltiptext tooltip-left tooltip-3d" style="font-family: 'gilroysemibold';
color: #085E8C;">3D</span> color: #085E8C;">3D</span>
</li> </li>
...@@ -71,8 +71,11 @@ ...@@ -71,8 +71,11 @@
</ul> </ul>
</div> </div>
</li> </li>
<li class="fixed-plugin no3d" style="top: 170px;"> <li class="fixed-plugin no3d overlay-cek" style="top: 170px;">
<span class="tooltiptext tooltip-left" style="font-family: 'gilroysemibold';color: #6D3FDE;">Overlay</span> <span class="tooltiptext tooltip-left" style="font-family: 'gilroysemibold';color: #6D3FDE;">Overlay</span>
<div class="jumlah-ceklis">
</div>
<div class="dropdown show-dropdown "> <div class="dropdown show-dropdown ">
<a href="#" data-toggle="dropdown"> <a href="#" data-toggle="dropdown">
<img src="{% static 'img/icon-1/Vectoroverlay.svg' %}" alt="" style="height: 50px; <img src="{% static 'img/icon-1/Vectoroverlay.svg' %}" alt="" style="height: 50px;
...@@ -100,7 +103,7 @@ ...@@ -100,7 +103,7 @@
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" id="geo_building" style="margin-top:2px;"> <input type="checkbox" id="geo_building" onclick="georumah()" style="margin-top:2px;">
<img src="/static/img/icon-1/Buildingsbangunan.svg" alt="" style="margin-top: -5px;"> <img src="/static/img/icon-1/Buildingsbangunan.svg" alt="" style="margin-top: -5px;">
<span> <span>
Bangunan Bangunan
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</ul> </ul>
<ul class="navigation navigation-main navigation-accordion"> <ul class="navigation navigation-main navigation-accordion" style="height: 100px;">
<li> <li>
<a href="#" class="side-bar-but" data-toggle="modal" data-target="#modal_help" data-backdrop="static" data-keyboard="false"> <a href="#" class="side-bar-but" data-toggle="modal" data-target="#modal_help" data-backdrop="static" data-keyboard="false">
<img src="{% static 'img/icon-1/Vectoriconwarning.svg' %}" alt="" style="height: 17.875003814697266px;width: 17.875003814697266px;margin-left: -8px;"> <img src="{% static 'img/icon-1/Vectoriconwarning.svg' %}" alt="" style="height: 17.875003814697266px;width: 17.875003814697266px;margin-left: -8px;">
...@@ -413,7 +413,7 @@ ...@@ -413,7 +413,7 @@
<div class="form-group" style="margin-top: 15px;width: 98%;"> <div class="form-group" style="margin-top: 15px;width: 98%;">
<select name="select" id="sel-kec" class="form-control input-sm" style="background-color: #393E54;border-radius: 8px;border-color: #393E54;color: white;"> <select name="select" id="sel-kec" class="form-control input-sm" style="background-color: #393E54;border-radius: 8px;border-color: #393E54;color: white;">
<option>Pilih Kecamatan</option> <option value="all_kecamatan">Pilih Kecamatan</option>
{% for nama_kecamatan in kecamatan %} {% for nama_kecamatan in kecamatan %}
<option value="{{nama_kecamatan.administrasi.f1}}">{{nama_kecamatan.administrasi.f2}}</option> <option value="{{nama_kecamatan.administrasi.f1}}">{{nama_kecamatan.administrasi.f2}}</option>
{% endfor %} {% endfor %}
...@@ -686,18 +686,23 @@ ...@@ -686,18 +686,23 @@
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
if (data['res_kel'] == 'all_kecamatan') {
$('#sel-desa').html(`<option>Pilih Desa</option>`);
} else {
var data_all_desa = []
for (var i = 0; i < data['res_kel'].length; i++) {
var id_k = data['res_kel'][i][0];
var data_k = data['res_kel'][i][1];
var data_kel = `<option value="` + id_k + ` ">` +
data_k +
`</option>`;
data_all_desa.push(data_kel)
};
$('#sel-desa').html(`<option>Pilih Desa</option>` + data_all_desa);
}
var data_all_desa = []
for (var i = 0; i < data['res_kel'].length; i++) {
var id_k = data['res_kel'][i][0];
var data_k = data['res_kel'][i][1];
var data_kel = `<option value="` + id_k + ` ">` +
data_k +
`</option>`;
data_all_desa.push(data_kel)
};
$('#sel-desa').html(`<option>Pilih Desa</option>` + data_all_desa);
var data_perbaikan = [] var data_perbaikan = []
var number = 0; var number = 0;
......
...@@ -49,6 +49,10 @@ ...@@ -49,6 +49,10 @@
font-family: 'gilroyultralight'; font-family: 'gilroyultralight';
src: url('/static/css/Gilroy-UltraLight.woff') format('woff'); src: url('/static/css/Gilroy-UltraLight.woff') format('woff');
} }
.tab_kdb_klb {
display: none;
}
</style> </style>
{% include 'includes/css-o.html' %} {% include 'includes/css-m.html' %} {% include 'includes/css-o.html' %} {% include 'includes/css-m.html' %}
...@@ -90,7 +94,8 @@ ...@@ -90,7 +94,8 @@
<script type="text/javascript" src="{% static 'js/core/libraries/jquery.min.js' %}"></script> <script type="text/javascript" src="{% static 'js/core/libraries/jquery.min.js' %}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js"></script>
<link rel="stylesheet" href="{% static 'css/layout-style.css' %}"> {% endblock css %} <link rel="stylesheet" href="{% static 'css/layout-style.css' %}">
<link rel="stylesheet" href="{% static 'css/st.css' %}"> {% endblock css %}
<link href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" rel="Stylesheet"></link> <link href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" rel="Stylesheet"></link>
<!-- Theme JS files --> <!-- Theme JS files -->
...@@ -123,6 +128,7 @@ ...@@ -123,6 +128,7 @@
<div class="content-wrapper"> <div class="content-wrapper">
<div class="content"> <div class="content">
<div id="map"> <div id="map">
<div class="help_bangunan" style="position: absolute;z-index: 999;top: 0px;right: 60px;"></div>
<div class="col-md-4 col-md-offset-4 input-group content-group head"> <div class="col-md-4 col-md-offset-4 input-group content-group head">
<!-- <div class="input-group"> <!-- <div class="input-group">
...@@ -238,7 +244,7 @@ ...@@ -238,7 +244,7 @@
<div class="overlay"> <div class="overlay">
<div class="textover"> <div class="textover">
<i class="icon-camera" style="position: absolute;background-color: white;border-radius: 10px;top: 25%;right: 46%;width: 20px;height: 20px;" title="Ganti Foto Profil"></i> <i class="icon-camera" style="position: absolute;background-color: white;border-radius: 10px;top: 35%;right: 46%;width: 20px;height: 20px;" title="Ganti Foto Profil"></i>
</div> </div>
</div> </div>
...@@ -409,7 +415,7 @@ ...@@ -409,7 +415,7 @@
// return false; // return false;
// } // }
// } // }
// end disabled inspect // end disabled inspect
var dar = null; var dar = null;
...@@ -950,7 +956,7 @@ ...@@ -950,7 +956,7 @@
// <option value="cagar_budaya">Cagar Budaya dan Tempat Wisata</option> // <option value="cagar_budaya">Cagar Budaya dan Tempat Wisata</option>
// <option value="gardu_listrik">Gardu Listrik</option>` // <option value="gardu_listrik">Gardu Listrik</option>`
// } // }
content_edit = ` content_edit = `
<div class="modal-dialog" style="width: max-content;height: max-content;"> <div class="modal-dialog" style="width: max-content;height: max-content;">
...@@ -2631,4 +2637,10 @@ ...@@ -2631,4 +2637,10 @@
$(".switch").bootstrapSwitch(); $(".switch").bootstrapSwitch();
}); });
</script> --> </script> -->
\ No newline at end of file
{% if user.is_authenticated %} {% else %}
<script>
$(".tombol-edit").html('ilang')
</script>
{% endif %}
\ No newline at end of file
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