%# locals: (rule:) %>
<% if rule.conditions.first.compound? %> <%= rule.conditions.first.sub_conditions.first.filter.label %> <%= rule.conditions.first.sub_conditions.first.operator %> <%= rule.conditions.first.sub_conditions.first.value_display %> <% else %> <%= rule.conditions.first.filter.label %> <%= rule.conditions.first.operator %> <%= rule.conditions.first.value_display %> <% end %> <% if rule.conditions.count > 1 %> and <%= rule.conditions.count - 1 %> more <%= rule.conditions.count - 1 == 1 ? "condition" : "conditions" %> <% end %>
<% if rule.actions.first.value && rule.actions.first.options %> <%= rule.actions.first.executor.label %> to <%= rule.actions.first.value_display %> <% else %> <%= rule.actions.first.executor.label %> <% end %> <% if rule.actions.count > 1 %> and <%= rule.actions.count - 1 %> more <%= rule.actions.count - 1 == 1 ? "action" : "actions" %> <% end %>
<% if rule.effective_date.nil? %> All past and future <%= rule.resource_type.pluralize %> <% else %> <%= rule.resource_type.pluralize %> on or after <%= rule.effective_date.strftime("%b %-d, %Y") %> <% end %>