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
ce362964
Commit
ce362964
authored
8 years ago
by
delanoe
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/c24b-testing' into testing
parents
3648d3b2
dc9e819b
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
263 additions
and
31 deletions
+263
-31
projects.py
gargantext/views/pages/projects.py
+22
-10
project.html
templates/pages/projects/project.html
+36
-20
wait.html
templates/pages/projects/wait.html
+205
-1
No files found.
gargantext/views/pages/projects.py
View file @
ce362964
...
...
@@ -104,16 +104,9 @@ def project(request, project_id):
# parse_extract: fileparsing -> ngram extraction -> lists
scheduled
(
parse_extract_indexhyperdata
)(
corpus
.
id
)
return
render
(
template_name
=
'pages/projects/wait.html'
,
request
=
request
,
context
=
{
'user'
:
request
.
user
,
'project'
:
project
,
},
)
wait
=
True
else
:
wait
=
False
# corpora within this project
corpora
=
project
.
children
(
'CORPUS'
,
order
=
True
)
.
all
()
...
...
@@ -161,6 +154,25 @@ def project(request, project_id):
}
for
sourcename
,
count
in
sourcename2documentscount
.
items
()
]
if
wait
:
return
render
(
template_name
=
'pages/projects/wait.html'
,
request
=
request
,
context
=
{
'form'
:
NewCorpusForm
,
'user'
:
request
.
user
,
'date'
:
datetime
.
now
(),
'project'
:
project
,
'donut'
:
donut
,
'list_corpora'
:
dict
(
sourcename2corpora
),
'whitelists'
:
[],
'blacklists'
:
[],
'cooclists'
:
[],
'number'
:
len
(
corpora
),
'query_size'
:
QUERY_SIZE_N_DEFAULT
,
},
)
# response!
return
render
(
template_name
=
'pages/projects/project.html'
,
...
...
This diff is collapsed.
Click to expand it.
templates/pages/projects/project.html
View file @
ce362964
...
...
@@ -61,23 +61,7 @@
</p>
</div>
</div>
<!-- Modal -->
<div
id=
"wait"
class=
"modal"
style=
"top:8%;"
>
<div
class=
"jumbotron"
>
<div
class=
"container theme-showcase jumbotron"
role=
"main"
>
<div>
<div
class=
"col-md-3"
></div>
<div
class=
"col-md-6"
>
<h2>
Your file has been uploaded !
</h2>
<h2>
Gargantext need some time to eat it.
</h2>
<h2>
Duration depends on the size of the dish.
</h2>
<a
class=
"btn btn-primary btn-lg"
href=
"/projects/{{ project.id }}"
title=
"Click and test by yourself"
>
Continue on Gargantext
</a>
</div>
<div
class=
"col-md-3"
></div>
</div>
</div>
</div>
</div>
</div>
...
...
@@ -295,6 +279,29 @@
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<!-- Modal -->
<div
id=
"wait"
class=
"modal fade"
>
<div
class=
"modal-dialog"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
<h2
class=
"modal-title"
><h2><span
class=
"glyphicon glyphicon-info-sign"
aria-hidden=
"true"
></span>
Uploading corpus...
</h2>
</div>
<div
class=
"modal-body"
>
<p>
Your file has been uploaded !
Gargantext need some time to eat it.
Duration depends on the size of the dish.
</p>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-secondary"
data-dismiss=
"modal"
>
Continue on Gargantext
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<script
type=
"text/javascript"
src=
"{% static "
lib
/
jquery
/
1
.
11
.
2
/
jquery-ui
.
js
"
%}"
></script>
<script
type=
"text/javascript"
>
function
getCookie
(
name
)
{
...
...
@@ -312,7 +319,7 @@
}
return
cookieValue
;
}
var
thequeries
=
[]
;
// load the template's value for N scan size
...
...
@@ -657,9 +664,14 @@
alert
(
"OK"
)
setTimeout
(
function
()
{
alert
(
"TimeOut!"
)
$
(
'#addcorpus'
).
modal
(
'hide'
)
$
(
"#wait"
).
modal
(
"show"
)
$
(
"#wait"
).
modal
(
"show"
);
// setTimeout(
// function(){
// location.reload();
//
// }, 600);
// )
//setTimeout(, 300)
//location.reload();
},
600
);
...
...
@@ -730,6 +742,10 @@
formatter
:
function
(
y
)
{
return
y
+
"%"
}
});
{
%
endif
%
}
$
(
'#wait'
).
on
(
'hidden.bs.modal'
,
function
(
e
)
{
// reload page when dismiss the info box
window
.
location
.
reload
()
})
</script>
...
...
This diff is collapsed.
Click to expand it.
templates/pages/projects/wait.html
View file @
ce362964
This diff is collapsed.
Click to expand it.
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