Added edit post button

This commit is contained in:
Pierre 2018-01-14 08:09:04 +01:00
parent 756b097138
commit e67870a086
2 changed files with 22 additions and 3 deletions

View File

@ -24,12 +24,14 @@
}
/**
* Posts deletion
* Posts deletion and edition
*/
.post .del-post-div a {
.post .del-post-div a,
.post .edit-post-div a {
color: #b5bbc8;
}
.post .del-post-div a:active {
.post .del-post-div a:active,
.post .edit-post-div a:active {
color: black;
}

View File

@ -168,6 +168,23 @@ ComunicWeb.components.posts.ui = {
}
//Add a button to edit the post if the user is allowed
if(infos.user_access == "full"){
var editButtonDiv = createElem2({
appendTo: topRightArea,
type: "div",
class: "edit-post-div"
});
var editButtonLink = createElem2({
appendTo: editButtonDiv,
type: "a",
innerHTML: "<i class='fa fa-pencil'></i>"
});
}
//Add a button to delete the post if the user is allowed
if(infos.user_access == "full" || infos.user_access == "intermediate"){