Sha256: fcf168f7bb517587629b9dd555f9bf1ba7b3b560e946e20be9bddf0da155987a

Contents?: true

Size: 1.67 KB

Versions: 1

Compression:

Stored size: 1.67 KB

Contents

<h3>编辑多图文</h3>
<%= form_for @news_data, url: "/eric_weixin/cms/weixin/news_datas/#{@news_data.id}", method: :put  do |f| %>
    <div class="row">
      <div class="large-3 columns">
        <%= f.label "标题" %>
      </div>
      <div class="large-9 columns">
        <%= f.text_field :title, name: 'weixin_news[title]' %>
      </div>
    </div>
    <div class="row">
      <div class="large-3 columns">
        <%= f.label "关键字" %>
      </div>
      <div class="large-9 columns">
        <%= f.text_field :match_key, name: 'weixin_news[match_key]' %>
      </div>
    </div>
    <h2>图文列表:</h2>
    <div style="margin-left: 30px">
      <table class="" role="grid">
        <thead>
            <th>可选素材</th><th>排序</th>
        </thead>
        <% ::EricWeixin::Article.all.each do |article| %>
        <tbody>
                <tr>
                  <td>
                      <%= check_box_tag :weixin_article_data_ids,
                                        article.id,
                                        @news_data.weixin_articles.include?(article),
                                        :name => 'weixin_news[weixin_article_data_ids][]' %>
                      <%= article.title %>
                  </td>
                  <td>
                    <% w_a_d = @news_data.weixin_article_newses.where(weixin_article_id: article.id).first %>
                    <%= text_field_tag "weixin_news[weixin_article_data_sort][#{article.id}][]", w_a_d.blank? ? '' : w_a_d.sort %>
                  </td>
                </tr>
        </tbody>
        <% end %>
      </table>
    </div>
    <input type="submit" name="commit" class="button" value="保存">
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eric_weixin-0.4.2 app/views/eric_weixin/cms/weixin/news_datas/edit.html.erb