From 6b85bdf1418b990e2967b6440922c937cd67b7c5 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Thu, 29 Aug 2019 10:55:25 +0800 Subject: [PATCH] xxx --- .../admins/shixun_settings/shixun_settings.js | 6 ++++++ app/views/admins/shared/_sidebar.html.erb | 8 ++------ .../admins/shixun_settings/shared/_td.html.erb | 16 ++++++++-------- app/views/admins/shixuns/index.html.erb | 2 +- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/app/assets/javascripts/admins/shixun_settings/shixun_settings.js b/app/assets/javascripts/admins/shixun_settings/shixun_settings.js index 653836c17..9dd47337d 100644 --- a/app/assets/javascripts/admins/shixun_settings/shixun_settings.js +++ b/app/assets/javascripts/admins/shixun_settings/shixun_settings.js @@ -1,3 +1,9 @@ +$(document).on('turbolinks:load', function() { + if ($('body.admins-shixun-settings-index-page').length > 0) { + + } +}); + function update_change(target) { var s_id = $(target).attr("data-id"); var s_value = $(target).val(); diff --git a/app/views/admins/shared/_sidebar.html.erb b/app/views/admins/shared/_sidebar.html.erb index 21b64d166..bbf29e8c8 100644 --- a/app/views/admins/shared/_sidebar.html.erb +++ b/app/views/admins/shared/_sidebar.html.erb @@ -22,6 +22,8 @@
  • <%= sidebar_item_group('#shixun-submenu', '实训管理', icon: 'window-restore') do %> +
  • <%= sidebar_item(admins_shixuns_path, '实训列表', icon: 'jsfiddle', controller: 'admins-shixuns') %>
  • +
  • <%= sidebar_item(admins_shixun_settings_path, '实训配置', icon: 'cog', controller: 'admins-shixun_settings') %>
  • <%= sidebar_item(admins_mirror_repositories_path, '镜像管理', icon: 'cubes', controller: 'admins-mirror_repositories') %>
  • <% end %> @@ -42,12 +44,6 @@ <% end %> -
  • - <%= sidebar_item_group('#shixuns-menu', '实训列表', icon: 'jsfiddle') do %> -
  • <%= sidebar_item(admins_shixuns_path, '精选实训', icon: 'fire', controller: 'admins-shixuns') %>
  • -
  • <%= sidebar_item(admins_shixun_settings_path, '实训配置', icon: 'cog', controller: 'admins-shixun_settings') %>
  • - <% end %> -
  • <%= sidebar_item_group('#apply-review-submenu', '审核', icon: 'gavel') do %> diff --git a/app/views/admins/shixun_settings/shared/_td.html.erb b/app/views/admins/shixun_settings/shared/_td.html.erb index f64f4d5de..a4276f023 100644 --- a/app/views/admins/shixun_settings/shared/_td.html.erb +++ b/app/views/admins/shixun_settings/shared/_td.html.erb @@ -2,11 +2,11 @@ <%= shixun.identifier %> - <%= link_to overflow_hidden_span(shixun.name,width:200), "/shixuns/#{shixun.identifier}", :target => "_blank", :title => shixun.name %> + <%= link_to overflow_hidden_span(shixun.name,width:150), "/shixuns/#{shixun.identifier}", :target => "_blank", :title => shixun.name %> - <%= shixun.shixun_main_name.nil? ? "--" : shixun.shixun_main_name %> + <%= display_text shixun.shixun_main_name %> <% status_options = [['超级管理员', '0'], ["合作团队", "1"]] %> @@ -50,9 +50,9 @@ <%= check_box_tag :code_hidden,!shixun.code_hidden,shixun.code_hidden,remote:true,data:{id:shixun.id,toggle:"tooltip",placement:"top"},onchange:"update_change(this)" ,title:"隐藏文件目录"%> - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/app/views/admins/shixuns/index.html.erb b/app/views/admins/shixuns/index.html.erb index 86a3302b7..5dea7fda5 100644 --- a/app/views/admins/shixuns/index.html.erb +++ b/app/views/admins/shixuns/index.html.erb @@ -1,5 +1,5 @@ <% define_admin_breadcrumbs do %> - <% add_admin_breadcrumb('精选实训', admins_shixuns_path) %> + <% add_admin_breadcrumb('实训列表', admins_shixuns_path) %> <% end %>