Commit 9090da10 authored by Dave Griffiths's avatar Dave Griffiths
Browse files

village amenity fixes

parent 97a3674c
......@@ -470,20 +470,30 @@
50 (layout 'fill-parent 'wrap-content 1 'centre 5)))
(define (medit-text id type fn)
(vert
(linear-layout
(make-id (string-append (symbol->string id) "-container"))
'vertical
(layout 'fill-parent 'wrap-content 1 'centre 20)
(list 0 0 0 0)
(list
(text-view 0 (mtext-lookup id)
30 (layout 'wrap-content 'wrap-content -1 'centre 0))
(edit-text (symbol->id id) "" 30 type
(layout 'fill-parent 'wrap-content -1 'centre 0)
fn)))
fn))))
(define (medit-text-scale id type fn)
(vert
(linear-layout
(make-id (string-append (symbol->string id) "-container"))
'vertical
(layout 'fill-parent 'wrap-content 1 'centre 20)
(list 0 0 0 0)
(list
(text-view 0 (mtext-lookup id)
30 (layout 'wrap-content 'wrap-content 1 'centre 0))
(edit-text (symbol->id id) "" 30 type
(layout 'fill-parent 'wrap-content 1 'centre 0)
fn)))
fn))))
(define (mspinner id types fn)
(vert
......
......@@ -166,9 +166,9 @@
(append
(cond
((get-current 'sync-on #f)
(when (zero? (random 10))
(msg "mangling...")
(mangle-test! db "sync" entity-types))
; (when (zero? (random 10))
; (msg "mangling...")
; (mangle-test! db "sync" entity-types))
(msg "one")
(set-current! 'upload 0)
(set-current! 'download 0)
......@@ -529,9 +529,21 @@
(let ((id-text (symbol->string id)))
(horiz-colour
(if shade colour-one colour-two)
(linear-layout
0 'vertical (layout 200 'wrap-content -1 'left 0)
(list 0 0 0 0)
(list
(text-view (symbol->id id)
(mtext-lookup id)
30 (layout 'wrap-content 'wrap-content -1 'left 0))
(mtoggle-button-scale
id (lambda (v)
(entity-set-value! id-text "int" v) '()))
(string->symbol (string-append id-text "-in-village"))
(lambda (v)
(entity-set-value! id-text "int" v)
(list (update-widget
'edit-text
(get-id (string-append id-text "-closest-access-container"))
(if (eqv? v 1) 'hide 'show) 0))))))
(medit-text-scale
(string->symbol (string-append id-text "-closest-access"))
"normal" (lambda (v) (entity-set-value!
......@@ -550,10 +562,15 @@
(let ((id-text (symbol->string id)))
(append
(list
(mupdate 'toggle-button id id-text)
(mupdate 'toggle-button (string->symbol (string-append id-text "-in-village")) id-text)
(mupdate 'edit-text
(string->symbol (string-append id-text "-closest-access"))
(string-append id-text "-closest-access")))
(string-append id-text "-closest-access"))
(update-widget
'edit-text
(get-id (string-append id-text "-closest-access-container"))
(if (eqv? (entity-get-value id-text) 1)
'hide 'show) 0))
(mupdate-gps
(string->symbol (string-append id-text "-gps"))
(string-append id-text "-gps")))))
......
......@@ -52,31 +52,31 @@ closest-access, Closest place of access, ,,
house-gps, GPS, ,,
toilet-gps, GPS, ,,
school, School, ,,
school-closest-access, Access, ,,
school-closest-access, Closest access, ,,
school-gps, GPS, ,,
hospital, Hospital/Health care centre, ,,
hospital-closest-access, Access, ,,
hospital-closest-access, Closest access, ,,
hospital-gps, GPS, ,,
post-office, Post Office, ,,
post-office-closest-access, Access, ,,
post-office-closest-access, Closest access, ,,
post-office-gps, GPS, ,,
railway-station, Railway station, ,,
railway-station-closest-access, Access, ,,
railway-station-closest-access, Closest access, ,,
railway-station-gps, GPS, ,,
state-bus-service, Inter-state bus service, ,,
state-bus-service-closest-access, Access, ,,
state-bus-service-closest-access, Closest access, ,,
state-bus-service-gps, GPS, ,,
district-bus-service, Inter-village/district bus service, ,,
district-bus-service-closest-access, Access, ,,
district-bus-service-closest-access, Closest access, ,,
district-bus-service-gps, GPS, ,,
panchayat, Village Panchayat Office, ,,
panchayat-closest-access, Access, ,,
panchayat-closest-access, Closest access, ,,
panchayat-gps, GPS, ,,
NGO, Presence of NGO's working with them, ,,
NGO-closest-access, Access, ,,
NGO-closest-access, Closest access, ,,
NGO-gps, GPS, ,,
market, Market, ,,
market-closest-access, Access, ,,
market-closest-access, Closest access, ,,
market-gps, GPS, ,,
household-name, Household name, ,,
default-household-name, A household, ,,
......
......@@ -11,7 +11,7 @@
(list 'households (list "Households" "" ))
(list 'individual (list "Individual" "" ))
(list 'individuals (list "Individuals" "" ))
(list 'add-item-to-list (list "+" "" ))
(list 'add-item-to-list (list "0" "" ))
(list 'default-village-name (list "New village" "" ))
(list 'title (list "Symbai" "Symbai" "Symbai" "" ))
(list 'sync (list "Sync" "Sync" "Sync" "" ))
......@@ -54,32 +54,41 @@
(list 'closest-access (list "Closest place of access" "" ))
(list 'house-gps (list "GPS" "" ))
(list 'toilet-gps (list "GPS" "" ))
(list 'school-in-village (list "In Village" ))
(list 'school (list "School" "" ))
(list 'school-closest-access (list "Access" "" ))
(list 'school-closest-access (list "Closest access" "" ))
(list 'school-gps (list "GPS" "" ))
(list 'hospital-in-village (list "In Village" ))
(list 'hospital (list "Hospital/Health care centre" "" ))
(list 'hospital-closest-access (list "Access" "" ))
(list 'hospital-closest-access (list "Closest access" "" ))
(list 'hospital-gps (list "GPS" "" ))
(list 'Post-office-in-village (list "In Village" ))
(list 'post-office (list "Post Office" "" ))
(list 'post-office-closest-access (list "Access" "" ))
(list 'post-office-closest-access (list "Closest access" "" ))
(list 'post-office-gps (list "GPS" "" ))
(list 'railway-station-in-village (list "In Village" ))
(list 'railway-station (list "Railway station" "" ))
(list 'railway-station-closest-access (list "Access" "" ))
(list 'railway-station-closest-access (list "Closest access" "" ))
(list 'railway-station-gps (list "GPS" "" ))
(list 'State-bus-service-in-village (list "In Village" ))
(list 'state-bus-service (list "Inter-state bus service" "" ))
(list 'state-bus-service-closest-access (list "Access" "" ))
(list 'state-bus-service-closest-access (list "Closest access" "" ))
(list 'state-bus-service-gps (list "GPS" "" ))
(list 'District-bus-service-in-village (list "In Village" ))
(list 'district-bus-service (list "Inter-village/district bus service" "" ))
(list 'district-bus-service-closest-access (list "Access" "" ))
(list 'district-bus-service-closest-access (list "Closest access" "" ))
(list 'district-bus-service-gps (list "GPS" "" ))
(list 'Panchayat-in-village (list "In Village" ))
(list 'panchayat (list "Village Panchayat Office" "" ))
(list 'panchayat-closest-access (list "Access" "" ))
(list 'panchayat-closest-access (list "Closest access" "" ))
(list 'panchayat-gps (list "GPS" "" ))
(list 'NGO-in-village (list "In Village" ))
(list 'NGO (list "Presence of NGO's working with them" "" ))
(list 'NGO-closest-access (list "Access" "" ))
(list 'NGO-closest-access (list "Closest access" "" ))
(list 'NGO-gps (list "GPS" "" ))
(list 'market-in-village (list "In Village" ))
(list 'market (list "Market" "" ))
(list 'market-closest-access (list "Access" "" ))
(list 'market-closest-access (list "Closest access" "" ))
(list 'market-gps (list "GPS" "" ))
(list 'household-name (list "Household name" "" ))
(list 'default-household-name (list "A household" "" ))
......
......@@ -8,7 +8,7 @@
"households"," Households"," ",,
"individual"," Individual"," ",,
"individuals"," Individuals"," ",,
"add-item-to-list","+"," ",,
"add-item-to-list",0," ",,
"default-village-name"," New village"," ",,
"title"," Symbai"," Symbai"," Symbai"," "
"sync"," Sync"," Sync"," Sync"," "
......@@ -51,32 +51,41 @@
"closest-access"," Closest place of access"," ",,
"house-gps"," GPS"," ",,
"toilet-gps"," GPS"," ",,
"school-in-village","In Village",,,
"school"," School"," ",,
"school-closest-access"," Access"," ",,
"school-closest-access"," Closest access"," ",,
"school-gps"," GPS"," ",,
"hospital-in-village","In Village",,,
"hospital"," Hospital/Health care centre"," ",,
"hospital-closest-access"," Access"," ",,
"hospital-closest-access"," Closest access"," ",,
"hospital-gps"," GPS"," ",,
"Post-office-in-village","In Village",,,
"post-office"," Post Office"," ",,
"post-office-closest-access"," Access"," ",,
"post-office-closest-access"," Closest access"," ",,
"post-office-gps"," GPS"," ",,
"railway-station-in-village","In Village",,,
"railway-station"," Railway station"," ",,
"railway-station-closest-access"," Access"," ",,
"railway-station-closest-access"," Closest access"," ",,
"railway-station-gps"," GPS"," ",,
"State-bus-service-in-village","In Village",,,
"state-bus-service"," Inter-state bus service"," ",,
"state-bus-service-closest-access"," Access"," ",,
"state-bus-service-closest-access"," Closest access"," ",,
"state-bus-service-gps"," GPS"," ",,
"District-bus-service-in-village","In Village",,,
"district-bus-service"," Inter-village/district bus service"," ",,
"district-bus-service-closest-access"," Access"," ",,
"district-bus-service-closest-access"," Closest access"," ",,
"district-bus-service-gps"," GPS"," ",,
"Panchayat-in-village","In Village",,,
"panchayat"," Village Panchayat Office"," ",,
"panchayat-closest-access"," Access"," ",,
"panchayat-closest-access"," Closest access"," ",,
"panchayat-gps"," GPS"," ",,
"NGO-in-village","In Village",,,
"NGO"," Presence of NGO's working with them"," ",,
"NGO-closest-access"," Access"," ",,
"NGO-closest-access"," Closest access"," ",,
"NGO-gps"," GPS"," ",,
"market-in-village","In Village",,,
"market"," Market"," ",,
"market-closest-access"," Access"," ",,
"market-closest-access"," Closest access"," ",,
"market-gps"," GPS"," ",,
"household-name"," Household name"," ",,
"default-household-name"," A household"," ",,
......
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