Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PET-rating
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Heikkilä
PET-rating
Commits
dc85793f
Commit
dc85793f
authored
4 years ago
by
Ossi Laine
Browse files
Options
Downloads
Patches
Plain Diff
Show all experiments if language not defined in session
parent
52da9456
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/routes.py
+4
-4
4 additions, 4 deletions
app/routes.py
app/templates/index.html
+3
-19
3 additions, 19 deletions
app/templates/index.html
with
7 additions
and
23 deletions
app/routes.py
+
4
−
4
View file @
dc85793f
...
...
@@ -23,8 +23,8 @@ def index():
session
[
'
group
'
]
=
None
if
not
session
:
session
[
'
language
'
]
=
"
English
"
if
'
language
'
not
in
session
:
session
[
'
language
'
]
=
"
All
"
return
render_template
(
'
home.html
'
,
title
=
'
Home
'
,
groups
=
groups
)
...
...
@@ -42,8 +42,8 @@ def group_page(group_tag):
experiments
=
experiment
.
query
.
filter_by
(
group_id
=
group
.
id
).
all
()
session
[
'
group
'
]
=
group_tag
if
not
session
:
session
[
'
language
'
]
=
"
English
"
if
'
language
'
not
in
session
:
session
[
'
language
'
]
=
"
All
"
return
render_template
(
'
index.html
'
,
title
=
'
Home
'
,
experiments
=
experiments
,
group
=
group
)
...
...
This diff is collapsed.
Click to expand it.
app/templates/index.html
+
3
−
19
View file @
dc85793f
...
...
@@ -15,7 +15,7 @@
a previously started task, click on the "Continue task" button.') }}
</p>
<p
class=
"lead text-center"
>
{{ _('You can choose the language suitable for you from the language menu in the upper right corner.') }}
</p>
</p>
<div
class=
"row"
>
<div
class=
"col mt-5"
>
...
...
@@ -23,7 +23,7 @@
<p
class=
"lead text-left mt-3 font-weight-bold"
>
{{ _('List of experiments:') }}
</p>
{% block attributes %}
{% for exp in experiments %}
{% if exp.status == 'Public' and session['language'] == exp.language %}
<ul
class=
"list-group mb-3"
>
...
...
@@ -74,9 +74,6 @@
{% autoescape false %}
{{ exp.short_instruction }}
</li>
{% endautoescape %}
{% if current_user.is_authenticated %}
<li
class=
"list-group-item"
><span
class=
"font-weight-bold"
>
ID number:
</span>
{{ exp.idexperiment }}
</li>
...
...
@@ -91,7 +88,7 @@
<li
class=
"list-group-item"
>
<a
class=
"btn btn-outline-primary"
href=
"{{ url_for('consent', exp_id=exp.idexperiment) }}"
role=
"button"
>
{{ _('Begin task') }}
</a>
<a
class=
"btn btn-outline-primary"
href=
"{{ url_for('task.continue_task', exp_id=exp.idexperiment) }}"
role=
"button"
>
{{ _('Continue task') }}
</a
<a
class=
"btn btn-outline-primary"
href=
"{{ url_for('task.continue_task', exp_id=exp.idexperiment) }}"
role=
"button"
>
{{ _('Continue task') }}
</a
>
{% if current_user.is_authenticated %}
<span
class=
"text-right"
>
...
...
@@ -108,14 +105,6 @@
{% endif %}
{% if (exp.status == 'Private') and (current_user.is_authenticated) and session['language'] == exp.language %}
<br>
<h3>
Private experiment:
</h3>
...
...
@@ -196,11 +185,6 @@
{% endif %}
{% if (exp.status == 'Hidden') and (current_user.is_authenticated) and session['language'] == exp.language %}
<br>
<h3>
Unpublished experiment:
</h3>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment