Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit abc959d

Browse files
committed
Fix: Update old links to static books.
1 parent 2a6af8e commit abc959d

2 files changed

Lines changed: 17 additions & 13 deletions

File tree

runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap/layout.html

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{% extends "basic/layout.html" %}
22

3+
{% if dynamic_pages == 'True' %}
4+
{% set appname = '{{ =request.application }}' %}
5+
{% endif %}
6+
37
{% set script_files = ['_static/runestonebase.js'] + script_files + [
48
'_static'+'/jquery-ui-1.10.3.custom.min.js',
59
'_static'+'/jquery-fix.js',
@@ -114,11 +118,11 @@
114118
</a>
115119
<ul class='dropdown-menu'>
116120
{% if 'overview' in course_id %}
117-
<li><a href='/{{appname}}/static/{{course_id}}/overview.html' aria-label="index-page">Table of Contents</a></li>
121+
<li><a href='{{ pathto(master_doc) }}/overview.html' aria-label="index-page">Table of Contents</a></li>
118122
{% else: %}
119123
<li><a href='{{ pathto(master_doc) }}' aria-label="index-page">Table of Contents</a></li>
120124
{% endif %}
121-
<li><a href='/{{appname}}/static/{{course_id}}/genindex.html'>Book Index</a></li>
125+
<li><a href='{{ pathto(master_doc) }}/genindex.html'>Book Index</a></li>
122126
<li class="divider"></li>
123127
<li style="width: 240px;">
124128
<form class="navbar-search" style="margin:10px;" action="{{ pathto('search') }}" method="get">
@@ -149,17 +153,17 @@
149153
<ul class="dropdown-menu user-menu">
150154
<li><span class='loggedinuser'></span></li>
151155
<li class="divider"></li>
152-
<li><a href='{{course_url}}/{{appname}}/assignments/chooseAssignment.html'>Assignments</a></li>
153-
<li><a href='{{course_url}}/{{appname}}/assignments/practice'>Practice</a></li>
156+
<li><a href='/{{appname}}/assignments/chooseAssignment.html'>Assignments</a></li>
157+
<li><a href='/{{appname}}/assignments/practice'>Practice</a></li>
154158
<li class="divider"></li>
155159
<li><a href='/{{appname}}/default/courses'>Change Course</a></li>
156160
<li class="divider"></li>
157-
<li id="ip_dropdown_link"><a href='{{course_url}}/{{appname}}/admin/index'>Instructor's Page</a></li>
158-
<li><a href='{{ course_url }}/{{ appname }}/assignments/index'>Progress Page</a></li>
161+
<li id="ip_dropdown_link"><a href='/{{appname}}/admin/index'>Instructor's Page</a></li>
162+
<li><a href='/{{appname}}/assignments/index'>Progress Page</a></li>
159163
<li class="divider"></li>
160-
<li><a href="{{course_url}}/{{appname}}/default/user/profile" id="profilelink">Edit Profile</a></li>
161-
<li><a href="{{course_url}}/{{appname}}/default/user/change_password" id="passwordlink">Change Password</a></li>
162-
<li><a href="{{course_url}}/{{appname}}/default/user/register" id="registerlink">Register</a></li>
164+
<li><a href="/{{appname}}/default/user/profile" id="profilelink">Edit Profile</a></li>
165+
<li><a href="/{{appname}}/default/user/change_password" id="passwordlink">Change Password</a></li>
166+
<li><a href="/{{appname}}/default/user/register" id="registerlink">Register</a></li>
163167
<li class='loginout'><a href='#'>Login</a></li> <!-- correct link populated by addNavbarLoginLink() -->
164168
</ul>
165169
</li>
@@ -182,8 +186,8 @@
182186
</a>
183187
<ul class="dropdown-menu user-menu">
184188
<li><a href='http://runestoneinteractive.org/pages/faq.html'>FAQ</a></li>
185-
<li><a href='/{{appname}}/static/{{course_id}}/navhelp.html'>Navigation Help</a></li>
186-
<li><a href='/{{appname}}/static/instructorguide/index.html'>Help for Instructors</a></li>
189+
<li><a href='https://runestone.academy/runestone/static/overview/navhelp.html'>Navigation Help</a></li>
190+
<li><a href='https://runestone.academy/runestone/static/overview/instructor.html'>Help for Instructors</a></li>
187191
<li class="divider"></li>
188192
<li><a href='http://runestoneinteractive.org'>About Runestone</a></li>
189193
<li><a href='/{{ appname }}/default/reportabug?course={{ course_id }}&page={{ pathto(pagename,1) }}'>Report A Problem</a></li>
@@ -247,7 +251,7 @@
247251
{% endraw %}
248252
{% else %}
249253
eBookConfig.useRunestoneServices = {% if use_services == 'True' -%}true{%- else -%}false{%- endif -%};
250-
eBookConfig.host = '{{course_url}}' ? '{{course_url}}' : 'http://127.0.0.1:8000';
254+
eBookConfig.host = '{{course_url}}' || 'http://127.0.0.1:8000';
251255
eBookConfig.app = eBookConfig.host+'/{{appname}}';
252256
eBookConfig.course = '{{course_id}}';
253257
eBookConfig.basecourse = '{{ basecourse }}';

runestone/common/project_template/pavement.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ options(
4646
'dynamic_pages': %(dynamic_pages)s,
4747
'use_services': %(use_services)s,
4848
'basecourse': project_name,
49-
# If ``dynamic_pages`` is 'True', then the following values are ignored, since they're provided by the server.
5049
'course_id': project_name,
50+
# These are used for non-dynamic books.
5151
'appname': 'runestone',
5252
'course_url': master_url,
5353
}

0 commit comments

Comments
 (0)