Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
89e826ed
Commit
89e826ed
authored
Jan 08, 2015
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEAT] Adding nicer menu bar.
parent
2806e10e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
28 deletions
+43
-28
settings.py
gargantext_web/settings.py
+1
-1
urls.py
gargantext_web/urls.py
+2
-2
views.py
gargantext_web/views.py
+21
-11
chart.html
templates/chart.html
+7
-9
corpus.html
templates/corpus.html
+2
-2
menu.html
templates/menu.html
+10
-3
No files found.
gargantext_web/settings.py
View file @
89e826ed
...
...
@@ -27,7 +27,7 @@ CELERY_IMPORTS=("node.models",)
SECRET_KEY
=
'bt)3n9v&a02cu7^^=+u_t2tmn8ex5fvx8$x4r*j*pb1yawd+rz'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG
=
Fals
e
DEBUG
=
Tru
e
TEMPLATE_DEBUG
=
True
...
...
gargantext_web/urls.py
View file @
89e826ed
...
...
@@ -37,8 +37,8 @@ urlpatterns = patterns('',
# Visualizations
url
(
r'^project/(\d+)/corpus/(\d+)/chart$'
,
views
.
chart
),
url
(
r'^corpus/(\d+)/explorer$'
,
views
.
graph
),
url
(
r'^corpus/(\d+)/matrix$'
,
views
.
matrix
),
url
(
r'^
project/(\d+)/
corpus/(\d+)/explorer$'
,
views
.
graph
),
url
(
r'^
project/(\d+)/
corpus/(\d+)/matrix$'
,
views
.
matrix
),
# Data management
url
(
r'^chart/corpus/(\d+)/data.csv$'
,
views
.
send_csv
),
...
...
gargantext_web/views.py
View file @
89e826ed
...
...
@@ -547,38 +547,48 @@ def chart(request, project_id, corpus_id):
t
=
get_template
(
'chart.html'
)
user
=
request
.
user
date
=
datetime
.
datetime
.
now
()
project
=
Node
.
objects
.
get
(
id
=
project_id
)
corpus
=
Node
.
objects
.
get
(
id
=
corpus_id
)
html
=
t
.
render
(
Context
({
'user'
:
user
,
'date'
:
date
,
'project'
:
project
,
'user'
:
user
,
'date'
:
date
,
'project'
:
project
,
'corpus'
:
corpus
,
}))
return
HttpResponse
(
html
)
def
matrix
(
request
,
corpus_id
):
def
matrix
(
request
,
project_id
,
corpus_id
):
t
=
get_template
(
'matrix.html'
)
user
=
request
.
user
date
=
datetime
.
datetime
.
now
()
project
=
Node
.
objects
.
get
(
id
=
project_id
)
corpus
=
Node
.
objects
.
get
(
id
=
corpus_id
)
html
=
t
.
render
(
Context
({
\
'user'
:
user
,
\
'date'
:
date
,
\
'corpus'
:
corpus
,
\
'user'
:
user
,
\
'date'
:
date
,
\
'corpus'
:
corpus
,
\
'project'
:
project
,
\
}))
return
HttpResponse
(
html
)
def
graph
(
request
,
corpus_id
):
def
graph
(
request
,
project_id
,
corpus_id
):
t
=
get_template
(
'explorer.html'
)
user
=
request
.
user
date
=
datetime
.
datetime
.
now
()
project
=
Node
.
objects
.
get
(
id
=
project_id
)
corpus
=
Node
.
objects
.
get
(
id
=
corpus_id
)
html
=
t
.
render
(
Context
({
\
'user'
:
user
,
\
'date'
:
date
,
\
'corpus'
:
corpus
,
\
'user'
:
user
,
\
'date'
:
date
,
\
'corpus'
:
corpus
,
\
'project'
:
project
,
\
}))
return
HttpResponse
(
html
)
...
...
templates/chart.html
View file @
89e826ed
...
...
@@ -13,8 +13,7 @@
<div
class=
"container theme-showcase"
role=
"main"
>
<div
class=
"jumbotron"
>
<h1>
{{ project.name }}
</h1>
<p>
Advanced charts
</p>
<h1>
Advanced charts
</h1>
</div>
</div>
...
...
@@ -22,7 +21,7 @@
<div
id=
"test-container"
></div>
</div>
<!-- All the templates used by the Javascript framework -->
<!-- All the templates used by the Javascript framework -->
{% verbatim %}
<!--
<script type="text/template" id="filter-template">
...
...
@@ -227,10 +226,10 @@
<div
class=
"corpus"
>
<button
ng-click=
"removeDataset($index)"
title=
"remove this dataset"
>
X
</button>
<select
ng-model=
"mesured"
style=
"background-color:{{ getColor($index, datasets.length) }}"
ng-options=
"value as key for (key, value) in {'Documents count': 'nodes.count', 'Ngrams count': 'ngrams.count'}"
ng-change=
"updateQuery()"
></select>
in the
corpus
<select
ng-model=
"
corpusId"
ng-change=
"updateEntities()"
>
<option
ng-repeat=
"corpus in corpora"
value=
"{{corpus.id}}"
>
{{corpus.name}}
</option>
</select>
in the
project
<select
ng-model=
"
projectId"
ng-change=
"updateCorpora()"
ng-options=
"project.id as project.name for project in projects"
></select>
,
corpus
<
select
ng-model=
"corpusId"
ng-change=
"updateEntities()"
ng-options=
"corpus.id as corpus.name for corpus in corpora"
><
/select>
</div>
<div
class=
"filters"
ng-if=
"entities"
>
<ul>
...
...
@@ -273,7 +272,7 @@
<br/>
Y-axis: use a
<select
ng-model=
"graph.options.axes.y.type"
ng-options=
"type for type in ['l
og', 'linear
']"
></select>
<select
ng-model=
"graph.options.axes.y.type"
ng-options=
"type for type in ['l
inear', 'log
']"
></select>
scale
<br/>
...
...
@@ -359,4 +358,3 @@
templates/corpus.html
View file @
89e826ed
...
...
@@ -110,7 +110,7 @@
<div
class=
"col-md-4"
>
<div
class=
"jumbotron"
>
<h3><a
href=
"/corpus/{{corpus.id}}/matrix"
>
Matrix
</a></h3>
<h3><a
href=
"/
project/{{project.id}}/
corpus/{{corpus.id}}/matrix"
>
Matrix
</a></h3>
<ol>
<li>
Sort
</li>
<li>
Group
</li>
...
...
@@ -122,7 +122,7 @@
<div
class=
"col-md-4"
>
<div
class=
"jumbotron"
>
<h3><a
href=
"/corpus/{{ corpus.id }}/explorer"
>
Graph
</a></h3>
<h3><a
href=
"/
project/{{project.id}}/
corpus/{{ corpus.id }}/explorer"
>
Graph
</a></h3>
<ol>
<li>
Visualize
</li>
<li>
Explore
</li>
...
...
templates/menu.html
View file @
89e826ed
...
...
@@ -22,9 +22,16 @@
<div
class=
"navbar-collapse collapse"
>
<ul
class=
"nav navbar-nav"
>
<li><a
href=
"/admin/"
>
Admin
</a></li>
<li><a
href=
"/projects/"
>
Projects
</a></li>
<li><a
href=
"/projects/"
>
Corpus
</a></li>
<!-- <li><a href="/admin/">Admin/</a></li> --!>
<li><a href="/projects/">Projects/</a></li>
{% if project %}
<li><a href="/project/{{project.id}}">{{project.name}}/</a></li>
{% endif %}
{% if corpus %}
<li><a href="/project/{{project.id}}/corpus/{{corpus.id}}">{{corpus.name}}/</a></li>
{% endif %}
</ul>
<ul class="nav pull-right">
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment