Skip to content

Commit

Permalink
history: Hide editing history from anonymous user
Browse files Browse the repository at this point in the history
  • Loading branch information
doortts committed Mar 29, 2017
1 parent 8a3d498 commit 1c7b236
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
16 changes: 11 additions & 5 deletions app/views/board/view.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,17 @@
}
</a>
</div>
@if(post.history != null){
<div class="posting-history">
<a href="#-yona-posting-history" data-toggle="modal">@Messages("change.history")</a>
@common.partial_history(post)
</div>
@if(StringUtils.isNotEmpty(post.history)){
@if(UserApp.currentUser().isAnonymous){
<div class="posting-history">
<a href="@routes.UserApp.loginForm()[email protected](project.owner, project.name, post.getNumber)" data-toggle="modal">@Messages("change.history")</a>
</div>
} else {
<div class="posting-history">
<a href="#-yona-posting-history" data-toggle="modal">@Messages("change.history")</a>
@common.partial_history(post)
</div>
}
}
@if(StringUtils.isEmpty(post.body)){
<div class="content empty-content"></div>
Expand Down
14 changes: 10 additions & 4 deletions app/views/issue/view.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,16 @@
</a>
</div>
@if(StringUtils.isNotEmpty(issue.history)){
<div class="posting-history">
<a href="#-yona-posting-history" data-toggle="modal">@Messages("change.history")</a>
@common.partial_history(issue)
</div>
@if(UserApp.currentUser().isAnonymous){
<div class="posting-history">
<a href="@routes.UserApp.loginForm()[email protected](project.owner, project.name, issue.getNumber)" data-toggle="modal">@Messages("change.history")</a>
</div>
} else {
<div class="posting-history">
<a href="#-yona-posting-history" data-toggle="modal">@Messages("change.history")</a>
@common.partial_history(issue)
</div>
}
}
@if(StringUtils.isEmpty(issue.body)){
<div class="content empty-content"></div>
Expand Down

0 comments on commit 1c7b236

Please sign in to comment.