% sub_managers = @module_app.sub_managers sub_managers.delete(nil) %>
Click on Submit to save the changes.
<%= 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, :class => "control-label muted" %>
<%= f.number_field :top_limit, :min => "0" %>
Put 0 for unlimited.
<% if AnnouncementSetting.is_pro? %> <% if !sub_managers.blank? %>
<%= f.label "Approver Setting", :class => "control-label muted" %>
Approvers List
<%= @setting.approvers.count %>
<% else %>
Click here to set Sub Managers for this module
<% end %>
<%= f.label "Send emails to", :class => "control-label muted" %>
> Admins
> Managers
> Approvers
<% 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? %>
×
Sub Managers
<% sub_managers.each do |sm| %>
<%= image_tag sm.member_profile.avatar.thumb, :class => "approver-avatar" %>
<%= sm.name %>
>
Approver
<% end %>
<% end %>