Newb alert.

I have a class called Work Orders.

In my controller, I have functions like this to give a me a subset of
work orders.

  def needs_bid
    @work_orders = WorkOrder.needs_bid()
    hobo_index @work_orders
    render :index
  end

In my application.dryml, I have this.

<def tag="main-nav">
  <navigation class="main-nav" merge-attrs param="default">
      <nav-item href="#{base_url}/">Home</nav-item>
      <if test="&current_user.administrator?">
        <nav-item with="&WorkOrder"><ht
key="work_orders.nav_item">Work Orders</ht></nav-item>
        <nav-item href="#{base_url}/">Billing</nav-item>
      </if>
  </navigation>
</def>

In my Work Orders link, when I change the label to something like
"Open Work", it no longer marks that menu item as the current menu
item.

Question #1, How do I change the label for that link and still have
the current functionality work.

I wanted to add a sub-menu for my specific categorizations of Work
Orders, so I added this to my view/work_orders/index.dryml

    <top-page-nav: replace>
        <navigation class="top-page-nav">
          <nav-item action="new" to="&model">*New*</nav-item>
          <nav-item action="index" to="&model">All Unfinished</nav-
item>
          <nav-item href="/work_orders/index/needs_bid">Needs Bid</nav-
item>
          <nav-item href="/work_orders/index/needs_work">Needs Work</
nav-item>
          <nav-item href="/work_orders/index/needs_paper_work">Needs
Paper Work</nav-item>
        </navigation>
    </top-page-nav:>

This works great, but again, current doesn't work.

Question #2
What is a clean way to make current work for sub menus?

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