Commit e6db95a8 authored by Administrator's avatar Administrator

[FEAT] Buttons as active pages for each corpus view

	modifié :         gargantext_web/corpus_views.py
	modifié :         gargantext_web/views.py
	Adding view variable

	modifié :         templates/corpus/menu.html
	Adding if condition to activate the button or not.
parent 4041cd46
...@@ -128,6 +128,7 @@ def get_ngrams(request , project_id , corpus_id ): ...@@ -128,6 +128,7 @@ def get_ngrams(request , project_id , corpus_id ):
'processing' : processing, 'processing' : processing,
'number' : number, 'number' : number,
'list_id': list_id[0][0], 'list_id': list_id[0][0],
'view' : "Terms",
})) }))
return HttpResponse(html) return HttpResponse(html)
...@@ -194,6 +195,7 @@ def get_journals(request , project_id , corpus_id ): ...@@ -194,6 +195,7 @@ def get_journals(request , project_id , corpus_id ):
'corpus' : corpus, 'corpus' : corpus,
'processing' : processing, 'processing' : processing,
'number' : number, 'number' : number,
'view' : "Journals",
})) }))
return HttpResponse(html) return HttpResponse(html)
......
...@@ -287,6 +287,7 @@ def corpus(request, project_id, corpus_id): ...@@ -287,6 +287,7 @@ def corpus(request, project_id, corpus_id):
'processing' : processing, 'processing' : processing,
# 'documents': documents,\ # 'documents': documents,\
'number' : number, 'number' : number,
'view' : "Documents"
})) }))
return HttpResponse(html) return HttpResponse(html)
......
...@@ -62,9 +62,9 @@ ...@@ -62,9 +62,9 @@
<div class="btn-group btn-group-justified"> <div class="btn-group btn-group-justified">
<center> <center>
<a type="button" class="btn btn-default active" href="/project/{{project.id}}/corpus/{{ corpus.id }}/">{{number}} Documents</a> <a type="button" class="btn btn-default {% if view == "Documents" %}active{%endif%}" href="/project/{{project.id}}/corpus/{{ corpus.id }}/">{{number}} Documents</a>
<a type="button" class="btn btn-default " href="/project/{{project.id}}/corpus/{{ corpus.id }}/journals">Journals</a> <a type="button" class="btn btn-default {% if view == "Journals" %}active{%endif%}" href="/project/{{project.id}}/corpus/{{ corpus.id }}/journals">Journals</a>
<a type="button" class="btn btn-default " href="/project/{{project.id}}/corpus/{{ corpus.id }}/ngrams">Terms</a> <a type="button" class="btn btn-default {% if view == "Terms" %}active{%endif%}" href="/project/{{project.id}}/corpus/{{ corpus.id }}/ngrams">Terms</a>
</center> </center>
</div> </div>
......
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