Commit fdc72fd1 authored by Muhamad's avatar Muhamad

new again

parent ea31f528
...@@ -62,4 +62,6 @@ urlpatterns = [ ...@@ -62,4 +62,6 @@ urlpatterns = [
path('edit-jalan-valid', views.editjalanvalid, name='edit-jalan-valid'), path('edit-jalan-valid', views.editjalanvalid, name='edit-jalan-valid'),
path('3d-maps', views.maps3d, name='3d-maps'), path('3d-maps', views.maps3d, name='3d-maps'),
path('deletejalan', views.deletejalan, name='hapus-jalan')
] ]
\ No newline at end of file
...@@ -138,7 +138,7 @@ def building(request): ...@@ -138,7 +138,7 @@ def building(request):
FROM FROM
geo_bangunan gb geo_bangunan gb
WHERE WHERE
st_intersects ( gb.geom, 'SRID=0;POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))' )"""% (kulon, lor, wetan, lor, wetan, kidul, kulon, kidul, kulon, lor)) st_intersects ( st_setsrid(gb.geom,4326) , 'SRID=4326;POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))' )"""% (kulon, lor, wetan, lor, wetan, kidul, kulon, kidul, kulon, lor))
prov_res = buldings.fetchall() prov_res = buldings.fetchall()
polbang = [] polbang = []
...@@ -252,6 +252,31 @@ def editjalanvalid(request): ...@@ -252,6 +252,31 @@ def editjalanvalid(request):
respon={'data':data, 'info':info, 'code':status} respon={'data':data, 'info':info, 'code':status}
return Response(respon) return Response(respon)
@api_view(('GET',))
@renderer_classes((TemplateHTMLRenderer, JSONRenderer))
def deletejalan(request):
idjalan = request.GET.get("idjalan")
# try:
with conn.cursor() as jalan:
jalan.execute("DELETE from geo_jalan WHERE id = %s"% idjalan)
conn.commit()
data = 'SUCCESS'
info = 'data telah diperbaharui'
status = 0
# except:
# data = 'Oops!!'
# info = 'Hubungi Developer'
# status = 1
respon={'data':data, 'info':info, 'code':status}
return Response(respon)
@api_view(('GET',)) @api_view(('GET',))
@renderer_classes((TemplateHTMLRenderer, JSONRenderer)) @renderer_classes((TemplateHTMLRenderer, JSONRenderer))
......
from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
# Create your forms here.
class NewUserForm(UserCreationForm):
email = forms.EmailField(required=True)
class Meta:
model = User
fields = ("username", "email", "password1", "password2")
def save(self, commit=True):
user = super(NewUserForm, self).save(commit=False)
user.email = self.cleaned_data['email']
if commit:
user.save()
return user
\ No newline at end of file
...@@ -13,10 +13,14 @@ urlpatterns = [ ...@@ -13,10 +13,14 @@ urlpatterns = [
path('perbaikan', views.perbaikanrenovasi, name='perbaikan'), path('perbaikan', views.perbaikanrenovasi, name='perbaikan'),
path('loadDetail', views.loadDetail, name='loadDetail'), path('loadDetail', views.loadDetail, name='loadDetail'),
path('input-perbaikan', views.inpuperbaikan, name='input-perbaikan'), path('input-perbaikan', views.inpuperbaikan, name='input-perbaikan'),
path('input-perbaikan-bang', views.inputperbaikanbangunan, name='input-perbaikan-bang'),
path('save-perbaikan', views.saveperbaikan, name='save-perbaikan'), path('save-perbaikan', views.saveperbaikan, name='save-perbaikan'),
path('save-perbaikan-bang', views.saveperbaikanbangunan, name='save-perbaikan-bang'),
path('load-jl-by-id-detail', views.loadbyiddetail, name='load-jl-by-id-detail'), path('load-jl-by-id-detail', views.loadbyiddetail, name='load-jl-by-id-detail'),
path('get-jalan-perbaikan', views.getjalanperbaikan, name='get-jalan-perbaikan'), path('get-jalan-perbaikan', views.getjalanperbaikan, name='get-jalan-perbaikan'),
path('get-detail-perbaikan', views.getdetailperbaikan, name='get-detail-perbaikan'), path('get-detail-perbaikan', views.getdetailperbaikan, name='get-detail-perbaikan'),
path('get-detail-perbaikan-bang', views.getdetailperbaikanbangunan, name='get-detail-perbaikan-bang'),
path('registration_new_app', views.registrasi_new_app, name='reg_new_app'),
] ]
\ No newline at end of file
This diff is collapsed.
...@@ -42,7 +42,8 @@ INSTALLED_APPS = [ ...@@ -42,7 +42,8 @@ INSTALLED_APPS = [
'Application', 'Application',
'API', 'API',
'myauth.apps.MyauthConfig', 'myauth.apps.MyauthConfig',
'widget_tweaks' 'widget_tweaks',
'crispy_forms',
] ]
MIDDLEWARE = [ MIDDLEWARE = [
......
...@@ -35,5 +35,10 @@ urlpatterns = [ ...@@ -35,5 +35,10 @@ urlpatterns = [
path('loadUserbyId/', views.loadUserbyId, name="loadUserbyId"), path('loadUserbyId/', views.loadUserbyId, name="loadUserbyId"),
path('addGroup/', views.addGroup, name="addGroup"), path('addGroup/', views.addGroup, name="addGroup"),
path('deleteGroup/', views.deleteGroup, name="deleteGroup"), path('deleteGroup/', views.deleteGroup, name="deleteGroup"),
path('getGroupById/', views.loadGroupByGroupId, name='getGroupById') path('getGroupById/', views.loadGroupByGroupId, name='getGroupById'),
path('userprofile/', views.Userprofile.as_view(), name='userprofile'),
path('changepassword/', views.changepassword, name="changepassword"),
path('editprofile/', views.editprofile, name='editprofile'),
path('editpp/', views.editpp, name='editpp'),
path('welcome', views.welcom)
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) ]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.contrib import auth
from django.db.models.expressions import F from django.db.models.expressions import F
from django.http import request, response from django.http import request, response
from django.views import View, generic from django.views import View, generic
...@@ -12,38 +13,13 @@ from django.contrib.auth.hashers import make_password ...@@ -12,38 +13,13 @@ from django.contrib.auth.hashers import make_password
from rest_framework import status from rest_framework import status
from rest_framework.decorators import api_view, renderer_classes from rest_framework.decorators import api_view, renderer_classes
from rest_framework.response import Response from rest_framework.response import Response
import socket
from django.contrib.auth import authenticate
from django.core.files.storage import FileSystemStorage
import random
import string
def get_per_user(req):
us = req
id = us.id
with conn.cursor() as perm:
perm.execute("""SELECT
json_build_object ( 'kab', gpk.kabupaten, 'pro', gpk.provinsi, 'id_apps', uaa.id_apps, 'apps', uaa.NAME )
FROM
user_apps_access uaa
JOIN geo_prov_kab gpk ON uaa.id_kab = gpk.id_kabupaten
WHERE
uaa.id_user = %s"""% id)
per = perm.fetchall()
permm = per[0][0]
return us, permm
def ui_params(id_app):
with conn.cursor() as perm:
perm.execute("""SELECT
json_build_object ( 'title', v1, 'logo', v2)
FROM
ui_params
WHERE
id_apps = %s"""% int(id_app))
per = perm.fetchall()
permm = per[0][0]
return permm
# Create your views here. # Create your views here.
class CustomLoginView(LoginView): class CustomLoginView(LoginView):
...@@ -60,22 +36,32 @@ class CustomLogoutView(LogoutView): ...@@ -60,22 +36,32 @@ class CustomLogoutView(LogoutView):
template_name = 'user/login.html' template_name = 'user/login.html'
next_page = 'login' next_page = 'login'
class Usermanagement(generic.TemplateView): class Userprofile(generic.TemplateView):
template_name = "layout/user_layout.html" template_name = 'user/user_profile.html'
def get(self, request): def get(self, request):
usern, perm = get_per_user(request.user) with conn.cursor() as userprop_:
kab = perm['kab'] userprop_.execute("SELECT * FROM auth_user")
# print(perm) alluser = userprop_.fetchall()
ui_param = ui_params(perm['id_apps'])
title = ui_param['title'] res = []
logo = ui_param['logo'] print("")
print(type(request.user.groups.all())) for roww in alluser:
print(roww[0])
context = {
'data': res
}
return render(request, self.template_name, context)
class Usermanagement(generic.TemplateView):
template_name = "layout/user_layout.html"
# print("disini")
# print(make_password("kontolbadag"))
def get(self, request):
# print(request.user.groups.all())
with conn.cursor() as userlist_: with conn.cursor() as userlist_:
# if request.user.groups.all() == ''
arrayGroups = [] arrayGroups = []
for g in request.user.groups.all(): for g in request.user.groups.all():
print(g) print(g)
userGroup = g.id userGroup = g.id
...@@ -183,14 +169,37 @@ class Usermanagement(generic.TemplateView): ...@@ -183,14 +169,37 @@ class Usermanagement(generic.TemplateView):
"name" : rows[1], "name" : rows[1],
} }
group_res.append(datas) group_res.append(datas)
parameter_ui = {'logo':logo, 'title':title}
current_user = request.user
thisUser = current_user.id
# print()
sql = "select * from auth_user where id = "+str(thisUser)
with conn.cursor() as userprop:
userprop.execute(sql)
us = userprop.fetchall()
user_data = []
for row in us:
datas = {
"id": row[0],
"username": row[4],
"firstname": row[5],
"lastname": row[6],
"email" : row[7],
"filepath": row[11],
# "password": row[1]
}
user_data.append(datas)
print(user_data)
context = { context = {
'title' : 'user management', 'title' : 'user management',
'data' : user_res, 'data' : user_res,
'dataGroup' : group_res, 'dataGroup' : group_res,
'title' : title, 'thisUser' : user_data
'logo' : logo,
'parameter_ui':parameter_ui,
} }
...@@ -624,3 +633,130 @@ def loadGroupByGroupId(request): ...@@ -624,3 +633,130 @@ def loadGroupByGroupId(request):
"data": "group tidak memiliki parent" "data": "group tidak memiliki parent"
} }
return Response(data) return Response(data)
@api_view(('POST',))
def changepassword(request):
if request.method == "POST":
iduser = request.POST.get('id')
currentpassword = request.POST.get('currPass')
newpassword = request.POST.get('newPass')
renewpassword = request.POST.get('renewPass')
username = request.POST.get('username')
user = authenticate(username=username, password=currentpassword)
if user is not None:
if newpassword == renewpassword:
with conn.cursor() as concur:
sql = "UPDATE auth_user SET password = '"+make_password(newpassword)+"' WHERE id ="+iduser
print(sql)
concur.execute(sql)
reschange = concur.rowcount
if reschange > 0:
data = {
"baseurl" : request.META['HTTP_HOST'],
"code" : 0,
"info" : "Sukses",
"data" : "Password berhasil diperbaharui, silahkan login kembali untuk melanjutkan"
}
else:
data = {
"code" : 4,
"info" : "Gagal",
"data" : "Password gagal diperbaharui, silahkan coba kembali"
}
else:
data = {
"code" : 4,
"info" : "Gagal",
"data" : "Password baru tidak sesuai"
}
else:
data = {
"code" : 4,
"info" : "Gagal",
"data" : "Password salah"
}
return Response(data)
@api_view(('POST',))
def editprofile(request):
if request.method == 'POST':
iduser = request.POST.get('id')
firstname = request.POST.get('first_name')
lastname = request.POST.get('last_name')
email = request.POST.get('email')
with conn.cursor() as edtprop:
sql = "UPDATE auth_user SET first_name = '"+firstname+"', last_name ='"+lastname+"', email ='"+email+"' WHERE id = "+iduser
edtprop.execute(sql)
res = edtprop.rowcount
if(res > 0):
data = {
"code" : 0,
"info" : "Sukses",
"data" : "Profile berhasil diubah"
}
else:
data = {
"code" : 4,
"info" : "Gagal",
"data" : "Profile gagal diperbaharui, silahkan coba kembali"
}
return Response(data)
@api_view(('POST',))
def editpp(request):
if request.method == 'POST':
file = request.FILES.get('inifile')
iduser = request.POST.get('id')
fss = FileSystemStorage(location='static/img/')
try:
letters = string.ascii_letters
resrand = ''.join(random.choice(letters) for i in range(100))
format = (file.name).split(".")
namafile = f"{resrand}.{format[-1:][0]}"
filename = fss.save(namafile, file)
url = fss.url(filename)
with conn.cursor() as concur:
sql = "UPDATE auth_user SET file_path = '"+namafile+"' WHERE id = "+iduser
concur.execute(sql)
resupd = concur.rowcount
if resupd > 0:
data = {
"code" : 0,
"info" : "Sukses",
"data" : "Foto profil berhasil diperbaharui"
}
else:
data = {
"code" : 4,
"info" : "Gagal",
"data" : "Foto profil gagal diperbaharui, silahkan coba kembali"
}
except:
data = {
"code" : 3,
"info" : "Gagal",
"data" : "Foto profil gagal diperbaharui, silahkan coba kembali"
}
return Response(data)
def welcom(request):
return render(request, "layout/welcome.html")
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
...@@ -121,6 +121,129 @@ ...@@ -121,6 +121,129 @@
</div> </div>
<div class="content-wrapper mymodal" id="input_perbaikan_bang" style="display: none;padding: 60px;">
<div class="content" style="padding: 15px;max-height: 550px;">
<!-- Main charts -->
<div class="panel panel-flat" style="display: none;">
<div class="panel-body" style="padding-top: 10px;">
<div class="tabbable">
<ul class="nav nav-tabs nav-tabs-bottom nav-justified">
<button type="button" class="close" onclick="destroyWraper()">&times;</button>
<li class="active"><a href="#left-tab-input-coordinat_bang" data-toggle="tab">Koordinat</a></li>
<li><a href="#right-tab-input-informasi_bang" data-toggle="tab">Insert Informasi</a></li>
</ul>
</div>
<div class="tab-content">
<div class="tab-pane active" id="left-tab-input-coordinat_bang">
<div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<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>
<div class="tab-pane" id="right-tab-input-informasi_bang">
<div class="modal-body" style="max-height: 415px;overflow-y: auto;">
<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>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>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>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 class="panel-footer">
<input type="text" id="coorbangbaru" class="form-control" value="">
<button type="button" class="btn btn-info" id="save-perbaikan_bang" style="float: right; margin-right: 40px;">SAVE</button>
<button type="button" class="btn btn-link" onclick="destroyWraper()" style="float: right;">Close</button>
</div>
</div>
</div>
<!-- /main charts -->
</div>
<!-- editing kelurahan --> <!-- editing kelurahan -->
<div class="content-wrapper mymodal" id="edit_kelurahan" style="display: none;padding: 60px;"> <div class="content-wrapper mymodal" id="edit_kelurahan" style="display: none;padding: 60px;">
<div class="content" style="padding: 15px;max-height: 550px;"> <div class="content" style="padding: 15px;max-height: 550px;">
......
...@@ -143,9 +143,12 @@ ...@@ -143,9 +143,12 @@
#btn_edit_bangunan { #btn_edit_bangunan {
display: none; display: none;
} }
#btn_delete_bangunan {
display: none;
}
#btn_edit_kelurahan { #btn_edit_kelurahan {
display: block; display: none;
position: relative; position: relative;
top: 0; top: 0;
right: 0; right: 0;
...@@ -188,6 +191,9 @@ ...@@ -188,6 +191,9 @@
#btn_edit_adm { #btn_edit_adm {
display: none; display: none;
} }
#btn_delete_adm {
display: none;
}
#btn_edit_rs { #btn_edit_rs {
display: none; display: none;
...@@ -217,6 +223,18 @@ ...@@ -217,6 +223,18 @@
display: none; display: none;
} }
#btn_detail_per_bang {
display: none;
}
#btn_perbaikan_bangunan {
display: none;
}
#btn_upload_tampak {
display: none;
}
.leaflet-popup{ .leaflet-popup{
display: none; display: none;
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
...@@ -2,17 +2,7 @@ ...@@ -2,17 +2,7 @@
<!-- Main navbar --> <!-- Main navbar -->
<div class="navbar navbar-inverse navbar-fixed-top bg-none"> <div class="navbar navbar-inverse navbar-fixed-top bg-none">
<div class="navbar-header"> <div class="navbar-header">
<a class="navbar-brand gradient-text" id="title-logo" href="{% url 'apps:dashboard' %}"> <a class="navbar-brand gradient-text " id="title-id" href="{% url 'apps:dashboard' %}">
<!-- <h3>NationalAddress</h3> -->
<i>
<img src="{% static 'img/{{logo}}' %}" alt="" style="position: absolute;
width: 26px;
top: 7px;">
</i>
<!-- <i class="icon-location4 fa-gradient"></i> -->
<b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{{title}}
</b>
</a> </a>
<ul class="nav navbar-nav pull-right visible-xs-block"> <ul class="nav navbar-nav pull-right visible-xs-block">
...@@ -27,14 +17,13 @@ ...@@ -27,14 +17,13 @@
{% if user.is_authenticated %} {% if user.is_authenticated %}
<a class="dropdown-toggle" data-toggle="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown">
<img src="{% static 'img/placeholder.jpg' %}" alt="">
<img src="{% static 'img/' %}{{user.filepath}}" alt="">
<span>{{user.username}}</span> <span>{{user.username}}</span>
<i class="caret"></i> <i class="caret"></i>
</a> </a>
<ul class="dropdown-menu dropdown-menu-right"> <ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-user-plus"></i> My profile</a></li>
<li><a href="#"><i class="icon-cog5"></i> Account settings</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>
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<div class="col-md-3"> <div class="col-md-3">
<ul class="menu-list"> <ul class="menu-list">
<a href="#" data-toggle="collapse" data-target=".navbar-collapse.in" id="WorldImagery"> <a href="#" data-toggle="collapse" data-target=".navbar-collapse.in" id="WorldImagery">
<img src="{% static 'img/maps/esri.png' %}" alt="" style="min-width: 180px; max-height: 130px; <img src="{% static 'img/maps/esri.PNG' %}" alt="" style="min-width: 180px; max-height: 130px;
min-height: 130px"> min-height: 130px">
<span class="menu-heading"> <span class="menu-heading">
World Imagery</span> World Imagery</span>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<div class="col-md-3"> <div class="col-md-3">
<ul class="menu-list"> <ul class="menu-list">
<a href="#" data-toggle="collapse" data-target=".navbar-collapse.in" id="BingSatellite"> <a href="#" data-toggle="collapse" data-target=".navbar-collapse.in" id="BingSatellite">
<img src="{% static 'img/maps/bing.png' %}" alt="" style="min-width: 180px; max-height: 130px; <img src="{% static 'img/maps/bing.PNG' %}" alt="" style="min-width: 180px; max-height: 130px;
min-height: 130px"> min-height: 130px">
<span class="menu-heading"> <span class="menu-heading">
Bing Satellite</span> Bing Satellite</span>
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<div class="col-md-3"> <div class="col-md-3">
<ul class="menu-list"> <ul class="menu-list">
<a href="#" data-toggle="collapse" data-target=".navbar-collapse.in" id="GoogleSatellite"> <a href="#" data-toggle="collapse" data-target=".navbar-collapse.in" id="GoogleSatellite">
<img src="{% static 'img/maps/esri.png' %}" alt="" style="min-width: 180px; max-height: 130px; <img src="{% static 'img/maps/esri.PNG' %}" alt="" style="min-width: 180px; max-height: 130px;
min-height: 130px"> min-height: 130px">
<span class="menu-heading"> <span class="menu-heading">
Google Satellite</span> Google Satellite</span>
...@@ -89,7 +89,6 @@ ...@@ -89,7 +89,6 @@
<div class="panel-body"> --> <div class="panel-body"> -->
<div class="row" style="margin: 0;padding: 0;"> <div class="row" style="margin: 0;padding: 0;">
<div class="col-md-6"> <div class="col-md-6">
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" id="geo_tuplah" onclick="geotuplah()" style="margin-top:2px;"> <input type="checkbox" id="geo_tuplah" onclick="geotuplah()" style="margin-top:2px;">
...@@ -97,7 +96,6 @@ ...@@ -97,7 +96,6 @@
</label> </label>
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" id="geo_building" style="margin-top:2px;"> <input type="checkbox" id="geo_building" style="margin-top:2px;">
...@@ -125,12 +123,12 @@ ...@@ -125,12 +123,12 @@
</label> </label>
</div> </div>
<div class="checkbox"> <!-- <div class="checkbox">
<label> <label>
<input type="checkbox" id="geo_sungai" onclick="geosungai()" style="margin-top:2px;"> <input type="checkbox" id="geo_sungai" onclick="geosungai()" style="margin-top:2px;">
Sungai Sungai
</label> </label>
</div> </div> -->
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" id="batas_all" onclick="batasall()" style="margin-top:2px;" > <input type="checkbox" id="batas_all" onclick="batasall()" style="margin-top:2px;" >
......
...@@ -18,5 +18,3 @@ ...@@ -18,5 +18,3 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.4.1/core.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.4.1/core.js"></script>
<script src="{% static '/js/plugins/arrive.min.js' %}"></script> <script src="{% static '/js/plugins/arrive.min.js' %}"></script>
<script src="{% static '/js/plugins/bootstrap-notify.js' %}"></script> <script src="{% static '/js/plugins/bootstrap-notify.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/tables/datatables/datatables.min.js' %}"></script>
\ No newline at end of file
...@@ -257,7 +257,6 @@ ...@@ -257,7 +257,6 @@
/* height: 100px; */ /* height: 100px; */
max-width: 100%; max-width: 100%;
float: right; float: right;
top: -48px;
/* left: -5px; */ /* left: -5px; */
position: absolute; position: absolute;
z-index: 1000; z-index: 1000;
...@@ -465,7 +464,7 @@ ...@@ -465,7 +464,7 @@
} }
li.fixed-plugin .fa:hover { li.fixed-plugin .fa:hover {
transform: rotate(180deg); transform: rotate(360deg);
transition: all 0.3s linear; transition: all 0.3s linear;
} }
/*.move-btn .caret {*/ /*.move-btn .caret {*/
...@@ -579,25 +578,18 @@ ...@@ -579,25 +578,18 @@
{% include 'includes/navbar.html' %} {% include 'includes/plugin.html' %} {% include 'includes/navbar.html' %} {% include 'includes/plugin.html' %}
<!-- Page container --> <!-- Page container -->
<div class="page-container"> <div class="page-container">
<div id="panel-samping" class="widget-pane widget-pane-visible" style="overflow: scroll !important; height: 95vh !important;">
<!-- Page content -->
<div class="page-content">
<!-- Main sidebar -->
<!-- <div class="sidebar sidebar-main sidebar-default"> -->
<!-- <div class="sidebar-content"> -->
<div id="panel-samping" class="widget-pane widget-pane-visible">
{% block content %} {% block content %}
<div class="sidebar-wrapper"> <div class="sidebar-wrapper">
<div class="panel panel-default" id="features"> <div class="panel panel-default" id="features">
<div class="sidebar-table" id="isi_panel" style="margin-top: 48px;"> <div class="sidebar-table" id="isi_panel">
<table class="table tasks-list"> <table class="table tasks-list">
<thead style="text-align: center;"> <thead style="text-align: center;">
<tr> <tr>
<th class="text-center" style="padding: 0 0 0 0px;"> <th class="text-center" style="padding: 0 0 0 0px;">
<img src="{% static 'img/logo-ok.png' %}" alt="" style="max-height: 368px"> <img src="{% static 'img/' %}{{logo}}" alt="" style="max-height: 368px">
</th> </th>
</tr> </tr>
</thead> </thead>
...@@ -610,16 +602,22 @@ ...@@ -610,16 +602,22 @@
letter-spacing: 0; letter-spacing: 0;
font-weight: 400;"> font-weight: 400;">
<span style="font-size: x-large;"> <span style="font-size: x-large;">
OGAN KOMERING ULU {{title}}
</span> </span>
</h1> </h1>
</div> </div>
</th> </th>
</tr> </tr>
</div> </div>
{% if user.is_authenticated %}
<div class="container"> <div class="container">
<tr> <tr>
<th> <th>
<div class="form-group" style="margin-left: 80px;"> <div class="form-group" style="margin-left: 80px;">
<table> <table>
<tr> <tr>
...@@ -656,9 +654,10 @@ ...@@ -656,9 +654,10 @@
</table> </table>
</div> </div>
</th> </th>
</tr> </tr>
{% endif %}
</div> </div>
</tbody> </tbody>
...@@ -668,6 +667,13 @@ ...@@ -668,6 +667,13 @@
</div> </div>
{% endblock content %} {% endblock content %}
</div> </div>
<!-- Page content -->
<div class="page-content" style="overflow: hidden;">
<!-- Main sidebar -->
<!-- <div class="sidebar sidebar-main sidebar-default"> -->
<!-- <div class="sidebar-content"> -->
<div> <div>
<a href="#" class="btn btn-default" id="button_unhide_panel" data-toggle="tooltip" data-placement="right" title="Tampilkan panel"><span class="caret" style="margin-left: -5px;transform: rotate(270deg)"></span></a> <a href="#" class="btn btn-default" id="button_unhide_panel" data-toggle="tooltip" data-placement="right" title="Tampilkan panel"><span class="caret" style="margin-left: -5px;transform: rotate(270deg)"></span></a>
</div> </div>
...@@ -683,16 +689,14 @@ ...@@ -683,16 +689,14 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div id="map"> <div id="map">
</div> </div>
<div id="map-cesium" style="z-index: -999; height: 100vh; display:none"> <div id="map-cesium" style="z-index: -999; height: 100vh; display:none">
<div onmouseenter="resse()" onmouseleave="normalse()" id="DataTables_Table_0_filter" class="dataTables_filter" style="margin: 0px 0 0px 0px;padding-top: 55px;position: absolute;z-index: 1;right: 20px;"> <div class="label-bangunan" style="margin: 0px 0 0px 0px;padding-top: 55px;position: absolute;z-index: 1;right: 20px;">
<!-- <label> <label style="background-color: white;">
<input type="search" class="search_desa" id="search_desa" placeholder="Kelurahan ..." aria-controls="DataTables_Table_0"> &nbsp;&nbsp;left click + ctrl to rotate maps&nbsp;&nbsp;
</label> </label>
<ul id="searchResult"></ul> -->
</div> </div>
<div class="page_loader_3d"></div>
</div> </div>
</div> </div>
</div> </div>
...@@ -737,6 +741,9 @@ ...@@ -737,6 +741,9 @@
<script type="text/javascript" src="{% static 'js/plugins/forms/selects/bootstrap_multiselect.js' %}"></script> <script type="text/javascript" src="{% static 'js/plugins/forms/selects/bootstrap_multiselect.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/ui/moment/moment.min.js' %}"></script> <script type="text/javascript" src="{% static 'js/plugins/ui/moment/moment.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/pickers/daterangepicker.js' %}"></script> <script type="text/javascript" src="{% static 'js/plugins/pickers/daterangepicker.js' %}"></script>
<script type="text/javascript " src="{% static 'js/apexcharts.min.js' %}"></script>
<script type="text/javascript " src="{% static 'js/apexcharts.js' %}"></script>
<!-- /theme JS files --> <!-- /theme JS files -->
...@@ -750,4 +757,35 @@ ...@@ -750,4 +757,35 @@
</html> </html>
{% include 'includes/js-o.html' %} {% include 'includes/js-m.html' %} {% include 'includes/js-o.html' %} {% include 'includes/js-m.html' %} {% if user.is_authenticated %} {% else %}
\ No newline at end of file <script>
$("#po_all").prop("checked", !$("#po_all").prop("checked"));
$("#knt_adm").prop("checked", !$("#knt_adm").prop("checked"));
$("#lyn_kes").prop("checked", !$("#lyn_kes").prop("checked"));
$("#pus").prop("checked", !$("#pus").prop("checked"));
$("#rusak").prop("checked", !$("#rusak").prop("checked"));
$("#ibdh").prop("checked", !$("#ibdh").prop("checked"));
$("#dididik").prop("checked", !$("#dididik").prop("checked"));
$("#pom_bengsin").prop("checked", !$("#pom_bengsin").prop("checked"));
$("#tasiun").prop("checked", !$("#tasiun").prop("checked"));
$("#caheum").prop("checked", !$("#caheum").prop("checked"));
$("#cabud").prop("checked", !$("#cabud").prop("checked"));
$("#gardu").prop("checked", !$("#gardu").prop("checked"));
$("#batas_desa").prop("checked", !$("#batas_desa").prop("checked"));
$("#geo_jalan").prop("checked", !$("#geo_jalan").prop("checked"));
$("#geo_building").prop("checked", !$("#geo_building").prop("checked"));
geo_po_rumah_sakit.addTo(map);
geo_po_spbu.addTo(map);
geo_po_stasiun.addTo(map);
geo_po_terminal.addTo(map);
geo_po_cagar_budaya.addTo(map);
geo_po_gardu_listrik.addTo(map);
geo_bangunan.addTo(map);
geo_batas_kel.addTo(map);
geo_jalan.addTo(map);
map.setView([geo_batas.getBounds().getCenter().lat, geo_batas.getBounds().getCenter().lng], 12)
</script>
{% endif %}
\ No newline at end of file
This diff is collapsed.
{% load static %}
<script>
// alert("alerts");
</script>
\ No newline at end of file
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome</title>
</head>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj" crossorigin="anonymous"></script>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
<link href="{% static 'css/icons/icomoon/styles.css' %}" rel="stylesheet" type="text/css">
<link href="{% static 'css/bootstrap.css' %}" rel="stylesheet" type="text/css">
<link href="{% static 'css/core.css' %}" rel="stylesheet" type="text/css">
<link href="{% static 'css/components.css' %}" rel="stylesheet" type="text/css">
<link href="{% static 'css/colors.css' %}" rel="stylesheet" type="text/css">
<style>
.page_loader {
position: fixed;
background: url('../../static/img/loadingz.gif') 50% 50% no-repeat rgb(249, 249, 249);
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 9999;
opacity: .5;
}
</style>
<body>
<div style="height: 100%;">
<div id="map" style="height: 100vh;">
</div>
</div>
<div class="container text-center" style=" padding-top: 55vh;
width: 400px;
text-transform: uppercase;
color: rgb(23, 87, 76);
position: fixed;
z-index: 9999;
left: 115px;
top: 10px;
width: 100%;
height: 100%;">
<!-- <h1>
{% if user.is_authenticated %} {{user.username}} {% endif %}, Welcome
</h1> -->
<h2>
Anda Login Sebagai
</h2>
<h2>
{% if user.is_authenticated %} {{user.username}} {% endif %}
</h2>
</div>
<div class="page_loader"></div>
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js" integrity="sha384-eMNCOe7tC1doHpGoWe/6oMVemdAVTMs2xqW4mwXrXsW0L84Iytr2wi5v2QjrP/xp" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.min.js" integrity="sha384-cn7l7gDp0eyniUwwAZgrzD06kc/tftFf19TOAs2zVinnD/C7E91j9yyk5//jjpt/" crossorigin="anonymous"></script>
<script src="{% static 'js/plugins/notifications/sweet_alert.min.js' %}"></script>
</body>
</html>
<script>
var map = L.map('map', {
editable: true,
zoomControl: false,
drawControl: true
}).setView([-4.028349, 104.007235], 10);
$("#sidebar").hide()
maps = L.tileLayer('https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}', {
maxZoom: 22,
minZoom: 4,
}).addTo(map);
setTimeout(function() {
window.location.href = "{% url 'apps:dashboard' %}";
}, 1000);
</script>
\ No newline at end of file
This diff is collapsed.
...@@ -196,12 +196,56 @@ ...@@ -196,12 +196,56 @@
<!-- Main navbar --> <!-- Main navbar -->
<!-- Main navbar --> <!-- Main navbar -->
{% include 'includes/navbar.html' %} <div class="navbar navbar-inverse">
<div class="navbar-header">
<a class="navbar-brand gradient-text " href="{% url 'apps:dashboard' %}">
<!-- <h3>NationalAddress</h3> -->
<i>
<img src="{% static 'img/logo-ok.png' %}" alt="" style="position: absolute;
width: 26px;
top: 7px;">
</i>
<!-- <i class="icon-location4 fa-gradient"></i> -->
<b style="margin-left: 12px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Teman-KU
</b> (Sistem Informasi Pembangunan OKU)
</a>
<ul class="nav navbar-nav pull-right visible-xs-block">
<li><a data-toggle="collapse" data-target="#navbar-mobile"><i class="icon-tree5"></i></a></li>
</ul>
</div>
<div class="navbar-collapse collapse" id="navbar-mobile">
<p class="navbar-text"><span class="label bg-success-400">Online</span></p>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown dropdown-user">
<a class="dropdown-toggle" data-toggle="dropdown">
<img src="{% static 'img/placeholder.jpg' %}" alt="">
<span>{{user.username}}</span>
<i class="caret"></i>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-user-plus"></i> My profile</a></li>
<li><a href="#"><i class="icon-cog5"></i> Account settings</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>
{% endif %}
<li class="divider"></li>
<li><a href="{% url 'logout' %}"><i class="icon-cog5"></i> Logout</a></li>
</ul>
</li>
</ul>
</div>
</div>
<!-- /main navbar --> <!-- /main navbar -->
<!-- Page container --> <!-- Page container -->
<div class="page-container" style="top: 48px;"> <div class="page-container" style="top: 0px;">
<!-- Page content --> <!-- Page content -->
<div class="page-content"> <div class="page-content">
......
{% load crispy_forms_tags %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Registration new app</title>
</head>
<body>
<div class="container py-5">
<h1>Register New Application</h1>
<form method="POST">
{% csrf_token %}
<div id="div_id_username" class="control-group"> <label for="id_username" class="control-label requiredField">
Username<span class="asteriskField">*</span> </label>
<div class="controls"> <input type="text" name="username" maxlength="150" autofocus="" class="textinput textInput" required="" id="id_username">
<p id="hint_id_username" class="help-block">Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.</p>
</div>
</div>
<div id="div_id_password1" class="control-group"> <label for="id_password1" class="control-label requiredField">
Password<span class="asteriskField">*</span> </label>
<div class="controls"> <input type="password" name="password1" autocomplete="new-password" class="textinput textInput" required="" id="id_password1">
<p id="hint_id_password1" class="help-block"></p>
<ul>
<li>Your password can’t be too similar to your other personal information.</li>
<li>Your password must contain at least 8 characters.</li>
<li>Your password can’t be a commonly used password.</li>
<li>Your password can’t be entirely numeric.</li>
</ul>
<p></p>
</div>
</div>
<div id="div_id_password2" class="control-group"> <label for="id_password2" class="control-label requiredField">
Password confirmation<span class="asteriskField">*</span> </label>
<div class="controls"> <input type="password" name="password2" autocomplete="new-password" class="textinput textInput" required="" id="id_password2">
<p id="hint_id_password2" class="help-block">Enter the same password as before, for verification.</p>
</div>
</div>
<div id="app_name" class="control-group"> <label for="app_name" class="control-label requiredField">
App Name<span class="asteriskField">*</span> </label>
<div class="controls"> <input type="text" name="app_name" class="textinput textInput" required="">
<p class="help-block">Enter Application Name.</p>
</div>
</div>
<div id="teritory" class="control-group"> <label for="teritory" class="control-label requiredField">
Teritory<span class="asteriskField">*</span> </label>
<div class="controls">
<select name="teritory_name" id="search_desa" placeholder="Pick a state..." style="width: 256px;height: 35px;">
<option value="">Select Teritory</option>
{% for ter in teritor %}
<option value="{{ter}}">{{ter}}</option>
{% endfor %}
</select>
<p class="help-block"></p>
</div>
</div>
<button class="btn btn-primary" type="submit">Register</button>
</form>
</div>
</body>
</html>
\ No newline at end of file
...@@ -6,12 +6,9 @@ ...@@ -6,12 +6,9 @@
<!------ Include the above in your HEAD tag ----------> <!------ Include the above in your HEAD tag ---------->
<link href="{% static 'css/icons/icomoon/styles.css' %}" rel="stylesheet" type="text/css"> <link href="{% static 'css/icons/icomoon/styles.css' %}" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/all.css"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/all.css">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
<style> <style>
body {
margin-top: 100px;
/* background-image: url('https://3.bp.blogspot.com/-juutvktsA3I/WJsuDK2fYJI/AAAAAAAADJc/BLJqU67PqgMFlqG2E9KgxECwFlpO8_e1wCLcB/s4600/Peta%2BKabupaten%2BOgan%2BKomering%2Bulu%2B%2BOKU.gif'); */
}
/* .logo{ nn /* .logo{ nn
background-image: url("{% static 'img/logomaps.png' %}"); background-image: url("{% static 'img/logomaps.png' %}");
} */ } */
...@@ -24,13 +21,16 @@ ...@@ -24,13 +21,16 @@
</head> </head>
<body> <body>
<div class="container"> <div style="height: 100%;">
<div id="map" style="height: 100vh;">
<div class="container" style="margin-top: 100px;">
<br> <br>
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-6"> <div class="col-md-6">
<div class="card"> <div class="card" style="z-index: 999;">
<header class="card-header"> <header class="card-header">
<center> <center>
<h4 class="card-title mt-2 logo"> Log in </h4> <h4 class="card-title mt-2 logo"> Log in </h4>
...@@ -49,13 +49,13 @@ ...@@ -49,13 +49,13 @@
<form method="post" action="{% url 'login' %}" novalidate> <form method="post" action="{% url 'login' %}" novalidate>
{% csrf_token %} {% csrf_token %}
<div class="form-group"> <div class="form-group">
<label>{{ form.username.label_tag }}</label> {% if form.is_bound %} {% if form.username.errors %} {% render_field form.username class="form-control is-invalid" %} {% else %} {% render_field form.username class="form-control <label for="">Username</label>
is-valid" %} {% endif %} {% else %} {% render_field form.username class="form-control" %} {% endif %} <input type="text" name="username" class="form-control" id="exampleInputEmail1" placeholder="Username" aria-describedby="emailHelp" required>
</div> </div>
<!-- form-group end.// -->
<div class="form-group"> <div class="form-group">
<label>{{ form.password.label_tag }}</label> {% if form.is_bound %} {% if form.password.errors %} {% render_field form.password class="form-control is-invalid" %} {% else %} {% render_field form.password class="form-control <label for="">Password</label>
is-valid" %} {% endif %} {% else %} {% render_field form.password class="form-control" %} {% endif %} <input type="password" name="password" class="form-control" placeholder="Password" id="exampleInputPassword1" required>
</div> </div>
<!-- form-group end.// --> <!-- form-group end.// -->
<hr style="margin-top: 50;"> <hr style="margin-top: 50;">
...@@ -78,9 +78,28 @@ ...@@ -78,9 +78,28 @@
<!-- row.//--> <!-- row.//-->
</div> </div>
</div>
</div>
<!--container end.//--> <!--container end.//-->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script> <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script>
<script>
var map = L.map('map', {
editable: true,
zoomControl: false,
drawControl: true
}).setView([-4.028349, 104.007235], 10);
$("#sidebar").hide()
maps = L.tileLayer('https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}', {
maxZoom: 22,
minZoom: 4,
}).addTo(map);
</script>
</body> </body>
</html> </html>
\ No newline at end of file
This diff is collapsed.
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