Skip to content
Snippets Groups Projects
Unverified Commit 65c6b77f authored by Calum Mackervoy's avatar Calum Mackervoy Committed by Gaëlle Morin
Browse files

feature: admin of a circle displayed

- CSS added
- architecture reworked
- new field 'is-admin' used
- members field used instead of team field.
parent 92840cf8
No related branches found
No related tags found
1 merge request!89Circle admin role
...@@ -25,10 +25,10 @@ sib-router(default-route='circle-profile', hidden) ...@@ -25,10 +25,10 @@ sib-router(default-route='circle-profile', hidden)
sib-display.block( sib-display.block(
bind-resources bind-resources
fields='team' fields='members'
multiple-team='' multiple-members=''
widget-team='circle-team-template' widget-members='circle-team-template'
) )
div.box-button div.box-button
......
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
@import 'howto'; @import 'howto';
@import 'sidebar'; @import 'sidebar';
@import 'skills'; @import 'skills';
@import 'user-role'; @import 'tags';
\ No newline at end of file \ No newline at end of file
%tag-role {
border: 1px solid $color-45-95-54;
border-radius: 3px;
color: $color-210-4-50;
font-size: 1.4rem;
font-weight: 400;
margin-right: 0.6rem;
padding: 0.2rem 0.98rem;
}
%tag-admin {
border: 1px solid $color-244-73-62;
border-radius: 3px;
color: $color-244-73-62;
font-size: 1.4rem;
font-weight: 400;
margin-left: 0.6rem;
padding: 0.3rem 0.98rem;
}
\ No newline at end of file
%user-role {
border: 1px solid $color-45-95-54;
border-radius: 3px;
color: $color-210-4-50;
font-size: 1.4rem;
font-weight: 400;
margin-right: 0.4rem;
padding: 0.2rem 0.98rem;
}
\ No newline at end of file
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
display: flex; display: flex;
[name='groups'] { [name='groups'] {
@extend %user-role; @extend %tag-role;
} }
} }
} }
......
...@@ -15,87 +15,84 @@ ...@@ -15,87 +15,84 @@
} }
} }
>div { /* peut-être à mettre dans main.scss */ /* peut-être à mettre dans main.scss */
>sib-multiple { circle-team-template>sib-display>div {
display: grid;
grid-column-gap: 1.6rem;
grid-template-columns: 7vh auto;
grid-template-rows: repeat(2, 5.2vh);
>[name='account.picture'] {
align-items: center;
align-self: center;
background-color: $color-213-20-91;
border-radius: 50%;
display: flex;
grid-column: 1 / span 1;
grid-row: 1 / span 2;
height: 7vh;
justify-content: center;
overflow: hidden;
position: relative;
width: 7vh;
img {
background-color: white;
height: 100%;
left: 0;
object-fit: cover;
position: absolute;
top: 0;
width: 100%;
}
label { object {
display: none; height: 45%;
width: 45%;
} }
}
>div>circle-team-template[name='team']>sib-display>div { >[name='sup'] {
display: grid; align-items: center;
grid-column-gap: 1.6rem; align-self: end;
grid-template-columns: 7vh auto; display: flex;
grid-template-rows: repeat(2, 5.2vh); grid-column: 2 / span 1;
grid-row: 1 / span 1;
>[name='account.picture'] { margin-bottom: 0.50rem;
align-items: center;
align-self: center; .user-name {
background-color: $color-213-20-91; font-weight: 600;
border-radius: 50%; }
display: flex;
grid-column: 1 / span 1; .tag-group {
grid-row: 1 / span 2; display: flex;
height: 7vh; margin-left: 0.6rem;
justify-content: center;
overflow: hidden;
position: relative;
width: 7vh;
img {
background-color: white;
height: 100%;
left: 0;
object-fit: cover;
position: absolute;
top: 0;
width: 100%;
}
object {
height: 45%;
width: 45%;
}
}
>[name='sup'] { [name='user.groups'] {
align-self: end; @extend %tag-role;
display: flex;
grid-column: 2 / span 1;
grid-row: 1 / span 1;
margin-bottom: 0.50rem;
[name='name'] {
font-weight: 600;
}
sib-multiple {
display: flex;
margin-left: 1rem;
[name='groups'] {
@extend %user-role;
}
}
} }
}
.tag-admin:not(:empty) {
@extend %tag-admin;
}
}
>[name='sub'] {
align-self: start;
grid-column: 2 / span 1;
grid-row: 2 / span 1;
margin-top: 0.50rem;
>.city:not(:empty) {
@include mdi('atom');
align-items: center;
display: flex;
>[name='sub'] { &::before {
align-self: start; color: $color-43-100-50;
grid-column: 2 / span 1; margin-right: 0.50rem;
grid-row: 2 / span 1;
margin-top: 0.50rem;
>[name$='profile.city']:not(:empty) {
@include mdi('atom');
align-items: center;
display: flex;
&::before {
color: $color-43-100-50;
margin-right: 0.50rem;
}
}
} }
} }
} }
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
display: flex; display: flex;
[name='groups'] { [name='groups'] {
@extend %user-role; @extend %tag-role;
} }
} }
} }
......
...@@ -88,7 +88,7 @@ sib-job-board { ...@@ -88,7 +88,7 @@ sib-job-board {
} }
>* { >* {
@extend %user-role; @extend %tag-role;
} }
} }
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
} }
member-info-groups { member-info-groups {
@extend %user-role; @extend %tag-role;
} }
#members-list { #members-list {
......
...@@ -117,11 +117,6 @@ ...@@ -117,11 +117,6 @@
@include mdi('atom'); @include mdi('atom');
align-items: center; align-items: center;
display: flex; display: flex;
&::before {
color: $color-43-100-50;
margin-right: 0.50rem;
}
} }
} }
} }
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
padding-left: 1.4rem; padding-left: 1.4rem;
groups-name { groups-name {
@extend %user-role; @extend %tag-role;
} }
} }
} }
......
...@@ -3,14 +3,23 @@ include hd-user-avatar.pug ...@@ -3,14 +3,23 @@ include hd-user-avatar.pug
sib-widget(name='circle-team-template') sib-widget(name='circle-team-template')
template template
sib-display( sib-display(
data-src="${await value}" data-src='${await value}'
fields='account.picture, sup(name, groups), sub(profile.city)' fields='account.picture, sup(user.name, is_admin, user.groups), sub(user.profile.city)'
class-user.name='user-name'
class-is_admin='tag-admin'
class-user.groups='tag-group'
class-user.profile.city='city'
widget-account.picture='hd-user-avatar' widget-account.picture='hd-user-avatar'
widget-groups='hd-user-groups' widget-is_admin='hd-user-admin'
widget-user.groups='hd-user-groups'
multiple-groups='' multiple-user.groups=''
) )
sib-widget(name='hd-user-admin')
template ${await value ? "Administrator" : ""}
sib-widget(name='hd-user-groups') sib-widget(name='hd-user-groups')
template ${await value.name} template ${await value.name}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment