mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-01 11:06:06 +01:00
Fix repository description handling.
This commit is contained in:
@@ -16,11 +16,11 @@ class CreateRepositoryController extends CreateRepositoryControllerBase
|
||||
*/
|
||||
trait CreateRepositoryControllerBase extends ControllerBase { self: RepositoryService with WikiService =>
|
||||
|
||||
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)
|
||||
|
||||
/**
|
||||
@@ -37,7 +37,7 @@ trait CreateRepositoryControllerBase extends ControllerBase { self: RepositorySe
|
||||
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)
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
/
|
||||
<a href="@path/@repository.owner/@repository.name">@repository.name</a>
|
||||
</div>
|
||||
@if(repository.repository.description.isDefined){
|
||||
<div>@repository.repository.description</div>
|
||||
}
|
||||
<div><span class="description small">Last updated: @repository.repository.lastActivityDate</span></div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -26,7 +26,9 @@
|
||||
@repositories.map { repository =>
|
||||
<div class="block">
|
||||
<div class="block-header-2"><a href="@path/@repository.owner/@repository.name">@repository.name</a></div>
|
||||
@if(repository.repository.description.isDefined){
|
||||
<div>@repository.repository.description</div>
|
||||
}
|
||||
<div><span class="description small">Last updated: @repository.repository.lastActivityDate</span></div>
|
||||
</div>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user