How does the view tag work in a table? ( to allow tag="editor" )

43 views
Skip to first unread message

Clarksta

unread,
Apr 23, 2009, 12:46:29 PM4/23/09
to Hobo Users
Hi,

I dont know enough about how the <table> tag uses the <view> tag to
know how to get this to work.

In Agility I would like to allow in place editing of the story
statuses in the story table on the project show-page. (The tutorial
explains how to do this on the story show-page.)

Simplifying the project show-page table to just this

<table-plus:stories fields="this, tasks.count, status">
</table-plus>

This is how the html is rendered for one of the story statuses

<td class="status-view">
<span class="view story-status model::story-status:1">
<span class="view story-status-name ">new</span>
</span>
</td>

Now comparing with the story show-page where the field-list has
attribute tag="editor" set -

<show-page>
<field-list: tag="editor"></field-list:>
</show-page>

The html which provides the in place editing of the status is rendered
thus

<td class="status-view">
<select class="status-tag story_status editor"
onchange="Hobo.ajaxRequest('/stories/3-around-and-around', [],
{method:'put', params:'story[status_id]=' + this.value})">
<option value="1">new</option>
<option value="2" selected="selected">accepted</option>
<option value="3">discussion</option>
<option value="4">implementation</option>
<option value="5">user_testing</option>
<option value="6">deployed</option>
<option value="7">rejected</option>
</select>
</td>


How can I get the view tag to do the same when called from within the
table tag ?


Thanks
Clarksta

P.S. Sorry to bloat with stuff you already know, I hoped investigating/
typing it out would lead me to solve this ... it hasnt.

Bryan Larsen

unread,
Apr 23, 2009, 1:27:40 PM4/23/09
to Hobo Users
Try this:
<table-plus with="&@stories" fields="this, tasks.count, status">
<status-view:>
<editor/>
</status-view>
</table-plus>

cheers,
Bryan

Clarksta

unread,
Apr 23, 2009, 1:41:23 PM4/23/09
to Hobo Users
Bryan, many thanks. That works a treat.
> > typing it out would lead me to solve this ... it hasnt.- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages