Merge pull request #2121 from nanoant/patch/less-n-template-indent

Consistent tab indentation for all source files
This commit is contained in:
Unknwon 2015-12-07 19:04:13 -05:00
commit 14080dd61d
127 changed files with 6399 additions and 6391 deletions

View File

@ -1,15 +1,15 @@
{{if .Flash.ErrorMsg}} {{if .Flash.ErrorMsg}}
<div class="ui negative message"> <div class="ui negative message">
<p>{{.Flash.ErrorMsg}}</p> <p>{{.Flash.ErrorMsg}}</p>
</div> </div>
{{end}} {{end}}
{{if .Flash.SuccessMsg}} {{if .Flash.SuccessMsg}}
<div class="ui positive message"> <div class="ui positive message">
<p>{{.Flash.SuccessMsg}}</p> <p>{{.Flash.SuccessMsg}}</p>
</div> </div>
{{end}} {{end}}
{{if .Flash.InfoMsg}} {{if .Flash.InfoMsg}}
<div class="ui info message"> <div class="ui info message">
<p>{{.Flash.InfoMsg}}</p> <p>{{.Flash.InfoMsg}}</p>
</div> </div>
{{end}} {{end}}

View File

@ -1,3 +1,8 @@
{{/*
<html>
<body>
<div>
*/}}
</div> </div>
<footer> <footer>
<div class="ui container"> <div class="ui container">
@ -26,24 +31,24 @@
</footer> </footer>
</body> </body>
<!-- Third-party libraries --> <!-- Third-party libraries -->
{{if .RequireHighlightJS}} {{if .RequireHighlightJS}}
<link rel="stylesheet" href="{{AppSubUrl}}/css/highlight-8.9.1/github.css"> <link rel="stylesheet" href="{{AppSubUrl}}/css/highlight-8.9.1/github.css">
<script src="{{AppSubUrl}}/js/libs/highlight-8.9.1.pack.js"></script> <script src="{{AppSubUrl}}/js/libs/highlight-8.9.1.pack.js"></script>
{{end}} {{end}}
{{if .RequireMinicolors}} {{if .RequireMinicolors}}
<link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.minicolors-2.1.12.css"> <link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.minicolors-2.1.12.css">
<script src="{{AppSubUrl}}/js/libs/jquery.minicolors-2.1.12.min.js"></script> <script src="{{AppSubUrl}}/js/libs/jquery.minicolors-2.1.12.min.js"></script>
{{end}} {{end}}
{{if .RequireDatetimepicker}} {{if .RequireDatetimepicker}}
<link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.datetimepicker-2.4.5.css"> <link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.datetimepicker-2.4.5.css">
<script src="{{AppSubUrl}}/js/libs/jquery.datetimepicker-2.4.5.js"></script> <script src="{{AppSubUrl}}/js/libs/jquery.datetimepicker-2.4.5.js"></script>
{{end}} {{end}}
{{if .RequireDropzone}} {{if .RequireDropzone}}
<link rel="stylesheet" href="{{AppSubUrl}}/css/dropzone-4.2.0.css"> <link rel="stylesheet" href="{{AppSubUrl}}/css/dropzone-4.2.0.css">
<script src="{{AppSubUrl}}/js/libs/dropzone-4.2.0.js"></script> <script src="{{AppSubUrl}}/js/libs/dropzone-4.2.0.js"></script>
{{end}} {{end}}
<script src="{{AppSubUrl}}/js/libs/emojify-1.1.0.min.js"></script> <script src="{{AppSubUrl}}/js/libs/emojify-1.1.0.min.js"></script>
<script src="{{AppSubUrl}}/js/libs/clipboard-1.5.5.min.js"></script> <script src="{{AppSubUrl}}/js/libs/clipboard-1.5.5.min.js"></script>
</html> </html>

View File

@ -57,12 +57,12 @@
{{end}} {{end}}
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore">{{.i18n.Tr "explore"}}</a> <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore">{{.i18n.Tr "explore"}}</a>
<!-- <div class="item"> {{/*<div class="item">
<div class="ui icon input"> <div class="ui icon input">
<input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}"> <input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
<i class="search icon"></i> <i class="search icon"></i>
</div> </div>
</div> --> </div>*/}}
{{if .IsSigned}} {{if .IsSigned}}
<div class="right menu"> <div class="right menu">
@ -146,3 +146,8 @@
</div><!-- end container --> </div><!-- end container -->
</div><!-- end bar --> </div><!-- end bar -->
{{end}} {{end}}
{{/*
</div>
</body>
</html>
*/}}

