Sha256: aa96cafd757d82ac61589870a6b4e3f943234d8d71892b272bb7849d086cbc09

Contents?: true

Size: 1.56 KB

Versions: 11

Compression:

Stored size: 1.56 KB

Contents

<h3>新建多图文</h3>
<%= form_for @news_data, url: "/eric_weixin/cms/weixin/news_datas/#{@news_data.id}", method: :post  do |f| %>
    <div class="row">
      <div class="large-3 columns">
        <%= f.label "标题" %>
      </div>
      <div class="large-9 columns">
        <%= f.text_field :title %>
      </div>
    </div>
    <div class="row">
      <div class="large-3 columns">
        <%= f.label "关键字" %>
      </div>
      <div class="large-9 columns">
        <%= f.text_field :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

11 entries across 11 versions & 1 rubygems

Version Path
eric_weixin-0.4.1 app/views/eric_weixin/cms/weixin/news_datas/new.html.erb
eric_weixin-0.4.0 app/views/eric_weixin/cms/weixin/news_datas/new.html.erb
eric_weixin-0.3.3 app/views/eric_weixin/cms/weixin/news_datas/new.html.erb
eric_weixin-0.3.2 app/views/eric_weixin/cms/weixin/news_datas/new.html.erb
eric_weixin-0.3.1 app/views/eric_weixin/cms/weixin/news_datas/new.html.erb
eric_weixin-0.3.0 app/views/eric_weixin/cms/weixin/news_datas/new.html.erb
eric_weixin-0.2.3 app/views/eric_weixin/cms/weixin/news_datas/new.html.erb
eric_weixin-0.2.1 app/views/eric_weixin/cms/weixin/news_datas/new.html.erb
eric_weixin-0.2.0 app/views/eric_weixin/cms/weixin/news_datas/new.html.erb
eric_weixin-0.1.1 app/views/eric_weixin/cms/weixin/news_datas/new.html.erb
eric_weixin-0.1.0 app/views/eric_weixin/cms/weixin/news_datas/new.html.erb