diff options
author | Sondre Nilsen <nilsen.sondre@gmail.com> | 2017-11-30 06:08:40 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-11-30 13:08:40 +0800 |
commit | 86ee41ec033105bec50c1cc4eaf0181a37d71574 (patch) | |
tree | eef6df636e02ec33a18da75d6f189b12bd9e2df8 /templates/repo/diff | |
parent | 4cf90aa865c49110af38797b8901185ec072ab74 (diff) | |
download | gitea-86ee41ec033105bec50c1cc4eaf0181a37d71574.tar.gz gitea-86ee41ec033105bec50c1cc4eaf0181a37d71574.zip |
Expandable commit bodies (#2980)
* Initial working state of expandable commit bodies
* Fix all commits having showing button for multiline commits
* Refactor checking multiline messages method
* Force newlines with <br> in commit body
* Show multiple lines in the list view of repositories
* Fixed proper newlines and minor refactor
Use <pre> instead of <p>, this is so we can use \n instead of having to manually place <br> into the HTML. Makes it easier to display commit bodies.
* Fix commit list messages jumping around
* Fix indentation in view_list.tmpl
* Use vertical-align: baseline instead of top
* Refactor commit button toggle function
* Remove RenderCommitBodyLink function
* Add comments
* Add newline at the end of _repository.less
* Fix long commit bodies not properly wrapping inside <pre>
* Don't split on double newlines
* Show the commit body in commit view
* Update stylesheets
* Add/fix comments and run make fmt
* Fix spaces not being tabs
Diffstat (limited to 'templates/repo/diff')
-rw-r--r-- | templates/repo/diff/page.tmpl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/repo/diff/page.tmpl b/templates/repo/diff/page.tmpl index cb67b36f73..7600848118 100644 --- a/templates/repo/diff/page.tmpl +++ b/templates/repo/diff/page.tmpl @@ -10,6 +10,9 @@ {{.i18n.Tr "repo.diff.browse_source"}} </a> <h3>{{RenderCommitMessage .Commit.Message $.RepoLink $.Repository.ComposeMetas}}{{template "repo/commit_status" .CommitStatus}}</h3> + {{if IsMultilineCommitMessage .Commit.Message}} + <pre class="commit-body">{{RenderCommitBody .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</pre> + {{end}} </div> <div class="ui attached info segment {{if .Commit.Signature}} isSigned {{if .Verification.Verified }} isVerified {{end}}{{end}}"> {{if .Author}} |