Skip to content

Commit

Permalink
fixed conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
oviag committed Feb 20, 2023
1 parent 468754e commit 149af73
Show file tree
Hide file tree
Showing 8 changed files with 243 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ dependencies:
- helfi_tpr
- text
- user
- views_infinite_scroll
id: service_list
label: 'Service list'
module: views
Expand All @@ -23,7 +22,67 @@ display:
display_plugin: default
position: 0
display_options:
<<<<<<< HEAD
title: ''
=======
access:
type: perm
options:
perm: 'access content'
cache:
type: tag
options: { }
query:
type: views_query
options:
disable_sql_rewrite: false
distinct: false
replica: false
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: full
options:
items_per_page: 4
offset: 0
id: 0
total_pages: null
tags:
next: Next
previous: Previous
first: First
last: Last
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
quantity: 9
style:
type: default
options:
row_class: ''
default_row_class: true
uses_fields: false
row:
type: 'entity:tpr_service'
options:
relationship: none
view_mode: teaser
>>>>>>> 102e8c7 (UHF-7298: Removed infinity scroll from unit search and service list views)
fields:
name:
id: name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ dependencies:
- address
- helfi_tpr
- user
- views_infinite_scroll
id: unit_search
label: 'Unit search'
module: views
Expand Down Expand Up @@ -40,23 +39,25 @@ display:
exposed_form:
type: basic
options:
submit_button: Käytä
submit_button: Use
reset_button: false
reset_button_label: Palauta
exposed_sorts_label: Lajittele
reset_button_label: Reset
exposed_sorts_label: Sort
expose_sort_order: true
sort_asc_label: Nousevasti
sort_desc_label: Laskevasti
sort_asc_label: Ascending
sort_desc_label: Descending
pager:
type: infinite_scroll
type: full
options:
items_per_page: 5
offset: 0
id: 0
total_pages: null
tags:
previous: '‹ Previous'
next: 'Next ›'
next: Next
previous: Previous
first: First
last: Last
expose:
items_per_page: false
items_per_page_label: 'Items per page'
Expand All @@ -65,10 +66,7 @@ display:
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
views_infinite_scroll:
button_text: 'Load more results'
automatically_load_content: false
initially_load_all_pages: false
quantity: 9
style:
type: default
options:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@ display:
pager:
options:
tags:
previous: '‹ Edellinen'
next: 'Seuraava ›'
next: Seuraava
previous: Edellinen
first: Ensimmäinen
last: Viimeinen
expose:
items_per_page_label: 'Merkintöjä sivua kohti'
items_per_page_options_all_label: '- Kaikki -'
<<<<<<< HEAD
views_infinite_scroll:
button_text: 'Lataa lisää palveluita'
=======
offset_label: Offset
>>>>>>> 102e8c7 (UHF-7298: Removed infinity scroll from unit search and service list views)
arguments:
id:
exception:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,24 @@ display:
area:
content:
value: "<p>Ei tuloksia</p>\r\n"
exposed_form:
options:
submit_button: Käytä
reset_button_label: Palauta
exposed_sorts_label: Järjestä
sort_asc_label: Nouseva
sort_desc_label: Laskeva
pager:
options:
tags:
previous: '‹ Edellinen'
next: 'Seuraava ›'
next: Seuraava
previous: Edellinen
first: Ensimmäinen
last: Viimeinen
expose:
items_per_page_label: 'Merkintöjä sivua kohti'
items_per_page_options_all_label: '- Kaikki -'
offset_label: Offset
views_infinite_scroll:
button_text: 'Lataa lisää'
arguments:
id:
exception:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,8 @@ display:
expose:
label: 'Rådgivningstjänstens namn eller sökterm'
placeholder: 't.ex. Socialrådgivning, hälsa eller digitalt Sök'
tags:
next: Nästa
previous: Föregående
first: Första
last: Sista
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@ display:
default:
display_title: Förvald
display_options:
exposed_form:
options:
submit_button: Verkställ
reset_button_label: Återställ
exposed_sorts_label: 'Sortera efter'
sort_asc_label: Stigande
sort_desc_label: Fallande
pager:
options:
tags:
previous: '‹ Föregående'
next: 'Nästa ›'
next: Nästa
previous: Föregående
first: Första
last: Sista
expose:
items_per_page_label: 'Inlägg per sida'
items_per_page_options_all_label: '- Alla -'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
views.view.service_list:
expected_config:
dependencies:
module:
- helfi_tpr
- user
- views_infinite_scroll
display:
default:
display_options:
pager:
type: infinite_scroll
options:
tags:
previous: '‹ Previous'
next: 'Next ›'
views_infinite_scroll:
button_text: 'Load more services'
automatically_load_content: false
initially_load_all_pages: false
update_actions:
change:
dependencies:
module:
- helfi_tpr
- user
display:
default:
display_options:
pager:
type: full
options:
tags:
next: Next
previous: Previous
first: First
last: Last
quantity: 9
views.view.unit_search:
expected_config:
dependencies:
module:
- address
- helfi_tpr
- user
- views_infinite_scroll
display:
default:
display_options:
pager:
type: infinite_scroll
options:
tags:
previous: '‹ Previous'
next: 'Next ›'
views_infinite_scroll:
button_text: 'Load more results'
automatically_load_content: false
initially_load_all_pages: false
update_actions:
change:
dependencies:
module:
- address
- helfi_tpr
- user
display:
default:
display_options:
pager:
type: full
options:
tags:
next: Next
previous: Previous
first: First
last: Last
quantity: 9
62 changes: 59 additions & 3 deletions helfi_features/helfi_tpr_config/helfi_tpr_config.install
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

