<% define_breadcrumbs do %> <% add_breadcrumb('网站设置') %> <% end %>
<%= simple_form_for(@laboratory, url: cooperative_laboratory_setting_path(@laboratory), method: 'patch', html: { enctype: 'multipart/form-data' }) do |f| %> <% setting = @laboratory.laboratory_setting %>
网站域名设置
https://
<%= text_field_tag :identifier, @laboratory.identifier, maxlength: 15, class: 'form-control font-16', 'onKeyUp': 'value=value.replace(/[^\w\-\/]/ig,"").toLowerCase()', style: 'text-transform:lowercase'%>
<% rails_env = EduSetting.get('rails_env') %> <%= rails_env && rails_env != 'production' ? ".#{rails_env}.educoder.net" : '.educoder.net' %>
<%# if @laboratory.errors && @laboratory.errors.key?(:identifier) %> <%# end %>
网站名称设置
<%= text_field_tag :name, setting.name, placeholder: '输入20个字以内的网站名称', maxlength: 20, class: 'form-control col-12 col-md-4' %>
Logo设置
<% nav_logo_img = setting.nav_logo_url %>
网站导航logo
格式:PNG、JPG
尺寸:高度38px以内,宽等比例缩放
<% login_logo_img = setting.login_logo_url %>
登录页面logo
格式:PNG、JPG
尺寸:高度90px以内,宽等比例缩放
<% tab_logo_img = setting.tab_logo_url %>
<%= file_field_tag(:tab_logo, accept: 'image/x-icon', style: 'display: none', value: params[:tab_logo]) %>
浏览器导航栏logo
格式:ico
尺寸:16*16 32*32 48*48 64*64
Banner设置
导航设置
<% (setting.navbar || setting.default_navbar).each do |nav| %> <% end %>
导航名称 导航链接 是否展示
<%= text_field_tag('navbar[][name]', nav['name'], id: nil, class: 'form-control') %> <%= text_field_tag('navbar[][link]', nav['link'], id: nil, class: 'form-control') %> <%= check_box_tag('navbar[][hidden]', 0, !nav['hidden'], id: nil, class: 'font-16') %>
底部备案信息设置
<%= javascript_void_link '保存', class: 'btn btn-primary mr-3 px-4 submit-btn' %>
<% end %>