Sha256: 06361210535c1e1b2d8ac55dac5ea0f929d4ae49bc9d30b9d93f31db888fe243

Contents?: true

Size: 887 Bytes

Versions: 3

Compression:

Stored size: 887 Bytes

Contents

<%# выдать текстовый список предложений, сгруппированный по категориям %>
<div class="offer_list_grouped">

  <ul>
    <% list.each do |obj| %> <%# obj: {cat,offers} %>

        <% if obj[:cat_title].present? %>
            <li>
                <h5><%= obj[:cat_title] %></h5>
                <ul>
                  <% obj[:offers].each do |offer| %>
                      <li>
                        <%= link_to offer.title, my_url_for_offer(offer), title: offer.title %>
                      </li>
                  <% end %>
                </ul>
            </li>
        <% else %>
          <% obj[:offers].each do |offer| %>
              <li>
                <%= link_to offer.title, my_url_for_offer(offer), title: offer.title %>
              </li>
          <% end %>
        <% end %>
    <% end %>
  </ul>

</div>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
c80_catoffers-0.1.0.3 app/views/c80_catoffers/_offers_list_grouped.html.erb
c80_catoffers-0.1.0.2 app/views/c80_catoffers/_offers_list_grouped.html.erb
c80_catoffers-0.1.0.1 app/views/c80_catoffers/_offers_list_grouped.html.erb