Skip to content

Commit

Permalink
#95 closed: "Provide better administration for categories"
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatov committed Jul 29, 2011
1 parent 2195bc8 commit 2ce17a5
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 7 deletions.
44 changes: 40 additions & 4 deletions src/main/scala/scala/tools/colladoc/model/mapper/User.scala
Original file line number Diff line number Diff line change
Expand Up @@ -312,14 +312,50 @@ object User extends User with KeyedMetaMapper[Long, User] {
Replace("categories_list", categoriesList)
}

def categoryToHtml(c: Category) = <li>{ c.name }</li>
def categoryToHtml(c: Category) =
<tr>
<td>
{
SHtml.ajaxText(
c.name.is,
text => {
if (c.name.is != text )
c.name(text).save
Noop
}
)

}
</td>
<td>
{
SHtml.ajaxCheckbox(
c.anonymousView,
bool => { c.anonymousView(bool).save; Noop }
)
}
</td>
<td>
{
SHtml.ajaxCheckbox(
c.anonymousPost,
bool => { c.anonymousPost(bool).save; Noop }
)
}
</td>
</tr>

def categoriesList =
<div id="categories_list">
<div id="categories_table">
<h3>Categories list</h3>
<ul>
<table>
<tr>
<th>Name</th>
<th>Allowed to view for anonymous</th>
<th>Allowed to post for anonymous</th>
</tr>
{ Category.all map categoryToHtml _ }
</ul>
</table>
</div>

val form =
Expand Down
17 changes: 14 additions & 3 deletions src/main/webapp/cosettings.css
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,22 @@
padding-top: 0.2em;
}

#discussions_settings li {
list-style: none;
margin: 5px;
#categories_table td {
border-bottom: 1px solid #E5E5E5;
padding: 10px;
}

#categories_table th {
font-weight: bold;
padding: 10px;
}

#categories_table tr {
margin: 50px;
}

.test {margin: 5px;}

#discussions_settings h3 {
font-weight: bold;
font-size: 120%;
Expand Down

0 comments on commit 2ce17a5

Please sign in to comment.