Thank you! That was the solution. Tyler
On Aug 6, 2:43 am, Tomas <[email protected]> wrote: > Hi, > I am a beginner with Hobo so my answer might be completely wrong :-) > > I managed to do what you want by following tutorials 12/13/14 in the > beta book. > > I have a child model "transaction" that belongs to the model "rental". > > app/views/taglibs/application.dryml > > ----snip--- > <def tag="show-page" for="Rental"> > <page merge title="#{ht > 'rental.show.title', :default=>['Rental'] }"> > > <body: class="show-page rental" param/> > > <content: param> > <header param="content-header"> > <h2 param="heading"> > <ht key="rental.show.heading" name="&this.respond_to? > (:name) ? this.name : ''"> > <name/> > </ht> > </h2> > > <record-flags fields="" param/> > > <a action="edit" if="&can_edit?" param="edit-link"> > <ht key="rental.actions.edit" name="&this.respond_to? > (:name) ? this.name : ''"> > Edit Rental > </ht> > </a> > </header> > > <section param="content-body"> > <field-list fields="firstname, lastname, email, country, > phone, personalid" param/> > <a:transaction action="new" if="&can_create? > (@rental.transaction)" param="new-link"> > <ht key="transaction.actions.new" count="1"> > Add Transaction > </ht> > </a:transaction> > <div/> > <section param="collection-section"> > <collection:transaction param/> > </section> > </section> > </content:> > > </page> > </def> > ----snip--- > > app/views/rentals/show.dryml > <show-page> > <collection: replace> > <div> > <table-plus:transaction > fields="this,start,stop,transtype,amount,comment"> > <start-view:><view format="%F %R"/></start-view:> > <stop-view:><view format="%F %R"/></stop-view:> > <empty-message:>No transactions yet</empty-message:> > <controls:/> > </table-plus> > </div> > </collection:> > </show-page> > > So when I look at a rental I get a list of all the transactions. > > /TC > > On Aug 6, 5:45 am, Raklet <[email protected]> wrote: > > > > > > > > > I'm trying to add table plus to a "child" collection section. I have the > > following code in application.dryml > > > <extend tag="show-page" for="WoPlant"> > > <old-show-page merge> > > <collection:wo_plant_times replace> > > <div> > > <table-plus fields="start_time, end_time, acres_planted, note"/> > > </div> > > </collection> > > </old-show-page> > > </extend> > > > But the extension is not being applied. It still shows the auto-generated > > code from pages.dryml. > > > Any help would be greatly appreciated. > > > Thanks, > > > Tyler -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
