Move templates into the new structure (ChamiloTheme)

pull/2715/head
Julio Montoya 7 years ago
parent c1c3f81ee4
commit b5db608da7
  1. 10
      main/inc/lib/template.lib.php
  2. 18
      main/lp/lp_add_audio.php
  3. 6
      main/lp/lp_list.php
  4. 6
      main/lp/lp_view.php
  5. 1
      main/template/default/learnpath/lp_upload_audio.html.twig
  6. 2
      src/ThemeBundle/Resources/views/Layout/no_layout.html.twig
  7. 9
      src/ThemeBundle/Resources/views/LearnPath/add_audio.html.twig
  8. 0
      src/ThemeBundle/Resources/views/LearnPath/impress.html.twig
  9. 5
      src/ThemeBundle/Resources/views/LearnPath/list.html.twig
  10. 0
      src/ThemeBundle/Resources/views/LearnPath/record_voice.html.twig
  11. 0
      src/ThemeBundle/Resources/views/LearnPath/report.html.twig
  12. 0
      src/ThemeBundle/Resources/views/LearnPath/scorm_list.html.twig
  13. 7
      src/ThemeBundle/Resources/views/LearnPath/view.html.twig

@ -272,6 +272,16 @@ class Template
$response->send();
}
/**
* @param string $template
*
* @throws \Twig\Error\Error
*/
public function displayTemplate($template)
{
$this->returnResponse($this->params, $template);
}
/**
* Shortcut to display a 1 col layout (index.php).
* */

@ -124,8 +124,6 @@ $tpl->assign('enable_record_audio', api_get_setting('enable_record_audio') === '
$tpl->assign('cur_dir_path', '/audio');
$tpl->assign('lp_item_id', $lp_item_id);
$tpl->assign('lp_dir', api_remove_trailing_slash($lpPathInfo['dir']));
$template = $tpl->get_template('learnpath/record_voice.tpl');
$recordVoiceForm .= $tpl->fetch($template);
$form->addElement('header', get_lang('Or'));
$form->addElement('header', get_lang('AudioFile'));
$form->addLabel(null, sprintf(get_lang('AudioFileForItemX'), $lp_item->get_title()));
@ -163,17 +161,17 @@ $documentTree = DocumentManager::get_document_preview(
api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?action=add_audio&lp_id='.$lp->get_id().'&id='.$lp_item_id,
false,
true
//$folderId = false
);
$page .= $recordVoiceForm;
$page .= $form->returnForm();
$page .= '<legend>'.get_lang('SelectAnAudioFileFromDocuments').'</legend>';
$tpl->assign('pre_page', $page);
$tpl->assign('form', $form->returnForm());
$page = '<legend>'.get_lang('SelectAnAudioFileFromDocuments').'</legend>';
$page .= $documentTree;
$page .= '</div>';
$page .= '</div>';
$tpl->assign('content', $page);
$template = $tpl->get_template('learnpath/lp_upload_audio.tpl');
$content = $tpl->fetch($template);
$tpl->display_one_col_template();
$tpl->assign('post_page', $page);
$tpl->displayTemplate('@ChamiloTheme/LearnPath/add_audio.html.twig');

@ -940,7 +940,5 @@ $template->assign('introduction', $introduction);
$template->assign('data', $data);
$template->assign('lp_is_shown', $lpIsShown);
$template->assign('filtered_category', $filteredCategoryId);
$templateName = $template->get_template('learnpath/list.tpl');
$content = $template->fetch($templateName);
$template->assign('content', $content);
$template->display_one_col_template();
$template->displayTemplate('@ChamiloTheme/LearnPath/list.html.twig');

@ -566,11 +566,7 @@ $template->assign(
)
);
$view = $template->get_template('learnpath/view.tpl');
$content = $template->fetch($view);
$template->assign('content', $content);
$template->display_no_layout_template();
$template->displayTemplate('@ChamiloTheme/LearnPath/view.html.twig');
// Restore a global setting.
$_setting['show_navigation_menu'] = $save_setting;

@ -4,7 +4,9 @@
{% autoescape false %}
<link rel="stylesheet" href="{{ url('legacy_public') ~ 'build/css/scorm.css' }}"/>
<section id="content-scorm">
{% block content %}
{{ content }}
{% endblock %}
</section>
{% endautoescape %}
{% endblock %}

@ -0,0 +1,9 @@
{% extends '@ChamiloTheme/Layout/layout_one_col.html.twig' %}
{% block content %}
{% autoescape false %}
{{ pre_page }}
{% include '@ChamiloTheme/LearnPath/record_voice.html.twig' %}
{{ form }}
{{ post_page }}
{% endautoescape %}
{% endblock %}

@ -1,3 +1,5 @@
{% extends '@ChamiloTheme/Layout/layout_one_col.html.twig' %}
{% block content %}
{% autoescape false %}
<script>
function confirmation(name) {
@ -497,4 +499,5 @@
</div>
</div>
{% endif %}
{% endautoescape %}
{% endautoescape %}
{% endblock %}

@ -1,3 +1,5 @@
{% extends '@ChamiloTheme/Layout/no_layout.html.twig' %}
{% block content %}
{% autoescape false %}
<div id="learning_path_main" class="{{ is_allowed_to_edit ? 'lp-view-include-breadcrumb' }} {{ lp_mode == 'embedframe' ? 'lp-view-collapsed' }}">
{% if show_left_column == 1 %}
@ -67,7 +69,7 @@
</div>
{# TOC layout #}
<div id="toc_id" class="scorm-body" name="toc_name">
{% include template ~ '/learnpath/scorm_list.html.twig' %}
{% include '@ChamiloTheme/LearnPath/scorm_list.html.twig' %}
</div>
{# end TOC layout #}
</div>
@ -325,4 +327,5 @@
});
})();
</script>
{% endautoescape %}
{% endautoescape %}
{% endblock %}
Loading…
Cancel
Save