Skip to content
Snippets Groups Projects
page-circle-edit.pug 1.63 KiB
#circle-edit.content-box.with-padding.with-form.full-width

  include templates/hd-user-avatar.pug

  sib-widget(name='circle-team-template')
    template
      sib-widget(name='hd-user-groups')
        template ${await value.name}

      sib-display(
        data-src='${await value}'
        fields='account.picture, sup(name, groups), sub(profile.city)'

        widget-account.picture='hd-user-avatar'
        widget-groups='hd-user-groups'

        multiple-groups=''
      )

      //-div(name='team')
        div(name='user.thumb')
          span ${await value.name}
          sib-display(
          data-src="${await value.groups}",
          fields='name'
        )
        span ${await value.profile.city}

  sib-widget(name='circle-delete-template')
    template
      sib-delete(
        data-src="${await value['@id']}"
        data-label='Delete from circle'
        resourceDeleted=''
      )

  h1 Edit your circle
  
  sib-form.block(
    bind-resources
    
    fields='block-circle__info(name, owner), description'
    range-owner=`${endpoints.users}`

    label-owner='owner'

    class-name='form-label is-light is-half-width'
    class-owner='form-label is-light is-half-width member-select'
    class-description='form-label is-light is-full-width'

    widget-owner='sib-form-auto-completion'
    widget-description='sib-form-textarea'
  )
  
  h3 List of members

  div.table-header
    div.cell.un Name
    div.cell.deux Status
    
  sib-display.table-body(
    bind-resources
    fields='team, members'

    multiple-team=''
    multiple-members=''

    widget-team='circle-team-template'
    widget-members='circle-delete-template'
  )