Commit 60eaca51 authored by Muhamad's avatar Muhamad

jalan edit

parent 85e29181
......@@ -101,9 +101,10 @@ def jalan(request):
kulon = request.GET.get("kulon")
lor = request.GET.get("lor")
kidul = request.GET.get("kidul")
print(kulon, lor, wetan, lor, wetan, kidul, kulon, kidul, kulon, lor, kulon, lor, wetan, lor, wetan, kidul, kulon, kidul, kulon, lor)
with conn.cursor() as jalan:
jalan.execute("SELECT json_build_object ('type', 'Feature', 'properties', ( id, namrjl, st_length(geom::geography), lebar_jalan, remark, gambar), 'geometry', ST_AsGeoJSON ( st_intersection(geom, 'SRID=4326;POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))') :: geometry ) :: json ) FROM geo_jalan WHERE st_intersects(geom,'SRID=4326;POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))')"% (kulon, lor, wetan, lor, wetan, kidul, kulon, kidul, kulon, lor, kulon, lor, wetan, lor, wetan, kidul, kulon, kidul, kulon, lor))
jalan.execute("SELECT json_build_object ('type', 'Feature', 'properties', ( gj.ID, namrjl, st_length ( gj.geom :: geography ), gj.lebar_jalan, gj.remark, gj.gambar,(SELECT ARRAY_AGG ( '' || id || ',' || tgl_perbaikan || '' order by tgl_perbaikan DESC ) FROM tbl_perbaikan WHERE id_object = gj.ID ) ), 'geometry', ST_AsGeoJSON ( st_intersection(gj.geom, 'SRID=4326;POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))') :: geometry ) :: json ) FROM geo_jalan gj WHERE st_intersects(gj.geom,'SRID=4326;POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))') GROUP BY gj.id"% (kulon, lor, wetan, lor, wetan, kidul, kulon, kidul, kulon, lor, kulon, lor, wetan, lor, wetan, kidul, kulon, kidul, kulon, lor))
prov_res = jalan.fetchall()
data = {'gen':prov_res}
......
......@@ -8,9 +8,15 @@ app_name = 'apps'
urlpatterns = [
path('', views.Dashboard.as_view(), name='dashboard'),
#Search
path('editkelurahan/', edit.editkelurahan, name='edit_kel'),
path('editkelurahan', views.editkelurahan, name='editkelurahan'),
path('perbaikan', views.perbaikanrenovasi, name='perbaikan'),
path('loadDetail', views.loadDetail, name='loadDetail'),
path('input-perbaikan', views.inpuperbaikan, name='input-perbaikan'),
path('save-perbaikan', views.saveperbaikan, name='save-perbaikan'),
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-detail-perbaikan', views.getdetailperbaikan, name='get-detail-perbaikan'),
]
\ No newline at end of file
This diff is collapsed.
......@@ -42,7 +42,7 @@ INSTALLED_APPS = [
'Application',
'API',
'myauth.apps.MyauthConfig',
'widget_tweaks',
'widget_tweaks'
]
MIDDLEWARE = [
......@@ -145,3 +145,6 @@ STATICFILES_DIRS = (
STATIC_ROOT = '/static/'
LOGIN_REDIRECT_URL = '/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
\ No newline at end of file
......@@ -36,4 +36,4 @@ urlpatterns = [
path('addGroup/', views.addGroup, name="addGroup"),
path('deleteGroup/', views.deleteGroup, name="deleteGroup"),
path('getGroupById/', views.loadGroupByGroupId, name='getGroupById')
]
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
......@@ -80,6 +80,7 @@ $("#button_unhide").click(function() {
$("#button_hide_panel").click(function() {
$("#panel-samping").toggleClass("move");
// $("#panel-samping").css('display', 'none');
$("#button_unhide_panel").css('display', 'block');
$("#button_hide_panel").css('display', 'none');
......@@ -90,8 +91,11 @@ $("#button_hide_panel").click(function() {
})
$("#button_unhide_panel").click(function() {
$(".pace-done").toggleClass("sidebar-move")
$("#panel-samping").toggleClass("move");
$(".mymodal").toggleClass("input_perbaikan")
$(this).toggleClass("move-btn");
// $("#panel-samping").css('display', 'block');
// $("#button_unhide").css('display', 'none');
// $("#button_hide_panel").css('display', 'block');
......
This diff is collapsed.
......@@ -21,10 +21,12 @@
<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>
<!-- /theme JS files -->
<script src="{% static 'js/leaflet-bing-layer.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/tables/datatables/datatables.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/maps.js' %}"></script>
<script src="{% static 'js/scripts.js' %}"></script>
\ No newline at end of file
This diff is collapsed.
......@@ -30,6 +30,7 @@
<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>
......@@ -38,17 +39,16 @@
{% else %}
<div class="form-group" style="margin: 6px;">
<a href="/login">
<button type="submit" class="btn btn-xs btn-icon bg-blue btn-block" style="width: 100px;border-radius: 4px;"> <i class="icon-enter"> Login</i></button>
<button type="submit" class="btn btn-xs btn-icon bg-blue btn-block btn-login" style="width: 35px;
border-radius: 20px;
height: 35px;
border-color: #40777c;
background-color: #40777c;
color: white;
box-shadow: 0 0 20px rgb(0 0 0 / 30%);"> <i class="icon-enter"></i></button>
</a>
</div>
{% endif %}
</li>
</ul>
</div>
......
......@@ -237,20 +237,20 @@
<div>
<a href="#" class="btn btn-default" id="button_hide"><span class="caret" style="margin-left: -5px;"></span></a>
</div>
<div class="row" >
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6 content-footer" >
<div class="col-md-6 content-footer">
<div class="row" id="info-footer">
<div class="col-md-12">
<div class="row">
<div class="col-md-3" style="min-width: 150px;">
<div class="col-md-4" style="min-width: 150px;">
<div class="form-group">
<label class="text-semibold">Informasi</label>
<div>
<table>
<tr>
<th>Luas Wilayah</th>
<td>: {{ global.1 }}</td>
</tr>
<tr>
<th>Jumlah Kecamatan</th>
<td>: {{ global.5 }}</td>
......@@ -280,45 +280,11 @@
</tr>
</table>
</div>
</div>
</div>
<div class="col-md-3" style="min-width: 150px;">
<div class="form-group" style="margin-top: 30px;">
<table>
<tr>
<th>Luas Wilayah</th>
<td>: {{ global.1 }}</td>
</tr>
<tr>
<th>Luas Pemukiman</th>
<td>: {{ global.2 }}</td>
</tr>
<tr>
<th>Luas Ladang & Sawah</th>
<td>: {{ global.3 }}</td>
</tr>
<tr>
<th>Luas Hutan Kering</th>
<td>: {{ global.7 }}</td>
</tr>
<tr>
<th>Luas Semak Belukar</th>
<td>: {{ global.14 }}</td>
</tr>
<tr>
<th>Panjang Ruas Jalan</th>
<td>: {{ global.8 }}</td>
</tr>
</table>
</div>
</div>
<div class="col-md-3" style="min-width: 120px;">
<div class="form-group" style="margin-top: 20px;">
<!-- <label class="text-semibold">Last filter check feasibilty </label> -->
<div class="col-md-4" style="min-width: 150px;">
<div class="form-group">
<table>
<tr>
<th>Jumlah Rumah Sakit</th>
......@@ -351,9 +317,37 @@
</tr>
</table>
</div>
</div>
<div class="col-md-4" style="min-width: 120px;">
<div class="form-group">
<!-- <label class="text-semibold">Last filter check feasibilty </label> -->
<table>
<tr>
<th>Luas Pemukiman</th>
<td>: {{ global.2 }}</td>
</tr>
<tr>
<th>Luas Ladang & Sawah</th>
<td>: {{ global.3 }}</td>
</tr>
<tr>
<th>Luas Hutan Kering</th>
<td>: {{ global.7 }}</td>
</tr>
<tr>
<th>Luas Semak Belukar</th>
<td>: {{ global.14 }}</td>
</tr>
<tr>
<th>Panjang Ruas Jalan</th>
<td>: {{ global.8 }}</td>
</tr>
</table>
</div>
</div>
<div class="col-md-3" style="min-width: 150px;padding-left:50px;bottom:-140px">
<div style="min-width: 150px;padding-left:50px;bottom:-140px">
<i><b>
Sumber : DUKCAPIL, 2019
</b></i>
......
{% load static %}
<ul class="dock" style="right: 0;position: absolute;">
<li class="fixed-plugin" style="top: 100px;">
<li class="fixed-plugin" style="top: 100px;">
<div class="dropdown show-dropdown">
<a href="#" data-toggle="dropdown">
<i class="fa fa-map-o fa-2x" style="color: white;
......@@ -8,7 +8,7 @@
border-radius: 0 0 6px 6px;
width: auto;"> </i>
</a>
<ul class="dropdown-menu" x-placement="bottom-start" >
<ul class="dropdown-menu" x-placement="bottom-start">
<li class="header-title text-center">Maps BaseLayer</li>
<div class="dropdown-content-body">
<div class="row text-center">
......@@ -55,8 +55,8 @@
</div>
</ul>
</div>
</li>
<li class="fixed-plugin" style="top: 160px;">
</li>
<li class="fixed-plugin" style="top: 160px;">
<div class="dropdown show-dropdown">
<a href="#" data-toggle="dropdown">
......@@ -65,7 +65,7 @@
margin: 4px;
margin-left: 10px;"> </i>
</a>
<ul class="dropdown-menu" >
<ul class="dropdown-menu">
<li class="header-title text-center">Sidebar Filters</li>
<!-- <div id="sidebar" onmouseleave="overll()">
<div class="sidebar-wrapper">
......@@ -232,36 +232,7 @@
</div>
</ul>
</div>
</div>
</ul>
<!-- Second navbar -->
<div class="navbar navbar-default" id="navbar-second" style="display: none;">
<ul class="nav navbar-nav no-border visible-xs-block">
<li><a class="text-center collapsed" data-toggle="collapse" data-target="#navbar-second-toggle"><i class="icon-menu7"></i></a></li>
</ul>
<div class="navbar-collapse collapse" id="navbar-second-toggle">
<ul class="nav navbar-nav">
<li class="active"><a href="{% url 'apps:dashboard' %}"><i class="icon-display4 position-left"></i> Dashboard</a></li>
<li>
<div onmouseenter="resse()" onmouseleave="normalse()" id="DataTables_Table_0_filter" class="dataTables_filter" style="margin: 0px 0 0px 20px;padding-top:5px;">
<label>
<input type="search" class="search_desa" id="search_desa" placeholder="Type to search..." aria-controls="DataTables_Table_0">
</label>
<ul id="searchResult"></ul>
</div>
</li>
<li class="hidden-xs" id="jumlah" style="padding-top: 14px;padding-left: 14px;">
<!-- <li class="hidden-xs"><a href="#" data-toggle="collapse" data-target=".navbar-collapse.in" id="list-btn"><i class="fa fa-list white"></i>&nbsp;&nbsp;List</a></li> -->
</li>
<!-- Second navbar -->
{% block btnlist %} {% endblock btnlist %}
</ul>
</div>
</div>
</div>
\ No newline at end of file
</ul>
\ No newline at end of file
This diff is collapsed.
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