learningtapestry/lcms-engine

View on GitHub
lib/doc_template/templates/pv.html.erb

Summary

Maintainability
Test Coverage
<div class="o-ld-pv">
  <div>
    <p class="o-ld-pv__header"><%= @tmpl['text_header'] %></p>
  </div>
  <table class="o-ld-pv o-ld-pv-content">
    <tbody>
      <% @tmpl['row_count'].times do %>
        <tr class="o-ld-pv__row--<%= @tmpl['row_count'] %>">
          <% @tmpl['column_count'].times do |idx| %>
              <% width = @tmpl.try(:[], 'column_width').try(:[], idx).presence || '50%' %>
              <td style="width: <%= width %>"></td>
          <% end %>
        </tr>
      <% end %>
    </tbody>
  </table>
  <div>
      <p class="o-ld-pv__footer"><%= @tmpl['text_footer'] %></p>
    </div>
</div>