feature: add counter on projects & communities

This commit is contained in:
Jean-Baptiste Pasquier 2021-01-25 12:01:16 +01:00
parent c469606dca
commit 56f2ad647b
2 changed files with 44 additions and 5 deletions

View File

@ -18,6 +18,17 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
div.segment.full.margin-bottom-xlarge
h3.text-color-heading.text-semibold.text-letter-spacing-large(data-trans='communities.subTitle')
solid-widget(name='hubl-admin-community-counter')
template
div(style='float:right')
solid-display(
fields=''
data-src="${src}"
nested-field="community.members"
counter-template="\\\${counter}"
)
span.icon.icon-people.icon-xsmall.margin-right-xxsmall
.segment.table-wrapper
.table
div.table-header.bg-color-third.text-color-heading
@ -28,14 +39,16 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
class='table-body'
bind-user
nested-field='communities'
fields='cell1(community.name), cell2(community)'
fields='cell1(community.name, counter), cell2(community)'
loader-id='loader-admin-community'
class-cell1='segment table-cell half text-center'
class-cell1='segment table-cell half'
class-cell2='segment table-cell half text-center'
class-community.name='text-xlarge text-color-heading text-semibold text-letter-spacing-large ellipsis'
class-community.name='segment block margin-bottom-xxsmall text-xlarge text-color-heading text-semibold text-letter-spacing-large ellipsis'
widget-community='hubl-action-community'
action-counter="counter"
widget-counter="hubl-admin-community-counter"
order-asc='community.name'
)

View File

@ -14,6 +14,28 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
data-trans='project.list.buttonCreate'
)
solid-widget(name='hubl-admin-project-counter')
template
div(style='float:right')
solid-display(
fields=''
data-src="${src}"
nested-field="members"
counter-template="\\\${counter}"
)
span.icon.icon-people.icon-xsmall.margin-right-xxsmall
solid-widget(name='hubl-admin-project-counter-alternate')
template
div(style='float:right')
solid-display(
fields=''
data-src="${src}"
nested-field="project.members"
counter-template="\\\${counter}"
)
span.icon.icon-people.icon-xsmall.margin-right-xxsmall
.segment.table-wrapper
.table
@ -82,7 +104,7 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
bind-user
nested-field="projects"
fields='cell1(project.customer.name, project.name), cell2(project.members), cell3(project.captain), cell4(leaveButton)'
fields='cell1(project.customer.name, counter, project.name), cell2(project.members), cell3(project.captain), cell4(leaveButton)'
loader-id='loader-admin-projects'
class-cell1='segment table-cell quarter text-left whitespace-normal'
@ -98,6 +120,8 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
widget-project.captain='hubl-project-captain'
widget-project.members='hubl-project-admins'
action-counter="counter"
widget-counter="hubl-admin-project-counter-alternate"
order-by="project.name"
)
@ -127,7 +151,7 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
class='table-body'
data-src=`${endpoints.projects || endpoints.get.projects}joinable/`
fields='cell1(customer.name, name), cell2(members), cell3(captain), cell4(joinButton)'
fields='cell1(customer.name, counter, name), cell2(members), cell3(captain), cell4(joinButton)'
loader-id='loader-admin-projects'
class-cell1='segment table-cell quarter text-left whitespace-normal'
@ -143,6 +167,8 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
widget-captain='hubl-project-captain'
widget-members='hubl-project-admins'
action-counter="counter"
widget-counter="hubl-admin-project-counter"
order-by="name"
)