mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 13:35:50 +01:00
(refs #437)Show author at repo file list view
This commit is contained in:
@@ -64,7 +64,7 @@ trait WikiService {
|
||||
if(!JGitUtil.isEmpty(git)){
|
||||
JGitUtil.getFileList(git, "master", ".").find(_.name == pageName + ".md").map { file =>
|
||||
WikiPageInfo(file.name, StringUtil.convertFromByteArray(git.getRepository.open(file.id).getBytes),
|
||||
file.committer, file.time, file.commitId)
|
||||
file.author, file.time, file.commitId)
|
||||
}
|
||||
} else None
|
||||
}
|
||||
|
||||
@@ -47,15 +47,15 @@ object JGitUtil {
|
||||
* @param id the object id
|
||||
* @param isDirectory whether is it directory
|
||||
* @param name the file (or directory) name
|
||||
* @param time the last modified time
|
||||
* @param message the last commit message
|
||||
* @param commitId the last commit id
|
||||
* @param committer the last committer name
|
||||
* @param time the last modified time
|
||||
* @param author the last committer name
|
||||
* @param mailAddress the committer's mail address
|
||||
* @param linkUrl the url of submodule
|
||||
*/
|
||||
case class FileInfo(id: ObjectId, isDirectory: Boolean, name: String, time: Date, message: String, commitId: String,
|
||||
committer: String, mailAddress: String, linkUrl: Option[String])
|
||||
case class FileInfo(id: ObjectId, isDirectory: Boolean, name: String, message: String, commitId: String,
|
||||
time: Date, author: String, mailAddress: String, linkUrl: Option[String])
|
||||
|
||||
/**
|
||||
* The commit data.
|
||||
@@ -240,11 +240,11 @@ object JGitUtil {
|
||||
objectId,
|
||||
fileMode == FileMode.TREE || fileMode == FileMode.GITLINK,
|
||||
name,
|
||||
commit.getCommitterIdent.getWhen,
|
||||
getSummaryMessage(commit.getFullMessage, commit.getShortMessage),
|
||||
commit.getName,
|
||||
commit.getCommitterIdent.getName,
|
||||
commit.getCommitterIdent.getEmailAddress,
|
||||
commit.getAuthorIdent.getWhen,
|
||||
commit.getAuthorIdent.getName,
|
||||
commit.getAuthorIdent.getEmailAddress,
|
||||
linkUrl)
|
||||
}
|
||||
}.sortWith { (file1, file2) =>
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
<td colspan="4" class="latest-commit">
|
||||
<div>
|
||||
@avatar(latestCommit, 20)
|
||||
@user(latestCommit.committerName, latestCommit.committerEmailAddress, "username strong")
|
||||
<span class="muted">@datetime(latestCommit.commitTime)</span>
|
||||
@user(latestCommit.authorName, latestCommit.authorEmailAddress, "username strong")
|
||||
<span class="muted">@datetime(latestCommit.authorTime)</span>
|
||||
<div class="pull-right align-right monospace" style="line-height: 18px;">
|
||||
<a href="@url(repository)/commit/@latestCommit.id" class="commit-id"><span class="muted">latest commit</span> @latestCommit.id.substring(0, 10)</a>
|
||||
</div>
|
||||
@@ -83,7 +83,7 @@
|
||||
</td>
|
||||
<td class="mute">
|
||||
<a href="@url(repository)/commit/@file.commitId" class="commit-message">@link(file.message, repository)</a>
|
||||
[@user(file.committer, file.mailAddress)]
|
||||
[@user(file.author, file.mailAddress)]
|
||||
</td>
|
||||
<td style="text-align: right;">@datetime(file.time)</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user