Merge pull request #2538 from betagouv/improve-messagerie-css

Improve messagerie CSS
This commit is contained in:
Pierre de La Morinerie 2018-09-11 10:06:36 +02:00 committed by GitHub
commit c37e672112
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 56 additions and 52 deletions

View file

@ -0,0 +1,37 @@
@import "colors";
@import "constants";
.message {
display: flex;
align-items: flex-start;
margin-bottom: $default-padding;
padding: $default-padding;
background: #FFFFFF;
border-radius: 3px;
.person-icon {
margin-right: $default-spacer;
}
h2 {
margin-bottom: $default-spacer;
}
.mail {
font-weight: bold;
}
.guest,
.date {
font-size: 12px;
color: $grey;
}
.date {
float: right;
}
.attachment-link {
margin-top: $default-spacer;
}
}

View file

@ -1,58 +1,25 @@
@import "colors";
@import "common";
@import "constants";
.messagerie {
.messages-list {
max-height: 350px;
overflow-y: scroll;
border: 1px solid $border-grey;
background: $light-grey;
padding: 2 * $default-spacer;
margin-bottom: $default-spacer;
border-radius: 4px;
.messages-list {
max-height: 350px;
overflow-y: scroll;
border: 1px solid $border-grey;
background: $light-grey;
padding: 2 * $default-spacer;
margin-bottom: $default-spacer;
border-radius: 4px;
> li {
display: flex;
align-items: flex-start;
margin-bottom: $default-padding;
padding: $default-padding;
background: #FFFFFF;
width: 80%;
border-radius: 3px;
.message {
width: 80%;
&.from-me {
margin-left: auto;
}
&.from-me {
margin-left: auto;
}
}
}
.person-icon {
margin-right: $default-spacer;
}
h2 {
margin-bottom: $default-spacer;
}
.mail {
font-weight: bold;
}
.guest,
.date {
font-size: 12px;
color: $grey;
}
.date {
float: right;
}
.attachment-link {
margin-top: $default-spacer;
}
.messagerie {
.message-textarea {
margin-bottom: $default-spacer;
}

View file

@ -44,10 +44,6 @@ th {
padding-left: 0;
max-height: none;
li {
margin-bottom: 40px;
}
h2 {
font-size: 110%;
}
@ -58,6 +54,10 @@ th {
}
}
.message {
margin-bottom: 40px;
}
.updated-at {
display: none;
}

View file

@ -1,7 +1,7 @@
.messagerie.container
%ul.messages-list
- dossier.commentaires.each do |commentaire|
%li{ class: commentaire_is_from_me_class(commentaire, user_email) }
%li.message{ class: commentaire_is_from_me_class(commentaire, user_email) }
= render partial: "shared/dossiers/messages/message", locals: { commentaire: commentaire, user_email: user_email, messagerie_seen_at: messagerie_seen_at }
= render partial: "shared/dossiers/messages/form", locals: { commentaire: new_commentaire, form_url: form_url }