Skip to content

Commit

Permalink
hide issue watch when not login
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Apr 28, 2017
1 parent 5218564 commit 88026a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 0 additions & 6 deletions routers/repo/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,6 @@ func ViewIssue(ctx *context.Context) {
IsWatching: models.IsWatching(ctx.User.ID, ctx.Repo.Repository.ID),
}
}
} else {
iw = &models.IssueWatch{
UserID: 0,
IssueID: issue.ID,
IsWatching: false,
}
}
ctx.Data["IssueWatch"] = iw

Expand Down
2 changes: 2 additions & 0 deletions templates/repo/issue/view_content/sidebar.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
</div>
</div>

{{if $.IssueWatch}}
<div class="ui divider"></div>

<div class="ui watching">
Expand All @@ -119,5 +120,6 @@
</form>
</div>
</div>
{{end}}
</div>
</div>

0 comments on commit 88026a4

Please sign in to comment.