FIX 更改云上实验室主站配置
This commit is contained in:
parent
cda614e9df
commit
260e6f8932
|
@ -24,7 +24,7 @@ class Laboratory < ApplicationRecord
|
||||||
|
|
||||||
def site
|
def site
|
||||||
rails_env = EduSetting.get('rails_env')
|
rails_env = EduSetting.get('rails_env')
|
||||||
suffix = rails_env && rails_env != 'production' ? ".#{rails_env}.educoder.net" : '.educoder.net'
|
suffix = rails_env && rails_env != 'production' ? ".#{rails_env}.trustie.net" : '.trustie.net'
|
||||||
|
|
||||||
identifier ? "#{identifier}#{suffix}" : ''
|
identifier ? "#{identifier}#{suffix}" : ''
|
||||||
end
|
end
|
||||||
|
@ -126,4 +126,4 @@ class Laboratory < ApplicationRecord
|
||||||
def main_site?
|
def main_site?
|
||||||
id == 1
|
id == 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<% school = laboratory&.school %>
|
<% school = laboratory&.school %>
|
||||||
<td><%= list_index_no((params[:page] || 1).to_i, index) %></td>
|
<td><%= list_index_no((params[:page] || 1).to_i, index) %></td>
|
||||||
<td class="text-left"><%= school&.name || 'EduCoder主站' %></td>
|
<td class="text-left"><%= school&.name || 'Trustie主站' %></td>
|
||||||
<td class="text-left">
|
<td class="text-left">
|
||||||
<% if laboratory.identifier %>
|
<% if laboratory.identifier %>
|
||||||
<%= link_to laboratory.site, "https://#{laboratory.site}", target: '_blank' %>
|
<%= link_to laboratory.site, "https://#{laboratory.site}", target: '_blank' %>
|
||||||
|
|
Loading…
Reference in New Issue