You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/app/views/shixuns/index.html.erb

94 lines
5.0 KiB

6 years ago
<!-- 多级搜索的条件 -->
<%= form_for 'shixun', :url => search_shixuns_path(), :html => {:id => "shixun_search_condition", :remote => true, :autocomplete => "off"} do |f| %>
<input type="hidden" name="repertoire" value="<%= @rep_active %>"/>
<input type="hidden" name="sub_repertoire" value="<%= @sub_acive %>" />
<input type="hidden" name="tag_repertoire" value="<%= @tag_active %>"/>
<input type="hidden" name="status" value="0" />
<input type="hidden" name="diff" value="0" />
<input type="hidden" name="search" value="" />
<input type="hidden" name="order" value="publish_time" />
<input type="hidden" name="sort" value="asc" />
<input type="hidden" name="hidden_learn">
<% end %>
<div class="edu-back-white">
<div class="educontent">
<div class="pt50 pb50">
<div class="clearfix mb30 shaiContent">
<span class="shaiTitle fl mt3">方向:</span>
<div class="fl pr shaiAllItem">
<li class="shaiItem <%= @type.blank? ? 'active' : '' %> shixun_repertoire" data-type="rep" data-name="">全部</li>
<% @repertoires.each do |repertoire| %>
<li class="shaiItem shixun_repertoire <%= (@rep_active == repertoire.id) ? 'active' : '' %>" data-type="rep" data-values="<%= repertoire.id %>" data-name="<%= repertoire.name %>" >
<%= repertoire.name %>
<div class="subshaicontent">
<% repertoire.sub_repertoires.each do |sub| %>
<div class="mt20 pb10 subshaicontent-part">
<a href="javascript:void(0);" style="height: 20px;" class="mb15 shixun_repertoire color-dark <%= (@sub_active == sub.id) ? 'active' : '' %>" data-type="sub" data-values="<%= sub.id %>" data-name="<%= sub.name %>"><%= sub.name %></a>
<div class="sub-Item clearfix mb10">
<% sub.tag_repertoires.each do |tag| %>
<a href="javascript:void(0);" class="shixun_repertoire <%= (@tag_active == tag.id) ? 'active' : '' %>" data-type="tag" data-values="<%= tag.id %>" data-name="<%= "#{sub.name} / #{tag.name}" %>"><%= tag.name %></a>
<% end %>
</div>
</div>
<% end %>
</div>
</li>
<% end %>
</div>
</div>
<div class="clearfix">
<span class="shaiTitle fl mt3">筛选:</span>
<div class="fl">
<div class="fl groupBox">
<input type="text" class="positionInput" readonly value="全部状态"/>
<i class="iconfont icon-sanjiaoxing-down color-grey-8 positionIcon"></i>
<ul class="edu-menu-list menuItem" style="top:35px;left: 0px;width: 100%;">
<% @status.each do |st| %>
<li><a href="javascript:void(0)" str="status" value=<%= st[1] %>><%= st[0] %></a></li>
<% end %>
</ul>
</div>
<div class="fl ml20 groupBox">
<input type="text" class="positionInput" readonly value="全部难度"/>
<i class="iconfont icon-sanjiaoxing-down color-grey-8 positionIcon"></i>
<ul class="edu-menu-list menuItem" style="top:35px;left: 0px;width: 100%;">
<% @diff.each_with_index do |dif, index| %>
<li><a href="javascript:void(0)" str="diff" value=<%= index %>><%= dif %></a></li>
<% end %>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="educontent mb80">
<div class="mt20 mb20 clearfix">
<a href="javascript:void(0)" class="fl mr20 font-16 bestChoose shixun_repertoire active" data-type="order" data-values="publish_time">全部</a>
<a href="javascript:void(0)" class="fl mr20 font-16 bestChoose shixun_repertoire" data-type="order" data-values="mine">我的</a>
<a href="javascript:void(0)" class="fl mr20 font-16 bestChoose shixun_repertoire" data-type="order" data-values="created_at">最新</a>
<a href="javascript:void(0)" class="fl font-16 bestChoose shixun_repertoire" data-type="order" data-values="myshixuns_count">最热</a>
<% if false %>
<div class="fr">
<div class="controlbtn fl mr10 mt10 pr" onclick="clickControl(this, 'l_shixun');">
<div class="controlblue"></div>
<span class="controlring"></span>
</div>
<span class="fl font-16 cdefault" data-tip-down="隐藏我学习的实训">隐藏我的</span>
</div>
<% end %>
<div class="fr search-new mr5">
<input type="text" class="search-new-input fl" placeholder="请输入实训名称或创建者进行搜索" id="shixun_search_input" />
<span class="search-span"></span>
<a href="javascript:void(0)" onclick="filter_search($('#shixun_search_input').val(), 'search')"><i class="iconfont icon-sousuo color-grey-6"></i></a>
</div>
<span class="fr color-grey-6 mr30 font-16" id="search_name"><%= @search_name %></span>
</div>
<div id="shixun_list_content">
<%= render "shixuns/shixun_list" %>
</div>
</div>