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 ...@@ -15,8 +15,8 @@ from django.db import connection as conn
# Create your views here. # Create your views here.
from rest_framework.renderers import JSONRenderer, TemplateHTMLRenderer from rest_framework.renderers import JSONRenderer, TemplateHTMLRenderer
#from django.utils import six from django.utils import six
import six #import six
from django.core.exceptions import PermissionDenied from django.core.exceptions import PermissionDenied
from django.contrib.auth.decorators import user_passes_test from django.contrib.auth.decorators import user_passes_test
from django.http import HttpResponse, HttpResponseNotFound from django.http import HttpResponse, HttpResponseNotFound
...@@ -2276,7 +2276,6 @@ def createbang(request): ...@@ -2276,7 +2276,6 @@ def createbang(request):
tb = tibang tb = tibang
except: except:
tb = 0 tb = 0
print(tb)
try: try:
if ltbang == "" and tibang != "": if ltbang == "" and tibang != "":
...@@ -2288,21 +2287,24 @@ def createbang(request): ...@@ -2288,21 +2287,24 @@ def createbang(request):
ltb = ltbang ltb = ltbang
except: except:
ltb = 0 ltb = 0
print(ltb)
if kilimep == "": if kilimep == "":
pemilik = "unnamed" pemilik = "unnamed"
else: else:
pemilik = kilimep pemilik = kilimep
print(pemilik)
# try: # try:
with conn.cursor() as kel: 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) 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() adm = kel.fetchall()
administrasi = adm[0] print(adm)
if adm == []:
administrasi = ["", "", "", ""]
else:
administrasi = adm[0]
with conn.cursor() as buldings: 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)) 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): ...@@ -126,7 +126,26 @@ class Usermanagement(generic.TemplateView):
ag.id = aug.group_id AND ag.id = aug.group_id AND
ag.id IN("""+ars+")" ag.id IN("""+ars+")"
else: 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) userlist_.execute(sql)
allUser = userlist_.fetchall() allUser = userlist_.fetchall()
...@@ -279,7 +298,7 @@ def addUser(request): ...@@ -279,7 +298,7 @@ def addUser(request):
} }
# data = {'sukses':'sukses'} # data = {'sukses':'sukses'}
return Response(data) return Response(data)
@api_view(('POST',)) @api_view(('POST',))
def listGroup(request): 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 = []; var pool = [];
......
...@@ -240,6 +240,7 @@ ...@@ -240,6 +240,7 @@
content = ` 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"> <table class="table tasks-list">
<thead style="text-align: center;"> <thead style="text-align: center;">
<tr> <tr>
...@@ -680,6 +681,7 @@ ...@@ -680,6 +681,7 @@
} }
}); });
}; };
$(document).on("click", "#btn_detail_kelurahan", function() {
$(document).on("click", "#btn_edit_kelurahan", function() { $(document).on("click", "#btn_edit_kelurahan", function() {
......
...@@ -737,4 +737,4 @@ ...@@ -737,4 +737,4 @@
} }
}); });
}); });
</script> --> </script> -->
\ No newline at end of file
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
</a> </a>
<ul class="dropdown-menu dropdown-menu-right"> <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 %} {% 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 '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> <li><a href="{% url 'apps:perbaikan' %}"><i class="icon-list"></i>Repair & Renovation</a></li>
......
...@@ -236,6 +236,7 @@ ...@@ -236,6 +236,7 @@
left: -408px; left: -408px;
max-width: 100%; max-width: 100%;
float: right; float: right;
/* left: -5px; */ /* left: -5px; */
position: absolute; position: absolute;
z-index: 1000; z-index: 1000;
...@@ -325,6 +326,20 @@ ...@@ -325,6 +326,20 @@
.move-btn { .move-btn {
transform: rotate(180deg) 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 { .fixed-plugin {
position: absolute; position: absolute;
......
This diff is collapsed.
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
</div> </div>
<div class="panel-body form-horizontal form-validate-jquery"> <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 class="col-lg-7">
<div> <div>
<div id="map" class="map-container" style="padding-top: -100px; max-width:600px; max-height:385px;margin-bottom: 15px;"></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 @@ ...@@ -321,6 +321,13 @@
<div class="panel-body form-horizontal form-validate-jquery"> <div class="panel-body form-horizontal form-validate-jquery">
<div class="row"> <div class="row">
<div class="col-md-4" style="max-width: 335px;"> <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> <fieldset>
<div class="form-group"> <div class="form-group">
<label class="col-lg-3 control-label">Jumlah Penduduk:</label> <label class="col-lg-3 control-label">Jumlah Penduduk:</label>
...@@ -380,6 +387,13 @@ ...@@ -380,6 +387,13 @@
</div> </div>
<div class="col-md-4" style="max-width: 400px;"> <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> <fieldset>
<div class="form-group"> <div class="form-group">
...@@ -430,6 +444,13 @@ ...@@ -430,6 +444,13 @@
<div class="col-md-4" style="max-width: 400px;"> <div class="col-md-4" style="max-width: 400px;">
<div class="row"> <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"> <div class="col-md-6">
<fieldset> <fieldset>
<div class="form-group"> <div class="form-group">
...@@ -586,7 +607,7 @@ ...@@ -586,7 +607,7 @@
</div> </div>
<div class="panel-body form-horizontal form-validate-jquery"> <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;"> <div class="col-md-6" style="max-width: 500px;">
<fieldset> <fieldset>
<div class="form-group"> <div class="form-group">
...@@ -710,7 +731,7 @@ ...@@ -710,7 +731,7 @@
<div class="panel-body form-horizontal form-validate-jquery"> <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;"> <div class="col-md-4" style="max-width: 400px;">
<fieldset> <fieldset>
<div class="form-group"> <div class="form-group">
...@@ -985,7 +1006,7 @@ ...@@ -985,7 +1006,7 @@
<div class="panel-body form-horizontal form-validate-jquery"> <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;"> <div class="col-md-6" style="margin-left: 30px;max-width: 500px;">
<fieldset> <fieldset>
<div class="form-group"> <div class="form-group">
...@@ -1040,9 +1061,9 @@ ...@@ -1040,9 +1061,9 @@
<div id="modal_theme_DEL" class="modal fade"> <div id="modal_theme_DEL" class="modal fade">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content" style="width: 400px;margin-left: 100px;"> <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> <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>
<div class="modal-body" style="max-height: 450px;overflow-y: auto;"> <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