Skip to content

Commit

Permalink
category are displayed according to field anonymousView
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatov committed Aug 9, 2011
1 parent 812b587 commit 7a878a7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/scala/scala/tools/colladoc/page/Template.scala
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,14 @@ class Template(tpl: DocTemplateEntity) extends tools.nsc.doc.html.page.Template(
</div>

/** Render discussion block. */
private def categories: NodeSeq =
Category.findAll(By(Category.valid, true)) map categoryToHtmlWithToggle _
private def categories =
Category.findAll(By(Category.valid, true)) map {
c =>
if (User.loggedIn_? || c.anonymousView.is)
categoryToHtmlWithToggle(c)
else
NodeSeq.Empty
}

private def categoryToHtmlWithToggle(c: Category) = {
val toggle =
Expand Down

0 comments on commit 7a878a7

Please sign in to comment.