app/views/carrier/messages/_nav_messages.html.erb in carrier-0.0.6 vs app/views/carrier/messages/_nav_messages.html.erb in carrier-0.1.0

- old
+ new

@@ -1,15 +1,15 @@ <div class="carrier_nav_line"> <div class="carrier_nav_line_inner"> - <div class="carrier_new"> - <%= link_to raw(t 'views.carrier.new_link'), carrier.new_message_path %> + <div class="carrier_new<%= ' active' if request.fullpath =~ /#{prefix_for_messages}\/new\Z/ %>"> + <%= link_to raw(t 'views.carrier.new_link'), carrier.new_message_path, :class => "#{'active' if request.fullpath =~ /#{prefix_for_messages}\/new\Z/ }"%> </div> <div class="carrier_nav"> <ul> - <li class="<%= 'active' if request.fullpath =~ /messages(\/\d+)?\z/ && !archived?(@message) %>"><%= link_to raw(t 'views.carrier.inbox_link'), carrier.messages_path %></li> - <li class="<%= 'active' if request.fullpath =~ /messages\/(\d+\/.*)?sent/ %>"><%= link_to raw(t 'views.carrier.sent_link'), carrier.sent_messages_path %></li> - <li class="<%= 'active' if request.fullpath =~ /messages\/archive/ || archived?(@message) %>"><%= link_to raw(t 'views.carrier.archived_link'), carrier.archive_messages_path %></li> + <li class="<%= 'active' if request.fullpath =~ /#{prefix_for_messages}(\/\d+)?\z/ && !archived?(@message) %>"><%= link_to raw(t 'views.carrier.inbox_link'), carrier.messages_path %></li> + <li class="<%= 'active' if request.fullpath =~ /#{prefix_for_messages}\/(\d+\/.*)?sent/ %>"><%= link_to raw(t 'views.carrier.sent_link'), carrier.sent_messages_path %></li> + <li class="<%= 'active' if request.fullpath =~ /#{prefix_for_messages}\/archive/ || archived?(@message) %>"><%= link_to raw(t 'views.carrier.archived_link'), carrier.archive_messages_path %></li> </ul> </div> </div> </div>