FIX task comment design
This commit is contained in:
parent
4b6553d360
commit
ad017495f4
@ -213,3 +213,5 @@ AllowCommentOnTask=Allow user comments on tasks
|
||||
TaskCommentLinks=Comments
|
||||
TaskNbComments=Number of comments
|
||||
TaskComment=Task's comments space
|
||||
CommentAdded=Comment added
|
||||
CommentDeleted=Comment deleted
|
||||
|
||||
@ -212,3 +212,5 @@ AllowCommentOnTask=Autoriser les commentaires entre utilisateurs sur les tâches
|
||||
TaskCommentLinks=Commentaires
|
||||
TaskNbComments=Nombre de commentaires
|
||||
TaskComment=Tâches espace commentaires
|
||||
CommentAdded=Commentaire ajouté avec succès
|
||||
CommentDeleted=Commentaire supprimé avec succès
|
||||
|
||||
@ -81,6 +81,7 @@ if ($action == 'addcomment')
|
||||
$object->entity = $conf->entity;
|
||||
if ($object->create($user) > 0)
|
||||
{
|
||||
setEventMessages($langs->trans("CommentAdded"), null, 'mesgs');
|
||||
header('Location: '.DOL_URL_ROOT.'/projet/tasks/comment.php?id='.$id.($withproject?'&withproject=1':''));
|
||||
exit;
|
||||
}
|
||||
@ -97,6 +98,7 @@ if ($action == 'deletecomment')
|
||||
{
|
||||
if ($object->delete($user) > 0)
|
||||
{
|
||||
setEventMessages($langs->trans("CommentDeleted"), null, 'mesgs');
|
||||
header('Location: '.DOL_URL_ROOT.'/projet/tasks/comment.php?id='.$id.($withproject?'&withproject=1':''));
|
||||
exit;
|
||||
}
|
||||
@ -366,24 +368,35 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<div class="width25p float"> </div>';
|
||||
}
|
||||
|
||||
print '<div class="width75p float comment" style="background-color:#'.$TColors[$fk_user]['bgcolor'].'">';
|
||||
print '<div class="comment-description">';
|
||||
print $comment->description;
|
||||
print '</div>';
|
||||
print '<div class="comment-info">';
|
||||
print '<div class="width75p float comment comment-table" style="background-color:#'.$TColors[$fk_user]['bgcolor'].'">';
|
||||
print '<div class="comment-info comment-cell">';
|
||||
if (! empty($user->photo))
|
||||
{
|
||||
print Form::showphoto('userphoto', $userstatic, 80, 0, 0, '', 'small', 0, 1).'<br/>';
|
||||
}
|
||||
print $langs->trans('User').' : '.$userstatic->getNomUrl().'<br/>';
|
||||
print $langs->trans('Date').' : '.dol_print_date($comment->datec,'dayhoursec');
|
||||
print '</div>'; // End comment-info
|
||||
|
||||
print '<div class="comment-cell comment-right">';
|
||||
print '<div class="comment-table width100p">';
|
||||
print '<div class="comment-description comment-cell">';
|
||||
print $comment->description;
|
||||
print '</div>'; // End comment-description
|
||||
if(($first && $fk_user == $user->id) || $user->admin == 1) {
|
||||
print '<br/> <a href="?action=deletecomment&id='.$id.'&withproject=1&idcomment='.$comment->id.'">'.$langs->trans('Delete').'</a>';
|
||||
print '<a class="comment-delete comment-cell" href="'.DOL_URL_ROOT.'/projet/tasks/comment.php?action=deletecomment&id='.$id.'&withproject=1&idcomment='.$comment->id.'" title="'.$langs->trans('Delete').'">';
|
||||
print img_picto('', 'delete.png');
|
||||
print '</a>';
|
||||
}
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
print '</div>'; // End comment-table
|
||||
print '</div>'; // End comment-right
|
||||
print '</div>'; // End comment
|
||||
|
||||
if($comment->fk_user != $user->id) {
|
||||
print '<div class="width25p float"> </div>';
|
||||
}
|
||||
print '<div class="clearboth"></div>';
|
||||
print '</div>';
|
||||
print '</div>'; // end 100p
|
||||
|
||||
$first = false;
|
||||
}
|
||||
|
||||
@ -3817,19 +3817,46 @@ pre#editfilecontentaceeditorid {
|
||||
#comment div {
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
||||
#comment .comment {
|
||||
border-radius:7px;
|
||||
padding:7px 10px;
|
||||
margin-bottom:10px;
|
||||
overflow:hidden;
|
||||
}
|
||||
#comment .comment-table {
|
||||
display:table;
|
||||
height:100%;
|
||||
}
|
||||
#comment .comment-cell {
|
||||
display:table-cell;
|
||||
}
|
||||
#comment .comment-info {
|
||||
font-size:0.8em;
|
||||
margin-top:5px;
|
||||
border-right:1px solid #dedede;
|
||||
margin-right:10px;
|
||||
width:160px;
|
||||
text-align:center;
|
||||
background:rgba(255,255,255,0.5);
|
||||
vertical-align:middle;
|
||||
padding:10px 2px;
|
||||
}
|
||||
#comment .comment-info a {
|
||||
color:inherit;
|
||||
}
|
||||
#comment .comment-right {
|
||||
vertical-align:top;
|
||||
}
|
||||
#comment .comment-description {
|
||||
padding:10px;
|
||||
vertical-align:top;
|
||||
}
|
||||
#comment .comment-delete {
|
||||
width: 100px;
|
||||
text-align:center;
|
||||
vertical-align:middle;
|
||||
}
|
||||
#comment .comment-delete:hover {
|
||||
background:rgba(250,20,20,0.8);
|
||||
}
|
||||
#comment textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user