That seems like a simple request and something that should be easy to
do, but isn't.

IMO, the best solution is to cut and paste the collection definition
from rapid_generics.dryml into your application.dryml, and then change
the 'ul' into an 'ol'.   This won't any other part of your application
until you update your CSS since the Hobo theme hides list markers
anyways.

For that reason we should consider making the same change in Hobo
itself for everybody.

Another option would be:

<def tag="collection" attrs="list-tag">
  <% list_tag ||= 'ul' %>
  <call-tag tag="&list_tag" class="collection #{collection_name
:dasherize => true}" merge-attrs unless="empty?">
    <li param="item" class="#{scope.even_odd} #{model_id_class}"
repeat="&select_viewable">
      <do param="default"><card param/></do>
    </li>
  </call-tag>
  <empty-collection-message param="empty-message"/>
</def>

which would allow you to do:

<collection: list-tag='ol'> in your page.   However, I think the first
option I mentioned is best.   Does anybody have any objections to
changing the collection list tag to 'ol'?

Bryan
On Sun, Dec 4, 2011 at 4:33 PM, Ronny Hanssen <[email protected]> wrote:
> Hi all,
>
> I have a model set up with acts-as-list, where the items in the list are
> movable using drag-and-drop. So far so good. However, this specific list
> should be numbered. So, the quick-minded suggest adding the position to the
> card. Well, that's all dandy, but drag-n-dropping the items does not update
> the cards themselves. So, I could write a javascript that updates these
> numbers on every drag-n-drop operation. But, that seems overkill when
> exchanging the collection UL with an OL would do the trick.
>
> But, what is the "slickest" way to change the collection? I know I can
> change the child-collection from the automatic generated show-page for the
> list. Would that be the best approach you think?
>
> Regards,
> Ronny
>
> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/hobousers/-/Z_3Vzpj_HRcJ.
> 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.

-- 
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.

Reply via email to