From da2585c11e11023ffa7a8c69d21c6fecac520a8e Mon Sep 17 00:00:00 2001 From: Adam Strzelecki Date: Mon, 7 Dec 2015 23:30:52 +0100 Subject: Indent all templates with tabs This commit improves templates readability, since all of them use consistent indent with all template command blocks indented too. 1. Indents both HTML containers such as
,

and Go HTML template blocks such as {{if}} {{with}} 2. Cleans all trailing white-space 3. Adds trailing last line-break to each file --- templates/org/team/members.tmpl | 64 +++++++-------- templates/org/team/new.tmpl | 150 +++++++++++++++++------------------ templates/org/team/repositories.tmpl | 62 +++++++-------- templates/org/team/sidebar.tmpl | 80 +++++++++---------- templates/org/team/teams.tmpl | 56 ++++++------- 5 files changed, 206 insertions(+), 206 deletions(-) (limited to 'templates/org/team') diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl index 83b832e107..3f070b7412 100644 --- a/templates/org/team/members.tmpl +++ b/templates/org/team/members.tmpl @@ -1,46 +1,46 @@ {{template "base/head" .}}

{{template "org/header" .}} -
- {{template "base/alert" .}} -
+
+ {{template "base/alert" .}} +
{{template "org/team/sidebar" .}}
{{.i18n.Tr "org.teams.members"}}
- {{range .Team.Members}} -
- {{if $.IsOrganizationOwner}} - {{$.i18n.Tr "org.members.remove"}} - {{end}} - - - {{.DisplayName}} - -
- {{end}} -
- {{if .IsOrganizationOwner}} -
-
- {{.CsrfTokenHtml}} - -
-
-
- -
-
-
-
- -
+ {{range .Team.Members}} +
+ {{if $.IsOrganizationOwner}} + {{$.i18n.Tr "org.members.remove"}} + {{end}} + + + {{.DisplayName}} + +
+ {{end}}
+ {{if .IsOrganizationOwner}} +
+
+ {{.CsrfTokenHtml}} + +
+
+
+ +
+
+
+
+ +
+
{{end}}
-
+
-{{template "base/footer" .}} \ No newline at end of file +{{template "base/footer" .}} diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl index 8d09e2ac0f..6293efb62e 100644 --- a/templates/org/team/new.tmpl +++ b/templates/org/team/new.tmpl @@ -1,82 +1,82 @@ {{template "base/head" .}}
- {{template "org/header" .}} -
-
-
- {{.CsrfTokenHtml}} -

- {{if .PageIsOrgTeamsNew}}{{.i18n.Tr "org.create_new_team"}}{{else}}{{.i18n.Tr "org.teams.settings"}}{{end}} -

-
- {{template "base/alert" .}} -
- - {{if eq .Team.LowerName "owners"}} - - {{end}} - - {{.i18n.Tr "org.team_name_helper"}} -
-
- - - {{.i18n.Tr "org.team_desc_helper"}} -
- {{if not (eq .Team.LowerName "owners")}} -
- -
-
-
- - - {{.i18n.Tr "org.teams.read_access_helper"}} -
-
-
-
- - - {{.i18n.Tr "org.teams.write_access_helper"}} -
-
-
-
- - - {{.i18n.Tr "org.teams.admin_access_helper"}} -
-
-
-
- {{end}} + {{template "org/header" .}} +
+
+ + {{.CsrfTokenHtml}} +

+ {{if .PageIsOrgTeamsNew}}{{.i18n.Tr "org.create_new_team"}}{{else}}{{.i18n.Tr "org.teams.settings"}}{{end}} +

+
+ {{template "base/alert" .}} +
+ + {{if eq .Team.LowerName "owners"}} + + {{end}} + + {{.i18n.Tr "org.team_name_helper"}} +
+
+ + + {{.i18n.Tr "org.team_desc_helper"}} +
+ {{if not (eq .Team.LowerName "owners")}} +
+ +
+
+
+ + + {{.i18n.Tr "org.teams.read_access_helper"}} +
+
+
+
+ + + {{.i18n.Tr "org.teams.write_access_helper"}} +
+
+
+
+ + + {{.i18n.Tr "org.teams.admin_access_helper"}} +
+
+
+
+ {{end}} -
- {{if .PageIsOrgTeamsNew}} - - {{.i18n.Tr "cancel"}} - {{else}} - - {{if not (eq .Team.LowerName "owners")}} - - {{end}} - {{end}} -
-
- -
-
+
+ {{if .PageIsOrgTeamsNew}} + + {{.i18n.Tr "cancel"}} + {{else}} + + {{if not (eq .Team.LowerName "owners")}} + + {{end}} + {{end}} +
+
+ +
+
-{{template "base/footer" .}} \ No newline at end of file +{{template "base/footer" .}} diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl index 28126bef32..1f8d1a08f0 100644 --- a/templates/org/team/repositories.tmpl +++ b/templates/org/team/repositories.tmpl @@ -1,9 +1,9 @@ {{template "base/head" .}}
{{template "org/header" .}} -
- {{template "base/alert" .}} -
+
+ {{template "base/alert" .}} +
{{template "org/team/sidebar" .}}
@@ -11,36 +11,36 @@
{{$canAddRemove := and $.IsOrganizationOwner (not (eq $.Team.LowerName "owners"))}} - {{range .Team.Repos}} - - {{end}} -
- {{if $canAddRemove}} -
-
- {{.CsrfTokenHtml}} -
-
-
- -
-
-
-
- -
-
+ {{range .Team.Repos}} + + {{end}} +
+ {{if $canAddRemove}} +
+
+ {{.CsrfTokenHtml}} +
+
+
+ +
+
+
+
+ +
+
{{end}}
-{{template "base/footer" .}} \ No newline at end of file +{{template "base/footer" .}} diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl index 5abf34be6c..d17261593d 100644 --- a/templates/org/team/sidebar.tmpl +++ b/templates/org/team/sidebar.tmpl @@ -1,41 +1,41 @@
-

- {{.Team.Name}} -
- {{if .Team.IsMember $.SignedUser.Id}} - {{$.i18n.Tr "org.teams.leave"}} - {{else if .IsOrganizationOwner}} - {{$.i18n.Tr "org.teams.join"}} - {{end}} -
-

-
-
- {{if .Team.Description}} - {{.Team.Description}} - {{else}} - {{.i18n.Tr "org.teams.no_desc"}} - {{end}} -
- -
- {{if eq .Team.LowerName "owners"}} - {{.i18n.Tr "org.teams.owners_permission_desc" | Str2html}} - {{else if (eq .Team.Authorize 1)}} - {{.i18n.Tr "org.teams.read_permission_desc" | Str2html}} - {{else if (eq .Team.Authorize 2)}} - {{.i18n.Tr "org.teams.write_permission_desc" | Str2html}} - {{else if (eq .Team.Authorize 3)}} - {{.i18n.Tr "org.teams.admin_permission_desc" | Str2html}} - {{end}} -
-
- {{if .IsOrganizationOwner}} - - {{end}} -
\ No newline at end of file +

+ {{.Team.Name}} +
+ {{if .Team.IsMember $.SignedUser.Id}} + {{$.i18n.Tr "org.teams.leave"}} + {{else if .IsOrganizationOwner}} + {{$.i18n.Tr "org.teams.join"}} + {{end}} +
+

+
+
+ {{if .Team.Description}} + {{.Team.Description}} + {{else}} + {{.i18n.Tr "org.teams.no_desc"}} + {{end}} +
+ +
+ {{if eq .Team.LowerName "owners"}} + {{.i18n.Tr "org.teams.owners_permission_desc" | Str2html}} + {{else if (eq .Team.Authorize 1)}} + {{.i18n.Tr "org.teams.read_permission_desc" | Str2html}} + {{else if (eq .Team.Authorize 2)}} + {{.i18n.Tr "org.teams.write_permission_desc" | Str2html}} + {{else if (eq .Team.Authorize 3)}} + {{.i18n.Tr "org.teams.admin_permission_desc" | Str2html}} + {{end}} +
+
+ {{if .IsOrganizationOwner}} + + {{end}} +
diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl index 2289af123f..a5ad5d48c1 100644 --- a/templates/org/team/teams.tmpl +++ b/templates/org/team/teams.tmpl @@ -1,41 +1,41 @@ {{template "base/head" .}}
{{template "org/header" .}} -
- {{template "base/alert" .}} +
+ {{template "base/alert" .}} {{if .IsOrganizationOwner}} - -
+ +
{{end}}
{{range .Teams}} -
-
- {{.Name}} -
- {{if .IsMember $.SignedUser.Id}} - {{$.i18n.Tr "org.teams.leave"}} - {{else if $.IsOrganizationOwner}} - {{$.i18n.Tr "org.teams.join"}} - {{end}} -
-
-
- {{range .Members}} - - - - {{end}} +
+
+ {{.Name}} +
+ {{if .IsMember $.SignedUser.Id}} + {{$.i18n.Tr "org.teams.leave"}} + {{else if $.IsOrganizationOwner}} + {{$.i18n.Tr "org.teams.join"}} + {{end}} +
+
+
+ {{range .Members}} + + + + {{end}} +
+
+

{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}

+
-
-

{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}

-
-
{{end}}
-{{template "base/footer" .}} \ No newline at end of file +{{template "base/footer" .}} -- cgit v1.2.3