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
cf203527
Commit
cf203527
authored
Oct 26, 2016
by
c24b
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LANGUAGES from USER_LANG >> menu option
parent
1ba4b32a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
50 deletions
+22
-50
projects.py
gargantext/views/pages/projects.py
+2
-2
views.py
graph/views.py
+1
-1
menu.html
templates/pages/menu.html
+18
-46
project.html
templates/pages/projects/project.html
+1
-1
No files found.
gargantext/views/pages/projects.py
View file @
cf203527
...
...
@@ -4,7 +4,6 @@ from gargantext.util.db_cache import cache
from
gargantext.util.files
import
upload
from
gargantext.models
import
*
from
gargantext.constants
import
*
from
gargantext.constants
import
USER_LANG
from
.main
import
get_node_user
from
gargantext.util.scheduling
import
scheduled
from
gargantext.util.toolchain
import
parse_extract_indexhyperdata
...
...
@@ -69,7 +68,7 @@ def overview(request):
'number'
:
user_projects
.
count
(),
'projects'
:
user_projects
,
"user_parameters"
:
node_user
.
hyperdata
,
'
USER_LANG
'
:
USER_LANG
,
'
languages
'
:
USER_LANG
,
# projects owned by the user's contacts
'common_users'
:
(
contact
for
contact
,
projects
in
contacts_projects
),
'common_projects'
:
sum
((
projects
for
contact
,
projects
in
contacts_projects
),
[]),
...
...
@@ -213,6 +212,7 @@ def project(request, project_id):
request
=
request
,
context
=
{
"user_parameters"
:
node_user
.
hyperdata
,
"languages"
:
USER_LANG
,
'form'
:
NewCorpusForm
,
'user'
:
request
.
user
,
'date'
:
datetime
.
now
(),
...
...
graph/views.py
View file @
cf203527
...
...
@@ -49,7 +49,7 @@ def explorer(request, project_id, corpus_id):
'maplist_id'
:
maplist_id
,
'view'
:
'graph'
,
'user_parameters'
:
node_user
.
hyperdata
,
'
USER_LANG
'
:
USER_LANG
'
languages
'
:
USER_LANG
},
)
...
...
templates/pages/menu.html
View file @
cf203527
...
...
@@ -104,53 +104,25 @@
{% endif %}
</ul>
</li>
{% if user.is_authenticated %}
<li
class=
"dropdown"
>
<a
tabindex=
"-1"
id=
"lang"
href=
"#"
role=
"button"
data-lang=
"{{user_parameters.language}}"
role=
"button"
class=
"dropdown-toggle navbar-text"
data-toggle=
"dropdown"
title=
"This is your chosen language"
>
{% if user_parameters.language == "fr" %}
<img
value=
"{{user_parameters.language}}"
src=
"{% static "
img
/
fr
.
png
"%}"
width=
"25%"
/>
{%else %}
<img
value=
"{{user_parameters.language}}"
src=
"{% static "
img
/
en
.
png
"%}"
width=
"25%"
/>
{%endif%}
{{user_parameters.language}}
<i
class=
"caret"
></i>
</a>
<ul
class=
"dropdown-menu"
>
<li
class=
"dropdown"
>
{% if user_parameters.language == "fr" %}
<a
role=
"button"
id=
"new_lang"
data-lang=
"en"
>
<img
value=
"en"
src=
"{% static "
img
/
en
.
png
"%}"
width=
"25%"
/>
en
</a>
{%else%}
<a
role=
"button"
id=
"new_lang"
data-lang=
"fr"
>
<img
value=
"fr"
src=
"{% static "
img
/
fr
.
png
"%}"
width=
"25%"
/>
fr
</a>
{% endif %}
<ul
class=
"dropdown-menu"
>
<li
class=
"dropdown"
>
<!-- <a href="/{{user.username}}/parameters/" > -->
{% if user_parameters.language == "fr" %}
<button
id=
"new_lang"
data-lang=
"en"
>
<img
value=
"en"
src=
"{% static "
img
/
en
.
png
"%}"
width=
"25%"
/>
en
{%else%}
<img
value=
"fr"
src=
"{% static "
img
/
fr
.
png
"%}"
width=
"25%"
/>
fr
<!-- </a> -->
{%endif%}
</button>
</li>
<li></li>
</ul>
</li>
<li
class=
"nav-item dropdown"
>
<a
class=
"nav-link dropdown-toggle"
id=
"lang"
data-lang=
"{{user_parameters.languages}}"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
<img
value=
"{{user_parameters.language}}"
src=
"/static/img/{{user_parameters.language}}.png"
width=
"25%"
/>
{{user_parameters.language}}
<i
class=
"caret"
></i>
</a>
<ul
class=
"dropdown-menu"
aria-labelledby=
"lang"
>
{% for lang in languages %}
{% if lang != user_parameters.language %}
<li
class=
"dropdown-item"
><a
class=
"new_lang"
data-lang=
"{{lang}}"
><img
value=
"{{user_parameters.language}}"
src=
"/static/img/{{lang}}.png"
width=
"25%"
/>
{{lang}}
</a></li>
{% endif %}
{% endfor %}
</ul>
</li>
{% endif %}
</ul>
...
...
templates/pages/projects/project.html
View file @
cf203527
...
...
@@ -84,7 +84,7 @@
<div
class=
"container"
>
{% if list_corpora %}
{% for key, corpora in list_corpora.items %}
<h2>
...
...
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