[Notice] Announcing the End of Demo Server [Read me]
code: Show text file line ending type in code browser
@af80f86d502ae3fea343873823ae4f09a6a01a9f
--- app/views/code/partial_view_file.scala.html
+++ app/views/code/partial_view_file.scala.html
... | ... | @@ -11,12 +11,19 @@ |
11 | 11 |
@import utils.TemplateHelper.CodeBrowser._ |
12 | 12 |
@import java.net.URLEncoder |
13 | 13 |
@import utils.Markdown |
14 |
+@import utils.LineEnding |
|
14 | 15 |
|
15 | 16 |
@getRevIdString(revId:String) = @{ |
16 | 17 |
if(project.vcs.equalsIgnoreCase("git")) { |
17 | 18 |
branchItemName(branch) |
18 | 19 |
} else { |
19 | 20 |
revId |
21 |
+ } |
|
22 |
+} |
|
23 |
+ |
|
24 |
+@getLineEndingtype() = @{ |
|
25 |
+ if(!files.get("isBinary").booleanValue()){ |
|
26 |
+ LineEnding.findLineEnding(fieldText(files, "data")) |
|
20 | 27 |
} |
21 | 28 |
} |
22 | 29 |
|
... | ... | @@ -53,6 +60,7 @@ |
53 | 60 |
</a> |
54 | 61 |
</span> |
55 | 62 |
<span id="commitMessage" class="commitMsg">@fieldText(files,"commitMessage")</span> |
63 |
+ <span>@getLineEndingtype</span> |
|
56 | 64 |
</div> |
57 | 65 |
<div class="pull-right"> |
58 | 66 |
@if(!files.get("isBinary").booleanValue()){ |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?