View File

@ -1,5 +1,5 @@
{{with .Org}} {{with .Org}}
<div class="ui container"> <div class="ui container">
<div class="ui vertically grid head"> <div class="ui vertically grid head">
<div class="column"> <div class="column">
<div class="ui header"> <div class="ui header">
@ -21,6 +21,6 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="ui divider"></div> <div class="ui divider"></div>
{{end}} {{end}}

View File

@ -15,7 +15,7 @@
</h4> </h4>
{{if .Commits}} {{if .Commits}}
<div class="ui attached table segment"> <div class="ui attached table segment">
<table class="ui very basic striped fixed table single line" id="commits-table"> <table class="ui very basic striped fixed table single line" id="commits-table">
<thead> <thead>
<tr> <tr>
@ -44,12 +44,12 @@
{{end}} {{end}}
</tbody> </tbody>
</table> </table>
</div> </div>
{{end}} {{end}}
{{with .Page}} {{with .Page}}
{{if gt .TotalPages 1}} {{if gt .TotalPages 1}}
<div class="center page buttons"> <div class="center page buttons">
<div class="ui borderless pagination menu"> <div class="ui borderless pagination menu">
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Previous}}"{{end}}> <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Previous}}"{{end}}>
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}} <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
@ -65,6 +65,6 @@
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i> {{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
</a> </a>
</div> </div>
</div> </div>
{{end}} {{end}}
{{end}} {{end}}

View File

@ -1,7 +1,7 @@
{{if .DiffNotAvailable}} {{if .DiffNotAvailable}}
<h4>{{.i18n.Tr "repo.diff.data_not_available"}}</h4> <h4>{{.i18n.Tr "repo.diff.data_not_available"}}</h4>
{{else}} {{else}}
<div class="diff-detail-box diff-box"> <div class="diff-detail-box diff-box">
<div> <div>
<i class="fa fa-retweet"></i> <i class="fa fa-retweet"></i>
{{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}} {{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
@ -30,10 +30,10 @@
</li> </li>
{{end}} {{end}}
</ol> </ol>
</div> </div>
{{range $i, $file := .Diff.Files}} {{range $i, $file := .Diff.Files}}
<div class="diff-file-box diff-box file-content" id="diff-{{.Index}}"> <div class="diff-file-box diff-box file-content" id="diff-{{.Index}}">
<h4 class="ui top attached normal header"> <h4 class="ui top attached normal header">
<div class="diff-counter count ui left"> <div class="diff-counter count ui left">
{{if $file.IsBin}} {{if $file.IsBin}}
@ -88,7 +88,7 @@
{{end}} {{end}}
{{end}} {{end}}
</div> </div>
</div> </div>
<br> <br>
{{end}} {{end}}
{{end}} {{end}}

View File

@ -1,5 +1,5 @@
{{with .Repository}} {{with .Repository}}
<div class="ui container"><!-- start container --> <div class="ui container"><!-- start container -->
<div class="ui vertically padded grid head"><!-- start grid --> <div class="ui vertically padded grid head"><!-- start grid -->
<div class="column"><!-- start column --> <div class="column"><!-- start column -->
<div class="ui header"> <div class="ui header">
@ -43,10 +43,10 @@
</div> </div>
</div><!-- end column --> </div><!-- end column -->
</div><!-- end grid --> </div><!-- end grid -->
</div><!-- end container --> </div><!-- end container -->
{{end}} {{end}}
{{if not (or .IsBareRepo .IsDiffCompare)}} {{if not (or .IsBareRepo .IsDiffCompare)}}
<div class="ui tabs container"> <div class="ui tabs container">
<div class="ui tabular menu navbar"> <div class="ui tabular menu navbar">
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}"> <a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}">
<i class="icon octicon octicon-code"></i> {{.i18n.Tr "repo.code"}} <i class="icon octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
@ -80,8 +80,8 @@
</div> </div>
{{end}} {{end}}
</div> </div>
</div> </div>
<div class="ui tabs divider"></div> <div class="ui tabs divider"></div>
{{else}} {{else}}
<div class="ui divider"></div> <div class="ui divider"></div>
{{end}} {{end}}

View File

@ -11,6 +11,6 @@
</div> </div>
</div> </div>
{{if .IsAttachmentEnabled}} {{if .IsAttachmentEnabled}}
<div class="attachments"></div> <div class="attachments"></div>
<div class="ui basic button dropzone" id="dropzone" data-upload-url="{{AppSubUrl}}/issues/attachments" data-accepts="{{.AttachmentAllowedTypes}}" data-max-file="{{.AttachmentMaxFiles}}" data-max-size="{{.AttachmentMaxSize}}" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"></div> <div class="ui basic button dropzone" id="dropzone" data-upload-url="{{AppSubUrl}}/issues/attachments" data-accepts="{{.AttachmentAllowedTypes}}" data-max-file="{{.AttachmentMaxFiles}}" data-max-size="{{.AttachmentMaxSize}}" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"></div>
{{end}} {{end}}

View File

@ -52,7 +52,7 @@
</div> </div>
{{if .IsRepositoryAdmin}} {{if .IsRepositoryAdmin}}
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> <i class="trash icon"></i>
{{.i18n.Tr "repo.issues.label_deletion"}} {{.i18n.Tr "repo.issues.label_deletion"}}
@ -70,9 +70,9 @@
{{.i18n.Tr "modal.yes"}} {{.i18n.Tr "modal.yes"}}
</div> </div>
</div> </div>
</div> </div>
<div class="ui small edit-label modal"> <div class="ui small edit-label modal">
<div class="header"> <div class="header">
{{.i18n.Tr "repo.issues.label_modify"}} {{.i18n.Tr "repo.issues.label_modify"}}
</div> </div>
@ -104,6 +104,6 @@
<i class="checkmark icon"></i> <i class="checkmark icon"></i>
</div> </div>
</div> </div>
</div> </div>
{{end}} {{end}}
{{template "base/footer" .}} {{template "base/footer" .}}

View File

@ -94,7 +94,7 @@
</div> </div>
{{if .IsRepositoryAdmin}} {{if .IsRepositoryAdmin}}
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> <i class="trash icon"></i>
{{.i18n.Tr "repo.milestones.deletion"}} {{.i18n.Tr "repo.milestones.deletion"}}
@ -112,6 +112,6 @@
{{.i18n.Tr "modal.yes"}} {{.i18n.Tr "modal.yes"}}
</div> </div>
</div> </div>
</div> </div>
{{end}} {{end}}
{{template "base/footer" .}} {{template "base/footer" .}}

View File

@ -139,9 +139,7 @@
{{else if .IsPullReuqestBroken}}red {{else if .IsPullReuqestBroken}}red
{{else if .Issue.IsChecking}}yellow {{else if .Issue.IsChecking}}yellow
{{else if .Issue.CanAutoMerge}}green {{else if .Issue.CanAutoMerge}}green
{{else}}red{{end}}"> {{else}}red{{end}}"><span class="mega-octicon octicon-git-merge"></span></a>
<span class="mega-octicon octicon-git-merge"></span>
</a>
<div class="content"> <div class="content">
<div class="ui merge segment"> <div class="ui merge segment">
{{if .Issue.HasMerged}} {{if .Issue.HasMerged}}

View File

@ -84,7 +84,7 @@
</div> </div>
{{if .PageIsEditRelease}} {{if .PageIsEditRelease}}
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> <i class="trash icon"></i>
{{.i18n.Tr "repo.release.deletion"}} {{.i18n.Tr "repo.release.deletion"}}
@ -93,6 +93,6 @@
<p>{{.i18n.Tr "repo.release.deletion_desc"}}</p> <p>{{.i18n.Tr "repo.release.deletion_desc"}}</p>
</div> </div>
{{template "base/delete_modal_actions" .}} {{template "base/delete_modal_actions" .}}
</div> </div>
{{end}} {{end}}
{{template "base/footer" .}} {{template "base/footer" .}}

View File

@ -1,6 +1,6 @@
{{if eq .HookType "gogs"}} {{if eq .HookType "gogs"}}
<p>{{.i18n.Tr "repo.settings.add_webhook_desc" "http://gogs.io/docs/features/webhook.html" | Str2html}}</p> <p>{{.i18n.Tr "repo.settings.add_webhook_desc" "http://gogs.io/docs/features/webhook.html" | Str2html}}</p>
<form class="ui form" action="{{.BaseLink}}/settings/hooks/gogs/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post"> <form class="ui form" action="{{.BaseLink}}/settings/hooks/gogs/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<div class="required field {{if .Err_PayloadURL}}error{{end}}"> <div class="required field {{if .Err_PayloadURL}}error{{end}}">
<label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label> <label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
@ -24,5 +24,5 @@
<input id="secret" name="secret" type="password" value="{{.Webhook.Secret}}" autocomplete="off"> <input id="secret" name="secret" type="password" value="{{.Webhook.Secret}}" autocomplete="off">
</div> </div>
{{template "repo/settings/hook_settings" .}} {{template "repo/settings/hook_settings" .}}
</form> </form>
{{end}} {{end}}

View File

@ -1,5 +1,5 @@
{{if .PageIsSettingsHooksEdit}} {{if .PageIsSettingsHooksEdit}}
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.i18n.Tr "repo.settings.recent_deliveries"}} {{.i18n.Tr "repo.settings.recent_deliveries"}}
{{if .IsRepositoryAdmin}} {{if .IsRepositoryAdmin}}
<div class="ui right"> <div class="ui right">
@ -7,8 +7,8 @@
"{{.i18n.Tr "repo.settings.webhook.test_delivery_desc"}}" data-variation="inverted tiny" data-link="{{.Link}}/test" data-redirect="{{.Link}}">{{.i18n.Tr "repo.settings.webhook.test_delivery"}}</button> "{{.i18n.Tr "repo.settings.webhook.test_delivery_desc"}}" data-variation="inverted tiny" data-link="{{.Link}}/test" data-redirect="{{.Link}}">{{.i18n.Tr "repo.settings.webhook.test_delivery"}}</button>
</div> </div>
{{end}} {{end}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<div class="ui hook history list"> <div class="ui hook history list">
{{range .History}} {{range .History}}
<div class="item"> <div class="item">
@ -69,5 +69,5 @@
</div> </div>
{{end}} {{end}}
</div> </div>
</div> </div>
{{end}} {{end}}

View File

@ -1,6 +1,6 @@
{{if eq .HookType "slack"}} {{if eq .HookType "slack"}}
<p>{{.i18n.Tr "repo.settings.add_slack_hook_desc" "http://slack.com" | Str2html}}</p> <p>{{.i18n.Tr "repo.settings.add_slack_hook_desc" "http://slack.com" | Str2html}}</p>
<form class="ui form" action="{{.BaseLink}}/settings/hooks/slack/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post"> <form class="ui form" action="{{.BaseLink}}/settings/hooks/slack/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<div class="required field {{if .Err_PayloadURL}}error{{end}}"> <div class="required field {{if .Err_PayloadURL}}error{{end}}">
<label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label> <label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
@ -24,5 +24,5 @@
<input id="color" name="color" value="{{.SlackHook.Color}}" placeholder="e.g. #dd4b39, good, warning, danger"> <input id="color" name="color" value="{{.SlackHook.Color}}" placeholder="e.g. #dd4b39, good, warning, danger">
</div> </div>
{{template "repo/settings/hook_settings" .}} {{template "repo/settings/hook_settings" .}}
</form> </form>
{{end}} {{end}}

View File

@ -217,6 +217,6 @@
<button class="ui red button">{{.i18n.Tr "repo.settings.confirm_delete"}}</button> <button class="ui red button">{{.i18n.Tr "repo.settings.confirm_delete"}}</button>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
{{template "base/footer" .}} {{template "base/footer" .}}

View File

@ -1,5 +1,5 @@
{{range .Feeds}} {{range .Feeds}}
<div class="news"> <div class="news">
<div class="ui left"> <div class="ui left">
<img class="ui avatar image" src="{{.ActAvatar}}" alt=""> <img class="ui avatar image" src="{{.ActAvatar}}" alt="">
</div> </div>
@ -65,5 +65,5 @@
</div> </div>
</div> </div>
<div class="ui divider"></div> <div class="ui divider"></div>
</div> </div>
{{end}} {{end}}