Skip to content

Commit

Permalink
Merge pull request #68 from interdruper/67-improve_members_view
Browse files Browse the repository at this point in the history
#67 fixed. Improves the members view.
  • Loading branch information
interdruper authored Jul 16, 2017
2 parents f87d7e8 + 92a4bf5 commit 200b000
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 7 deletions.
131 changes: 124 additions & 7 deletions sites/default/conf/views.view.members.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dependencies:
config:
- core.entity_view_mode.user.compact
- system.menu.main
- user.role.socio
module:
- user
id: members
Expand Down Expand Up @@ -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'
Expand All @@ -62,9 +66,6 @@ display:
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
tags:
previous: ‹‹
next: ››
style:
type: default
row:
Expand Down Expand Up @@ -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:
Expand All @@ -223,16 +327,28 @@ display:
value: "<h2>Socios</h2>\n<p>\n ¿Ya eres socio y no apareces en este listado? <a href=\"[site:login-url-or-user-url]\">Habilítalo ahora</a>\n</p>"
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: { }
Expand All @@ -253,6 +369,7 @@ display:
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- url.query_args
- user.permissions
tags: { }
4 changes: 4 additions & 0 deletions themes/custom/aed_th/templates/user/user.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@
<article{{ attributes.addClass('profile') }}>
{% if content %}
{{- content -}}
<div class="user-roles">
<span class="label">{{- 'Socio/a en: '|t -}}</span>
{{- user.getRoles()|slice(2)|join(' ')|replace({'socio_': ''}) -}}
</div>
{% endif %}
</article>

0 comments on commit 200b000

Please sign in to comment.