Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
replace underscores in url names by hyphens
Browse files Browse the repository at this point in the history
  • Loading branch information
WGierke committed Sep 5, 2017
1 parent 0ed2f28 commit 8c9a8bc
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion interface/backend/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
urlpatterns = [
url(r'^', include(router.urls)),
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
url(r'^images/available$', ImageAvailableApiView.as_view(), name='images_available'),
url(r'^images/available$', ImageAvailableApiView.as_view(), name='images-available'),
]
2 changes: 1 addition & 1 deletion interface/backend/static/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class SmokeTest(TestCase):
def test_landing(self):
url = reverse('static:open_image')
url = reverse('static:open-image')
resp = self.client.get(url)
self.assertContains(resp, 'Concept to Clinic')
self.assertEqual(resp.status_code, 200)
8 changes: 4 additions & 4 deletions interface/backend/static/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
from . import views

urlpatterns = (
url(r'^$', views.open_image, name='open_image'),
url(r'^detect$', views.detect_and_select, name='detect_and_select'),
url(r'^annotate$', views.annotate_and_segment, name='annotate_and_segment'),
url(r'^report$', views.report_and_export, name='report_and_export'),
url(r'^$', views.open_image, name='open-image'),
url(r'^detect$', views.detect_and_select, name='detect-and-select'),
url(r'^annotate$', views.annotate_and_segment, name='annotate-and-segment'),
url(r'^report$', views.report_and_export, name='report-and-export'),

)
2 changes: 1 addition & 1 deletion interface/frontend/annotate_and_segment.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{% block tabs %}
{{ block.super }}
{% include "shared/tabs.html" with active_tab='annotate_and_segment' %}
{% include "shared/tabs.html" with active_tab='annotate-and-segment' %}
{% endblock %}

{% block content %}
Expand Down
2 changes: 1 addition & 1 deletion interface/frontend/detect_and_select.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{% block tabs %}
{{ block.super }}
{% include "shared/tabs.html" with active_tab='detect_and_select' %}
{% include "shared/tabs.html" with active_tab='detect-and-select' %}
{% endblock %}

{% block content %}
Expand Down
4 changes: 2 additions & 2 deletions interface/frontend/open_image.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

{% block tabs %}
{{ block.super }}
{% include "shared/tabs.html" with active_tab='open_image' %}
{% include "shared/tabs.html" with active_tab='open-image' %}
{% endblock %}

{% block content %}
Expand Down Expand Up @@ -129,7 +129,7 @@ <h3 class="card-title">{{ selected.patient_id }}</h3>
},
fetchAvailableImages: function() {
var vm = this;
this.$http.get("{% url 'images_available' %}").then(
this.$http.get("{% url 'images-available' %}").then(
function(response) {
this.directoriesDict = response.body;
},
Expand Down
2 changes: 1 addition & 1 deletion interface/frontend/report_and_export.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{% block tabs %}
{{ block.super }}
{% include "shared/tabs.html" with active_tab='report_and_export' %}
{% include "shared/tabs.html" with active_tab='report-and-export' %}
{% endblock %}

{% block content %}
Expand Down
16 changes: 8 additions & 8 deletions interface/frontend/shared/tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
<a class="navbar-brand" href="#">Concept To Clinic</a>
<div class="navbar-collapse collapse" id="navbar">
<ul class="navbar-nav justify-content-center">
<li class="nav-item {% if active_tab == 'open_image' %}active{% endif %}">
<a class="nav-link" href="{% url 'static:open_image' %}">Open image</a>
<li class="nav-item {% if active_tab == 'open-image' %}active{% endif %}">
<a class="nav-link" href="{% url 'static:open-image' %}">Open image</a>
</li>
<li class="nav-item {% if active_tab == 'detect_and_select' %}active{% endif %}">
<a class="nav-link" href="{% url 'static:detect_and_select' %}">Detect and Select</a>
<li class="nav-item {% if active_tab == 'detect-and-select' %}active{% endif %}">
<a class="nav-link" href="{% url 'static:detect-and-select' %}">Detect and Select</a>
</li>
<li class="nav-item {% if active_tab == 'annotate_and_segment' %}active{% endif %}">
<a class="nav-link" href="{% url 'static:annotate_and_segment' %}">Annotate and Segment</a>
<li class="nav-item {% if active_tab == 'annotate-and-segment' %}active{% endif %}">
<a class="nav-link" href="{% url 'static:annotate-and-segment' %}">Annotate and Segment</a>
</li>
<li class="nav-item {% if active_tab == 'report_and_export' %}active{% endif %}">
<a class="nav-link" href="{% url 'static:report_and_export' %}">Report and Export</a>
<li class="nav-item {% if active_tab == 'report-and-export' %}active{% endif %}">
<a class="nav-link" href="{% url 'static:report-and-export' %}">Report and Export</a>
</li>
</ul>
<ul class="nav navbar-nav mx-auto justify-content-end">
Expand Down

0 comments on commit 8c9a8bc

Please sign in to comment.