Skip to content

Commit

Permalink
#99 closed: "Add support for Category.valid field"
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatov committed Aug 1, 2011
1 parent 39f76c0 commit 4c8ed66
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/main/scala/scala/tools/colladoc/model/mapper/User.scala
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ object User extends User with KeyedMetaMapper[Long, User] {
Noop
}
)

}
</td>
<td>
Expand All @@ -343,6 +342,14 @@ object User extends User with KeyedMetaMapper[Long, User] {
)
}
</td>
<td>
{
SHtml.ajaxCheckbox(
c.valid,
bool => { c.valid(bool).save; Noop }
)
}
</td>
</tr>

def categoriesList =
Expand All @@ -353,6 +360,7 @@ object User extends User with KeyedMetaMapper[Long, User] {
<th>Name</th>
<th>Allowed to view for anonymous</th>
<th>Allowed to post for anonymous</th>
<th>Valid</th>
</tr>
{ Category.all map categoryToHtml _ }
</table>
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/scala/tools/colladoc/page/Template.scala
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class Template(tpl: DocTemplateEntity) extends tools.nsc.doc.html.page.Template(

/** Render discussion block. */
private def categories: NodeSeq =
Category.all map categoryToHtmlWithToggle _
Category.findAll(By(Category.valid, true)) map categoryToHtmlWithToggle _

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

0 comments on commit 4c8ed66

Please sign in to comment.