From 92a4bf594252dbad8f78760ab1a47487e96bc509 Mon Sep 17 00:00:00 2001 From: interdruper Date: Sun, 16 Jul 2017 16:19:31 +0200 Subject: [PATCH] #67 fixed. Improves the members view. --- sites/default/conf/views.view.members.yml | 131 +++++++++++++++++- .../aed_th/templates/user/user.html.twig | 4 + 2 files changed, 128 insertions(+), 7 deletions(-) diff --git a/sites/default/conf/views.view.members.yml b/sites/default/conf/views.view.members.yml index 909ed0351..e5845da42 100644 --- a/sites/default/conf/views.view.members.yml +++ b/sites/default/conf/views.view.members.yml @@ -5,6 +5,7 @@ dependencies: config: - core.entity_view_mode.user.compact - system.menu.main + - user.role.socio module: - user id: members @@ -40,20 +41,23 @@ display: exposed_form: type: basic options: - submit_button: Apply + submit_button: Buscar reset_button: false reset_button_label: Reset exposed_sorts_label: 'Sort by' - expose_sort_order: true + expose_sort_order: false sort_asc_label: Asc sort_desc_label: Desc pager: type: mini options: - items_per_page: 30 + items_per_page: 50 offset: 0 id: 0 total_pages: null + tags: + previous: ‹‹ + next: ›› expose: items_per_page: false items_per_page_label: 'Items per page' @@ -62,9 +66,6 @@ display: items_per_page_options_all_label: '- All -' offset: false offset_label: Offset - tags: - previous: ‹‹ - next: ›› style: type: default row: @@ -207,7 +208,110 @@ display: default_group_multiple: { } group_items: { } plugin_id: boolean - sorts: { } + uid: + id: uid + table: users_field_data + field: uid + relationship: none + group_type: group + admin_label: '' + operator: in + value: { } + group: 1 + exposed: true + expose: + operator_id: uid_op + label: Nombre + description: 'Buscar por nombre' + use_operator: false + operator: uid_op + identifier: uid + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + editor: '0' + anonymous: '0' + administrator: '0' + socio: '0' + socio_2013: '0' + socio_2014: '0' + socio_2015: '0' + socio_2016: '0' + socio_2017: '0' + socio_2018: '0' + socio_2019: '0' + socio_2020: '0' + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: user + entity_field: uid + plugin_id: user_name + roles_target_id: + id: roles_target_id + table: user__roles + field: roles_target_id + relationship: none + group_type: group + admin_label: '' + operator: or + value: + socio: socio + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reduce_duplicates: false + entity_type: user + plugin_id: user_roles + sorts: + field_name_value: + id: field_name_value + table: user__field_name + field: field_name_value + relationship: none + group_type: group + admin_label: '' + order: ASC + exposed: false + expose: + label: '' + plugin_id: standard title: Members header: area: @@ -223,16 +327,28 @@ display: value: "

Socios

\n

\n ¿Ya eres socio y no apareces en este listado? Habilítalo ahora\n

" format: full_html plugin_id: text + result: + id: result + table: views + field: result + relationship: none + group_type: group + admin_label: '' + empty: false + content: 'Mostrando @start - @end de @total' + plugin_id: result footer: { } empty: { } relationships: { } arguments: { } display_extenders: { } + use_ajax: true cache_metadata: max-age: -1 contexts: - 'languages:language_content' - 'languages:language_interface' + - url - url.query_args - user.permissions tags: { } @@ -253,6 +369,7 @@ display: contexts: - 'languages:language_content' - 'languages:language_interface' + - url - url.query_args - user.permissions tags: { } diff --git a/themes/custom/aed_th/templates/user/user.html.twig b/themes/custom/aed_th/templates/user/user.html.twig index 9a824effd..d509cff4e 100644 --- a/themes/custom/aed_th/templates/user/user.html.twig +++ b/themes/custom/aed_th/templates/user/user.html.twig @@ -19,5 +19,9 @@ {% if content %} {{- content -}} +
+ {{- 'Socio/a en: '|t -}} + {{- user.getRoles()|slice(2)|join(' ')|replace({'socio_': ''}) -}} +
{% endif %}