claro-8.x-1.x-dev/templates/content-edit/file-managed-file.html.twig
templates/content-edit/file-managed-file.html.twig
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | {# /** * @file * Theme override to display a file form widget. * * Available variables: * - element: Form element for the file upload. * - attributes: HTML attributes for the containing element. * - multiple: Whether this widget is the part of a multi-value file widget or * not. * - upload: Whether the file upload input is displayed or not. * - has_value: true if the widget already contains a file. * - has_meta: true when the display checkbox or the description input are * enabled and and are visible. * * @see template_preprocess_file_managed_file() * @see claro_preprocess_file_managed_file() */ #} {% set classes = [ 'js-form-managed-file' , 'form-managed-file' , multiple ? 'is-multiple' : 'is-single' , upload ? 'has-upload' : 'no-upload' , has_value ? 'has-value' : 'no-value' , has_meta ? 'has-meta' : 'no-meta' , ] %} <div{{ attributes.addClass(classes) }}> <div class = "form-managed-file__main" > {{ element|without( 'display' , 'description' )}} </div> {% if has_meta %} <div class = "form-managed-file__meta-wrapper" > <div class = "form-managed-file__meta" > <div class = "form-managed-file__meta-items" > {{ element.description }} {% if display %} {{ element.display }} {% endif %} </div> </div> </div> {% endif %} </div> |