% sub_managers = @module_app.sub_managers sub_managers.delete(nil) %>
<%= t("announcement.click_on_submit") %>
<%= form_for @setting, url: (@setting.new_record? ? admin_announcement_createsettings_path : admin_announcement_updatesettings_path), html: {class: "form-horizontal main-forms"} do |f| %>
<%= f.label :top_limit, t("announcement.top_limit"), :class => "control-label muted" %>
<%= f.number_field :top_limit, :min => "0" %>
<%= t("announcement.for_unlimited") %>
<% if AnnouncementSetting.is_pro? %> <% if !sub_managers.blank? %>
<%= f.label "Approver Setting", :class => "control-label muted" %>
<%= t("announcement.approvers_list") %>
<%= @setting.approvers.count %>
<% else %>
<%= t("announcement.click_set_sub_manager") %>
<% end %>
<%= f.label "Send emails to", :class => "control-label muted" %>
> <%= t("admin") %>
> <%= t("manager") %>
> <%= t("announcement.approver") %>
<% sub_managers.each do |sm| %> <% if @setting.approvers.include?(sm.id.to_s) %>
<% end %> <% end %>
<% end %>
<%= f.submit t('submit'), class: 'btn btn-primary' %>
<% end %> <% if AnnouncementSetting.is_pro? %>
×
<%= t("sub_manager") %>
<% sub_managers.each do |sm| %>
<%= image_tag sm.member_profile.avatar.thumb, :class => "approver-avatar" %>
<%= sm.name %>
>
<%= t("announcement.approver") %>
<% end %>
<% end %>