cirandas.net

ref: master

plugins/newsletter/views/tasks/newsletter_plugin/_moderate_newsletter_accept_details.html.erb


<% newsletter = NewsletterPlugin::Newsletter.find(task.newsletter_id) %>

<%= _('Check posts you want to include') %>

<% newsletter_content = newsletter.body.gsub(/width: 640px;/,'').sub(/#{NewsletterPlugin::Newsletter::CSS['breakingnews-wrap']}/, '') %> <% newsletter.posts.each do |post| %> <% input_name = "tasks[#{task.id}][task][post_ids][]" %> <% post_check_box = hidden_field_tag(input_name, '0') +check_box_tag(input_name, post.id, true) %> <% newsletter_content.gsub!(/]*?) id="#{post.id}"/, post_check_box + ' <% newsletter_content.gsub!(/]*?) id="#{post.id}"/, post_check_box + ' <% end %> <%= newsletter_content.html_safe %>