mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-08 14:35:52 +01:00
Pass the Account object instead of the user name to user.scala.html.
This commit is contained in:
@@ -11,14 +11,12 @@ import org.eclipse.jgit.lib._
|
||||
import org.apache.commons.io.FileUtils
|
||||
import org.eclipse.jgit.treewalk._
|
||||
|
||||
// TODO Should models move to other package?
|
||||
|
||||
class RepositoryViewerController extends RepositoryViewerControllerBase with ProjectService with AccountService
|
||||
|
||||
/**
|
||||
* The repository viewer.
|
||||
*/
|
||||
trait RepositoryViewerControllerBase extends ControllerBase { self: ProjectService =>
|
||||
trait RepositoryViewerControllerBase extends ControllerBase { self: ProjectService with AccountService =>
|
||||
|
||||
// TODO separate to AccountController?
|
||||
/**
|
||||
@@ -27,7 +25,7 @@ trait RepositoryViewerControllerBase extends ControllerBase { self: ProjectServi
|
||||
get("/:owner") {
|
||||
val owner = params("owner")
|
||||
|
||||
html.user(owner, getRepositories(owner, servletContext))
|
||||
html.user(getAccountByUserName(owner).get, getRepositories(owner, servletContext))
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
@(user: String, repositories: List[service.ProjectService.RepositoryInfo])(implicit context: app.Context)
|
||||
@(account: model.Account, repositories: List[service.ProjectService.RepositoryInfo])(implicit context: app.Context)
|
||||
@import context._
|
||||
@main(user){
|
||||
@main(account.userName){
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span4">
|
||||
<div class="block">
|
||||
<div class="block-header-1">Naoki Takezoe</div>
|
||||
<div class="block-header-2">@user</div>
|
||||
<div class="block-header-2">@account.userName</div>
|
||||
</div>
|
||||
<div class="block">
|
||||
<div><i class="icon-home"></i> <a href="http://d.hatena.co.jp/takezoe">http://d.hatena.co.jp/takezoe</a></div>
|
||||
<div><i class="icon-time"></i> <span class="description">Joined on</span> yyyy/mm/dd</div>
|
||||
<div><i class="icon-home"></i> <a href="http://d.hatena.co.jp/takezoe">@account.url</a></div>
|
||||
<div><i class="icon-time"></i> <span class="description">Joined on</span> @account.registeredDate</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span8">
|
||||
|
||||
Reference in New Issue
Block a user