Sha256: f1d316f6cb68a16d9474145fc9d7c173fd5f79622bdf1b0c42f81f8d3c678b43

Contents?: true

Size: 1.44 KB

Versions: 16

Compression:

Stored size: 1.44 KB

Contents

<% @tmp_mail_template.template_partials.each do |template_partial| %>
  <%= fields_for "mail_engine_mail_template[template_partials_attributes][#{template_partial.id || template_partial.object_id}]", template_partial do |partial_form| %>
    <b>Choose partial for <%= partial_form.object.placeholder_name %>:</b>

    <!-- list all partials -->
    <%= show_no_record partials = MailEngine::MailTemplate.partial.where(:format => params[:template_format], :locale => params[:template_locale]) do %>
      <ul class="partial_option_list">
      <% partials.each do |partial| %>
        <li>
          <%= partial_form.radio_button :partial_id, partial.id, :class => "placeholder_option" %>
          <label for="mail_engine_mail_template_template_partials_attributes_<%= template_partial.id || template_partial.object_id %>_partial_id_<%= partial.id %>" style="font-size: 13px">
            <%= partial.name.to_s.humanize %>
            <%= link_to "Edit", edit_mail_template_path(partial), :target => "_blank" %>
            <iframe width="100%" class="bordered" src="<%= body_mail_template_path(partial, :format => partial.format, :locale => partial.locale) %>"></iframe>
          </label>
          <%= partial_form.hidden_field :placeholder_name, :value => partial_form.object.placeholder_name %>
        </li>
      <% end %>
      </ul>
    <% end %>
  <% end %>
<% end %>

<script>
  $(function(){
    jQuery('iframe').iframeAutoHeight({heightOffset: 20});
  });
</script>

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
mail_engine-0.1.15 app/views/mail_engine/mail_templates/partial_options.html.erb
mail_engine-0.1.14 app/views/mail_engine/mail_templates/partial_options.html.erb
mail_engine-0.1.13 app/views/mail_engine/mail_templates/partial_options.html.erb
mail_engine-0.1.12 app/views/mail_engine/mail_templates/partial_options.html.erb
mail_engine-0.1.11 app/views/mail_engine/mail_templates/partial_options.html.erb
mail_engine-0.1.10 app/views/mail_engine/mail_templates/partial_options.html.erb
mail_engine-0.1.9 app/views/mail_engine/mail_templates/partial_options.html.erb
mail_engine-0.1.8 app/views/mail_engine/mail_templates/partial_options.html.erb
mail_engine-0.1.7 app/views/mail_engine/mail_templates/partial_options.html.erb
mail_engine-0.1.6 app/views/mail_engine/mail_templates/partial_options.html.erb
mail_engine-0.1.5 app/views/mail_engine/mail_templates/partial_options.html.erb
mail_engine-0.1.4 app/views/mail_engine/mail_templates/partial_options.html.erb
mail_engine-0.1.3 app/views/mail_engine/mail_templates/partial_options.html.erb
mail_engine-0.1.2 app/views/mail_engine/mail_templates/partial_options.html.erb
mail_engine-0.1.1 app/views/mail_engine/mail_templates/partial_options.html.erb
mail_engine-0.1.0 app/views/mail_engine/mail_templates/partial_options.html.erb