Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
nebogeo
symbai
Commits
d547be53
Commit
d547be53
authored
May 12, 2014
by
Dave Griffiths
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explicit number of children in household
parent
b2d61b53
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
2 deletions
+23
-2
android/assets/starwisp.scm
android/assets/starwisp.scm
+6
-2
android/assets/translations.scm
android/assets/translations.scm
+1
-0
eavdb/ktv-list.ss
eavdb/ktv-list.ss
+15
-0
translations.csv
translations.csv
+1
-0
No files found.
android/assets/starwisp.scm
View file @
d547be53
...
...
@@ -87,6 +87,7 @@
(
list
(
ktv
"name"
"varchar"
(
mtext-lookup
'default-household-name
))
(
ktv
"num-pots"
"int"
0
)
(
ktv
"num-children"
"int"
0
)
(
ktv
"house-lat"
"real"
0
)
;; get from current location?
(
ktv
"house-lon"
"real"
0
)
(
ktv
"toilet-lat"
"real"
0
)
...
...
@@ -797,7 +798,9 @@
(
build-activity
(
horiz
(
medit-text
'household-name
"normal"
(
lambda
(
v
)
(
entity-set-value!
"name"
"varchar"
v
)
'
()))
(
medit-text
'num-pots
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"num-pots"
"int"
v
)
'
())))
(
vert
(
medit-text
'num-pots
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"num-pots"
"int"
v
)
'
()))
(
medit-text
'num-children
"numeric"
(
lambda
(
v
)
(
entity-set-value!
"num-children"
"int"
v
)
'
()))))
(
horiz
(
vert
(
mtext
'location
)
...
...
@@ -844,7 +847,8 @@
(
list
(
update-list-widget
db
"sync"
"individual"
"individual"
arg
)
(
mupdate
'edit-text
'household-name
"name"
)
(
mupdate
'edit-text
'num-pots
"num-pots"
))
(
mupdate
'edit-text
'num-pots
"num-pots"
)
(
mupdate
'edit-text
'num-children
"num-children"
))
(
mupdate-gps
'house
"house"
)
(
mupdate-gps
'toilet
"toilet"
)))
...
...
android/assets/translations.scm
View file @
d547be53
...
...
@@ -247,4 +247,5 @@
(
list
'gps-are-you-sure
(
list
"Are you sure you want to record your current position?"
))
(
list
'gps-are-you-sure-2
(
list
"Please confirm again..."
))
(
list
'Current-village
(
list
"Your current village"
))
(
list
'num-children
(
list
"Number of children"
))
))
eavdb/ktv-list.ss
View file @
d547be53
...
...
@@ -38,3 +38,18 @@
((
equal?
(
ktv-key
(
car
ktv-list
))
(
ktv-key
ktv
))
(
cons
ktv
(
cdr
ktv-list
)))
(
else
(
cons
(
car
ktv-list
)
(
ktv-set
(
cdr
ktv-list
)
ktv
)))))
;; replace or insert a ktv
(
define
(
ktvlist-replace
ktv
ktvlist
)
(
cond
((
null?
ktvlist
)
(
list
ktv
))
((
equal?
(
ktv-key
(
car
ktvlist
))
(
ktv-key
ktv
))
(
cons
ktv
(
cdr
ktvlist
)))
(
else
(
cons
(
car
ktvlist
)
(
ktvlist-replace
ktv
(
cdr
ktvlist
))))))
(
define
(
ktvlist-merge
a
b
)
(
foldl
(
lambda
(
ktv
r
)
(
ktvlist-replace
ktv
r
))
a
b
))
translations.csv
View file @
d547be53
...
...
@@ -244,3 +244,4 @@
"gps-are-you-sure","Are you sure you want to record your current position?",,,
"gps-are-you-sure-2","Please confirm again...",,,
"Current-village","Your current village",,,
"num-children","Number of children",,,
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment