diff options
author | Adam Strzelecki <ono@java.pl> | 2015-12-07 23:30:52 +0100 |
---|---|---|
committer | Adam Strzelecki <ono@java.pl> | 2015-12-08 00:57:46 +0100 |
commit | da2585c11e11023ffa7a8c69d21c6fecac520a8e (patch) | |
tree | 1c2a575dfc00e0e78f47c497a6d9347b3edeca9a /templates/repo/release | |
parent | dd8a06a397e26c46639eba1313102560dfa49c95 (diff) | |
download | gitea-da2585c11e11023ffa7a8c69d21c6fecac520a8e.tar.gz gitea-da2585c11e11023ffa7a8c69d21c6fecac520a8e.zip |
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 <div>, <p> and Go HTML template blocks
such as {{if}} {{with}}
2. Cleans all trailing white-space
3. Adds trailing last line-break to each file
Diffstat (limited to 'templates/repo/release')
-rw-r--r-- | templates/repo/release/list.tmpl | 154 | ||||
-rw-r--r-- | templates/repo/release/new.tmpl | 184 |
2 files changed, 169 insertions, 169 deletions
diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index 5970bda3d2..295ca0b3bd 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -1,80 +1,80 @@ {{template "base/head" .}} <div class="repository release"> - {{template "repo/header" .}} - <div class="ui container"> - {{template "base/alert" .}} - <h2 class="ui header"> - {{.i18n.Tr "repo.release.releases"}} - {{if .IsRepositoryAdmin}} - <div class="ui right"> - <a class="ui small green button" href="{{$.RepoLink}}/releases/new"> - {{.i18n.Tr "repo.release.new_release"}} - </a> - </div> - {{end}} - </h2> - <ul id="release-list"> - {{range .Releases}} - <li class="ui grid"> - <div class="ui four wide column meta"> - {{if .PublisherID}} - {{if .IsDraft}} - <span class="ui yellow label">{{$.i18n.Tr "repo.release.draft"}}</span> - {{else if .IsPrerelease}} - <span class="ui orange label">{{$.i18n.Tr "repo.release.prerelease"}}</span> - {{else}} - <span class="ui green label">{{$.i18n.Tr "repo.release.stable"}}</span> - {{end}} - <span class="tag text blue"> - <a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a> - </span> - {{end}} - <span class="commit"> - <a href="{{$.RepoLink}}/src/{{.Sha1}}" rel="nofollow"><i class="code icon"></i> {{ShortSha .Sha1}}</a> - </span> - </div> - <div class="ui twelve wide column detail"> - {{if .PublisherID}} - <h3> - <a href="{{$.RepoLink}}/src/{{.TagName}}">{{.Title}}</a> - {{if $.IsRepositoryAdmin}}<small>(<a href="{{$.RepoLink}}/releases/edit/{{.TagName}}" rel="nofollow">{{$.i18n.Tr "repo.release.edit"}}</a>)</small>{{end}} - </h3> - <p class="text grey"> - <span class="author"> - <img class="img-10" src="{{.Publisher.AvatarLink}}"> - <a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.Name}}</a> - </span> - {{if .Created}}<span class="time">{{TimeSince .Created $.Lang}}</span>{{end}} - <span class="ahead">{{$.i18n.Tr "repo.release.ahead" .NumCommitsBehind .Target | Str2html}}</span> - </p> - <div class="markdown desc"> - {{Str2html .Note}} - </div> - <div class="download"> - <h2>{{$.i18n.Tr "repo.release.downloads"}}</h2> - <ul class="list"> - <li> - <a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="icon octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (ZIP)</a> - </li> - <li> - <a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="icon octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</a> - </li> - </ul> - </div> - {{else}} - <h4> - <a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a> - </h4> - <div class="download"> - <a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="octicon octicon-file-zip"></i> ZIP</a> - <a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="octicon octicon-file-zip"></i> TAR.GZ</a> - </div> - {{end}} - <span class="dot"> </span> - </div> - </li> - {{end}} - </ul> - </div> + {{template "repo/header" .}} + <div class="ui container"> + {{template "base/alert" .}} + <h2 class="ui header"> + {{.i18n.Tr "repo.release.releases"}} + {{if .IsRepositoryAdmin}} + <div class="ui right"> + <a class="ui small green button" href="{{$.RepoLink}}/releases/new"> + {{.i18n.Tr "repo.release.new_release"}} + </a> + </div> + {{end}} + </h2> + <ul id="release-list"> + {{range .Releases}} + <li class="ui grid"> + <div class="ui four wide column meta"> + {{if .PublisherID}} + {{if .IsDraft}} + <span class="ui yellow label">{{$.i18n.Tr "repo.release.draft"}}</span> + {{else if .IsPrerelease}} + <span class="ui orange label">{{$.i18n.Tr "repo.release.prerelease"}}</span> + {{else}} + <span class="ui green label">{{$.i18n.Tr "repo.release.stable"}}</span> + {{end}} + <span class="tag text blue"> + <a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a> + </span> + {{end}} + <span class="commit"> + <a href="{{$.RepoLink}}/src/{{.Sha1}}" rel="nofollow"><i class="code icon"></i> {{ShortSha .Sha1}}</a> + </span> + </div> + <div class="ui twelve wide column detail"> + {{if .PublisherID}} + <h3> + <a href="{{$.RepoLink}}/src/{{.TagName}}">{{.Title}}</a> + {{if $.IsRepositoryAdmin}}<small>(<a href="{{$.RepoLink}}/releases/edit/{{.TagName}}" rel="nofollow">{{$.i18n.Tr "repo.release.edit"}}</a>)</small>{{end}} + </h3> + <p class="text grey"> + <span class="author"> + <img class="img-10" src="{{.Publisher.AvatarLink}}"> + <a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.Name}}</a> + </span> + {{if .Created}}<span class="time">{{TimeSince .Created $.Lang}}</span>{{end}} + <span class="ahead">{{$.i18n.Tr "repo.release.ahead" .NumCommitsBehind .Target | Str2html}}</span> + </p> + <div class="markdown desc"> + {{Str2html .Note}} + </div> + <div class="download"> + <h2>{{$.i18n.Tr "repo.release.downloads"}}</h2> + <ul class="list"> + <li> + <a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="icon octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (ZIP)</a> + </li> + <li> + <a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="icon octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</a> + </li> + </ul> + </div> + {{else}} + <h4> + <a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a> + </h4> + <div class="download"> + <a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="octicon octicon-file-zip"></i> ZIP</a> + <a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="octicon octicon-file-zip"></i> TAR.GZ</a> + </div> + {{end}} + <span class="dot"> </span> + </div> + </li> + {{end}} + </ul> + </div> </div> -{{template "base/footer" .}}
\ No newline at end of file +{{template "base/footer" .}} diff --git a/templates/repo/release/new.tmpl b/templates/repo/release/new.tmpl index 7129cf6b56..e334ee749e 100644 --- a/templates/repo/release/new.tmpl +++ b/templates/repo/release/new.tmpl @@ -1,98 +1,98 @@ {{template "base/head" .}} <div class="repository new release"> - {{template "repo/header" .}} - <div class="ui container"> - <h2 class="ui dividing header"> - {{if .PageIsEditRelease}} - {{.i18n.Tr "repo.release.edit_release"}} - <div class="sub header">{{.i18n.Tr "repo.release.edit_subheader"}}</div> - {{else}} - {{.i18n.Tr "repo.release.new_release"}} - <div class="sub header">{{.i18n.Tr "repo.release.new_subheader"}}</div> - {{end}} - </h2> - {{template "base/alert" .}} - <form class="ui form grid" action="{{.Link}}" method="post"> - {{.CsrfTokenHtml}} - <div class="ui seven wide column target"> - <div class="inline field {{if .Err_TagName}}error{{end}}"> - {{if .PageIsEditRelease}} - <b>{{.tag_name}}</b><span class="at">@</span><strong>{{.tag_target}}</strong> - {{else}} - <input name="tag_name" value="{{.tag_name}}" placeholder="{{.i18n.Tr "repo.release.tag_name"}}" autofocus required> - <span class="at">@</span> - <div class="ui selection dropdown"> - <input type="hidden" name="tag_target" value="{{.tag_target}}"/> - <i class="octicon octicon-git-branch"></i> - <div class="text"> - {{.i18n.Tr "repo.release.target"}} : - <strong id="repo-branch-current">{{.Repository.DefaultBranch}}</strong> - </div> - <i class="dropdown icon"></i> - <div class="menu"> - {{range .Branches}} - <div class="item" data-value="{{.}}">{{.}}</div> - {{end}} - </div> - </div> - <span class="help">{{.i18n.Tr "repo.release.tag_helper"}}</span> - {{end}} - </div> - </div> - <div class="eleven wide column"> - <div class="field {{if .Err_Title}}error{{end}}"> - <label>{{.i18n.Tr "repo.release.title"}}</label> - <input name="title" placeholder="{{.i18n.Tr "repo.release.title"}}" value="{{.title}}" autofocus required> - </div> - <div class="field"> - <label>{{.i18n.Tr "repo.release.content"}}</label> - <textarea name="content">{{.content}}</textarea> - </div> - </div> - <div class="ui container"> - <div class="ui divider"></div> - <div class="ui text right"> - <div class="prerelease field"> - <div class="ui checkbox"> - <input type="checkbox" name="prerelease" {{if .prerelease}}checked{{end}}> - <label><strong>{{.i18n.Tr "repo.release.prerelease_desc"}}</strong></label> - </div> - </div> - <span class="help">{{.i18n.Tr "repo.release.prerelease_helper"}}</span> - <div class="field"> - {{if .PageIsEditRelease}} - <a class="ui blue basic button" href="{{.RepoLink}}/releases"> - {{.i18n.Tr "repo.release.cancel"}} - </a> - <button class="ui green button"> - {{.i18n.Tr "repo.release.edit_release"}} - </button> - <a class="ui red button delete-button" data-url="{{$.RepoLink}}/releases/delete" data-id="{{.ID}}"> - {{$.i18n.Tr "repo.release.delete_release"}} - </a> - {{else}} - <button class="ui green button"> - {{.i18n.Tr "repo.release.publish"}} - </button> - <input class="ui grey button" type="submit" name="draft" value="{{.i18n.Tr "repo.release.save_draft"}}"/> - {{end}} - </div> - </div> - </div> - </form> - </div> + {{template "repo/header" .}} + <div class="ui container"> + <h2 class="ui dividing header"> + {{if .PageIsEditRelease}} + {{.i18n.Tr "repo.release.edit_release"}} + <div class="sub header">{{.i18n.Tr "repo.release.edit_subheader"}}</div> + {{else}} + {{.i18n.Tr "repo.release.new_release"}} + <div class="sub header">{{.i18n.Tr "repo.release.new_subheader"}}</div> + {{end}} + </h2> + {{template "base/alert" .}} + <form class="ui form grid" action="{{.Link}}" method="post"> + {{.CsrfTokenHtml}} + <div class="ui seven wide column target"> + <div class="inline field {{if .Err_TagName}}error{{end}}"> + {{if .PageIsEditRelease}} + <b>{{.tag_name}}</b><span class="at">@</span><strong>{{.tag_target}}</strong> + {{else}} + <input name="tag_name" value="{{.tag_name}}" placeholder="{{.i18n.Tr "repo.release.tag_name"}}" autofocus required> + <span class="at">@</span> + <div class="ui selection dropdown"> + <input type="hidden" name="tag_target" value="{{.tag_target}}"/> + <i class="octicon octicon-git-branch"></i> + <div class="text"> + {{.i18n.Tr "repo.release.target"}} : + <strong id="repo-branch-current">{{.Repository.DefaultBranch}}</strong> + </div> + <i class="dropdown icon"></i> + <div class="menu"> + {{range .Branches}} + <div class="item" data-value="{{.}}">{{.}}</div> + {{end}} + </div> + </div> + <span class="help">{{.i18n.Tr "repo.release.tag_helper"}}</span> + {{end}} + </div> + </div> + <div class="eleven wide column"> + <div class="field {{if .Err_Title}}error{{end}}"> + <label>{{.i18n.Tr "repo.release.title"}}</label> + <input name="title" placeholder="{{.i18n.Tr "repo.release.title"}}" value="{{.title}}" autofocus required> + </div> + <div class="field"> + <label>{{.i18n.Tr "repo.release.content"}}</label> + <textarea name="content">{{.content}}</textarea> + </div> + </div> + <div class="ui container"> + <div class="ui divider"></div> + <div class="ui text right"> + <div class="prerelease field"> + <div class="ui checkbox"> + <input type="checkbox" name="prerelease" {{if .prerelease}}checked{{end}}> + <label><strong>{{.i18n.Tr "repo.release.prerelease_desc"}}</strong></label> + </div> + </div> + <span class="help">{{.i18n.Tr "repo.release.prerelease_helper"}}</span> + <div class="field"> + {{if .PageIsEditRelease}} + <a class="ui blue basic button" href="{{.RepoLink}}/releases"> + {{.i18n.Tr "repo.release.cancel"}} + </a> + <button class="ui green button"> + {{.i18n.Tr "repo.release.edit_release"}} + </button> + <a class="ui red button delete-button" data-url="{{$.RepoLink}}/releases/delete" data-id="{{.ID}}"> + {{$.i18n.Tr "repo.release.delete_release"}} + </a> + {{else}} + <button class="ui green button"> + {{.i18n.Tr "repo.release.publish"}} + </button> + <input class="ui grey button" type="submit" name="draft" value="{{.i18n.Tr "repo.release.save_draft"}}"/> + {{end}} + </div> + </div> + </div> + </form> + </div> </div> {{if .PageIsEditRelease}} -<div class="ui small basic delete modal"> - <div class="ui icon header"> - <i class="trash icon"></i> - {{.i18n.Tr "repo.release.deletion"}} - </div> - <div class="content"> - <p>{{.i18n.Tr "repo.release.deletion_desc"}}</p> - </div> - {{template "base/delete_modal_actions" .}} -</div> + <div class="ui small basic delete modal"> + <div class="ui icon header"> + <i class="trash icon"></i> + {{.i18n.Tr "repo.release.deletion"}} + </div> + <div class="content"> + <p>{{.i18n.Tr "repo.release.deletion_desc"}}</p> + </div> + {{template "base/delete_modal_actions" .}} + </div> {{end}} -{{template "base/footer" .}}
\ No newline at end of file +{{template "base/footer" .}} |