Skip to content

Commit

Permalink
Library links on GitHub; new option in Explorer.custom
Browse files Browse the repository at this point in the history
  • Loading branch information
achlipala committed Feb 1, 2017
1 parent 459e35c commit 3cdf41d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -14,4 +14,4 @@ Those are the basics! The other modules of the library define more complex UI e

## Installation

Two other Ur/Web libraries are required: [Bootstrap](http://hg.impredicative.com/bootstrap) and [AjaxUpload](http://hg.impredicative.com/ajaxUpload).
Two other Ur/Web libraries are required: [Bootstrap](https://github.com/urweb/bootstrap) and [AjaxUpload](https://github.com/urweb/ajaxUpload).
5 changes: 3 additions & 2 deletions explorer.ur
Expand Up @@ -776,6 +776,7 @@ fun custom [full ::: {Type}]
(lab : string) (_ : show colT) (_ : read colT)
(content : colT -> transaction (option stash))
(render : stash -> xtable)
(dbchange : colT -> transaction unit)
(old : t full ([tname = (key, [col = option colT] ++ cols, colsDone, cstrs, impl1, impl2, impl3)] ++ old)) =
old -- tname
++ {tname = old.tname
Expand All @@ -786,8 +787,8 @@ fun custom [full ::: {Type}]
| Some v => content v);
aux2 <- old.tname.Auxiliary k row;
return (aux1, aux2),
Insert = fn r (_, aux) => old.tname.Insert r aux,
Update = fn r (_, aux) => old.tname.Update r aux,
Insert = fn r (sto, aux) => old.tname.Insert r aux; Option.app dbchange r.col,
Update = fn r (sto, aux) => old.tname.Update r aux; Option.app dbchange r.col,
Render = fn entry (aux1, aux2) r => <xml>
{old.tname.Render entry aux2 r}
{case aux1 of
Expand Down
1 change: 1 addition & 0 deletions explorer.urs
Expand Up @@ -218,6 +218,7 @@ val custom : full ::: {Type}
-> read colT
-> (colT -> transaction (option stash))
-> (stash -> xtable)
-> (colT -> transaction unit) (* Run each time we update the database. *)
-> t full ([tname = (key, [col = option colT] ++ cols, colsDone, cstrs, impl1, impl2, impl3)] ++ old)
-> t full ([tname = (key, [col = option colT] ++ cols, [col = option colT] ++ colsDone, cstrs, custom1 stash impl1, custom2 stash impl2, custom3 stash impl3)] ++ old)

Expand Down

0 comments on commit 3cdf41d

Please sign in to comment.