Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
ng6
Commits
52b67959
Commit
52b67959
authored
Jul 16, 2014
by
Penom Nom
Browse files
Always display the run table even if there is only one run available
parent
0201ef62
Changes
2
Hide whitespace changes
Inline
Side-by-side
ui/nG6/pi1/class.tx_nG6_pi1.php
View file @
52b67959
...
...
@@ -214,10 +214,12 @@ class tx_nG6_pi1 extends tslib_pibase {
if
(
!
$GLOBALS
[
'TSFE'
]
->
loginUser
)
{
$user_id
=
null
;
}
else
{
$user_id
=
$GLOBALS
[
'TSFE'
]
->
fe_user
->
user
[
'uid'
];
}
$single_run_display
=
false
;
// If a single element
if
(
$this
->
piVars
[
'run_id'
])
{
if
(
tx_nG6_db
::
user_is_authorized
(
$user_id
,
$this
->
piVars
[
'project_id'
],
$this
->
piVars
[
'run_id'
]))
{
$runs
=
array
(
'run_'
.
$this
->
piVars
[
'run_id'
]
=>
tx_nG6_db
::
select_run
(
$this
->
piVars
[
'run_id'
]));
$single_run_display
=
true
;
}
}
else
{
$runs
=
tx_nG6_db
::
select_all_user_runs
(
$user_id
);
...
...
@@ -255,9 +257,10 @@ class tx_nG6_pi1 extends tslib_pibase {
$smarty
->
assign
(
'server_name'
,
$this
->
conf
[
"server_name"
]);
$smarty
->
assign
(
'server_url'
,
$this
->
conf
[
'server_url'
]);
$smarty
->
assign
(
'run_ids'
,
substr
(
$run_ids
,
0
,
-
1
));
$smarty
->
assign
(
'single_run_display'
,
$single_run_display
);
// If it's a single run, add analysis information
if
(
count
(
$runs
)
==
1
)
{
if
(
$single_run_display
)
{
$run_analysis
=
tx_nG6_db
::
get_run_analysis
(
$runs
[
key
(
$runs
)][
'id'
]);
// Add some information to the table
foreach
(
$run_analysis
as
$analysis_id
=>
$analysis_values
)
{
...
...
ui/nG6/pi1/run_view.tpl
View file @
52b67959
...
...
@@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Sorry no results to display
{* If a single run has to be displayed *}
{
elseif
$
runs
|@
count
==
1
}
{
elseif
$
single_run_display
}
<div
class=
"sub-content sc-top"
>
<div
class=
"ng6-content-header-left run"
>
<h2>
Run
<small>
{
$runs
[
key
(
$runs
)].
name
}
</small></h2>
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment