diff --git a/public/main/lp/lp_list.php b/public/main/lp/lp_list.php index 6927cceaf0..4eb337c12d 100644 --- a/public/main/lp/lp_list.php +++ b/public/main/lp/lp_list.php @@ -75,8 +75,7 @@ if (!empty($sessionId)) { } if ($is_allowed_to_edit) { - $actionLeft = ''; - $actionLeft .= Display::url( + $actionLeft = Display::url( Display::return_icon( 'new_learnpath.png', get_lang('Create new learning path'), @@ -1009,4 +1008,15 @@ $template->assign('lp_is_shown', $lpIsShown); $template->assign('filtered_category', $filteredCategoryId); $template->assign('allow_min_time', $allowMinTime); +$template->assign('no_data', ''); +if (false === $lpIsShown && api_is_allowed_to_edit()) { + $noData = Display::noDataView( + get_lang('Learning paths'), + Display::return_icon('scorms.png', '', [], 64), + get_lang('Create new learning path'), + api_get_self().'?'.api_get_cidreq().'&action=add_lp' + ); + $template->assign('no_data', $noData); +} + $template->displayTemplate('@ChamiloCore/LearnPath/list.html.twig'); diff --git a/src/CoreBundle/Resources/views/LearnPath/list.html.twig b/src/CoreBundle/Resources/views/LearnPath/list.html.twig index 5f1e4e09e7..77882610af 100644 --- a/src/CoreBundle/Resources/views/LearnPath/list.html.twig +++ b/src/CoreBundle/Resources/views/LearnPath/list.html.twig @@ -578,15 +578,7 @@ {% endif %} {% if is_allowed_to_edit and not lp_is_shown %} -
-

{{ "Learning paths"|trans }}

- -
- - {{ "Create new learning path"|trans }} - -
-
+ {{ no_data }} {% endif %} {% endautoescape %} {% endblock %} \ No newline at end of file