Loading css/builder.css +14 −2 Changes for css/builder.css: 14 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -118,6 +118,7 @@ .lpb-up, .lpb-down, .lpb-edit, .lpb-duplicate, .lpb-delete { cursor: pointer; height: 30px; Loading @@ -131,6 +132,7 @@ .is-layout .lpb-up, .is-layout .lpb-down, .is-layout .lpb-edit, .is-layout .lpb-duplicate, .is-layout .lpb-delete { opacity: 1; } Loading @@ -145,6 +147,7 @@ .lpb-up:hover, .lpb-down:hover, .lpb-edit:hover, .lpb-duplicate:hover, .lpb-delete:hover { opacity: 1; background-color: rgba(0, 0, 0, .1); Loading @@ -152,6 +155,7 @@ .is-layout .lpb-up:hover, .is-layout .lpb-down:hover, .is-layout .lpb-edit:hover, .is-layout .lpb-duplicate:hover, .is-layout .lpb-delete:hover { background-color: rgba(0, 0, 0, .25); } Loading @@ -159,6 +163,7 @@ .lpb-up:focus, .lpb-down:focus, .lpb-edit:focus, .lpb-duplicate:focus, .lpb-delete:focus { outline: 2px solid blue; } Loading @@ -166,6 +171,7 @@ .is-layout .lpb-up:focus, .is-layout .lpb-down:focus, .is-layout .lpb-edit:focus, .is-layout .lpb-duplicate:focus, .is-layout .lpb-delete:focus { outline-color: white; } Loading Loading @@ -200,6 +206,13 @@ .is-layout .lpb-edit { background-image: url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.284 8.63082L19.6136 7.30121C20.0152 6.8996 20.6664 6.8996 21.068 7.30121L22.6988 8.93203C23.1004 9.33365 23.1004 9.98479 22.6988 10.3864L21.3692 11.716L18.284 8.63082Z' fill='white'/%3E%3Cpath d='M17.2556 9.65922L9.0284 17.8864L8 22L12.1136 20.9716L20.3408 12.7444L17.2556 9.65922Z' fill='white'/%3E%3C/svg%3E%0A"); } .lpb-duplicate { background-image: url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.7,8C21.4,8,22,8.6,22,9.3v7.9c0,0.7-0.6,1.3-1.3,1.3h-7.9c-0.7,0-1.3-0.6-1.3-1.3V9.3c0-0.7,0.6-1.3,1.3-1.3H20.7 M12.8,19.4c-1.2,0-2.2-1-2.2-2.2v-5.7H9.3c-0.7,0-1.3,0.6-1.3,1.3v7.9C8,21.4,8.6,22,9.3,22h7.9c0.7,0,1.3-0.6,1.3-1.3v-1.3H12.8z' fill='black' /%3E%3C/svg%3E%0A"); background-size: cover; } .is-layout .lpb-duplicate { background-image: url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.7,8C21.4,8,22,8.6,22,9.3v7.9c0,0.7-0.6,1.3-1.3,1.3h-7.9c-0.7,0-1.3-0.6-1.3-1.3V9.3c0-0.7,0.6-1.3,1.3-1.3H20.7 M12.8,19.4c-1.2,0-2.2-1-2.2-2.2v-5.7H9.3c-0.7,0-1.3,0.6-1.3,1.3v7.9C8,21.4,8.6,22,9.3,22h7.9c0.7,0,1.3-0.6,1.3-1.3v-1.3H12.8z' fill='white' /%3E%3C/svg%3E%0A"); } .lpb-delete { background-image: url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M14 8H16C16.5523 8 17 8.44772 17 9H21V11H9V9H13C13 8.44772 13.4477 8 14 8ZM10 12H20L19.09 21.0995C19.0389 21.6107 18.6088 22 18.095 22H11.905C11.3912 22 10.9611 21.6107 10.91 21.0995L10 12Z' fill='%23000000'/%3E%3C/svg%3E%0A"); background-size: cover; Loading @@ -208,7 +221,6 @@ background-image: url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M14 8H16C16.5523 8 17 8.44772 17 9H21V11H9V9H13C13 8.44772 13.4477 8 14 8ZM10 12H20L19.09 21.0995C19.0389 21.6107 18.6088 22 18.095 22H11.905C11.3912 22 10.9611 21.6107 10.91 21.0995L10 12Z' fill='white'/%3E%3C/svg%3E%0A"); } .lpb-btn { position: absolute; position: absolute; display: inline-block; background: #fff; Loading Loading @@ -403,7 +415,7 @@ a.lpb-enable-button::before { opacity: 1; } .js-lpb-ui-message { background-color: 000; background-color: #000; color: #fff; text-align: center; position: static; Loading layout_paragraphs.module +17 −0 Changes for layout_paragraphs.module: 17 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ function layout_paragraphs_theme() { 'layout_paragraphs_layout' => NULL, 'uuid' => NULL, 'edit_access' => FALSE, 'duplicate_access' => FALSE, 'delete_access' => FALSE, ], ], Loading Loading @@ -209,6 +210,22 @@ function layout_paragraphs_preprocess_layout_paragraphs_builder_controls(&$varia '#access' => $variables['edit_access'], '#weight' => 60, ], 'duplicate_link' => [ '#type' => 'link', '#url' => Url::fromRoute('layout_paragraphs.builder.duplicate_item', [ 'layout_paragraphs_layout' => $layout->id(), 'source_uuid' => $entity->uuid(), ]), '#title' => t('Duplicate'), '#attributes' => [ 'class' => [ 'lpb-duplicate', 'use-ajax', ], ], '#access' => $variables['duplicate_access'], '#weight' => 65, ], 'delete_link' => [ '#type' => 'link', '#url' => Url::fromRoute('layout_paragraphs.builder.delete_item', [ Loading layout_paragraphs.routing.yml +12 −0 Changes for layout_paragraphs.routing.yml: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -71,6 +71,18 @@ layout_paragraphs.builder.insert: requirements: _layout_paragraphs_builder_access: 'TRUE' layout_paragraphs.builder.duplicate_item: path: '/layout-paragraphs-builder/{layout_paragraphs_layout}/duplicate/{source_uuid}' defaults: _controller: '\Drupal\layout_paragraphs\Controller\DuplicateController::duplicate' operation: 'duplicate' options: parameters: layout_paragraphs_layout: layout_paragraphs_layout_tempstore: TRUE requirements: _layout_paragraphs_builder_access: 'TRUE' layout_paragraphs.builder.delete_item: path: '/layout-paragraphs-builder/{layout_paragraphs_layout}/delete/{component_uuid}' defaults: Loading modules/layout_paragraphs_permissions/layout_paragraphs_permissions.module +1 −0 Changes for modules/layout_paragraphs_permissions/layout_paragraphs_permissions.module: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ function layout_paragraphs_permissions_preprocess_layout_paragraphs_builder_cont foreach (['drag_handle', 'move_up', 'move_down'] as $key) { $variables['controls'][$key]['#access'] = layout_paragraphs_permissions_access($variables['layout_paragraphs_layout'], 'reorder'); } $variables['controls']['duplicate_link']['#access'] = layout_paragraphs_permissions_access($variables['layout_paragraphs_layout'], 'duplicate'); } /** Loading modules/layout_paragraphs_permissions/layout_paragraphs_permissions.permissions.yml +4 −0 Changes for modules/layout_paragraphs_permissions/layout_paragraphs_permissions.permissions.yml: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2,6 +2,10 @@ reorder layout paragraphs components: title: 'Reorder layout paragraphs components' description: 'Grants access to drag and drop, move, and other navigation for Layout Paragraphs components.' duplicate layout paragraphs components: title: 'Duplicate layout paragraphs components' description: 'Allows duplicating Layout Paragraphs components.' edit layout paragraphs plugin config: title: 'Edit Layout Paragraphs Plugin Config' description: "Allow access to the 'Layout plugin configuration' form when creating/editing a Layout" Loading
css/builder.css +14 −2 Changes for css/builder.css: 14 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -118,6 +118,7 @@ .lpb-up, .lpb-down, .lpb-edit, .lpb-duplicate, .lpb-delete { cursor: pointer; height: 30px; Loading @@ -131,6 +132,7 @@ .is-layout .lpb-up, .is-layout .lpb-down, .is-layout .lpb-edit, .is-layout .lpb-duplicate, .is-layout .lpb-delete { opacity: 1; } Loading @@ -145,6 +147,7 @@ .lpb-up:hover, .lpb-down:hover, .lpb-edit:hover, .lpb-duplicate:hover, .lpb-delete:hover { opacity: 1; background-color: rgba(0, 0, 0, .1); Loading @@ -152,6 +155,7 @@ .is-layout .lpb-up:hover, .is-layout .lpb-down:hover, .is-layout .lpb-edit:hover, .is-layout .lpb-duplicate:hover, .is-layout .lpb-delete:hover { background-color: rgba(0, 0, 0, .25); } Loading @@ -159,6 +163,7 @@ .lpb-up:focus, .lpb-down:focus, .lpb-edit:focus, .lpb-duplicate:focus, .lpb-delete:focus { outline: 2px solid blue; } Loading @@ -166,6 +171,7 @@ .is-layout .lpb-up:focus, .is-layout .lpb-down:focus, .is-layout .lpb-edit:focus, .is-layout .lpb-duplicate:focus, .is-layout .lpb-delete:focus { outline-color: white; } Loading Loading @@ -200,6 +206,13 @@ .is-layout .lpb-edit { background-image: url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.284 8.63082L19.6136 7.30121C20.0152 6.8996 20.6664 6.8996 21.068 7.30121L22.6988 8.93203C23.1004 9.33365 23.1004 9.98479 22.6988 10.3864L21.3692 11.716L18.284 8.63082Z' fill='white'/%3E%3Cpath d='M17.2556 9.65922L9.0284 17.8864L8 22L12.1136 20.9716L20.3408 12.7444L17.2556 9.65922Z' fill='white'/%3E%3C/svg%3E%0A"); } .lpb-duplicate { background-image: url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.7,8C21.4,8,22,8.6,22,9.3v7.9c0,0.7-0.6,1.3-1.3,1.3h-7.9c-0.7,0-1.3-0.6-1.3-1.3V9.3c0-0.7,0.6-1.3,1.3-1.3H20.7 M12.8,19.4c-1.2,0-2.2-1-2.2-2.2v-5.7H9.3c-0.7,0-1.3,0.6-1.3,1.3v7.9C8,21.4,8.6,22,9.3,22h7.9c0.7,0,1.3-0.6,1.3-1.3v-1.3H12.8z' fill='black' /%3E%3C/svg%3E%0A"); background-size: cover; } .is-layout .lpb-duplicate { background-image: url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.7,8C21.4,8,22,8.6,22,9.3v7.9c0,0.7-0.6,1.3-1.3,1.3h-7.9c-0.7,0-1.3-0.6-1.3-1.3V9.3c0-0.7,0.6-1.3,1.3-1.3H20.7 M12.8,19.4c-1.2,0-2.2-1-2.2-2.2v-5.7H9.3c-0.7,0-1.3,0.6-1.3,1.3v7.9C8,21.4,8.6,22,9.3,22h7.9c0.7,0,1.3-0.6,1.3-1.3v-1.3H12.8z' fill='white' /%3E%3C/svg%3E%0A"); } .lpb-delete { background-image: url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M14 8H16C16.5523 8 17 8.44772 17 9H21V11H9V9H13C13 8.44772 13.4477 8 14 8ZM10 12H20L19.09 21.0995C19.0389 21.6107 18.6088 22 18.095 22H11.905C11.3912 22 10.9611 21.6107 10.91 21.0995L10 12Z' fill='%23000000'/%3E%3C/svg%3E%0A"); background-size: cover; Loading @@ -208,7 +221,6 @@ background-image: url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M14 8H16C16.5523 8 17 8.44772 17 9H21V11H9V9H13C13 8.44772 13.4477 8 14 8ZM10 12H20L19.09 21.0995C19.0389 21.6107 18.6088 22 18.095 22H11.905C11.3912 22 10.9611 21.6107 10.91 21.0995L10 12Z' fill='white'/%3E%3C/svg%3E%0A"); } .lpb-btn { position: absolute; position: absolute; display: inline-block; background: #fff; Loading Loading @@ -403,7 +415,7 @@ a.lpb-enable-button::before { opacity: 1; } .js-lpb-ui-message { background-color: 000; background-color: #000; color: #fff; text-align: center; position: static; Loading
layout_paragraphs.module +17 −0 Changes for layout_paragraphs.module: 17 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ function layout_paragraphs_theme() { 'layout_paragraphs_layout' => NULL, 'uuid' => NULL, 'edit_access' => FALSE, 'duplicate_access' => FALSE, 'delete_access' => FALSE, ], ], Loading Loading @@ -209,6 +210,22 @@ function layout_paragraphs_preprocess_layout_paragraphs_builder_controls(&$varia '#access' => $variables['edit_access'], '#weight' => 60, ], 'duplicate_link' => [ '#type' => 'link', '#url' => Url::fromRoute('layout_paragraphs.builder.duplicate_item', [ 'layout_paragraphs_layout' => $layout->id(), 'source_uuid' => $entity->uuid(), ]), '#title' => t('Duplicate'), '#attributes' => [ 'class' => [ 'lpb-duplicate', 'use-ajax', ], ], '#access' => $variables['duplicate_access'], '#weight' => 65, ], 'delete_link' => [ '#type' => 'link', '#url' => Url::fromRoute('layout_paragraphs.builder.delete_item', [ Loading
layout_paragraphs.routing.yml +12 −0 Changes for layout_paragraphs.routing.yml: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -71,6 +71,18 @@ layout_paragraphs.builder.insert: requirements: _layout_paragraphs_builder_access: 'TRUE' layout_paragraphs.builder.duplicate_item: path: '/layout-paragraphs-builder/{layout_paragraphs_layout}/duplicate/{source_uuid}' defaults: _controller: '\Drupal\layout_paragraphs\Controller\DuplicateController::duplicate' operation: 'duplicate' options: parameters: layout_paragraphs_layout: layout_paragraphs_layout_tempstore: TRUE requirements: _layout_paragraphs_builder_access: 'TRUE' layout_paragraphs.builder.delete_item: path: '/layout-paragraphs-builder/{layout_paragraphs_layout}/delete/{component_uuid}' defaults: Loading
modules/layout_paragraphs_permissions/layout_paragraphs_permissions.module +1 −0 Changes for modules/layout_paragraphs_permissions/layout_paragraphs_permissions.module: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ function layout_paragraphs_permissions_preprocess_layout_paragraphs_builder_cont foreach (['drag_handle', 'move_up', 'move_down'] as $key) { $variables['controls'][$key]['#access'] = layout_paragraphs_permissions_access($variables['layout_paragraphs_layout'], 'reorder'); } $variables['controls']['duplicate_link']['#access'] = layout_paragraphs_permissions_access($variables['layout_paragraphs_layout'], 'duplicate'); } /** Loading
modules/layout_paragraphs_permissions/layout_paragraphs_permissions.permissions.yml +4 −0 Changes for modules/layout_paragraphs_permissions/layout_paragraphs_permissions.permissions.yml: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2,6 +2,10 @@ reorder layout paragraphs components: title: 'Reorder layout paragraphs components' description: 'Grants access to drag and drop, move, and other navigation for Layout Paragraphs components.' duplicate layout paragraphs components: title: 'Duplicate layout paragraphs components' description: 'Allows duplicating Layout Paragraphs components.' edit layout paragraphs plugin config: title: 'Edit Layout Paragraphs Plugin Config' description: "Allow access to the 'Layout plugin configuration' form when creating/editing a Layout"