Permalink
Browse files

filtering-stories-by-status-dryml

## Filtering stories by status

Rapid's `<table-plus>` is giving us some nice searching and sorting features on the project page. We can easily add some filtering into the mix, so that it's easy to, say, see only new stories.

First we'll add the filter control to the header of the table-plus. Rapid provides a `<filter-menu>` tag which is just what we need. We want to add it to the header section, before the stuff that's already there. In DRYML, you can prepend or append content to any named parameter. `<table-plus>` has a `header:` parameter, so we can use `<prepend-header:>`, like this:

SHOW_PATCH
  • Loading branch information...
bryanlarsen authored and iox committed Jun 3, 2013
1 parent b478033 commit 3617654c6782fb725bbfacc1410a658fa257ad1d
Showing with 5 additions and 0 deletions.
  1. +5 −0 app/views/projects/show.dryml
@@ -1,6 +1,11 @@
<show-page>
<collection: replace>
<table-plus with="&@stories" fields="this, tasks_count, status">
<prepend-header:>
<div class="filter">
Display by status: <filter-menu param-name="status" options="&StoryStatus.all"/>
</div>
</prepend-header:>
<empty-message:>No stories match your criteria</empty-message:>
</table-plus>
</collection:>

2 comments on commit 3617654

@ampinog

This comment has been minimized.

Show comment
Hide comment
@ampinog

ampinog Feb 5, 2014

Tal como esta no me funciono, buscando encontré que la línea display by status: debe ser:
Display by status:

ampinog replied Feb 5, 2014

Tal como esta no me funciono, buscando encontré que la línea display by status: debe ser:
Display by status:

@iox

This comment has been minimized.

Show comment
Hide comment
@iox

iox Feb 5, 2014

Member

Thanks Angel, I'll check it and try to improve the tutorial :).

Gracias Angel, lo revisaré e intentaré mejorar el tutorial.

Member

iox replied Feb 5, 2014

Thanks Angel, I'll check it and try to improve the tutorial :).

Gracias Angel, lo revisaré e intentaré mejorar el tutorial.

Please sign in to comment.