-
Notifications
You must be signed in to change notification settings - Fork 2
/
view.html.erb
33 lines (30 loc) · 1.2 KB
/
view.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<%- if usertutorial== "test" -%>
<%- user_tutorial = "#{usertutorial}"
base_url = "/node/#{host}/#{port}"
login_url = "#{base_url}/login"
next_url = "#{base_url}/notebooks/test.ipynb"
action = "#{login_url}?next=#{next_url}"
form_id = "jupyter_form#{login_url.gsub('/', '_')}"
method = "post"
target = "_blank"
onsubmit = "changeTarget()"
-%>
<%- end -%>
<%- if usertutorial== "Alphafold3" -%>
<%- user_tutorial = "#{usertutorial}"
base_url = "/node/#{host}/#{port}"
login_url = "#{base_url}/login"
next_url = "#{base_url}/notebooks/alphafold3.ipynb"
action = "#{login_url}?next=#{next_url}"
form_id = "jupyter_form#{login_url.gsub('/', '_')}"
method = "post"
target = "_blank"
onsubmit = "changeTarget()"
-%>
<%- end -%>
<form id="<%= form_id %>" action="<%= action %>" method="<%= method %>" target="<%= target %>" onsubmit="<%= onsubmit %>">
<input type="hidden" name="password" value="<%= password %>">
<button class="btn btn-primary" type="submit">
<i class="fa fa-eye"></i> Connect to Tutorials OnDemand: <%= user_tutorial %>
</button>
</form>