Commit 3aa76801 authored by delanoe's avatar delanoe

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

parent a08562cd
......@@ -71,6 +71,7 @@ class NewCorpusForm(forms.Form):
raise forms.ValidationError(ugettext_lazy('File too heavy! (>1GB).'))
return file_
@requires_auth
def project(request, project_id):
# current user
......
......@@ -92,37 +92,32 @@
--!>
<!-- <li class="divider"></li> --!>
<a type="button" class="btn btn-default {% if view == "titles" %} active {% endif %}"
href="/projects/{{project.id}}/corpora/{{ corpus.id }}/">Titles
</a>
<a type="button" class="btn btn-default {% if view == "journals" %} active {% endif %}"
href="/projects/{{project.id}}/corpora/{{ corpus.id }}/journals">Journals
</a>
{% for state in corpus.hyperdata.statuses %}
{% if state.action == "ngrams_extraction" %}
{% if state.complete %}
<a type="button" class="btn btn-default
{% if view == "titles" %}active{%endif%}"
href="/projects/{{project.id}}/corpora/{{ corpus.id }}/">Titles</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%}"
{% if view == "terms" %} active {% endif %}"
href="/projects/{{project.id}}/corpora/{{ corpus.id }}/terms">Terms</a>
<!-- <li class="divider"></li> --!>
<!-- FIXME put a separator here --!>
<!--
<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 --!>
<a type="button" class="btn btn-default
{% if view == "conditional" %}active{%endif%}"
<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
{% if view == "distributional" %}active{%endif%}"
<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>
<!--
<a type="button" class="btn btn-default
{% if view == "journalTerms" %}active{%endif%}"
href="/projects/{{project.id}}/corpora/{{ corpus.id }}/graph">Graphs Journal/Terms</a>
--!>
{% endif %}
{% endif %}
{% endfor %}
</center>
</div>
</div>
......@@ -130,9 +125,16 @@
<div class="row">
<div class="col-md-4">
{% if project %}
<h3><a href="/projects/{{project.id}}">Project: {{ project.name }}</a>
<br> Corpus: {{ corpus.name }}
<br> ({{ corpus.date }})
<h3><a href="/projects/{{project.id}}">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
{{ 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>
{% endif %}
</div>
......
......@@ -30,8 +30,10 @@
<div class="container theme-showcase" role="main">
<div class="jumbotron">
<h1>My projects</h1>
<p>Template showing my working space</p>
<h1>
<span class="glyphicon glyphicon-home" aria-hidden="true"></span>
Projects
</h1>
<p>
<button
type="button"
......@@ -64,7 +66,12 @@
{% for project in projects %}
<!--<div class="col-md-offset-7 col-md-4 content" style="background-color:grey">!-->
<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 href="/projects/{{project.id}}" >
<button type="button" class="btn btn-default" aria-label="Left Align">
......
......@@ -30,7 +30,9 @@
<div class="row">
<div class="col-md-6">
{% if project %}
<h1>{{ project.name }}</h1>
<h1>
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
{{ project.name }}</h1>
<!--<h3> {{number}} corpora </h3>-->
{% endif %}
</div>
......@@ -69,11 +71,11 @@
<div class="container">
{% if list_corpora %}
<h1>Resources</h1>
<h2>Corpora</h2>
<ul>
{% for key, corpora in list_corpora.items %}
<li>
<span class="glyphicon glyphicon-cd" aria-hidden="true"></span>
{{ key }}
<ul>
{% for corpus in corpora %}
......@@ -84,6 +86,7 @@
Processing, drink a cup of tea, and refresh the page :)
{% else %}
<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 }}
</a>
<a href="/projects/{{project.id}}/corpora/{{corpus.id}}">
......@@ -112,6 +115,57 @@
">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
</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>
{% endfor %}
</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