Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHS-5643 rethink the purpose of alt text listing #1560

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions config/default/views.settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ ui:
show:
additional_queries: false
advanced_column: true
default_display: false
performance_statistics: false
default_display: true
performance_statistics: true
preview_information: true
sql_query:
enabled: false
enabled: true
where: above
display_embed: false
always_live_preview: false
display_embed: true
always_live_preview: true
exposed_filter_any_label: old_any
field_rewrite_elements:
div: DIV
Expand Down
22 changes: 7 additions & 15 deletions config/default/views.view.new_default_image_alt_text.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
- user
- views_bulk_operations
id: new_default_image_alt_text
label: 'New Default Image Alt Text'
label: 'Default Image Alt Text'
module: views
description: ''
tag: ''
Expand Down Expand Up @@ -272,7 +272,7 @@ display:
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: target_id
click_sort_column: alt
type: image
settings:
image_link: ''
Expand Down Expand Up @@ -503,7 +503,7 @@ display:
access:
type: perm
options:
perm: 'view media'
perm: 'edit any image media'
cache:
type: tag
options: { }
Expand Down Expand Up @@ -646,7 +646,7 @@ display:
placeholder: null
is_grouped: true
group_info:
label: 'Alternative Text'
label: 'Alt Text'
description: ''
identifier: alt
optional: true
Expand Down Expand Up @@ -682,7 +682,7 @@ display:
exposed: true
expose:
operator_id: field_media_image_alt_1_op
label: 'Alt Text'
label: 'Search Alt Text'
description: ''
use_operator: false
operator: field_media_image_alt_1_op
Expand Down Expand Up @@ -730,10 +730,9 @@ display:
name_1: name_1
field_media_image_1: field_media_image_1
field_media_image_caption: field_media_image_caption
status: status
changed: changed
operations: operations
default: '-1'
default: changed
info:
views_bulk_operations_bulk_form:
align: ''
Expand Down Expand Up @@ -768,16 +767,9 @@ display:
separator: ''
empty_column: false
responsive: ''
status:
sortable: true
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
changed:
sortable: true
default_sort_order: asc
default_sort_order: desc
align: ''
separator: ''
empty_column: false
Expand Down
9 changes: 7 additions & 2 deletions docroot/modules/humsci/hs_views_helper/hs_views_helper.module
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,13 @@ function hs_views_helper_views_post_execute(ViewExecutable $view) {
* Implements hook_views_pre_view().
*/
function hs_views_helper_views_pre_view(ViewExecutable $view, $display_id, array &$args) {
$display_options = &$view->getDisplay()->options;
$default_options = &$view->getDisplay()->default_display->options;
$display = $view->getDisplay();
$display_options = &$display->options;
$default_display = &$display;
if (!empty($display->default_display)) {
$default_display = &$display->default_display;
}
$default_options = &$default_display->options;
$filters = !empty($display_options['filters']) ? $display_options['filters'] : $default_options['filters'];

if (
Expand Down
Loading