diff --git a/src/main/scala/app/RepositoryViewerController.scala b/src/main/scala/app/RepositoryViewerController.scala index 6b8d2ad..3addf62 100644 --- a/src/main/scala/app/RepositoryViewerController.scala +++ b/src/main/scala/app/RepositoryViewerController.scala @@ -117,7 +117,7 @@ val (logs, hasNext) = JGitUtil.getCommitLog(Git.open(getRepositoryDir(owner, repository)), branchName, page, 30) - html.commits(Nil, branchName, JGitUtil.getRepositoryInfo(owner, repository, servletContext), + repo.html.commits(Nil, branchName, JGitUtil.getRepositoryInfo(owner, repository, servletContext), logs.splitWith{ (commit1, commit2) => view.helpers.date(commit1.time) == view.helpers.date(commit2.time) }, page, hasNext) @@ -135,7 +135,7 @@ val (logs, hasNext) = JGitUtil.getCommitLog(Git.open(getRepositoryDir(owner, repository)), branchName, page, 30, path) - html.commits(path.split("/").toList, branchName, JGitUtil.getRepositoryInfo(owner, repository, servletContext), + repo.html.commits(path.split("/").toList, branchName, JGitUtil.getRepositoryInfo(owner, repository, servletContext), logs.splitWith{ (commit1, commit2) => view.helpers.date(commit1.time) == view.helpers.date(commit2.time) }, page, hasNext) @@ -183,7 +183,7 @@ val viewer = if(FileTypeUtil.isImage(path)) "image" else if(large) "large" else "text" val content = ContentInfo(viewer, if(viewer == "text") JGitUtil.getContent(git, objectId, false).map(new String(_, "UTF-8")) else None) - html.blob(id, repositoryInfo, path.split("/").toList, content, new CommitInfo(revCommit)) + repo.html.blob(id, repositoryInfo, path.split("/").toList, content, new CommitInfo(revCommit)) } } @@ -202,7 +202,7 @@ val revCommit = revWalk.parseCommit(objectId) revWalk.dispose - html.commit(id, new CommitInfo(revCommit), JGitUtil.getRepositoryInfo(owner, repository, servletContext), JGitUtil.getDiffs(git, id)) + repo.html.commit(id, new CommitInfo(revCommit), JGitUtil.getRepositoryInfo(owner, repository, servletContext), JGitUtil.getDiffs(git, id)) } /** @@ -236,7 +236,7 @@ new String(JGitUtil.getContent(Git.open(getRepositoryDir(owner, repository)), file.id, true).get, "UTF-8") } - html.files( + repo.html.files( // current branch revision, // repository diff --git a/src/main/twirl/blob.scala.html b/src/main/twirl/blob.scala.html deleted file mode 100644 index e197112..0000000 --- a/src/main/twirl/blob.scala.html +++ /dev/null @@ -1,71 +0,0 @@ -@(branch: String, repository: app.RepositoryInfo, pathList: List[String], content: app.ContentInfo, latestCommit: app.CommitInfo)(implicit context: app.Context) -@import context._ -@import view.helpers -@main(repository.owner+"/"+repository.name) { - @header("code", repository) - @navtab(branch, repository, "files") -
-
- @latestCommit.committer
- @helpers.datetime(latestCommit.time)
- @helpers.cut(latestCommit.message, 100)
-
- - |
-
---|
- @if(content.viewType == "text"){
- @content.content.get- } - @if(content.viewType == "image"){ -
- View Raw
- }
- - (Sorry about that, but we can't show files that are this big right now) - |
-
- @helpers.format(commit.message)
- @branch
- |
-
---|
- @commit.committer @helpers.datetime(commit.time)
-
- commit @commit.id
-
- |
-
@helpers.date(date.head.time) | -
---|
- - - | -
-
- @latestCommit.committer
- @helpers.cut(latestCommit.message, 100)
-
-
- @helpers.datetime(latestCommit.time)
- @latestCommit.id.substring(0, 10)
-
- |
- |||
---|---|---|---|
- | .. | -- | - |
- @if(file.isDirectory){
- ![]() ![]() |
- - @if(file.isDirectory){ - @file.name - } else { - @file.name - } - | -@helpers.datetime(file.time) | -@helpers.cut(file.message, 60) [@file.committer] | -
@helpers.markdown(content) | -
+
+ @latestCommit.committer
+ @helpers.datetime(latestCommit.time)
+ @helpers.cut(latestCommit.message, 100)
+
+ + |
+
---|
+ @if(content.viewType == "text"){
+ @content.content.get+ } + @if(content.viewType == "image"){ +
+ View Raw
+ }
+ + (Sorry about that, but we can't show files that are this big right now) + |
+
+ @helpers.format(commit.message)
+ @branch
+ |
+
---|
+ @commit.committer @helpers.datetime(commit.time)
+
+ commit @commit.id
+
+ |
+
@helpers.date(date.head.time) | +
---|
+ + + | +
+
+ @latestCommit.committer
+ @helpers.cut(latestCommit.message, 100)
+
+
+ @helpers.datetime(latestCommit.time)
+ @latestCommit.id.substring(0, 10)
+
+ |
+ |||
---|---|---|---|
+ | .. | ++ | + |
+ @if(file.isDirectory){
+ ![]() ![]() |
+ + @if(file.isDirectory){ + @file.name + } else { + @file.name + } + | +@helpers.datetime(file.time) | +@helpers.cut(file.message, 60) [@file.committer] | +
@helpers.markdown(content) | +