<index-page>

This is the hobo_bootstrap customization of the index page.

It uses a table for the collection view, rather than the list of cards that hobo_clean uses.

To switch to a list of cards, parameterize your index page like this:

 <index-page>
   <collection: replace>
     <collection/>
   </collection:>
 </index-page>

If you wish to customize the table instead, the collections param may be tweaked like any other <table>.

<collection: fields="this, subject, actions">
  <this-view:>My <view/></this-view>
</collection:>

actions is defined in this tag. Remove it from fields to remove the column.

The best way to remove any of the actions is to adjust your permission functions. However, if you wish to remove or tweak in the view:

<collection:>
  <actions-view:>
    <bootstrap-table-actions>
      <delete: replace/>
    </bootstrap-table-actions>
  </actions-view:>
</collection:>

You will probably want to add sorting and searching options to your index page. These are not enabled by default since they require controller support. To do so, customize your index.dryml like this:

<index-page>
  <collection: replace>
    <table-plus without-page-nav fields="this, quantity, actions">
      <actions-heading:></actions-heading:>
      <actions-view:><bootstrap-table-actions/></actions-view:>
    </table-plus>
  </collection:>
</index-page>

and your controller like this

def index
  self.this = Widget.paginate(:page => params[:page]).
    search(params[:search], :name).
    order_by(parse_sort_param(:name, :quantity))
  hobo_index
end

Parameters

  • new-link
  • collection
  • empty-message

Show Source


Edit this page