From ab07af40776793f54a2140ddcc8e2d5c86255148 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 10 May 2021 13:53:54 +0200 Subject: [PATCH] Remove unused code, add CSS styles --- assets/css/app.scss | 2 +- assets/css/scss/_forums.scss | 7 + assets/css/scss/index.scss | 1 + .../template/default/admin/index.html.twig | 2 +- .../Resources/views/Macros/box.html.twig | 378 +----------------- 5 files changed, 25 insertions(+), 365 deletions(-) create mode 100644 assets/css/scss/_forums.scss diff --git a/assets/css/app.scss b/assets/css/app.scss index e904f5de3f..7247fae5c2 100644 --- a/assets/css/app.scss +++ b/assets/css/app.scss @@ -42,7 +42,7 @@ @layer components { .card { - @apply bg-white rounded shadow-lg; + @apply bg-white rounded shadow-lg w-full; } // Buttons. diff --git a/assets/css/scss/_forums.scss b/assets/css/scss/_forums.scss new file mode 100644 index 0000000000..3071f0fecf --- /dev/null +++ b/assets/css/scss/_forums.scss @@ -0,0 +1,7 @@ +.category-forum { + @apply flex flex-row w-full; +} + +.forum_display { + @apply flex flex-row w-full; +} \ No newline at end of file diff --git a/assets/css/scss/index.scss b/assets/css/scss/index.scss index ed21c14c51..bddbd83957 100755 --- a/assets/css/scss/index.scss +++ b/assets/css/scss/index.scss @@ -6,6 +6,7 @@ //@import 'install'; //@import "forms"; //@import 'announcement'; +@import 'forums'; @import 'exercise'; //@import 'jqueryui'; @import 'lp'; diff --git a/public/main/template/default/admin/index.html.twig b/public/main/template/default/admin/index.html.twig index 0593fa79fb..f11ae2149b 100644 --- a/public/main/template/default/admin/index.html.twig +++ b/public/main/template/default/admin/index.html.twig @@ -41,7 +41,7 @@ {% endif %} {% endset %} - {{ display.panel_box(loop.index, block_item.icon ~ block_item.label, block_item.search_form ~ list) }} + {{ display.panel(block_item.icon ~ block_item.label, block_item.search_form ~ list) }} {% endfor %} diff --git a/src/CoreBundle/Resources/views/Macros/box.html.twig b/src/CoreBundle/Resources/views/Macros/box.html.twig index 8162ef52dd..b54333d457 100644 --- a/src/CoreBundle/Resources/views/Macros/box.html.twig +++ b/src/CoreBundle/Resources/views/Macros/box.html.twig @@ -1,135 +1,3 @@ -{% block box_collapse %} - -{% endblock %} -{% block box_remove %} - -{% endblock %} - -{% block box_header_buttons %} - {% if collapse or remove %} -
- {% if collapse %} - {{ block('box_collapse') }} - {% endif %} - {% if remove %} - {{ block('box_remove') }} - {% endif %} -
- {% endif %} -{% endblock %} - -{% macro box_header(title, buttons) %} -
- {% if buttons %} -
- {{ buttons }} -
- {% endif %} -
{{ title }}
-
-{% endmacro %} - -{% macro menu_item(item) %} -
  • - - {% if item.icon %} {% endif %} - {{ item.label }} - {% if item.badge %} - {{ item.badge }} - {% endif %} - - - {% if item.hasChildren %} - - {% endif %} -
  • -{% endmacro %} - -{% macro card_collapse(name, item, expanded = 'true') %} - {% autoescape false %} -
    -
    -
    - {{ item.tools }} -
    - - {{ 'forum_blue.png'|img(32) }} - - {{ item.title }}{{ item.icon_session }} -
    -
    -
    -
    - {{ item.description }} -
    -
    - {% for subitem in item.forums %} -
    -
    -
    -
    -
    - -
    -
    -
    -

    - {{ subitem.title }} - {% if subitem.forum_of_group != 0 %} - - {{ "forum.png"|img(22) }} {{ "Go to"|trans }} {{ subitem.forum_group_title }} - - {% endif %} - {{ subitem.icon_session }} -
    -
    - {{ subitem.tools }} -
    -
    -

    -
      -
    • {{ 'Forum threads'| trans }}: {{ subitem.number_threads }}
    • - {% if subitem.last_poster_id is not empty %} -
    • - - {{ subitem.last_poster_date }} - « {{ subitem.last_post_title }} » - {{ "By"|trans }} - {{ subitem.last_poster_user }} -
    • - {% endif %} -
    -
    -
    -
    - {{ subitem.description }} - {{ subitem.last_post_text }} -
    - {{ subitem.alert }} - {% if subitem.moderation is not empty %} - - {{ "PostsPendingModeration"|trans }}: {{ subitem.moderation }} - - {% endif %} -
    -
    - {% endfor %} -
    -
    -
    -
    - {% endautoescape %} -{% endmacro %} - {% macro collapse(name, title, content, list = false, expanded = 'true', title_right = '', title_icons = '') %} {% autoescape false %}
    @@ -141,7 +9,12 @@ {% endif %}

    - + {{ title }}

    @@ -152,7 +25,11 @@
    {% endif %} -
    +
    {% if list %}