From d35faf3935987013213422fe3ebb26443504050e Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Fri, 21 Aug 2020 11:30:47 +0800 Subject: [PATCH] Fix:Issues --- app/controllers/concerns/laboratory_helper.rb | 21 +++++++++---------- app/views/settings/show.json.jbuilder | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/app/controllers/concerns/laboratory_helper.rb b/app/controllers/concerns/laboratory_helper.rb index 5cc0ca55..33e8e0f5 100644 --- a/app/controllers/concerns/laboratory_helper.rb +++ b/app/controllers/concerns/laboratory_helper.rb @@ -33,18 +33,17 @@ module LaboratoryHelper end def default_course_links - # my_projects: "/users/#{current_user.try(:login)}/projects", - # my_projects: "https://www.trustie.net/users/#{current_user.try(:login)}/user_projectlist", + { - new_syllabuses: "https://www.trustie.net/syllabuses/new", - new_course: "https://www.trustie.net/courses/new", - edit_account: "https://www.trustie.net/my/account", - my_courses: "https://www.trustie.net/users/#{current_user.try(:login)}/user_courselist", - my_projects: "/users/#{current_user.try(:login)}/projects", - my_organ: "https://www.trustie.net/users/#{current_user.try(:login)}/user_organizations", - default_url: "https://www.trustie.net/", - tiding_url: "https://www.trustie.net/users/#{current_user.try(:login)}/user_messages", - register_url: "https://www.trustie.net/login?login=false" + # new_syllabuses: "https://www.trustie.net/syllabuses/new", + # new_course: "https://www.trustie.net/courses/new", + # edit_account: "https://www.trustie.net/my/account", + # my_courses: "https://www.trustie.net/users/#{current_user.try(:login)}/user_courselist", + # my_projects: "/users/#{current_user.try(:login)}/projects", + # my_organ: "https://www.trustie.net/users/#{current_user.try(:login)}/user_organizations", + # default_url: "https://www.trustie.net/", + tiding_url: "http://39.105.176.215/users/#{current_user.try(:login)}/user_tidings", + # register_url: "https://www.trustie.net/login?login=false" } end diff --git a/app/views/settings/show.json.jbuilder b/app/views/settings/show.json.jbuilder index 3be28084..e471ba52 100644 --- a/app/views/settings/show.json.jbuilder +++ b/app/views/settings/show.json.jbuilder @@ -44,6 +44,6 @@ json.setting do json.navbar nav_bar json.footer default_setting.footer - + json.new_course default_course_links json.main_site current_laboratory.main_site? end