fix for empty categories

This commit is contained in:
Harry Bomrah 2015-04-30 19:07:57 +08:00
parent 40728d31c8
commit 97120b7a72
1 changed files with 4 additions and 0 deletions

View File

@ -5,9 +5,13 @@
<% if current_user.is_admin? or current_user.is_manager?(@module_app) %>
<div class="bottomnav clearfix" style="left: 81px;">
<div class="action pull-right">
<% if @categories.count == 0 %>
<a class="btn btn-primary" href="/admin/module_apps/<%= @module_app.id.to_s %>/categories"> <%= t(:categories) %></a>
<% else %>
<a data-title="<%= t("text_marquee.new") %>" data-id="new" data-fx="fade" class="btn btn-primary open-slide new-marquee" href="#">
<i class="icon-plus"></i> <%= t("text_marquee.new") %>
</a>
<% end %>
</div>
<div class="pagination pagination-centered"></div>
</div>