Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
1bb9c81f
Commit
1bb9c81f
authored
8 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
issue
#75
comments can be removed from admin panel
parent
bb0635b5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
web/src/main/java/lcsb/mapviewer/bean/FeedbackBean.java
+15
-0
15 additions, 0 deletions
web/src/main/java/lcsb/mapviewer/bean/FeedbackBean.java
web/src/main/webapp/admin/comments.xhtml
+1
-0
1 addition, 0 deletions
web/src/main/webapp/admin/comments.xhtml
with
16 additions
and
0 deletions
web/src/main/java/lcsb/mapviewer/bean/FeedbackBean.java
+
15
−
0
View file @
1bb9c81f
...
@@ -384,6 +384,21 @@ public class FeedbackBean extends AbstractMarkerManagerBean<FullCommentView> imp
...
@@ -384,6 +384,21 @@ public class FeedbackBean extends AbstractMarkerManagerBean<FullCommentView> imp
refreshComments
();
refreshComments
();
}
}
public
void
removeComment
(
CommentView
comment
)
{
try
{
logger
.
debug
(
"Remove comment"
);
if
(
getUserHasCommentPrivilege
())
{
String
commentId
=
comment
.
getIdObject
()
+
""
;
commentService
.
deleteComment
(
userBean
.
getLoggedUser
(),
commentId
,
""
);
}
else
{
sendError
(
"You don't have privilege to remove comment"
);
}
}
catch
(
InvalidArgumentException
e
)
{
sendError
(
"Internal server error"
,
e
);
}
refreshCommentList
();
}
/**
/**
* Returns true if user can manage current comments.
* Returns true if user can manage current comments.
*
*
...
...
This diff is collapsed.
Click to expand it.
web/src/main/webapp/admin/comments.xhtml
+
1
−
0
View file @
1bb9c81f
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
<p:column
sortBy=
"removed"
headerText=
"Removed"
>
<p:column
sortBy=
"removed"
headerText=
"Removed"
>
<h:outputText
value=
"#{comment.removed}"
/>
<h:outputText
value=
"#{comment.removed}"
/>
<p:commandButton
actionListener=
"#{feedbackMB.removeComment(comment)}"
icon=
"ui-icon-closethick"
update=
"commentsDataTable"
rendered=
"#{comment.removed=='NO'}"
value=
"remove"
/>
</p:column>
</p:column>
<p:column
sortBy=
"pinned"
headerText=
"Pinned"
>
<p:column
sortBy=
"pinned"
headerText=
"Pinned"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment