dev_aliyun
daiao 5 years ago
commit 32eb383c19

@ -51,7 +51,7 @@ class CompetitionTeamsController < ApplicationController
end end
condition = "%#{params[:search].strip}%".gsub(" ","") condition = "%#{params[:search].strip}%".gsub(" ","")
@teachers = User.joins(:user_extensions).where("status = 1 and LOWER(concat(lastname, firstname, login, nickname)) LIKE '#{condition}' and user_extensions.identity = 0") @teachers = User.joins(:user_extensions).where("status = 1 and LOWER(concat(lastname, firstname, login, nickname)) LIKE '#{condition}' and user_extensions.identity = 0").limit(20)
end end
def search_non_user def search_non_user
@ -71,7 +71,7 @@ class CompetitionTeamsController < ApplicationController
end end
user_ids = user_ids.length > 0 ? "(" + user_ids.uniq.join(',') + ")" : "(-1)" user_ids = user_ids.length > 0 ? "(" + user_ids.uniq.join(',') + ")" : "(-1)"
condition = "%#{params[:search].strip}%".gsub(" ","") condition = "%#{params[:search].strip}%".gsub(" ","")
@users = User.joins(:user_extensions).where("users.id not in #{user_ids} and status = 1 and user_extensions.identity = 1 and LOWER(concat(lastname, firstname, login, nickname)) LIKE '#{condition}'") @users = User.joins(:user_extensions).where("users.id not in #{user_ids} and status = 1 and user_extensions.identity = 1 and LOWER(concat(lastname, firstname, login, nickname)) LIKE '#{condition}'").limit(20)
end end
def create def create

@ -17,15 +17,6 @@
<img src="/images/educoder/competitionslog.png" height="600px" width="600px" /> <img src="/images/educoder/competitionslog.png" height="600px" width="600px" />
<img height="600px" width="600px" src="/images/educoder/applys.png" /> <img height="600px" width="600px" src="/images/educoder/applys.png" />
</div> </div>
<!--第三方账号登录-->
<!--<div class="mt10 edu-txt-center">
<p class="color-grey-9">第三方账号登录</p>
<div class="mt15">
<a href="javascript:void(0)" class="margin15"><img src="/images/educoder/weixin.png" class="radius"/></a>
<a href="javascript:void(0)" class="margin15"><img src="/images/educoder/QQ.png" class="radius"/></a>
<a href="javascript:void(0)" class="margin15"><img src="/images/educoder/weibo.png" class="radius"/></a>
</div>
</div>-->
</div> </div>
</div> </div>
</div> </div>

@ -23,7 +23,7 @@
<img class="roundedRectangles" src="/images/educoder/roundedRectangle.png"/> <img class="roundedRectangles" src="/images/educoder/roundedRectangle.png"/>
</li> </li>
<li class="<%= params[:controller] == "libraries" ? " active" : "" %>"><%= link_to "教学案例", libraries_path %></li> <li class="<%= params[:controller] == "libraries" ? " active" : "" %>"><%= link_to "教学案例", libraries_path %></li>
<li class="<%= params[:controller] == "project_packages" ? " active" : "" %>"><%= link_to "众包", project_packages_path %></li> <li class="<%= params[:controller] == "project_packages" ? " active" : "" %>"><%= link_to "众包任务", project_packages_path %></li>
<li class="<%= params[:controller] == "forums" ? " active" : "" %>"><%= link_to "交流问答", forums_path %></li> <li class="<%= params[:controller] == "forums" ? " active" : "" %>"><%= link_to "交流问答", forums_path %></li>
<% if User.current.ec_school.present? %> <% if User.current.ec_school.present? %>
<li class="<%= ecs_controller.include?(params[:controller]) ? " active" : "" %>" id="ec_banner"> <li class="<%= ecs_controller.include?(params[:controller]) ? " active" : "" %>" id="ec_banner">

@ -24,7 +24,7 @@
<img class="roundedRectangles" src="/images/educoder/roundedRectangle.png"/> <img class="roundedRectangles" src="/images/educoder/roundedRectangle.png"/>
</li> </li>
<li class="<%= params[:controller] == "libraries" ? " active" : "" %>"><%= link_to "教学案例", libraries_path %></li> <li class="<%= params[:controller] == "libraries" ? " active" : "" %>"><%= link_to "教学案例", libraries_path %></li>
<li class="<%= params[:controller] == "project_packages" ? " active" : "" %>"><%= link_to "众包", project_packages_path %></li> <li class="<%= params[:controller] == "project_packages" ? " active" : "" %>"><%= link_to "众包任务", project_packages_path %></li>
<li class="<%= params[:controller] == "forums" ? " active" : "" %>"><%= link_to "交流问答", forums_path %></li> <li class="<%= params[:controller] == "forums" ? " active" : "" %>"><%= link_to "交流问答", forums_path %></li>
<!--<li><%#= link_to "活动竞赛", competitions_path %></li>--> <!--<li><%#= link_to "活动竞赛", competitions_path %></li>-->
</ul> </ul>

Loading…
Cancel
Save