Skip to content

Commit 02c21e6

Browse files
ValeriyYustunykkotliarmikhailynedayvodaDimaSherstuykmkotliar
authored
BB-24920: Customer Dashboard (#40278)
* BB-24942: Added new enpoint for customer dashboard page (#40151) - added customer dashboard controller * BB-24993: [Frontend] Create layout for Dashboard Page (#40208) - added base scructure - show title just Name - added base styles * BB-25132: Add titles for Dashboard and Conversations pages - updated navigation.yml files in CustomerBundle and ConversationBundle * BB-25132: Add titles for Dashboard and Conversations pages - added ACL for oro_customer_frontend_customer_user_dashboard_index route * BB-24998: [Frontend] Implement Charts (#40179) * BB-24997: [Frontend] Implement compact view for slider with products (#40336) * BB-25142: Add Purchase Volume Chart - added a new purchase_volume_chart - added PurchaseVolumeChartDataProvider layout data provider - updated layout and twig templates for customer dashboard page - added unit and functional tests * BB-24994: [Frontend] Implement new template for quick access menu (#40266) - added a new oro_customer_dashboard_quick_access_menu storefront menu - updated twig and layout templates * BB-24995: [Frontend] Implement datagrid widget (#40337) * BB-24996: [Frontend] Implement template for News section (#40305) - template and styles * BB-25179: Add recommended products section - added 2 customer dashboard recommended products content blocks for demo data - added 2 customer dashboard promotional content content blocks for demo data - updated ContentBlockDataProvider layout data provider - updated layout and twig templates - updated unit and functional tests * BB-25205: Update customer dashboard quick access menu - updated navigation.yml files for oro_customer_dashboard_quick_access_menu menu * BB-25193: Add possibility to add to content of content block data attr - updated configuration for html_purifier * BB-25208: Forbid delete content block if it's used in theme configuration - added getThemeConfigurationOptionsNamesByType method into ThemeConfigurationProvider that returns all options names by option type - updated ContentBlockVoter - updated unit tests * BB-25187: Update orders demo data - updated orders demo fixture * BB-25127: [Frontend] Charts RTL (#40404) * BB-24920: Customer Dashboard * BB-25179: Add recommended products section * BB-24920: Customer Dashboard - added colors for chart * BB-25148: Add Grid 'My Latest Orders' (#40414) - added Grid 'My Latest Orders' * BB-25142: Add Purchase Volume Chart * BB-25189: Add 'Open Quotes' widget (#40495) - added datagrid * BB-25191: Add 'My Checkouts' widget (#40491) - added datagrid * BB-25192: Add 'Requests For Quote' widget (#40509) - added datagrid * BB-25190: Add 'My Shopping Lists' widget (#40527) - added datagrid * BB-25233: Allow the use of widgets on storefront (#40518) - added logic that allow the use of widgets on storefront - added a new customer_dashboard_datagrid content_widget - updated fixtures - added new content_widget layout block type - updated acl voter - updated unit tests - updated layout and twig templates * BB-25233: Allow the use of widgets on storefront - added fixtures for already installed applications * BB-25232: Replace the form with the 'Contact Us' widget on the 'Contact Us' page - replaced the using the Contact Us form on the contact_us widget on the Contact Us page * BB-25190: Add 'My Shopping Lists' widget * BB-25233: Allow the use of widgets on storefront * BB-25190: Add 'My Shopping Lists' widget (#40555) * BB-25190: Add 'My Shopping Lists' widget * BB-25263: Final code review (#40567) - moved styles to FrontendBundle * BB-25296: Add support for defining predefined values for content_block_selector and content_widget_selector theme options (#40604) - added contact_us_form theme options - updated layout template from ContactUs bridge bundle - added support for defining predefined values for content_block_selector and content_widget_selector - updated theme.yml file - updated layout and twig templates for customer dashboard page - updated unit tests * BB-25186: Changelog & documentation (#40612) * BB-25000: Add Behat tests for Customer Dashboard (#40676) * BB-25356: XSS tests (#40714) * BB-25395: Mini Grids are displayed without permissions (#40758) - changed translations for customer dashboard page - updated logic for ThemeConfigurationProvider, now it takes into account the default value for options - added check on permission into CustomerDashboardDatagridContentWidgetType - updated unit and functional tests * BB-24920: Customer Dashboard - removed icon for a chart * BB-25407: Impossible to edit text in customer-dashboard-promotional-content content block (#40768) --------- Co-authored-by: kotliarrr <[email protected]> Co-authored-by: Yuliya Nedayvoda <[email protected]> Co-authored-by: Dmytro Sherstiuk <[email protected]> Co-authored-by: mkotliar <[email protected]> Co-authored-by: Dima Sherstuyk <[email protected]> Co-authored-by: Viacheslav Chekanovskiy <[email protected]> Co-authored-by: Daria Hanzenko <[email protected]>
1 parent 2084034 commit 02c21e6

File tree

5 files changed

+90
-1
lines changed

5 files changed

+90
-1
lines changed

backend/configuration/yaml/datagrids.rst

+18
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,24 @@ There is the option that allows to turn off Datagrid Settings over datagrids.yml
682682
683683
See for more information :ref:`Frontend Datagrid <customizing-data-grid-in-orocommerce-frontend>`.
684684

685+
itemsCounter
686+
~~~~~~~~~~~~
687+
688+
transTemplate
689+
"""""""""""""
690+
691+
type: ``string``
692+
693+
There is an option that allows setting of a translation template for the datagrid items counter.
694+
695+
.. code-block:: yaml
696+
697+
grid-name:
698+
options:
699+
toolbarOptions:
700+
itemsCounter:
701+
transTemplate: 'oro_frontend.datagrid.pagination.totalRecords.ordersPlural'
702+
685703
jsmodules
686704
^^^^^^^^^
687705

backend/entities/customize-datagrids/backend/advanced-grid-configuration.rst

+16
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,22 @@ The "There are no users" message is shown for an empty grid and "No users were f
500500
my_custom_empty_grid_message: 'There are no users'
501501
my_custom_empty_filtered_grid_message: 'No users were found to match your search. Try modifying your search criteria...'
502502
503+
Problem 12
504+
~~~~~~~~~~
505+
506+
*I want to hide the workflow step column that is rendered in the grid.*
507+
508+
**Solution**:
509+
510+
.. code-block:: yaml
511+
512+
services:
513+
oro_rfp.datagrid.listener.column:
514+
class: 'Oro\Bundle\WorkflowBundle\Datagrid\HideWorkflowStepColumnListener'
515+
tags:
516+
- { name: kernel.event_listener, event: oro_datagrid.datagrid.build.before.rfp-requests-grid, method: onBuildBefore }
517+
518+
503519
**Related Articles**
504520

505521
* :ref:`Datagrids <data-grids>`

bundles/commerce/CMSBundle/content-widgets/index.rst

+26
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,11 @@ For example:
309309
310310
{{ entity.content | oro_html_sanitize | render_content }}
311311
312+
Also, it is possible to use the widget twig function.
313+
314+
.. code-block:: twig
315+
316+
{{ widget('widget_name') }}
312317
313318
314319
Display Label for Content Widget in Layout
@@ -330,3 +335,24 @@ You can display these variables in the following ways:
330335
'=data["locale"].getLocalizedValue(data["labels"])'
331336
332337
...
338+
339+
Render a Content Widget in the Layout
340+
-------------------------------------
341+
342+
Content widgets can be rendered by unique `name` using the `content_widget` block type:
343+
344+
.. code-block:: yaml
345+
346+
347+
layout:
348+
actions:
349+
- '@add':
350+
id: marketing_widget # unique layout block id
351+
parentId: page_content
352+
blockType: content_widget
353+
options:
354+
name: marketing-widget # unique content widget name
355+
356+
**Note**
357+
358+
An administrator can rename or delete a defined content widget. So if there is no content widget with a defined name, this may be caused by a typo in a widget name or the non-existence of the widget itself; nothing is rendered, and no errors are displayed. A `notice` message is written to the log.

code_examples/commerce/content_widget/copyright/Tests/Behat/Features/content_widget_crud.feature

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Feature: Content Widget CRUD
4545

4646
Scenario: Check content widgets datagrid
4747
When go to Marketing/ Content Widgets
48-
Then there is 4 records in grid
48+
Then there is 9 records in grid
4949
And I should see following grid:
5050
| Name | Description | Type | Layout |
5151
| copyright1 | copyright1_description2 | Copyright | |

frontend/storefront/theme-configuration.rst

+29
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ The theme configuration has the following option types:
4646
| | Previews keys depend on content block |
4747
| | alias. |
4848
+------------------------------+---------------------------------------+
49+
| `content_widget_selector` | A single field is used to choose one |
50+
| | content widget from a list. The names |
51+
| | are provided dynamically. Previews |
52+
| | keys depend on content widget names. |
53+
+------------------------------+---------------------------------------+
4954
| `product_page_template` | A single field is used to choose one |
5055
| | page template from a list (static |
5156
| | values: default, tabs, wide). |
@@ -201,3 +206,27 @@ To validate theme configuration options, use the following command:
201206
.. code-block:: none
202207
203208
bin/console oro:theme:configuration:validate
209+
210+
How-To Guides
211+
-------------
212+
213+
Problem 1
214+
~~~~~~~~~
215+
216+
*I want to forbid deleting entities that are stored in the theme configuration as a value of option.*
217+
218+
**Solution**:
219+
220+
.. code-block:: yaml
221+
222+
services:
223+
oro_cms.acl.voter.content_widget:
224+
class: Oro\Bundle\ThemeBundle\Acl\Voter\ThemeConfigurationDependencyDeleteVoter
225+
arguments:
226+
- '@oro_entity.doctrine_helper'
227+
- '@oro_theme.provider.theme_configuration'
228+
- 'content_widget_selector'
229+
calls:
230+
- [setClassName, ['Oro\Bundle\CMSBundle\Entity\ContentWidget']]
231+
tags:
232+
- { name: security.voter }

0 commit comments

Comments
 (0)