Topic: Navigation ideas.

I started with a simple application to store server information and relate it to primary contacts.  Since then I've had massive scope creep.  I'm using a left navigation menu, but now that there are many items, I need a better navigation system.  I've been thinking of different ways to do this, but I'd like some outside input.

Any ideas?

Here's the menu:

Servers:
  Unix Servers
  Windows Servers
  Retired Servers
  ALL Servers
  ALL Servers (Detailed)
    New Server
Projects
  New Project
People
  New Person
Teams
  New Team
Operating Systems
  New OS
Patch Bundles
  New Patch Bundle
Server Models
  New Server Model
Support Contracts
  New Contract
Environments
  New Environment
Locations
  New Location
Data Center Racks
Reports:
  Operations Report
  Hostinfo Files
External Links:
  APC Rack Configurator
  Monitoring
  Firewall Rule Request
  Centralized Syslog
  Sun EOSL Matrix

Thanks,

J

Re: Navigation ideas.

I see two options here:

1) Make your vertical navigation collapsible:

> Servers                     v Server
> Projects        ==>                 Unix Servers
> People                              Windows Servers
> Teams                               Retired Servers
...                                   ALL Servers
                                      ALL Servers (Detailed)
                                      New Server
                              > Projects
                              > People

2) Change your design to tabs with a navigation submenu:
 ________  ________  ______  _____
/Servers \/Projects\/People\/Teams\ ...
----------------------------------------------------
Unix  Retired  Windows  Summary  Detail  New
----------------------------------------------------

Re: Navigation ideas.

Thanks rubinelli.  I think I'm going to go with the tabs.

Now I'm creating the sub menus in application.html.erb like so:

<% if (controller.controller_name == "people") %>
         <%= link_to_unless_current "People", people_path() %>
         <%= link_to_unless_current "New Person", new_person_path() %>
<%end%>

Is there a better way to implement this technically?

Thanks

Re: Navigation ideas.

I'll show you an option that would be a bit DRYer, though I'm sure more experienced Railers can come up with even better alternatives. You can create a method in your controllers to return a list of link texts and paths, like this:

def navlinks
  [{:text => 'People', :path => people_path},
  {:text => 'New Person', :path => new_person_path}]
end

This way, you remove the ifs from your layout, and it looks like this:
<% navlinks.each do |link| %>
  <%= link_to_unless_current link[:text], link[:path]%>
<% end %>