Skip to content

Commit 93bd7b3

Browse files
Merge pull request #195 from OpenDSA/textbook-url
Textbook url
2 parents 2e0bb31 + 41a4ec5 commit 93bd7b3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/views/courses/show.html.haml

+5-3
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,12 @@
6464
- course = Course.find_by(id:offering.course_id)
6565
- organization = Organization.find_by(id:course.organization_id)
6666
- term = Term.find_by(id:offering.term_id)
67-
- if ENV["config_api_link"] == "staging"
68-
= "https://opendsax.cs.vt.edu/ODSA/" + "/Books/#{organization.slug}/#{course.slug}/#{term.slug}/#{offering.label}/html/"
67+
- if ENV["opendsa_branch"] == "staging"
68+
= link_to "Textbook URL", "https://opendsax.cs.vt.edu/ODSA/" + "/Books/#{organization.slug}/#{course.slug}/#{term.slug}/#{offering.label}/html/"
69+
- elsif ENV["opendsa_branch"] == "master"
70+
= link_to "Textbook URL", "https://opendsa-server.cs.vt.edu/ODSA/" + "/Books/#{organization.slug}/#{course.slug}/#{term.slug}/#{offering.label}/html/"
6971
- else
70-
= ENV["config_api_link"].gsub("/api/configure/","/Books/#{organization.slug}/#{course.slug}/#{term.slug}/#{offering.label}/html/index.html")
72+
= link_to "Textbook URL", ENV["config_api_link"].gsub("/api/configure/","/Books/#{organization.slug}/#{course.slug}/#{term.slug}/#{offering.label}/html/index.html")
7173
%td
7274
- inst_book = InstBook.find_by(course_offering_id:offering.id)
7375
- form_name = 'compile_book_' + inst_book.id.to_s

0 commit comments

Comments
 (0)