Commit 9c526a4a authored by Muhamad's avatar Muhamad

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

# Conflicts:
#	API/__pycache__/views.cpython-37.pyc
#	API/views.py
#	Application/__pycache__/views.cpython-37.pyc
#	Application/views.py
#	OKU/__pycache__/settings.cpython-37.pyc
#	myauth/__pycache__/views.cpython-37.pyc
#	templates/includes/js-o.html
#	templates/includes/modal.html
#	templates/includes/navbar.html
#	templates/includes/plugin.html
#	templates/layout/layout.html
#	templates/layout/user_layout.html
#	templates/maps/e.html
parents 95cddbb4 56e6d6c6
......@@ -15,8 +15,8 @@ from django.db import connection as conn
# Create your views here.
from rest_framework.renderers import JSONRenderer, TemplateHTMLRenderer
#from django.utils import six
import six
from django.utils import six
#import six
from django.core.exceptions import PermissionDenied
from django.contrib.auth.decorators import user_passes_test
from django.http import HttpResponse, HttpResponseNotFound
......@@ -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 = [];
......
......@@ -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,7 @@
}
});
};
$(document).on("click", "#btn_detail_kelurahan", function() {
$(document).on("click", "#btn_edit_kelurahan", function() {
......
......@@ -737,4 +737,4 @@
}
});
});
</script> -->
\ No newline at end of file
</script> -->
......@@ -42,6 +42,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>
......
......@@ -236,6 +236,7 @@
left: -408px;
max-width: 100%;
float: right;
/* left: -5px; */
position: absolute;
z-index: 1000;
......@@ -325,6 +326,20 @@
.move-btn {
transform: rotate(180deg)
}
/*.fixed-plugin {*/
/* position: absolute;*/
/* z-index: 1000;*/
/* right: 0px;*/
/* background-color: #40777c;*/
/* border-top-left-radius: 10px;*/
/* border-bottom-left-radius: 10px;*/
/* margin-top: 5px;*/
/* width: 48px;*/
/* height: 48px;*/
/* box-shadow: 0 0 20px rgb(0 0 0 / 30%);*/
/* transition: 0.3s ease-out;*/
/* display: inline-block;*/
/*}*/
.fixed-plugin {
position: absolute;
......
This diff is collapsed.
......@@ -225,7 +225,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>
......@@ -321,6 +321,13 @@
<div class="panel-body form-horizontal form-validate-jquery">
<div class="row">
<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 +387,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 +444,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 +607,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 +731,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 +1006,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 +1061,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