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
gendl
tutorials
Commits
64aa728a
Commit
64aa728a
authored
Jul 21, 2020
by
Dave Cooper
Browse files
updated to multiple presidents
parent
481b3019
Changes
1
Hide whitespace changes
Inline
Side-by-side
source/presidents.lisp
View file @
64aa728a
...
...
@@ -19,25 +19,36 @@
(
str
(
the
development-links
))
((
:table
:border
(
the
table-border
))
(
dolist
(
president
(
list-elements
(
the
presidents
)))
(
htm
(
:tr
(
:td
((
:a
:href
(
the-object
president
url
))(
str
(
the-object
president
name
))))
(
:td
(
str
(
the-object
president
term
))))))))))
(
htm
(
:tr
(
:td
((
:a
:href
(
the-object
president
url
))(
str
(
the-object
president
name
-input
value
))))
(
:td
(
str
(
the-object
president
term
-input
value
))))))))))
:objects
((
presidents
:type
'president
:sequence
(
:size
(
length
(
the
data
)))
:parameters
(
nth
(
the-child
index
)
(
the
data
)))))
:pass-down
(
table-border
)
:listing-page
self
:data
(
nth
(
the-child
index
)
(
the
data
))
:pseudo-inputs
(
data
)
:name
(
getf
(
the-child
data
)
:name
)
:term
(
getf
(
the-child
data
)
:term
)
)))
(
define-object
president
(
base-ajax-sheet
)
:input-slots
((
name
"Carter"
)
(
term
1976
))
(
(
listing-page
nil
)
(
name
"Carter"
)
(
term
1976
)
table-border
)
:computed-slots
((
main-sheet-body
(
with-cl-who-string
()
(
when
(
the
listing-page
)
(
htm
(
:p
((
:a
:href
(
the
listing-page
url
))
"<-Back"
))))
(
:p
(
str
(
the
name-input
html-string
)))
(
:p
(
str
(
the
term-input
html-string
)))
...
...
@@ -47,11 +58,13 @@
((
main-sheet-section
:type
'sheet-section
:inner-html
(
with-cl-who-string
()
((
:table
:border
(
the
table-border
))
(
:tr
(
:th
"Name"
)
(
:th
"Term"
))
(
:tr
(
:td
(
str
(
the
name-input
value
)))
(
:td
(
str
(
the
term
)))))))
(
:td
(
str
(
the
term-input
value
)))))))
(
name-input
:type
'text-form-control
:ajax-submit-on-change?
t
:default
(
the
name
))
...
...
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