mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 05:49:22 +00:00
Added edit post button
This commit is contained in:
parent
756b097138
commit
e67870a086
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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"){
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user