denny/ShinyCMS-ruby

View on GitHub
plugins/ShinyCMS/app/views/shinycms/rails_email_preview/emails/index.html.erb

Summary

Maintainability
Test Coverage
<%
  @page_title = t( 'shinycms.admin.rails_email_preview.emails.index.title' )
  list = @list
  previews = @previews
%>

<div class="rep--main-container">
  <%= with_index_hook :list do %>
    <div class="<%= rep_style[:row_class] %>">
      <% list.columns do |groups| %>
        <div class="rep--email-list-half">
          <% groups.each do |title, group_previews| %>
            <h2><%= title %></h2>
            <div class="<%= rep_style[:list_group_class] %>">
              <% group_previews.each do |p| %>
                <a class="<%= rep_style[:list_group_item_class] %>"
                   href="<%= rails_email_preview.rep_email_path(preview_id: p.id, email_locale: @email_locale) %>">
                  <%= p.humanized_method_name %>
                </a>
              <% end %>
            </div>
          <% end %>
        </div>
      <% end %>
    </div>
  <% end %>
  <hr/>
  <p class="rep--footer">
    <%= t 'shinycms.admin.rails_email_preview.base.email',  count: previews.length    %>
    <%= t 'shinycms.admin.rails_email_preview.base.in' %>
    <%= t 'shinycms.admin.rails_email_preview.base.mailer', count: list.groups.length %>
    <br/>
    <a href="https://github.com/glebm/rails_email_preview" target="_blank">
      REP <%= RailsEmailPreview::VERSION %>
    </a>
  </p>
</div>