From 86ee41ec033105bec50c1cc4eaf0181a37d71574 Mon Sep 17 00:00:00 2001 From: Sondre Nilsen Date: Thu, 30 Nov 2017 06:08:40 +0100 Subject: 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
in commit body * Show multiple lines in the list view of repositories * Fixed proper newlines and minor refactor Use
 instead of 

, this is so we can use \n instead of having to manually place
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


* 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
---
 templates/repo/diff/page.tmpl | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'templates/repo/diff')

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"}}
 				
 				

{{RenderCommitMessage .Commit.Message $.RepoLink $.Repository.ComposeMetas}}{{template "repo/commit_status" .CommitStatus}}

+ {{if IsMultilineCommitMessage .Commit.Message}} +
{{RenderCommitBody .Commit.Message $.RepoLink $.Repository.ComposeMetas}}
+ {{end}}
{{if .Author}} -- cgit v1.2.3