栏目创建类型添加老师、学生类型
This commit is contained in:
parent
65bcca76c1
commit
878bcc8cf1
|
@ -148,4 +148,10 @@ module OrganizationsHelper
|
|||
org_acts
|
||||
end
|
||||
|
||||
def org_subfield_had_created?(org, type)
|
||||
sub_field = org.org_subfields.select{|subfield| subfield.field_type == type}
|
||||
result = sub_field.length > 0 ? true : false
|
||||
result
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -118,7 +118,6 @@
|
|||
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="$('#PostDomain_<%= field.id %>').slideToggle();" style="border-bottom: 1px solid #ddd;"></a>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<% else %>
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<% if !field.subfield_subdomain_dir.nil? %>
|
||||
|
|
|
@ -152,10 +152,22 @@
|
|||
<input type="radio" id="orgMeb" value="Resource" name="field_type" />
|
||||
<label for="orgMeb">资源</label>
|
||||
</li>
|
||||
<!--<li class="fl">-->
|
||||
<!--<input type="radio" id="orgCom" value="Complex" name="field_type" />-->
|
||||
<!--<label for="orgMeb">综合</label>-->
|
||||
<!--</li>-->
|
||||
<li class="fl mr15">
|
||||
<input type="radio" id="orgCom" value="Complex" name="field_type" />
|
||||
<label for="orgMeb">综合</label>
|
||||
</li>
|
||||
<% unless org_subfield_had_created?(@organization, "Comptec") %>
|
||||
<li class="fl mr15">
|
||||
<input type="radio" id="orgTec" value="Comptec" name="field_type" />
|
||||
<label for="orgMeb">教师</label>
|
||||
</li>
|
||||
<% end %>
|
||||
<% unless org_subfield_had_created?(@organization, "Compstu") %>
|
||||
<li class="fl">
|
||||
<input type="radio" id="orgStu" value="Compstu" name="field_type" />
|
||||
<label for="orgMeb">学生</label>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="fr"><a href="javascript:void(0);" class="saveBtn db" onclick="add_org_subfield();">新增</a></li>
|
||||
<li class="cl"></li>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue