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
bdc332d8
Commit
bdc332d8
authored
Apr 30, 2013
by
Jerome Mariette
Browse files
if the user is the admin, display action buttons
parent
b22c78c4
Changes
3
Hide whitespace changes
Inline
Side-by-side
ui/nG6/class.tx_nG6_eid.php
View file @
bdc332d8
...
...
@@ -593,6 +593,7 @@ class tx_nG6_eid {
$login_user
=
intVal
(
trim
(
t3lib_div
::
_GP
(
'login_user'
)));
$page_id
=
intVal
(
trim
(
t3lib_div
::
_GP
(
'page_id'
)));
$project_runs
=
tx_nG6_db
::
get_project_runs
(
$project_id
);
$is_project_admin
=
tx_nG6_db
::
is_administrator
(
$user_id
,
'project'
,
$project_id
);
$is_at_least_admin_of_1_run
=
false
;
foreach
(
$project_runs
as
$run_id
=>
$run_values
)
{
$is_admin
=
tx_nG6_db
::
is_administrator
(
$user_id
,
'run'
,
$run_values
[
'id'
]);
...
...
@@ -602,6 +603,7 @@ class tx_nG6_eid {
$project_runs
[
$run_id
][
'href'
]
=
$href
;
}
$smarty
->
assign
(
'runs'
,
$project_runs
);
$smarty
->
assign
(
'is_project_admin'
,
$is_project_admin
);
$smarty
->
assign
(
'is_at_least_admin_of_1_run'
,
$is_at_least_admin_of_1_run
);
$smarty
->
assign
(
'login_user'
,
$login_user
);
print
$smarty
->
fetch
(
'run_table.tpl'
);
...
...
ui/nG6/pi1/project_view.tpl
View file @
bdc332d8
...
...
@@ -73,6 +73,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{
assign
var
=
"is_at_least_admin_of_1_run"
value
=
false
}
{/
if
}
{
assign
var
=
"runs"
value
=
$project_runs
}
{
assign
var
=
"is_project_admin"
value
=
$projects
[
key
(
$projects
)].
is_admin
}
{
include
file
=
'run_table.tpl'
}
</div>
...
...
ui/nG6/pi1/run_table.tpl
View file @
bdc332d8
...
...
@@ -84,7 +84,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{/
if
}
{/
foreach
}
</tbody>
{
if
$is_at_least_admin_of_1_run
&&
$login_user
}
{
if
(
$is_at_least_admin_of_1_run
&&
$login_user
)
||
(
$is_project_admin
)
}
<tfoot>
<tr>
<th
align=
"left"
colspan=
"11"
>
...
...
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