Skip to content

Commit

Permalink
auto-completion-form
Browse files Browse the repository at this point in the history
Now for the form in `projects/show.dryml`. We'll use Hobo's ajax `part` mechanism to refresh the collection without reloading the page:

SHOW_PATCH

Some things to note:

 - The `<collection>` tag has `part="members"`. This creates a re-loadable section of the page, much as you would achieve with partials in regular Rails.

 - The `<form>` tag has `update="members"`. The presence of this attribute turns the form into an ajax form. Submitting the form will cause the "members" part to be updated.

 - The `<name-one>` tag creates an input field for the user association with auto-completion.
  • Loading branch information
bryanlarsen committed Feb 19, 2010
1 parent 00e765d commit 0223684
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/views/projects/show.dryml
Expand Up @@ -9,4 +9,17 @@
<empty-message:>No stories match your criteria</empty-message:>
</table-plus>
</collection:>

<aside:>
<h2>Project Members</h2>
<collection:members part="members"/>

<form:memberships.new update="members" reset-form refocus-form>
<div>
Add a member:
<name-one:user/>
</div>
</form>
</aside:>

</show-page>

0 comments on commit 0223684

Please sign in to comment.