Skip to content
Snippets Groups Projects
Commit 902447c1 authored by Bastien Abadie's avatar Bastien Abadie
Browse files

Merge branch 'frontend-router' into 'master'

Frontend router

See merge request !148
parents 9de3a947 75ed254b
No related branches found
No related tags found
1 merge request!148Frontend router
Showing
with 10 additions and 77 deletions
from django.conf import settings
from django.conf.urls import url, include
from arkindex.documents.views import (
VolumesList, VolumePages, VolumeActs, PagesSearch, ActsSearch, ElementDetails, CorpusCreate
)
from arkindex.documents.views import PagesSearch, ActsSearch, CorpusCreate
from arkindex.project.views import FrontendView
urlpatterns = [
url(r'^volumes/?$', FrontendView.as_view(), name='volumes'),
url(r'^pages/$', PagesSearch.as_view(), name='pages'),
url(r'^acts/$', ActsSearch.as_view(), name='acts'),
# Volumes
url(r'^volume/(?P<pk>[\w\-]+)/pages/$',
VolumePages.as_view(), name='volume-pages'),
url(r'^volume/(?P<pk>[\w\-]+)/acts/$',
VolumeActs.as_view(), name='volume-acts'),
url(r'^$', VolumesList.as_view(), name='volumes'),
# Element info
url(r'^element/(?P<pk>[\w\-]+)/$',
ElementDetails.as_view(), name='element-details'),
url(r'^corpus/new/$', CorpusCreate.as_view(), name='corpus-create'),
]
......
from django.conf.urls import url, include
from django.contrib import admin
from arkindex.project.api_v1 import api
from arkindex.project.views import FrontendView
urlpatterns = [
url(r'^api/v1/', include((api, 'api'), namespace='api')),
......@@ -8,4 +9,5 @@ urlpatterns = [
url(r'^user/', include('django.contrib.auth.urls')),
url(r'^imports/', include('arkindex.dataimport.urls')),
url(r'^', include('arkindex.documents.urls')),
url(r'^', FrontendView.as_view()),
]
from django.views.generic import TemplateView
class Home(TemplateView):
class FrontendView(TemplateView):
"""
Project homepage
View that show the frontend's router
TODO: Get rid of this view once the frontend is fully split
"""
template_name = 'home.html'
template_name = 'front.html'
{% extends 'base.html' %}
{% block content %}
<h1 class="title">Credentials</h1>
<h2 class="subtitle">Manage connected applications</h2>
<div id="app">
<OAuth-List />
</div>
......
{% extends 'base.html' %}
{% block content %}
<h1 class="title">Workflow errors</h1>
<h2 class="subtitle">View a workflow's errors</h2>
<div id="app">
<Import-Failures id="{{ dataimport.id }}" />
</div>
......
{% extends 'base.html' %}
{% block content %}
<h1 class="title">Data files</h1>
<h2 class="subtitle">List uploaded files in corpora</h2>
<div id="app">
<Files-List />
</div>
......
{% extends 'base.html' %}
{% block content %}
<h1 class="title">Data imports</h1>
<h2 class="subtitle">List all data importation workflows</h2>
<div id="app">
<Imports-List />
</div>
......
{% extends 'base.html' %}
{% block content %}
<h1 class="title">Repositories</h1>
<h2 class="subtitle">Manage Git repositories</h2>
<div id="app">
<Repos-List />
</div>
......
{% extends 'base.html' %}
{% block content %}
<h1 class="title">New repository</h1>
<h2 class="subtitle">Add a repository from an external provider</h2>
<div id="app">
<Repos-Create />
</div>
......
{% extends 'base.html' %}
{% block content %}
<h1 class="title">Workflow status</h1>
<h2 class="subtitle">Monitor a workflow's tasks</h2>
<div id="app">
<Import-Status id="{{ dataimport.id }}" />
</div>
......
{% extends 'base.html' %}
{% block content %}
<div id="app">
<Element-Details id="{{ element.id }}" />
</div>
{% endblock %}
{% extends 'base.html' %}
{% block content %}
<div id="app">
<Volume-Acts id="{{ volume.id }}" />
</div>
{% endblock %}
{% extends 'base.html' %}
{% block content %}
<div id="app">
<Volume-Pages id="{{ volume.id }}" />
</div>
{% endblock %}
......@@ -2,6 +2,6 @@
{% block content %}
<div id="app">
<Volumes />
<router-view></router-view>
</div>
{% endblock %}
{% extends 'base.html' %}
{% block content %}
<div class="content">
<ul>
<li>
View available <a href="{% url 'volumes' %}">volumes</a>
</li>
<li>
Search through <a href="{% url 'pages' %}">pages</a>
</li>
<li>
Search through <a href="{% url 'acts' %}">acts</a>
</li>
</ul>
</div>
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment