diff --git a/assets/css/app.scss b/assets/css/app.scss index 670e1b436d..0c8976c5e1 100644 --- a/assets/css/app.scss +++ b/assets/css/app.scss @@ -27,6 +27,16 @@ } } +.btn { + @apply font-bold py-2 px-4 rounded; +} +.btn-blue { + @apply bg-blue-500 text-white; +} +.btn-blue:hover { + @apply bg-blue-700; +} + @import '~cropper/dist/cropper.css'; //@import '~flag-icon-css/sass/flag-icon.scss'; @import "~select2/dist/css/select2.css"; diff --git a/assets/js/app.js b/assets/js/app.js index fd075a971f..7e1daa12ce 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -162,9 +162,15 @@ $(function () { self = $(this); $.when(loadModalContent).done(function (modalContent) { - var modalTitle = self.data('title') || ' '; - $('#global-modal').find('.modal-title').text(modalTitle); - $('#global-modal').find('.modal-body').html(modalContent); + var modalTitle = self.data('title') || ' ', + globalModalTitle = $('#global-modal').find('#global-modal-title'), + globalModalBody = $('#global-modal').find('#global-modal-body'); + + globalModalTitle.text(modalTitle); + globalModalBody.html(modalContent); + + globalModalBody.css({'max-height' : "500px", "overflow" : "auto"}); + toggleModal('global-modal'); }); }); diff --git a/public/main/admin/settings.lib.php b/public/main/admin/settings.lib.php index 3a7ce63ebc..9e52364354 100644 --- a/public/main/admin/settings.lib.php +++ b/public/main/admin/settings.lib.php @@ -149,14 +149,16 @@ function handlePlugins() // Plugins NOT installed echo Display::page_subheader(get_lang('Plugins')); echo '
'; - echo ''; + echo '
'; + echo ''; echo ''; - echo ''; echo ''; + echo ''; /*$plugin_list = array(); $my_plugin_list = $plugin_obj->get_plugin_regions(); @@ -174,23 +176,23 @@ function handlePlugins() $pluginRow = ''; if (in_array($pluginName, $installed_plugins)) { - $pluginRow .= ''; + $pluginRow .= ''; } else { - $pluginRow .= ''; + $pluginRow .= ''; } - $pluginRow .= ''; echo $installed; echo $notInstalled; + echo ''; echo '
'; + echo ''; echo get_lang('Action'); - echo ''; + echo ''; echo get_lang('Description'); echo '
'; + $pluginRow .= ''; // Checkbox if (in_array($pluginName, $installed_plugins)) { $pluginRow .= ''; } else { $pluginRow .= ''; } - $pluginRow .= ''; - $pluginRow .= '

'.$plugin_info['title'].' v '.$plugin_info['version'].'

'; + $pluginRow .= '
'; + $pluginRow .= '

'.$plugin_info['title'].' v '.$plugin_info['version'].'

'; $pluginRow .= '

'.$plugin_info['comment'].'

'; $pluginRow .= '

'.get_lang('Author').': '.$plugin_info['author'].'

'; - $pluginRow .= '
'; + $pluginRow .= '
'; if (in_array($pluginName, $installed_plugins)) { $pluginRow .= Display::url( ' '.get_lang('Configure'), @@ -209,7 +211,7 @@ function handlePlugins() " readme.txt", api_get_path(WEB_PLUGIN_PATH).$pluginName."/readme.txt", [ - 'class' => 'btn btn-primary ajax', + 'class' => 'btn btn-blue ajax', 'data-title' => $plugin_info['title'], 'data-size' => 'lg', '_target' => '_blank', @@ -223,7 +225,7 @@ function handlePlugins() " README.md", api_get_path(WEB_AJAX_PATH).'plugin.ajax.php?a=md_to_html&plugin='.$pluginName, [ - 'class' => 'btn btn-primary ajax', + 'class' => 'btn btn-blue ajax', 'data-title' => $plugin_info['title'], 'data-size' => 'lg', '_target' => '_blank', @@ -241,9 +243,10 @@ function handlePlugins() } } } - + echo '
'; echo '
'; @@ -252,26 +255,6 @@ function handlePlugins() echo get_lang('Enable the selected plugins').''; echo '
'; echo '
'; - echo ' - '; } /** diff --git a/src/CoreBundle/Resources/views/Layout/base-layout.html.twig b/src/CoreBundle/Resources/views/Layout/base-layout.html.twig index bc42217141..2c6657cba6 100644 --- a/src/CoreBundle/Resources/views/Layout/base-layout.html.twig +++ b/src/CoreBundle/Resources/views/Layout/base-layout.html.twig @@ -3,6 +3,7 @@ {% import "@ChamiloCore/Macros/buttons.html.twig" as macro_buttons %} {% import "@ChamiloCore/Macros/image.html.twig" as macro_image %} {% import '@ChamiloCore/Macros/headers.html.twig' as macro_headers %} +{% import '@ChamiloCore/Macros/modals.html.twig' as macro_modals %} {# Chamilo theme #} {% set theme = 'chamilo' %} {% if not from_vue %} @@ -26,3 +27,4 @@ {% else %} {{ block('page_content') }} {% endif %} +{{ macro_modals.global_modal('') }} diff --git a/src/CoreBundle/Resources/views/Macros/modals.html.twig b/src/CoreBundle/Resources/views/Macros/modals.html.twig new file mode 100644 index 0000000000..d8680eb9a6 --- /dev/null +++ b/src/CoreBundle/Resources/views/Macros/modals.html.twig @@ -0,0 +1,22 @@ +{% macro global_modal(title) %} + + +{% endmacro %}