IchHabRecht / content_defender

Define allowed or denied content element types in your backend layouts
GNU General Public License v2.0
81 stars 38 forks source link

[FEATURE] Show remaining maxitems in page module #121

Open IchHabRecht opened 1 year ago

IchHabRecht commented 1 year ago

Resolves: #100

peterkraume commented 1 year ago

I have tested this patch in an existing TYPO3 v11 installation and discovered a little edge case (see #122). Despite of that everything worked fine. But in TYPO3 v11 the visual display of the badge is a little bit lost. But I'm not sure what would be the best solution to tackle that. Screenshot_2023-01-29_13 04 50

And finally I have a wish: please add that badge also to EXT:container elements, so the editors can see how many content elements are left for a specific column in the container columns.

IchHabRecht commented 1 year ago

Hi @peterkraume,

Thank you very much for your test and feedback.

and discovered a little edge case

I need to figure out another solution to differentiate between a negative and a non-set maxitems value.

in TYPO3 v11 the visual display of the badge is a little bit lost

Every help is more than welcome. Currently the CSS works in all supported versions 10 - 12 (although it's not optimal in 10 and 11 but it's the best I could do).

please add that badge also to EXT:container elements

As this extension is not related to container, I cannot do anything here.

riegeo commented 1 year ago

I'm not sure if this is possible, but what if you place the tag with the icon directly next to the Title? content_defender-01

Then it would line up directly in the same line with some CSS.

.t3-page-column-header {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
}

.t3-cd-badge {
    display: inline-block;
    margin-left: 15px;
}

So the badge is inline with the Title. content_defender-02