1. Ruby / Говнокод #3310

    −98

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    <% form_tag(advertiser_creatives_path(@advertiser), :method=>'post' ) do %>
      <% content_tag :table, :class => "form-tabular" do %>
        <% content_tag :thead do %>
          <% content_tag :tr do %>
            <% tag :th, :class=>'hide'%>
            <% content_tag :th do %>
              Concept (optional)
            <%end%>
            <% content_tag :th do %>
               Ad Tag
            <%end%>
            <% content_tag :th do %>
               Click-Through URL
            <%end%>
            <th/>
          <%end%>
        <%end%>
        <% content_tag :tbody, :id=>'creative_sub_forms' do %>
          <% creatives.each_with_index do |creative, index| 
              next unless creative.new_record?
            %>
            <% unless creative.errors.empty? %>
              <tr class='nowrap'>
                <td colspan='3'>
                  Error:
                  <% creative.errors.full_messages.each do |msg| %>
                  <%= msg %><br/>
                  <%end%>
                </td>
              </tr>
            <%end%>
            <%=render :partial => 'creative_fields', :locals => {:index => index, :creative => creative}%>
          <%end%>
        <%end%>
        <tr>
          <td colspan='3'><%= link_to_add_creative_fields "Add row"  %></td>
        </tr>
      <%end%>
      <br/>
      <br/>
      <%= submit_tag 'Continue', :class=>'button' %>
    <%end%>

    Товарищи, заставляйте нубой учить HTML. Ну, или HAML.

    Запостил: cheba, 25 Мая 2010

    Комментарии (346) RSS

    Добавить комментарий