Community Sidebar
<ul id="sidebar_navigator" class="community_app">
<li class="sidebar_buttons"> <!-- Make sure this is here all the time and only have the buttons inside it if they are there -->
<div class="create_new_topic">
<%= link_to new_topic_path(:forum_id => @forum.id,:trailing_slash=>true) do %>
<div class="button button_primary" id="create_topic_button">New Topic <!-- please change the ID here to button_new_topic if you can -->
</div>
<% end %>
</div>
</li>
<!-- Notifications -->
<h4 class="meta_title">Notifications</h4>
<li class="sidebar_item level1">
<a href="#" class="sidebar_item_link" alt="All">All</a>
</li>
<!-- Forums -->
<h4 class="meta_title"></h4>
<% app_list = {"all" => {:engine => nil, :name => "all", :link => "all"}}.merge(apps_list) %>
<% app_list.each do |key, app| %>
<% app_name = app[:name] %>
<li class="sidebar_item level1 <%= 'is-selected' if key.downcase == @tab_type.downcase %> <%= add_underscore(key) %>">
<!--Todo: Remove transform_app_name function when app_name comes as key -->
<%= link_to notifications_path(:tab_type=>transform_app_name(key), :format=>:js), :class=> "sidebar_item_link", :alt => app_name, :remote => true, :onclick => "$(\".notifications_area .ajax_loader\").show();" do %>
<div class="sidebar_item_app_name <%= key %>" descriptive-name="<%= app_name %>"><%= (t app_name).try(:capitalize) %></div>
<% if !@notifications_count_hash.blank? && !@notifications_count_hash[key].blank? %>
<% app_count = notifications_count_hash[key.to_s] || 0 %>
<% unless app_count == 0 %>
<div class="notification_alert">
<span class="notification_number"><%= app_count %></span>
</div>
<% end %>
<% end %>
<% end %>
</li> <!-- END SIDEBAR_ITEM -->
</ul>