Conflicts:
	src/main/scala/app/SettingsController.scala
This commit is contained in:
takezoe
2013-06-05 01:49:46 +09:00
25 changed files with 366 additions and 48 deletions

View File

@@ -18,11 +18,11 @@ class CreateRepositoryController extends CreateRepositoryControllerBase
trait CreateRepositoryControllerBase extends ControllerBase {
self: RepositoryService with WikiService with UsersOnlyAuthenticator =>
case class RepositoryCreationForm(name: String, description: String) // TODO Option?
case class RepositoryCreationForm(name: String, description: Option[String])
val form = mapping(
"name" -> trim(label("Repository name", text(required, maxlength(40), repository))),
"description" -> trim(label("Description" , text()))
"description" -> trim(label("Description" , optional(text())))
)(RepositoryCreationForm.apply)
/**
@@ -39,7 +39,7 @@ trait CreateRepositoryControllerBase extends ControllerBase {
val loginUserName = context.loginAccount.get.userName
// Insert to the database at first
createRepository(form.name, loginUserName, Some(form.description))
createRepository(form.name, loginUserName, form.description)
// Create the actual repository
val gitdir = getRepositoryDir(loginUserName, form.name)