use Drupal\Core\Field\FieldStorageDefinitionInterface;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\helfi_platform_config\ConfigHelper;

/**
Expand All @@ -28,6 +29,7 @@ function helfi_tpr_config_install($is_syncing) {
helfi_tpr_config_update_9022();
helfi_tpr_config_update_9023();
helfi_tpr_config_update_9025();
helfi_tpr_config_update_9029();
}

// If HELfi Announcements module is installed, install also
Expand Down Expand Up @@ -601,9 +603,63 @@ function helfi_tpr_config_update_9028() {
}

/**
* Installing configuration files for paragraph type Service List Search and its fields.
* Remove infinite scroll from service list and unit search paragraphs and replace it with full pager.
*/
function helfi_tpr_config_update_9029() {
// Handle the configuration update manually.
$configLocation = dirname(__FILE__) . '/config/install/';
$configTranslationLocation = dirname(__FILE__) . '/config/language/';

$configurations = [
'views.view.service_list',
'views.view.unit_search',
];

// Install configurations and translations.
foreach ($configurations as $configuration) {
ConfigHelper::installNewConfig($configLocation, $configuration);
ConfigHelper::installNewConfigTranslation($configTranslationLocation, $configuration);
}

// Remove the meta load more label field because load more pager is not used anymore.
if ($field_service_list_meta_load_mor = FieldStorageConfig::loadByName('paragraph', 'field_service_list_meta_load_mor')) {
$field_service_list_meta_load_mor->delete();
}

// Remove the meta load more label field because load more pager is not used anymore.
if ($field_unit_search_meta_load_more = FieldStorageConfig::loadByName('paragraph', 'field_unit_search_meta_load_more')) {
$field_unit_search_meta_load_more->delete();
}
}

/**
* Remove infinite scroll from TPR service units and unit services views and replace it with full pager.
*/
function helfi_tpr_config_update_9030() {
// Handle the configuration update manually.
$configLocation = dirname(__FILE__) . '/config/optional/';
$configTranslationLocation = dirname(__FILE__) . '/config/language/';

$configurations = [
'views.view.service_units',
'views.view.unit_services',
];

// Install configurations and translations.
foreach ($configurations as $configuration) {
ConfigHelper::installNewConfig($configLocation, $configuration);
ConfigHelper::installNewConfigTranslation($configTranslationLocation, $configuration);
}

// Manually uninstall views_infinite_scroll module.
$installer = Drupal::service('module_installer');
$installer->uninstall(['views_infinite_scroll']);
}

/**
* Installing configuration files for paragraph type Service List Search and its fields.
*/
function helfi_tpr_config_update_9031() {
/** @var \Drupal\update_helper\Updater $updateHelper */
$updateHelper = \Drupal::service('update_helper.updater');

Expand Down Expand Up @@ -640,7 +696,7 @@ function helfi_tpr_config_update_9029() {
/**
* Creating new view mode teaser search result.
*/
function helfi_tpr_config_update_9030() {
function helfi_tpr_config_update_9032() {
/** @var \Drupal\update_helper\Updater $updateHelper */
$updateHelper = \Drupal::service('update_helper.updater');

Expand Down Expand Up @@ -669,7 +725,7 @@ function helfi_tpr_config_update_9030() {
/**
* Add new display for service list view with labels translations.
*/
function helfi_tpr_config_update_9031() {
function helfi_tpr_config_update_9033() {

/** @var \Drupal\update_helper\Updater $updateHelper */
$updateHelper = \Drupal::service('update_helper.updater');
Expand Down

0 comments on commit 149af73

Please sign in to comment.