dev_aliyun
cxt 5 years ago
commit 58f5df5f1f

@ -487,7 +487,7 @@ class CompetitionsController < ApplicationController
if params[:competition_module] if params[:competition_module]
@competition.competition_modules.where(:id => params[:competition_module], :md_edit => false).update_all(:hidden => 0) @competition.competition_modules.where(:id => params[:competition_module], :md_edit => false).update_all(:hidden => 0)
none_modules = @competition.competition_modules.where("name != '首页' and md_edit = false").map(&:id).join(",").split(",") - params[:competition_module] none_modules = @competition.competition_modules.where("name != '首页' and md_edit = false").pluck(:id) - params[:competition_module].map(&:to_i)
@competition.competition_modules.where(:id => none_modules).update_all(:hidden => 1) @competition.competition_modules.where(:id => none_modules).update_all(:hidden => 1)
end end
if params[:name] if params[:name]

@ -46,6 +46,10 @@
<% else %> <% else %>
<li class="clearfix<%= com_module.name == "通知公告" ? " noticeLi" : "" %>"> <li class="clearfix<%= com_module.name == "通知公告" ? " noticeLi" : "" %>">
<div class="fl"> <div class="fl">
<% if com_module.name == "首页" %> <!-- disabled导致competition_module为空 -->
<input type="hidden" name="competition_module[]" value="<%= com_module.id %>" />
<% end %>
<input type="checkbox" value="<%= com_module.id %>" name="competition_module[]" <%= com_module.hidden ? "" : "checked" %> <%= com_module.name == "首页" ? "disabled" : "" %> class="magic-checkbox" id="com_module_<%= com_module.id %>"> <input type="checkbox" value="<%= com_module.id %>" name="competition_module[]" <%= com_module.hidden ? "" : "checked" %> <%= com_module.name == "首页" ? "disabled" : "" %> class="magic-checkbox" id="com_module_<%= com_module.id %>">
<label for="com_module_<%= com_module.id %>" style="top:0px"> <label for="com_module_<%= com_module.id %>" style="top:0px">
<% if com_module.name != "首页" && com_module.name != "报名" && com_module.name != "通知公告" && com_module.name != "排行榜" && com_module.name != "资料下载" %> <% if com_module.name != "首页" && com_module.name != "报名" && com_module.name != "通知公告" && com_module.name != "排行榜" && com_module.name != "资料下载" %>

@ -579,9 +579,9 @@ a.user_greybg_btn{background-color:#747A7F;color: #fff;}
.new_li ol li{ list-style-type: decimal!important; } .new_li ol li{ list-style-type: decimal!important; }
.new_li li{ margin-bottom: 0!important; } .new_li li{ margin-bottom: 0!important; }
.markdown-toc .markdown-toc-list li{ .markdown-toc .markdown-toc-list li{
list-style-type: disc!important; /*list-style-type: disc!important;*/
list-style-type: decimal!important; /*list-style-type: decimal!important;*/
margin-bottom: 0!important; /*margin-bottom: 0!important;*/
} }
/*搜索框*/ /*搜索框*/
#pollingPanel{position: relative;width: 248px;height: 32px;} #pollingPanel{position: relative;width: 248px;height: 32px;}

Loading…
Cancel
Save