|
<li class="dropdown">
|
|
<% location_count = Location.my_locations.count %>
|
|
<%= location_dropdown location_count %>
|
|
<ul class="dropdown-menu">
|
|
<% if show_add_location_button? location_count%>
|
|
<div class="no-taxonomies">
|
|
<div class="alert">
|
|
<button type="button" class="close" data-dismiss="alert">×</button>
|
|
There aren't any locations yet.
|
|
</div>
|
|
<button class="btn btn-primary" type="button"><%= link_to "New Location", :controller => "locations", :action => "new" %></button>
|
|
</div>
|
|
<% elsif location_count > 1 %>
|
|
<li><%= link_to('Any Location', clear_locations_path) %></li>
|
|
<% Location.my_locations.each do |location| %>
|
|
<li><%= link_to(location.name, select_location_path(location)) %></li>
|
|
<% end -%>
|
|
<% end %>
|
|
</ul>
|
|
</li>
|