"Fossies" - the Fresh Open Source Software Archive

Member "drupal-8.9.10/core/themes/bartik/templates/classy/content-edit/filter-tips.html.twig" (26 Nov 2020, 1522 Bytes) of package /linux/www/drupal-8.9.10.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 {#
    2 /**
    3  * @file
    4  * Theme override for a set of filter tips.
    5  *
    6  * Available variables:
    7  * - tips: Descriptions and a CSS ID in the form of 'module-name/filter-id'
    8  *   (only used when 'long' is TRUE) for each filter in one or more text
    9  *   formats.
   10  * - long: A flag indicating whether the passed-in filter tips contain extended
   11  *   explanations, i.e. intended to be output on the path 'filter/tips'
   12  *   (TRUE), or are in a short format, i.e. suitable to be displayed below a
   13  *   form element. Defaults to FALSE.
   14  * - multiple: A flag indicating there is more than one filter tip.
   15  *
   16  * @see template_preprocess_filter_tips()
   17  */
   18 #}
   19 {% if multiple %}
   20   <h2>{{ 'Text Formats'|t }}</h2>
   21 {% endif %}
   22 
   23 {% if tips|length %}
   24   {% if multiple %}
   25     <div class="compose-tips">
   26   {% endif %}
   27 
   28   {% for name, tip in tips %}
   29     {% if multiple %}
   30       {%
   31         set tip_classes = [
   32           'filter-type',
   33           'filter-' ~ name|clean_class,
   34         ]
   35       %}
   36       <div{{ tip.attributes.addClass(tip_classes) }}>
   37       <h3>{{ tip.name }}</h3>
   38     {% endif %}
   39 
   40     {% if tip.list|length %}
   41       <ul class="tips">
   42       {% for item in tip.list %}
   43         {%
   44           set item_classes = [
   45             long ? 'filter-' ~ item.id|replace({'/': '-'}),
   46           ]
   47         %}
   48         <li{{ item.attributes.addClass(item_classes) }}>{{ item.tip }}</li>
   49       {% endfor %}
   50       </ul>
   51     {% endif %}
   52 
   53     {% if multiple %}
   54       </div>
   55     {% endif %}
   56   {% endfor %}
   57 
   58   {% if multiple %}
   59     </div>
   60   {% endif %}
   61 {% endif %}