Disable comments when a poll is not published

pull/1/head
yflory 7 years ago
parent aa744567ed
commit dd141b5c9f

@ -679,7 +679,8 @@ define([
]), ]),
h('h2#cp-app-poll-comments-list-title', Msg.poll_comment_list), h('h2#cp-app-poll-comments-list-title', Msg.poll_comment_list),
h('div#cp-app-poll-comments-list') h('div#cp-app-poll-comments-list')
]) ]),
h('div#cp-app-poll-nocomments', Msg.poll_comment_disabled)
]) ])
]) ])
]) ])

@ -267,6 +267,8 @@ define(function () {
out.poll_comment_submit = "Envoyer"; out.poll_comment_submit = "Envoyer";
out.poll_comment_remove = "Supprimer ce commentaire"; out.poll_comment_remove = "Supprimer ce commentaire";
out.poll_comment_disabled = "Publiez ce sondage en utilisant le bouton ✓ afin d'activer les commentaires.";
// Canvas // Canvas
out.canvas_clear = "Nettoyer"; out.canvas_clear = "Nettoyer";
out.canvas_delete = "Supprimer la sélection"; out.canvas_delete = "Supprimer la sélection";

@ -271,6 +271,8 @@ define(function () {
out.poll_comment_submit = "Send"; out.poll_comment_submit = "Send";
out.poll_comment_remove = "Delete this comment"; out.poll_comment_remove = "Delete this comment";
out.poll_comment_disabled = "Publish this poll using the ✓ button to enable the comments.";
// Canvas // Canvas
out.canvas_clear = "Clear"; out.canvas_clear = "Clear";
out.canvas_delete = "Delete selection"; out.canvas_delete = "Delete selection";

@ -125,6 +125,7 @@ table#cp-app-poll-table {
min-width: 80%; min-width: 80%;
width: 80%; width: 80%;
min-height: 200px; min-height: 200px;
height: 200px;
border: 1px solid black; border: 1px solid black;
.CodeMirror-placeholder { .CodeMirror-placeholder {
color: #777; color: #777;
@ -149,18 +150,26 @@ table#cp-app-poll-table {
max-height: 20em; max-height: 20em;
} }
} }
.cp-app-poll-published { div.cp-app-poll-published {
#cp-app-poll-description { div.cp-app-poll-realtime {
display: none; #cp-app-poll-description {
&~ .CodeMirror {
display: none; display: none;
&~ .CodeMirror {
display: none;
}
} }
} #cp-app-poll-description-published {
#cp-app-poll-description-published { display: block;
display: block; &:empty {
&:empty { display: none;
}
}
#cp-app-poll-nocomments {
display: none; display: none;
} }
#cp-app-poll-comments {
display: block;
}
} }
} }
@ -490,11 +499,18 @@ div.cp-app-poll-realtime {
display: none; display: none;
} }
} }
#cp-app-poll-nocomments {
color: #999;
text-align: center;
margin: 20px;
font: @colortheme_app-font;
}
#cp-app-poll-comments { #cp-app-poll-comments {
width: 50%; width: 50%;
margin: 20px auto; margin: 20px auto;
min-width: 400px; min-width: 400px;
padding-bottom: 5px; padding-bottom: 5px;
display: none;
button { button {
border-radius: 0; border-radius: 0;
} }

Loading…
Cancel
Save