Browse Source

settings增加old_projects_url

tags/v1
sylor_huang@126.com 6 years ago
parent
commit
83eb672cc7
3 changed files with 4 additions and 2 deletions
  1. +1
    -1
      app/controllers/projects_controller.rb
  2. +2
    -1
      app/controllers/settings_controller.rb
  3. +1
    -0
      app/views/settings/show.json.jbuilder

+ 1
- 1
app/controllers/projects_controller.rb View File

@@ -78,7 +78,7 @@ class ProjectsController < ApplicationController
rescue Exception => e
uid_logger_error(e.message)
tip_exception(e.message)
end
end·

private
def project_params


+ 2
- 1
app/controllers/settings_controller.rb View File

@@ -1,5 +1,6 @@
class SettingsController < ApplicationController
def show

@old_projects_url = nil
@old_projects_url = "https://www.trustie.net/users/#{current_user.try(:login)}/projects" if current_user.present?
end
end

+ 1
- 0
app/views/settings/show.json.jbuilder View File

@@ -36,6 +36,7 @@ json.setting do

json.main_site current_laboratory.main_site?
json.new_course default_course_links
json.old_projects_url @old_projects_url


end

Loading…
Cancel
Save