Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Taufik Yulianto
/
esipkd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a7003997
authored
Oct 13, 2020
by
pindya
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Penambahan halaman baru untuk ranking_opd, dan ranking_det
1 parent
056ff80e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
493 additions
and
85 deletions
esipkd/scripts/data/route.csv
esipkd/views/ranking_opd.py
esipkd/views/templates/home.pt
esipkd/views/templates/ranking/ranking_det.pt
esipkd/views/templates/ranking/ranking_opd.pt
esipkd/scripts/data/route.csv
View file @
a700399
...
...
@@ -238,4 +238,6 @@ id,kode,nama,path,factory,perm_name,disabled,created,updated,create_uid
253,"anggaran-pdf","PDF Anggaran","/anggaran/{pdf}/pdf",,"read",0,"2015-03-08 16:45:45",,1
254,"arinvoice-ws","Invoice WS","/arinvoicews",,"read",0,"2020-09-18 16:45:45",,1
255,"arinvoice-ws-act","Invoice WS","/arinvoicews/{act}/act",,"read",0,"2020-09-18 16:45:45",,1
255,"public-act","Public","/public/{act}",,"read",0,"2020-09-18 16:45:45",,1
\ No newline at end of file
256,"public-act","Public","/public/{act}",,"read",0,"2020-09-18 16:45:45",,1
257,"ranking","Ranking","/ranking",,"read",0,"2020-10-13 08:38:45",,1
258,"ranking-det","Ranking Detail","/ranking/det",,"read",0,"2020-10-13 08:38:45",,1
\ No newline at end of file
esipkd/views/ranking_opd.py
0 → 100644
View file @
a700399
import
pytz
import
transaction
import
colander
from
datetime
import
datetime
,
date
from
email.utils
import
parseaddr
from
pyramid.view
import
view_config
from
pyramid.httpexceptions
import
(
HTTPFound
,
HTTPForbidden
,
HTTPNotFound
)
from
pyramid.security
import
(
remember
,
forget
,
authenticated_userid
,)
from
deform
import
(
Form
,
ValidationFailure
,
widget
,)
from
..tools
import
dmy
,
date_from_str
,
int_to_roman
from
sqlalchemy
import
func
,
and_
from
..models
import
(
DBSession
,
User
,)
from
..models.isipkd
import
(
ARSspd
,
ARInvoice
,
Unit
,
Rekening
)
from
pyramid.view
import
notfound_view_config
import
logging
log
=
logging
.
getLogger
(
__name__
)
###########
# Ranking #
###########
@view_config
(
route_name
=
'ranking'
,
renderer
=
'templates/ranking/ranking_opd.pt'
)
def
view_rank
(
request
):
statusadmin
=
False
if
hasattr
(
request
.
user
,
'groups'
):
for
g
in
request
.
user
.
groups
:
if
g
.
group_name
==
'admin'
:
statusadmin
=
True
break
if
statusadmin
==
True
:
if
'date'
in
request
.
params
and
request
.
params
[
'date'
]:
now
=
date_from_str
(
request
.
params
[
'date'
]
.
strip
())
else
:
now
=
date
.
today
()
dates
=
dict
(
year
=
now
.
year
,
month
=
now
.
month
,
week
=
int
(
now
.
strftime
(
'
%
W'
)),
day
=
now
,
)
data_dashboard
=
dict
(
sopd
=
[],
## Ranking Penerimaan
sopd10
=
[],
## 10 Ranking Penerimaan
sopd4
=
[]
)
#Unit
opds
=
Unit
.
query
()
.
filter
(
Unit
.
level_id
.
between
(
3
,
4
))
.
order_by
(
Unit
.
kode
)
.
all
()
for
op
in
opds
:
if
op
.
level_id
==
3
:
data_dashboard
[
'sopd'
]
.
append
(
dict
(
peringkat
=
0
,
kode
=
op
.
kode
.
strip
(),
level
=
op
.
level_id
,
unit
=
op
.
nama
.
strip
(),
nominal
=
0
))
if
op
.
level_id
==
4
:
data_dashboard
[
'sopd4'
]
.
append
(
dict
(
kode
=
op
.
kode
.
strip
(),
level
=
op
.
level_id
,
unit
=
op
.
nama
.
strip
(),
nominal
=
0
))
##RANKING##
tanggal_berjalan
=
dates
[
'day'
]
tahun_berjalan
=
tanggal_berjalan
.
year
opd
=
DBSession
.
query
(
func
.
sum
(
ARSspd
.
bayar
)
.
label
(
'jumlah'
),
func
.
max
(
func
.
trim
(
Unit
.
kode
))
.
label
(
'kode'
),
func
.
max
(
func
.
trim
(
Unit
.
nama
))
.
label
(
'nama'
),
func
.
max
(
Unit
.
level_id
)
.
label
(
'level_id'
),
)
.
join
(
ARInvoice
,
ARInvoice
.
id
==
ARSspd
.
arinvoice_id
)
.
\
join
(
Unit
,
func
.
trim
(
Unit
.
kode
)
==
func
.
trim
(
ARInvoice
.
unit_kode
))
.
\
filter
(
ARSspd
.
tahun_id
==
tahun_berjalan
,
Unit
.
level_id
>=
3
)
.
\
group_by
(
func
.
trim
(
Unit
.
kode
))
.
all
()
for
sopd
in
opd
:
if
sopd
.
level_id
>=
3
:
for
unit3
in
data_dashboard
[
'sopd'
]:
if
sopd
.
kode
.
startswith
(
unit3
[
'kode'
]):
unit3
[
'nominal'
]
+=
sopd
.
jumlah
if
sopd
.
level_id
>=
4
:
for
unit4
in
data_dashboard
[
'sopd4'
]:
if
sopd
.
kode
.
startswith
(
unit4
[
'kode'
]):
unit4
[
'nominal'
]
+=
sopd
.
jumlah
##SORT
data_dashboard
[
'sopd'
]
=
sorted
(
data_dashboard
[
'sopd'
],
key
=
lambda
i
:
(
i
[
'nominal'
]),
reverse
=
True
)
i
=-
1
for
opd
in
data_dashboard
[
'sopd'
]:
i
+=
1
if
i
<
10
:
data_dashboard
[
'sopd10'
]
.
append
(
dict
(
peringkat
=
i
+
1
,
kode
=
opd
[
'kode'
],
unit
=
opd
[
'unit'
],
nominal
=
opd
[
'nominal'
]))
opd
[
'peringkat'
]
=
i
+
1
return
dict
(
project
=
'esipkd'
,
dates
=
dates
,
data
=
data_dashboard
,
statusadmin
=
statusadmin
)
else
:
return
dict
(
project
=
'esipkd'
,
statusadmin
=
statusadmin
)
@view_config
(
route_name
=
'ranking-det'
,
renderer
=
'templates/ranking/ranking_det.pt'
)
def
view_det
(
request
):
params
=
request
.
params
url_dict
=
request
.
matchdict
found
=
False
row
=
''
now
=
date
.
today
()
statusadmin
=
False
if
hasattr
(
request
.
user
,
'groups'
):
for
g
in
request
.
user
.
groups
:
if
g
.
group_name
==
'admin'
:
statusadmin
=
True
break
if
statusadmin
==
True
:
if
'date'
in
request
.
params
and
request
.
params
[
'date'
]:
now
=
date_from_str
(
request
.
params
[
'date'
]
.
strip
())
else
:
now
=
date
.
today
()
dates
=
dict
(
year
=
now
.
year
,
month
=
now
.
month
,
week
=
int
(
now
.
strftime
(
'
%
W'
)),
day
=
now
,
)
data_dashboard
=
dict
(
sopd4
=
[]
)
opds
=
Unit
.
query
()
.
filter
(
Unit
.
level_id
==
4
)
.
order_by
(
Unit
.
kode
)
.
all
()
for
op
in
opds
:
data_dashboard
[
'sopd4'
]
.
append
(
dict
(
kode
=
op
.
kode
.
strip
(),
level
=
op
.
level_id
,
unit
=
op
.
nama
.
strip
(),
nominal
=
0
))
unit_kode
=
'kode'
in
params
and
params
[
'kode'
]
or
''
unit_nama
=
'unit'
in
params
and
params
[
'unit'
]
or
''
tanggal_berjalan
=
dates
[
'day'
]
tahun_berjalan
=
tanggal_berjalan
.
year
opd
=
DBSession
.
query
(
func
.
sum
(
ARSspd
.
bayar
)
.
label
(
'jumlah'
),
func
.
max
(
func
.
trim
(
Unit
.
kode
))
.
label
(
'kode'
),
func
.
max
(
func
.
trim
(
Unit
.
nama
))
.
label
(
'nama'
),
func
.
max
(
Unit
.
level_id
)
.
label
(
'level_id'
),
)
.
join
(
ARInvoice
,
ARInvoice
.
id
==
ARSspd
.
arinvoice_id
)
.
\
join
(
Unit
,
func
.
trim
(
Unit
.
kode
)
==
func
.
trim
(
ARInvoice
.
unit_kode
))
.
\
filter
(
ARSspd
.
tahun_id
==
tahun_berjalan
,
Unit
.
level_id
==
4
)
.
\
group_by
(
func
.
trim
(
Unit
.
kode
))
.
all
()
for
sopd
in
opd
:
for
unit4
in
data_dashboard
[
'sopd4'
]:
if
sopd
.
kode
.
startswith
(
unit4
[
'kode'
]):
unit4
[
'nominal'
]
+=
sopd
.
jumlah
print
(
'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>'
,
opd
)
return
dict
(
project
=
'esipkd'
,
dates
=
dates
,
data
=
data_dashboard
,
unit_kode
=
unit_kode
,
unit_nama
=
unit_nama
,
statusadmin
=
statusadmin
)
else
:
return
dict
(
project
=
'esipkd'
,
statusadmin
=
statusadmin
)
\ No newline at end of file
esipkd/views/templates/home.pt
View file @
a700399
...
...
@@ -179,8 +179,8 @@ Selamat datang di aplikasi SIPANDU
</canvas>
</div>
<div
class=
"col-md-5"
>
<a
class=
"link-styleless"
title=
"klik untuk melihat daftar lengkap ranking"
data-toggle=
"modal"
data-target=
"#
ranking"
>
<font
class=
"labeltab"
>
10 Penerimaan OPD Tertinggi
Periode ${dates['year']}
</font><br>
<a
class=
"link-styleless"
title=
"klik untuk melihat daftar lengkap ranking"
data-toggle=
"modal"
href=
"/
ranking"
>
<font
class=
"labeltab"
>
Daftar Penerimaan Pendapatan Daerah
Periode ${dates['year']}
</font><br>
<div
class=
"clearfix"
></div>
<table
class=
"table table-bordered"
>
<thead>
...
...
@@ -218,88 +218,6 @@ Selamat datang di aplikasi SIPANDU
<div
class=
"clearfix"
></div>
<!-- MODAL START HERE -->
<!-- MODAL RANKING-->
<div
class=
"modal fade"
id=
"ranking"
tabindex=
"-1"
role=
"dialog"
>
<div
class=
"modal-dialog modal-lg"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
</div>
<div
class=
"modal-body"
>
<div
class=
"col-md-12"
>
<h5>
Detail Ranking Penerimaan OPD Periode ${dates['day'].strftime('%d-%m-%Y')}
</h5>
</div>
<div
class=
"clearfix"
></div>
<table
class=
"table table-bordered"
>
<thead>
<tr>
<th
style=
"text-align:center;"
>
Peringkat
</th>
<th
style=
"text-align:center;"
>
Kode Unit
</th>
<th
style=
"text-align:center;"
>
Nama Unit
</th>
<th
style=
"text-align:center;"
>
Nominal
</th>
</tr>
</thead>
<tbody>
<tal:block
tal:repeat=
"so data['sopd']"
>
<tal:block
tal:condition=
"so['nominal']"
>
<tr
class=
"link-styleless"
title=
"klik untuk melihat daftar lengkap ranking"
data-toggle=
"modal"
data-target=
"#ranking${so['kode'].replace('.','')}"
>
<td
style=
"text-align:center;"
>
${so['peringkat']}
</td>
<td
style=
"text-align:left;"
>
${so['kode']}
</td>
<td
style=
"text-align:left;"
>
${so['unit']}
</td>
<td
style=
"text-align:right;"
>
${'{:n}'.format(so['nominal'])}
</td>
</tr>
</tal:block>
</tal:block>
</tbody>
</table>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
Close
</button>
</div>
</div>
</div>
</div>
<!--MODAL DETAIL RANKING -->
<tal:block
tal:repeat=
"so data['sopd']"
>
<div
class=
"modal fade"
id=
"ranking${so['kode'].replace('.','')}"
tabindex=
"-1"
role=
"dialog"
>
<div
class=
"modal-dialog modal-lg"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
</div>
<div
class=
"modal-body"
>
<div
class=
"col-md-12"
>
<h5>
Ranking Penerimaan ${so['kode']} - ${so['unit']} Periode ${dates['day'].strftime('%d-%m-%Y')}
</h5>
</div>
<div
class=
"clearfix"
></div>
<table
class=
"table table-bordered"
>
<thead>
<tr>
<th
style=
"text-align:center;"
>
Kode Unit
</th>
<th
style=
"text-align:center;"
>
Nama Unit
</th>
<th
style=
"text-align:center;"
>
Nominal
</th>
</tr>
</thead>
<tbody>
<tal:block
tal:repeat=
"so4 data['sopd4']"
>
<tal:block
tal:condition=
"so4['kode'].startswith(so['kode'])"
>
<tr>
<td
style=
"text-align:left;"
>
${so4['kode']}
</td>
<td
style=
"text-align:left;"
>
${so4['unit']}
</td>
<td
style=
"text-align:right;"
>
${'{:n}'.format(so4['nominal'])}
</td>
</tr>
</tal:block>
</tal:block>
</tbody>
</table>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
Close
</button>
</div>
</div>
</div>
</div>
</tal:block>
<!--MODAL DETAIL REKENING -->
<tal:block
tal:repeat=
"ru data['rek']"
>
<div
class=
"modal fade"
id=
"rekeningdetail${ru['kode'].replace('.','')}"
tabindex=
"-1"
role=
"dialog"
>
...
...
esipkd/views/templates/ranking/ranking_det.pt
0 → 100644
View file @
a700399
<html
metal:use-macro=
"load: ../base.pt"
>
<div
metal:fill-slot=
"content"
>
<style>
h4
{
font-weight
:
bold
;
text-align
:
left
;
color
:
#15915b
;
}
h5
{
font-weight
:
bold
;
font-size
:
18px
;
text-align
:
left
;
color
:
#264184
;
}
.wraplabel
{
border
:
1px
solid
#15915b
;
border-radius
:
5px
;
-webkit-border-radius
:
5px
;
-moz-border-radius
:
5px
;
padding
:
10px
;
margin-top
:
10px
;
margin-bottom
:
20px
;
}
.labeltab
{
color
:
#264184
;
font-weight
:
bold
;
font-size
:
16px
;
}
.textlabel
{
display
:
block
;
text-align
:
right
;
color
:
#005500
;
font-weight
:
bold
;
}
.wrapchart
{
border
:
1px
solid
#c4c4c4
;
padding
:
0px
;
margin-top
:
10px
;
margin-bottom
:
20px
;
}
.table
{
font-size
:
12px
;
margin-top
:
10px
;
margin-bottom
:
20px
;
}
.table
th
{
background-color
:
#ddebf6
;
}
.no-padding
{
padding
:
0px
;
}
.wrapopd
{
border
:
1px
solid
#c4c4c4
;
min-height
:
120px
;
padding-top
:
5px
;
padding-bottom
:
5px
;
}
.kodeopd
{
display
:
block
;
color
:
#264184
;
font-size
:
120%
;
font-weight
:
bold
;
}
.namaopd
{
display
:
block
;
color
:
#264184
;
font-weight
:
500
;
}
.jmlopd
{
display
:
block
;
font-size
:
120%
;
color
:
#264184
;
font-weight
:
bold
;
text-align
:
right
;
position
:
absolute
;
bottom
:
5px
;
right
:
10px
;
}
.picker
{
font-size
:
13px
;
}
.link-styleless
{
text-decoration
:
none
!important
;
color
:
inherit
!important
;
cursor
:
pointer
;
}
.modal-body
{
overflow-x
:
scroll
!important
;
}
.bgth
{
background-color
:
#ddebf6
!important
;
}
.modal-backdrop
{
visibility
:
hidden
!important
;
}
.modal.in
{
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
}
.modal
{
overflow
:
auto
!important
;
}
tr
.header
{
cursor
:
pointer
;
}
.content
{
display
:
none
;
}
</style>
<tal:block
tal:condition=
"statusadmin"
>
<div
class=
"col-md-12"
>
<font
class=
"labeltab"
>
Daftar Penerimaan ${unit_kode} - ${unit_nama} Periode ${dates['day'].strftime('%d-%m-%Y')}
</font><br>
<div
class=
"clearfix"
></div>
<table
class=
"table table-bordered"
>
<thead>
<tr>
<th
style=
"text-align:center;"
>
Kode Unit
</th>
<th
style=
"text-align:center;"
>
Nama Unit
</th>
<th
style=
"text-align:center;"
>
Nominal
</th>
</tr>
</thead>
<tbody>
<tal:block
tal:repeat=
"so4 data['sopd4']"
>
<tal:block
tal:condition=
"so4['kode'].startswith(unit_kode)"
>
<tr>
<td
style=
"text-align:left;"
>
${so4['kode']}
</td>
<td
style=
"text-align:left;"
>
${so4['unit']}
</td>
<td
style=
"text-align:right;"
>
${'{:n}'.format(so4['nominal'])}
</td>
</tr>
</tal:block>
</tal:block>
</tbody>
</table>
</div>
<div
class=
"col-md-12"
>
<div
class=
"clearfix"
></div>
</div>
<script
type=
"text/javascript"
src=
"/static/js/Chart.min.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/jquery-2.1.1.min.js"
></script>
<script>
$
(
document
).
ready
(
function
()
{
$
(
'tr.header'
).
click
(
function
()
{
$
(
'.expanded'
).
slideUp
(
100
,
function
()
{});
if
(
!
$
(
this
).
hasClass
(
'expanded-header'
))
{
$
(
this
).
nextUntil
(
'tr.header'
).
addClass
(
'expanded'
).
slideToggle
(
100
,
function
()
{});
$
(
'.expanded-header'
).
removeClass
(
'expanded-header'
);
$
(
this
).
addClass
(
'expanded-header'
);
}
else
{
$
(
this
).
removeClass
(
'expanded-header'
);
}
});
$
(
'.date'
).
pickadate
({
"submitFormat"
:
"dd-mm-yyyy"
,
"format"
:
"dd-mm-yyyy"
,});
});
$
(
'.date'
).
attr
(
'readonly'
,
true
);
$
(
'.date'
).
css
(
'background-color'
,
'transparent'
);
<
tal
:
block
tal
:
condition
=
"'unit' in request.params and request.params['unit']"
>
$
(
"#unit"
).
val
(
"${request.params['unit'].strip()}"
);
<
/tal:block
>
</script>
</tal:block>
</div>
</html>
esipkd/views/templates/ranking/ranking_opd.pt
0 → 100644
View file @
a700399
<html
metal:use-macro=
"load: ../base.pt"
>
<div
metal:fill-slot=
"content"
>
<style>
h4
{
font-weight
:
bold
;
text-align
:
left
;
color
:
#15915b
;
}
h5
{
font-weight
:
bold
;
font-size
:
18px
;
text-align
:
left
;
color
:
#264184
;
}
.wraplabel
{
border
:
1px
solid
#15915b
;
border-radius
:
5px
;
-webkit-border-radius
:
5px
;
-moz-border-radius
:
5px
;
padding
:
10px
;
margin-top
:
10px
;
margin-bottom
:
20px
;
}
.labeltab
{
color
:
#264184
;
font-weight
:
bold
;
font-size
:
16px
;
}
.textlabel
{
display
:
block
;
text-align
:
right
;
color
:
#005500
;
font-weight
:
bold
;
}
.wrapchart
{
border
:
1px
solid
#c4c4c4
;
padding
:
0px
;
margin-top
:
10px
;
margin-bottom
:
20px
;
}
.table
{
font-size
:
12px
;
margin-top
:
10px
;
margin-bottom
:
20px
;
}
.table
th
{
background-color
:
#ddebf6
;
}
.no-padding
{
padding
:
0px
;
}
.wrapopd
{
border
:
1px
solid
#c4c4c4
;
min-height
:
120px
;
padding-top
:
5px
;
padding-bottom
:
5px
;
}
.kodeopd
{
display
:
block
;
color
:
#264184
;
font-size
:
120%
;
font-weight
:
bold
;
}
.namaopd
{
display
:
block
;
color
:
#264184
;
font-weight
:
500
;
}
.jmlopd
{
display
:
block
;
font-size
:
120%
;
color
:
#264184
;
font-weight
:
bold
;
text-align
:
right
;
position
:
absolute
;
bottom
:
5px
;
right
:
10px
;
}
.picker
{
font-size
:
13px
;
}
.link-styleless
{
text-decoration
:
none
!important
;
color
:
inherit
!important
;
cursor
:
pointer
;
}
.modal-body
{
overflow-x
:
scroll
!important
;
}
.bgth
{
background-color
:
#ddebf6
!important
;
}
.modal-backdrop
{
visibility
:
hidden
!important
;
}
.modal.in
{
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
}
.modal
{
overflow
:
auto
!important
;
}
tr
.header
{
cursor
:
pointer
;
}
.content
{
display
:
none
;
}
</style>
<tal:block
tal:condition=
"statusadmin"
>
<div
class=
"col-md-12"
>
<font
class=
"labeltab"
>
Daftar Penerimaan Pendapatan Daerah Periode ${dates['day'].strftime('%d-%m-%Y')}
</font><br>
<div
class=
"clearfix"
></div>
<table
class=
"table table-bordered"
>
<thead>
<tr>
<th
style=
"text-align:center;"
>
Peringkat
</th>
<th
style=
"text-align:center;"
>
Kode Unit
</th>
<th
style=
"text-align:center;"
>
Nama Unit
</th>
<th
style=
"text-align:center;"
>
Nominal
</th>
</tr>
</thead>
<tbody>
<tal:block
tal:repeat=
"so data['sopd']"
>
<tal:block
tal:condition=
"so['nominal']"
>
<tr
class=
"header"
title=
"klik untuk melihat daftar lengkap ranking"
href=
"/ranking/det?kode=${so['kode']}&unit=${so['unit']}"
>
<td
style=
"text-align:center;"
>
${so['peringkat']}
</td>
<td
style=
"text-align:left;"
>
${so['kode']}
</td>
<td
style=
"text-align:left;"
>
${so['unit']}
</td>
<td
style=
"text-align:right;"
>
${'{:n}'.format(so['nominal'])}
</td>
</tr>
</tal:block>
</tal:block>
</tbody>
</table>
</div>
<div
class=
"col-md-12"
>
<div
class=
"clearfix"
></div>
</div>
<script
type=
"text/javascript"
src=
"/static/js/Chart.min.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/jquery-2.1.1.min.js"
></script>
<script>
$
(
document
).
ready
(
function
()
{
$
(
'table tr'
).
click
(
function
(){
window
.
location
=
$
(
this
).
attr
(
'href'
);
return
false
;
});
$
(
'tbody>tr:not(.header)'
).
hide
();
$
(
'tr.header'
).
click
(
function
()
{
$
(
'.expanded'
).
slideUp
(
100
,
function
()
{});
if
(
!
$
(
this
).
hasClass
(
'expanded-header'
))
{
$
(
this
).
nextUntil
(
'tr.header'
).
addClass
(
'expanded'
).
slideToggle
(
100
,
function
()
{});
$
(
'.expanded-header'
).
removeClass
(
'expanded-header'
);
$
(
this
).
addClass
(
'expanded-header'
);
}
else
{
$
(
this
).
removeClass
(
'expanded-header'
);
}
});
$
(
'.date'
).
pickadate
({
"submitFormat"
:
"dd-mm-yyyy"
,
"format"
:
"dd-mm-yyyy"
,});
});
$
(
'.date'
).
attr
(
'readonly'
,
true
);
$
(
'.date'
).
css
(
'background-color'
,
'transparent'
);
<
tal
:
block
tal
:
condition
=
"'unit' in request.params and request.params['unit']"
>
$
(
"#unit"
).
val
(
"${request.params['unit'].strip()}"
);
<
/tal:block
>
</script>
</tal:block>
</div>
</html>
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