Skip to content

Commit ac93bd1

Browse files
authored
Update the tree view so that URLs are correct for Voici (#1299)
1 parent 34e0943 commit ac93bd1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

share/jupyter/voila/templates/base/tree.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
{% block body %}
5353
<div class="list-header">
5454
<div class="list-header-text">
55-
Select items to open with Voilà.
55+
Select items to open with {{ "Voilà" if frontend == "voila" else frontend.capitalize() }}.
5656
</div>
5757
</div>
5858

@@ -63,10 +63,10 @@
6363

6464
{% for content in contents.content %}
6565
{% if content.type in ['notebook', 'file'] %}
66-
<li><a href="{{ base_url }}voila/render/{{ content.path }}?{{ query }}"><i class="fa fa-book"></i>{{content.name}}</a></li>
66+
<li><a href="{{ base_url }}{{ frontend }}/render/{{ content.path }}?{{ query }}"><i class="fa fa-book"></i>{{content.name}}</a></li>
6767
{% endif %}
6868
{% if content.type == 'directory' %}
69-
<li><a href="{{ base_url }}voila/tree/{{ content.path }}?{{ query }}"><i class="fa fa-folder"></i>{{content.name}}</a></li>
69+
<li><a href="{{ base_url }}{{ frontend }}/tree/{{ content.path }}?{{ query }}"><i class="fa fa-folder"></i>{{content.name}}</a></li>
7070
{% endif %}
7171
{% endfor %}
7272
</ul>

share/jupyter/voila/templates/lab/tree.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
<div id="voila-tree-main" {{mainStyle}}>
9393
<div class="list-header">
9494
<div class="list-header-text">
95-
Select items to open with Voilà.
95+
Select items to open with {{ "Voilà" if frontend == "voila" else frontend.capitalize() }}.
9696
</div>
9797
</div>
9898

@@ -103,10 +103,10 @@
103103

104104
{% for content in contents.content %}
105105
{% if content.type in ['notebook', 'file'] %}
106-
<li><a href="{{ base_url }}voila/render/{{ content.path }}?{{ query }}" {{openInNewTab}}><i class="fa fa-book"></i>{{content.name}}</a></li>
106+
<li><a href="{{ base_url }}{{ frontend }}/render/{{ content.path }}?{{ query }}" {{openInNewTab}}><i class="fa fa-book"></i>{{content.name}}</a></li>
107107
{% endif %}
108108
{% if content.type == 'directory' %}
109-
<li><a href="{{ base_url }}voila/tree/{{ content.path }}?{{ query }}"><i class="fa fa-folder"></i>{{content.name}}</a></li>
109+
<li><a href="{{ base_url }}{{ frontend }}/tree/{{ content.path }}?{{ query }}"><i class="fa fa-folder"></i>{{content.name}}</a></li>
110110
{% endif %}
111111
{% endfor %}
112112
</ul>

0 commit comments

Comments
 (0)