Commit 3aa76801 authored by delanoe's avatar delanoe

[FEAT] Loader + CSS + icons, ergo ok ?

parent a08562cd
...@@ -71,6 +71,7 @@ class NewCorpusForm(forms.Form): ...@@ -71,6 +71,7 @@ class NewCorpusForm(forms.Form):
raise forms.ValidationError(ugettext_lazy('File too heavy! (>1GB).')) raise forms.ValidationError(ugettext_lazy('File too heavy! (>1GB).'))
return file_ return file_
@requires_auth @requires_auth
def project(request, project_id): def project(request, project_id):
# current user # current user
......
...@@ -92,37 +92,32 @@ ...@@ -92,37 +92,32 @@
--!> --!>
<!-- <li class="divider"></li> --!> <!-- <li class="divider"></li> --!>
<a type="button" class="btn btn-default <a type="button" class="btn btn-default {% if view == "titles" %} active {% endif %}"
{% if view == "titles" %}active{%endif%}" href="/projects/{{project.id}}/corpora/{{ corpus.id }}/">Titles
href="/projects/{{project.id}}/corpora/{{ corpus.id }}/">Titles</a> </a>
<a type="button" class="btn btn-default
{% if view == "journals" %}active{%endif%}"
href="/projects/{{project.id}}/corpora/{{ corpus.id }}/journals">Journals</a>
<a type="button" class="btn btn-default
{% if view == "terms" %}active{%endif%}"
href="/projects/{{project.id}}/corpora/{{ corpus.id }}/terms">Terms</a>
<!-- <li class="divider"></li> --!> <a type="button" class="btn btn-default {% if view == "journals" %} active {% endif %}"
href="/projects/{{project.id}}/corpora/{{ corpus.id }}/journals">Journals
<!-- FIXME put a separator here --!> </a>
<!--
<a type="button" class="btn btn-default
{% if view == "charts" %}active{%endif%}"
href="/projects/{{project.id}}/corpora/{{ corpus.id }}/terms">Advanced Charts</a>
--!>
<!-- FIXME a pop up for advanced mode of graphs --!> {% for state in corpus.hyperdata.statuses %}
<a type="button" class="btn btn-default {% if state.action == "ngrams_extraction" %}
{% if view == "conditional" %}active{%endif%}" {% if state.complete %}
data-url="/projects/{{project.id}}/corpora/{{ corpus.id }}/explorer?field1=ngrams&amp;field2=ngrams&amp;distance=conditional&amp;bridgeness=5" onclick='gotoexplorer(this)' >Graphs (Conditional)</a>
<a type="button" class="btn btn-default <a type="button" class="btn btn-default
{% if view == "distributional" %}active{%endif%}" {% if view == "terms" %} active {% endif %}"
data-url="/projects/{{project.id}}/corpora/{{ corpus.id }}/explorer?field1=ngrams&amp;field2=ngrams&amp;distance=distributional&amp;bridgeness=5" onclick='gotoexplorer(this)' >Graphs (Distributional)</a> href="/projects/{{project.id}}/corpora/{{ corpus.id }}/terms">Terms</a>
<!--
<a type="button" class="btn btn-default <!-- <li class="divider"></li> --!>
{% if view == "journalTerms" %}active{%endif%}"
href="/projects/{{project.id}}/corpora/{{ corpus.id }}/graph">Graphs Journal/Terms</a> <!-- FIXME a pop up for advanced mode of graphs --!>
--!> <a type="button" class="btn btn-default "
data-url="/projects/{{project.id}}/corpora/{{ corpus.id }}/explorer?field1=ngrams&amp;field2=ngrams&amp;distance=conditional&amp;bridgeness=5" onclick='gotoexplorer(this)' >Graphs (Conditional)</a>
<a type="button" class="btn btn-default "
data-url="/projects/{{project.id}}/corpora/{{ corpus.id }}/explorer?field1=ngrams&amp;field2=ngrams&amp;distance=distributional&amp;bridgeness=5" onclick='gotoexplorer(this)' >Graphs (Distributional)</a>
{% endif %}
{% endif %}
{% endfor %}
</center> </center>
</div> </div>
</div> </div>
...@@ -130,9 +125,16 @@ ...@@ -130,9 +125,16 @@
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
{% if project %} {% if project %}
<h3><a href="/projects/{{project.id}}">Project: {{ project.name }}</a> <h3><a href="/projects/{{project.id}}">
<br> Corpus: {{ corpus.name }} <span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<br> ({{ corpus.date }}) {{ project.name }}
</a>
<br>
<span class="glyphicon glyphicon-file" aria-hidden="true"></span>
{{ corpus.name }}
<br>
<span class="glyphicon glyphicon-calendar" aria-hidden="true"></span>
{{ corpus.date }}
</h3> </h3>
{% endif %} {% endif %}
</div> </div>
......
...@@ -30,8 +30,10 @@ ...@@ -30,8 +30,10 @@
<div class="container theme-showcase" role="main"> <div class="container theme-showcase" role="main">
<div class="jumbotron"> <div class="jumbotron">
<h1>My projects</h1> <h1>
<p>Template showing my working space</p> <span class="glyphicon glyphicon-home" aria-hidden="true"></span>
Projects
</h1>
<p> <p>
<button <button
type="button" type="button"
...@@ -64,7 +66,12 @@ ...@@ -64,7 +66,12 @@
{% for project in projects %} {% for project in projects %}
<!--<div class="col-md-offset-7 col-md-4 content" style="background-color:grey">!--> <!--<div class="col-md-offset-7 col-md-4 content" style="background-color:grey">!-->
<div id="project_{{project.id}}" class="col-md-3 content"> <div id="project_{{project.id}}" class="col-md-3 content">
<h3><a href="/projects/{{ project.id }}">{{ project.name }} <h3>
<a
href="/projects/{{ project.id }}">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
{{ project.name }}
</a> </a>
<a href="/projects/{{project.id}}" > <a href="/projects/{{project.id}}" >
<button type="button" class="btn btn-default" aria-label="Left Align"> <button type="button" class="btn btn-default" aria-label="Left Align">
......
...@@ -30,7 +30,9 @@ ...@@ -30,7 +30,9 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
{% if project %} {% if project %}
<h1>{{ project.name }}</h1> <h1>
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
{{ project.name }}</h1>
<!--<h3> {{number}} corpora </h3>--> <!--<h3> {{number}} corpora </h3>-->
{% endif %} {% endif %}
</div> </div>
...@@ -69,11 +71,11 @@ ...@@ -69,11 +71,11 @@
<div class="container"> <div class="container">
{% if list_corpora %} {% if list_corpora %}
<h1>Resources</h1>
<h2>Corpora</h2> <h2>Corpora</h2>
<ul> <ul>
{% for key, corpora in list_corpora.items %} {% for key, corpora in list_corpora.items %}
<li> <li>
<span class="glyphicon glyphicon-cd" aria-hidden="true"></span>
{{ key }} {{ key }}
<ul> <ul>
{% for corpus in corpora %} {% for corpus in corpora %}
...@@ -84,6 +86,7 @@ ...@@ -84,6 +86,7 @@
Processing, drink a cup of tea, and refresh the page :) Processing, drink a cup of tea, and refresh the page :)
{% else %} {% else %}
<a href="/projects/{{project.id}}/corpora/{{corpus.id}}"> <a href="/projects/{{project.id}}/corpora/{{corpus.id}}">
<span class="glyphicon glyphicon-file" aria-hidden="true"></span>
{{corpus.name}}, {{ corpus.count }} documents {{ corpus.status_message }} {{corpus.name}}, {{ corpus.count }} documents {{ corpus.status_message }}
</a> </a>
<a href="/projects/{{project.id}}/corpora/{{corpus.id}}"> <a href="/projects/{{project.id}}/corpora/{{corpus.id}}">
...@@ -92,7 +95,7 @@ ...@@ -92,7 +95,7 @@
</button> </button>
</a> </a>
{% endifequal %} {% endifequal %}
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="bottom" <button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="bottom"
data-content=" data-content="
...@@ -112,6 +115,57 @@ ...@@ -112,6 +115,57 @@
"> ">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
</button> </button>
<p>
<div class="progress">
{% for state in corpus.hyperdata.statuses %}
{% ifequal state.action "parsing" %}
<div class=" progress-bar progress-bar-striped
{% if state.complete %}
progress-bar-success
{% else %}
active
{% endif %}
"
role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 50%">
<span>
Parsing
{% if state.complete %}
Complete
{% else %}
Processing
{% endif %}
</span>
</div>
{% endifequal %}
{% ifequal state.action "ngrams_extraction" %}
<div class="progress-bar progress-bar-striped
{% if state.complete %}
progress-bar-success
{% else %}
active
{% endif %}
"
role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 50%">
<span>
Ngrams extraction
{% if state.complete %}
Complete
{% else %}
Processing
{% endif %}
</span>
</div>
{% endifequal %}
{% endfor %}
</div>
</p>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment