Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
citizen-science
symbai
Commits
a5437c5c
Commit
a5437c5c
authored
Jun 05, 2014
by
Dave Griffiths
Browse files
split the chooser by household (and filtered by current village)
parent
5ad51470
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
40 deletions
+61
-40
android/assets/starwisp.scm
android/assets/starwisp.scm
+61
-40
No files found.
android/assets/starwisp.scm
View file @
a5437c5c
...
...
@@ -423,13 +423,7 @@
(
inexact->exact
(
round
(
*
256
0.9
)))))
(
define
(
update-individual-filter
)
(
let
((
search
(
db-filter-only
db
"sync"
"individual"
(
filter-get
)
(
list
(
list
"photo"
"file"
)
(
list
"name"
"varchar"
)))))
(
update-widget
'linear-layout
(
get-id
"choose-pics"
)
'contents
(
define
(
build-photo-buttons
search
)
(
grid-ify
(
map
(
lambda
(
e
)
...
...
@@ -465,7 +459,34 @@
(
text-view
0
(
ktv-get
e
"name"
)
20
(
layout
'wrap-content
'wrap-content
-1
'centre
0
)))
))))
search
)
3
))))
3
))
(
define
(
update-individual-filter-inner
households
)
(
map
(
lambda
(
household
)
(
let
((
search
(
db-filter-only
db
"sync"
"individual"
(
append
(
filter-get
)
(
list
(
list
"parent"
"varchar"
"="
(
ktv-get
household
"unique_id"
))))
(
list
(
list
"photo"
"file"
)
(
list
"name"
"varchar"
)))))
(
apply
vert
(
cons
(
text-view
0
(
ktv-get
household
"name"
)
20
fillwrap
)
(
build-photo-buttons
search
)))
))
households
))
(
define
(
update-individual-filter
)
(
msg
"update if"
)
(
let
((
households
(
db-filter-only
db
"sync"
"household"
(
list
(
list
"parent"
"varchar"
"="
(
get-setting-value
"current-village"
)))
(
list
(
list
"name"
"varchar"
)))))
(
msg
households
)
(
update-widget
'linear-layout
(
get-id
"choose-pics"
)
'contents
(
update-individual-filter-inner
households
))))
(
define
(
image/name-from-unique-id
db
table
unique-id
)
(
let
((
e
(
get-entity-by-unique
db
table
unique-id
)))
...
...
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