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
2bebc82d
Commit
2bebc82d
authored
Nov 27, 2014
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'alex'
Last changes Alex
parents
1c05aa44
3c4e412d
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
190 additions
and
5 deletions
+190
-5
urls.py
gargantext_web/urls.py
+1
-0
views.py
gargantext_web/views.py
+17
-0
corpus.html
templates/corpus.html
+2
-2
graph-it.html
templates/graph-it.html
+43
-0
menu-bottom.html
templates/menu-bottom.html
+38
-0
menu.html
templates/menu.html
+4
-3
ngrams.html
templates/ngrams.html
+85
-0
No files found.
gargantext_web/urls.py
View file @
2bebc82d
...
...
@@ -42,6 +42,7 @@ urlpatterns = patterns('',
url
(
r'^api/corpus/(\d+)/data$'
,
gargantext_web
.
api
.
CorpusController
.
data
),
url
(
r'^graph-it$'
,
views
.
graph_it
),
url
(
r'^ngrams$'
,
views
.
ngrams
),
)
from
django.conf
import
settings
...
...
gargantext_web/views.py
View file @
2bebc82d
...
...
@@ -548,4 +548,21 @@ def graph_it(request):
return
HttpResponse
(
html
)
def
ngrams
(
request
):
'''The ngrams list.'''
t
=
get_template
(
'ngrams.html'
)
ngrams_list
=
list
()
for
node_ngram
in
Node_Ngram
.
objects
.
filter
(
node_id
=
81246
)[:
20
]:
ngrams_list
.
append
(
node_ngram
.
ngram
)
user
=
request
.
user
date
=
datetime
.
datetime
.
now
()
html
=
t
.
render
(
Context
({
'user'
:
user
,
'date'
:
date
,
'ngrams'
:
ngrams_list
,
}))
return
HttpResponse
(
html
)
templates/corpus.html
View file @
2bebc82d
...
...
@@ -114,7 +114,7 @@
<div
class=
"col-md-4"
>
<div
class=
"jumbotron"
>
<h3><a
href=
"/
graph
"
>
2) Ngrams
</a></h3>
<h3><a
href=
"/
ngrams
"
>
2) Ngrams
</a></h3>
<ol>
<li>
White Lists
</li>
<li>
Black Lists
</li>
...
...
@@ -125,7 +125,7 @@
<div
class=
"col-md-4"
>
<div
class=
"jumbotron"
>
<h3><a
href=
"/graph"
>
3) Vi
z
ualizations
</a></h3>
<h3><a
href=
"/graph"
>
3) Vi
s
ualizations
</a></h3>
<ol>
<li>
Matrix
</li>
<li>
Static maps
</li>
...
...
templates/graph-it.html
View file @
2bebc82d
...
...
@@ -19,6 +19,45 @@
<div
class=
"container tree"
></div>
<div
class=
"container graph-it"
></div>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-md-4"
>
<div
class=
"jumbotron"
>
<h3><a
href=
"/graph-it"
>
1) Documents
</a></h3>
<ol>
<li>
Read
</li>
<!-- write -->
<li>
Count
</li>
<!-- compute -->
<li>
Select
</li>
<!-- cut -->
</ol>
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"jumbotron"
>
<h3><a
href=
"/ngrams"
>
2) Ngrams
</a></h3>
<ol>
<li>
White Lists
</li>
<li>
Black Lists
</li>
<li>
Synonyms
</li>
</ol>
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"jumbotron"
>
<h3><a
href=
"/graph"
>
3) Visualizations
</a></h3>
<ol>
<li>
Matrix
</li>
<li>
Static maps
</li>
<li>
Dynamics maps
</li>
</ol>
</div>
</div>
</div>
</div>
<!-- <script type="text/javascript" src="{% static "js/jquery/jquery.min.js" %}"></script> -->
<!--
...
...
@@ -47,3 +86,7 @@
{% endblock %}
templates/menu-bottom.html
0 → 100644
View file @
2bebc82d
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-md-4"
>
<div
class=
"jumbotron"
>
<h3><a
href=
"/graph-it"
>
1) Documents
</a></h3>
<ol>
<li>
Read
</li>
<!-- write -->
<li>
Count
</li>
<!-- compute -->
<li>
Select
</li>
<!-- cut -->
</ol>
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"jumbotron"
>
<h3><a
href=
"/graph"
>
2) Ngrams
</a></h3>
<ol>
<li>
White Lists
</li>
<li>
Black Lists
</li>
<li>
Synonyms
</li>
</ol>
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"jumbotron"
>
<h3><a
href=
"/graph"
>
3) Visualizations
</a></h3>
<ol>
<li>
Matrix
</li>
<li>
Static maps
</li>
<li>
Dynamics maps
</li>
</ol>
</div>
</div>
</div>
</div>
templates/menu.html
View file @
2bebc82d
...
...
@@ -22,8 +22,8 @@
<div
class=
"navbar-collapse collapse"
>
<ul
class=
"nav navbar-nav"
>
<li><a
href=
"/admin/"
>
Admin
</a></li>
<li><a
href=
"/projects/"
>
My
Projects
</a></li>
<li><a
href=
"/
contact/"
>
Contact
</a></li>
<li><a
href=
"/projects/"
>
Projects
</a></li>
<li><a
href=
"/
projects/"
>
Corpus
</a></li>
</ul>
<ul
class=
"nav pull-right"
>
...
...
@@ -32,9 +32,10 @@
</a>
<ul
class=
"dropdown-menu"
>
<li><a
tabindex=
"-1"
href=
"/admin/logout/"
>
Login
</a></li>
<li><a
tabindex=
"-1"
href=
"#"
>
Profile
</a></li>
<li
class=
"divider"
></li>
<li><a
tabindex=
"-1"
href=
"
/admin/logout/"
>
Login/Logout
</a></li>
<li><a
tabindex=
"-1"
href=
"
#"
>
Help
</a></li>
</ul>
</li>
</ul>
...
...
templates/ngrams.html
0 → 100644
View file @
2bebc82d
{% extends "menu.html" %}
{% block css %}
<!-- {% load staticfiles %} -->
<link
rel=
"stylesheet"
href=
"{% static "
css
/
bootstrap
.
css
"
%}"
>
{% endblock %}
{% block content %}
<div
class=
"container theme-showcase"
role=
"main"
>
<div
class=
"jumbotron"
>
<h1>
Ngrams selection
</h1>
<p>
Remove the words
</p>
</div>
</div>
<div
class=
"container"
>
{% if ngrams %}
<form>
{% for ngram in ngrams %}
<INPUT
type=
"checkbox"
name=
"{{ ngram }}"
value=
"{{ ngram }}"
>
{{ ngram }}
<br>
{% endfor %}
</form>
{% endif %}
<a
class=
"btn btn-primary btn-lg"
role=
"button"
href=
"/admin/documents/corpus/{{ corpus.pk }}/"
>
Save
</a>
</div>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-md-4"
>
<div
class=
"jumbotron"
>
<h3><a
href=
"/graph-it"
>
1) Documents
</a></h3>
<ol>
<li>
Read
</li>
<!-- write -->
<li>
Count
</li>
<!-- compute -->
<li>
Select
</li>
<!-- cut -->
</ol>
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"jumbotron"
>
<h3><a
href=
"/ngrams"
>
2) Ngrams
</a></h3>
<ol>
<li>
White Lists
</li>
<li>
Black Lists
</li>
<li>
Synonyms
</li>
</ol>
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"jumbotron"
>
<h3><a
href=
"/graph"
>
3) Visualizations
</a></h3>
<ol>
<li>
Matrix
</li>
<li>
Static maps
</li>
<li>
Dynamics maps
</li>
</ol>
</div>
</div>
</div>
</div>
<!--
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
<script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.js"></script>
<script type="text/javascript" src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
-->
<link
rel=
"stylesheet"
href=
"{% static "
css
/
jquery-ui
.
css
"
%}"
>
<script
type=
"text/javascript"
src=
"{% static "
js
/
jquery
/
jquery
.
min
.
js
"
%}"
></script>
{% endblock %}
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