Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
irul
/
opensipkd-base
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1b819c06
authored
Mar 03, 2023
by
aagusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
perbaikan home
1 parent
af3b6463
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
52 additions
and
58 deletions
opensipkd/base/__init__.py
opensipkd/base/views/__init__.py
opensipkd/base/views/templates/403.pt
opensipkd/base/views/templates/404.pt
opensipkd/base/views/templates/base.pt
opensipkd/base/views/templates/base3.1.pt
opensipkd/base/views/templates/list_table.pt
opensipkd/base/views/templates/login.pt
opensipkd/base/views/templates/logout.pt
opensipkd/base/views/templates/maps.pt
opensipkd/base/views/templates/register.pt
opensipkd/base/__init__.py
View file @
1b819c0
...
...
@@ -383,12 +383,6 @@ def json_rpc():
def
get_host
(
request
):
host
=
get_params
(
'_host'
,
""
)
# if not host:
# host = request.route_url('home')[:-1]
# proto = 'HTTP_X_FORWARDED_PROTO' in request.environ \
# and request.environ['HTTP_X_FORWARDED_PROTO'] \
# or "http"
# host = f"{proto}://{request.host}"
return
host
and
host
or
get_home
(
request
)
...
...
@@ -467,7 +461,7 @@ def main(global_config, **settings):
config
.
add_request_method
(
thousand
,
'thousand'
,
reify
=
True
)
config
.
add_request_method
(
is_devel
,
'devel'
,
reify
=
True
)
config
.
add_request_method
(
get_host
,
'_host'
,
reify
=
True
)
config
.
add_request_method
(
get_ho
me
,
'home'
,
reify
=
True
)
config
.
add_request_method
(
get_ho
st
,
'home'
,
reify
=
True
)
config
.
add_request_method
(
google_signin_client_id
,
'google_signin_client_id'
,
reify
=
True
)
config
.
add_request_method
(
google_signin_client_ids
,
...
...
opensipkd/base/views/__init__.py
View file @
1b819c0
...
...
@@ -125,7 +125,7 @@ def view_password(request):
if
not
request
.
POST
:
return
dict
(
form
=
form
.
render
())
if
'save'
not
in
request
.
POST
:
return
HTTPFound
(
location
=
request
.
route_url
(
'home'
)
)
return
HTTPFound
(
location
=
request
.
_host
)
schema
.
request
=
request
controls
=
request
.
POST
.
items
()
try
:
...
...
@@ -135,7 +135,7 @@ def view_password(request):
UserService
.
set_password
(
request
.
user
,
c
[
'new_password'
])
DBSession
.
add
(
request
.
user
)
request
.
session
.
flash
(
'Password baru Anda sudah disimpan.'
)
return
HTTPFound
(
location
=
request
.
route_url
(
'home'
)
)
return
HTTPFound
(
location
=
request
.
_host
)
######################################
...
...
opensipkd/base/views/templates/403.pt
View file @
1b819c0
<html
tal:define=
"home request.
route_url('home')[:-1]
;"
>
<html
tal:define=
"home request.
_host
;"
>
<body>
<div
class=
"well"
>
<h3>
Forbidden
</h3>
...
...
opensipkd/base/views/templates/404.pt
View file @
1b819c0
<html
tal:define=
"home request.
route_url('home')[:-1]
;"
>
<html
tal:define=
"home request.
_host
;"
>
<body>
<div
class=
"well"
>
<h2>
${request.app_name}
</h2>
...
...
opensipkd/base/views/templates/base.pt
View file @
1b819c0
<!DOCTYPE html>
<html
lang=
"en"
tal:define=
"home request.
route_url('home')
;"
>
<html
lang=
"en"
tal:define=
"home request.
_host
;"
>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
...
...
opensipkd/base/views/templates/base3.1.pt
View file @
1b819c0
<!DOCTYPE html>
<html
lang=
"en-us"
tal:define=
"
home request.
route_url('home')[:-1]
;
home request.
_host
;
user_path ['user', 'user-add', 'user-edit', 'user-view', 'user-delete'];
user_ext_path ['user-ext', 'user-ext-view', 'user-ext-delete'];
group_path ['group', 'group-add', 'group-edit', 'group-view', 'group-delete'];
...
...
opensipkd/base/views/templates/list_table.pt
View file @
1b819c0
<html
metal:use-macro=
"load: ./base3.1.pt"
tal:define=
"
home request.
route_url('home')
;"
>
home request.
_host
;"
>
<div
metal:fill-slot=
"content"
>
<div
class=
"jarviswidget jarviswidget-color-blueLight"
>
<!-- jarviswidget -->
<div
tal:content=
"structure table"
></div>
...
...
opensipkd/base/views/templates/login.pt
View file @
1b819c0
<!DOCTYPE html>
<html
lang=
"en"
tal:define=
"home request.
route_url('home')[:-1]
;"
>
tal:define=
"home request.
_host
;"
>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
...
...
opensipkd/base/views/templates/logout.pt
View file @
1b819c0
<!DOCTYPE html>
<html
lang=
"en"
tal:define=
"home request.
route_url('home')
;"
>
<html
lang=
"en"
tal:define=
"home request.
_host
;"
>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
...
...
@@ -10,22 +10,22 @@
<meta
tal:condition=
"request.google_signin_client_id"
name=
"google-signin-client_id"
content=
"${request.google_signin_client_id}"
>
<link
rel=
"shortcut icon"
href=
"${home}static/img/favicon.png"
>
<link
rel=
"shortcut icon"
href=
"${home}
/
static/img/favicon.png"
>
<title>
Logout
</title>
<!-- Basic Styles -->
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"${home}static/v3/css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"${home}static/v3/css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"${home}
/
static/v3/css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"${home}
/
static/v3/css/font-awesome.min.css"
>
<!-- SmartAdmin Styles : Caution! DO NOT change the order -->
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"${home}static/v3/css/smartadmin-production-plugins.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"${home}static/v3/css/smartadmin-production.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"${home}static/v3/css/smartadmin-skins.min.css"
>
href=
"${home}
/
static/v3/css/smartadmin-production-plugins.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"${home}
/
static/v3/css/smartadmin-production.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"${home}
/
static/v3/css/smartadmin-skins.min.css"
>
<!-- SmartAdmin RTL Support -->
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"${home}static/v3/css/smartadmin-rtl.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}static/css/home.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"${home}
/
static/v3/css/smartadmin-rtl.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}
/
static/css/home.css"
>
</head>
...
...
@@ -54,7 +54,7 @@
tal:repeat=
"message request.session.pop_flash('error')"
>
${message}
</div>
</div>
<div
class=
"col-md-12"
align=
"center"
>
<img
src=
"${home}static/img/logo.png"
<img
src=
"${home}
/
static/img/logo.png"
class=
"img-float img-thumbnail"
style=
"height:50px;width:auto;border:none;"
/>
</div>
<div
class=
"clearfix"
></div>
...
...
@@ -83,9 +83,9 @@
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script
type=
"text/javascript"
src=
"${home}deform_static/scripts/jquery-2.0.3.min.js"
></script>
<script
type=
"text/javascript"
src=
"${home}deform_static/scripts/bootstrap.min.js"
></script>
<script
type=
"text/javascript"
src=
"${home}deform_static/scripts/deform.js"
></script>
<script
type=
"text/javascript"
src=
"${home}
/
deform_static/scripts/jquery-2.0.3.min.js"
></script>
<script
type=
"text/javascript"
src=
"${home}
/
deform_static/scripts/bootstrap.min.js"
></script>
<script
type=
"text/javascript"
src=
"${home}
/
deform_static/scripts/deform.js"
></script>
<!--?<script tal:condition="request.google_signin_client_id"-->
<!--? src="https://apis.google.com/js/platform.js" async defer></script>-->
<!--?<script tal:condition="request.google_signin_client_id">-->
...
...
opensipkd/base/views/templates/maps.pt
View file @
1b819c0
<!DOCTYPE html>
<html
lang=
"en"
tal:define=
"
home request.
route_url('home')
;"
>
home request.
_host
;"
>
<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"
>
<meta
name=
"description"
content=
""
>
<meta
name=
"author"
content=
""
>
<link
rel=
"shortcut icon"
href=
"${home}static/img/favicon.png"
>
<link
rel=
"shortcut icon"
href=
"${home}
/
static/img/favicon.png"
>
<title
tal:content=
"request.title"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}static/v3/css/bootstrap.min.css"
>
href=
"${home}
/
static/v3/css/bootstrap.min.css"
>
</link>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}static/bootstrap/css/font-awesome.min.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}deform_static/css/typeahead.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}static_map/lib/ol4/ol.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}static_map/lib/ol4/ext/ol3-layerswitcher.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}static_map/lib/ol4/ext/ol3gm.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}static_map/lib/ol4/ext/ol-geocoder.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}static/css/theme.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}static/css/navbar-fixed-top.css"
>
href=
"${home}
/
static/bootstrap/css/font-awesome.min.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}
/
deform_static/css/typeahead.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}
/
static_map/lib/ol4/ol.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}
/
static_map/lib/ol4/ext/ol3-layerswitcher.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}
/
static_map/lib/ol4/ext/ol3gm.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}
/
static_map/lib/ol4/ext/ol-geocoder.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}
/
static/css/theme.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${home}
/
static/css/navbar-fixed-top.css"
>
<link
metal:define-slot=
"link"
/>
<style>
html
{
height
:
100%
;}
...
...
@@ -66,7 +66,7 @@ var gmapKey = '${request.gmap_key}';
<ul
class=
"nav navbar-nav navbar-right"
>
<li
class=
"dropdown"
>
<a
href=
"${home}login"
class=
"button"
>
Masuk
</a>
<a
href=
"${home}
/
login"
class=
"button"
>
Masuk
</a>
</li>
</ul>
</div>
...
...
@@ -83,30 +83,30 @@ var gmapKey = '${request.gmap_key}';
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
Admin
<b
class=
"caret"
></b></a>
<ul
class=
"dropdown-menu"
>
<li
tal:condition=
"has_permission(request, 'user')"
>
<a
href=
"${home}user"
>
User
</a></li>
<a
href=
"${home}
/
user"
>
User
</a></li>
<li
tal:condition=
"has_permission(request, 'group')"
>
<a
href=
"${home}group"
>
Group
</a></li>
<a
href=
"${home}
/
group"
>
Group
</a></li>
<li
tal:condition=
"has_permission(request, 'user-group')"
>
<a
href=
"${home}user/group"
>
User Group
</a></li>
<a
href=
"${home}
/
user/group"
>
User Group
</a></li>
<li
tal:condition=
"has_permission(request, 'routes')"
>
<a
href=
"${home}routes"
>
Routes
</a></li>
<a
href=
"${home}
/
routes"
>
Routes
</a></li>
<li
tal:condition=
"has_permission(request, 'group-routes')"
>
<a
href=
"${home}group/routes"
>
Group Permission
</a></li>
<a
href=
"${home}
/
group/routes"
>
Group Permission
</a></li>
<li
tal:condition=
"has_permission(request, 'upload-logo')"
>
<a
href=
"${home}upload/logo"
>
Upload Logo
</a></li>
<a
href=
"${home}
/
upload/logo"
>
Upload Logo
</a></li>
<li
tal:condition=
"has_permission(request, 'user-ws')"
>
<a
href=
"${home}user/ws"
>
User Web Service
</a></li>
<a
href=
"${home}
/
user/ws"
>
User Web Service
</a></li>
</ul>
</li>
<!-- User Login Menu-->
<li
class=
"dropdown"
tal:attributes=
"class request.path in ['${home}password'] and 'active'"
>
<li
class=
"dropdown"
tal:attributes=
"class request.path in ['${home}
/
password'] and 'active'"
>
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
My Account
<b
class=
"caret"
></b></a>
<ul
class=
"dropdown-menu"
>
<li><a
href=
"${home}logout"
>
${request.user.nice_username()} Logout
</a></li>
<li><a
href=
"${home}password"
>
Ubah password
</a></li>
<li><a
href=
"${home}
/
logout"
>
${request.user.nice_username()} Logout
</a></li>
<li><a
href=
"${home}
/
password"
>
Ubah password
</a></li>
<li
tal:condition=
"'core' in request.modules"
>
<a
href=
"${home}departemen/chg"
>
Ubah Organisasi
</a></li>
<a
href=
"${home}
/
departemen/chg"
>
Ubah Organisasi
</a></li>
</ul>
</li>
</ul>
...
...
@@ -134,16 +134,16 @@ var gmapKey = '${request.gmap_key}';
</div>
</div>
<script
type=
"text/javascript"
src=
"${home}static/v3/js/jquery-2.1.1.min.js"
></script>
src=
"${home}
/
static/v3/js/jquery-2.1.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"${home}static/v3/js/bootstrap/bootstrap.min.js"
></script>
src=
"${home}
/
static/v3/js/bootstrap/bootstrap.min.js"
></script>
<script
type=
"text/javascript"
src=
"${home}deform_static/scripts/typeahead.min.js"
></script>
src=
"${home}
/
deform_static/scripts/typeahead.min.js"
></script>
<script
src=
"${home}static_map/lib/ol4/ol.js"
type=
"text/javascript"
></script>
<script
src=
"${home}
/
static_map/lib/ol4/ol.js"
type=
"text/javascript"
></script>
<!-- <script src="${home}static_map/lib/ol4/ol-debug.js" type="text/javascript"></script> -->
<script
type=
"text/javascript"
src=
"${home}static_map/lib/ol4/ext/ol3-layerswitcher.js"
></script>
<script
type=
"text/javascript"
src=
"${home}static_map/lib/ol4/ext/ol-geocoder.js"
></script>
<script
type=
"text/javascript"
src=
"${home}
/
static_map/lib/ol4/ext/ol3-layerswitcher.js"
></script>
<script
type=
"text/javascript"
src=
"${home}
/
static_map/lib/ol4/ext/ol-geocoder.js"
></script>
<script
type=
"text/javascript"
>
if
(
ol
.
Map
.
prototype
.
getLayer
===
undefined
)
{
ol
.
Map
.
prototype
.
getLayer
=
function
(
id
)
{
...
...
opensipkd/base/views/templates/register.pt
View file @
1b819c0
<html
metal:use-macro=
"load: form_input.pt"
tal:define=
"home request.
route_url('home')[:-1]
;"
>
tal:define=
"home request.
_host
;"
>
<div
metal:fill-slot=
"scripts"
>
<script
tal:condition=
"${captcha}"
>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment