diff options
author | Unknwon <u@gogs.io> | 2017-04-06 17:13:53 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-04-06 17:13:53 -0400 |
commit | 0e271799f2ec744332761cd87fe0d96f4d9653e0 (patch) | |
tree | a49a9609b8b37e972a60b505b2e3900922e55497 /templates/repo | |
parent | 3c0de1713367ffecfe4606ad0553a550f568e74d (diff) |
Refactoring: rename and simplify pkg/tool functions
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/branch_dropdown.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/commits_table.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/diff/page.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/release/list.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/view_list.tmpl | 8 |
5 files changed, 11 insertions, 11 deletions
diff --git a/templates/repo/branch_dropdown.tmpl b/templates/repo/branch_dropdown.tmpl index 1a8c7aa8..26409707 100644 --- a/templates/repo/branch_dropdown.tmpl +++ b/templates/repo/branch_dropdown.tmpl @@ -4,7 +4,7 @@ <span class="text"> <i class="octicon octicon-git-branch"></i> {{if .IsViewBranch}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.tree"}}{{end}}: - <strong>{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</strong> + <strong>{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSHA1 .BranchName}}{{end}}</strong> </span> <i class="dropdown icon"></i> </div> diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index a95cb824..e68dd76f 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -14,7 +14,7 @@ </form> </div> {{else if .IsDiffCompare}} - <a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID}}" class="ui green sha label">{{ShortSha .BeforeCommitID}}</a> ... <a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID}}" class="ui green sha label">{{ShortSha .AfterCommitID}}</a> + <a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID}}" class="ui green sha label">{{ShortSHA1 .BeforeCommitID}}</a> ... <a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID}}" class="ui green sha label">{{ShortSHA1 .AfterCommitID}}</a> {{end}} </h4> @@ -43,9 +43,9 @@ <td class="message collapsing has-emoji"> {{/* Username or Reponame doesn't present we assume the source repository no longer exists */}} {{if not (and $.Username $.Reponame)}} - <span class="ui sha label">{{ShortSha .ID.String}}</span> + <span class="ui sha label">{{ShortSHA1 .ID.String}}</span> {{else}} - <a rel="nofollow" class="ui sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}">{{ShortSha .ID.String}}</a> + <a rel="nofollow" class="ui sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}">{{ShortSHA1 .ID.String}}</a> {{end}} <span {{if gt .ParentCount 1}}class="grey text"{{end}}>{{RenderCommitMessage false .Summary $.RepoLink $.Repository.ComposeMetas}}</span> </td> diff --git a/templates/repo/diff/page.tmpl b/templates/repo/diff/page.tmpl index 0a35a804..4d2f6bc1 100644 --- a/templates/repo/diff/page.tmpl +++ b/templates/repo/diff/page.tmpl @@ -28,12 +28,12 @@ </div> <div class="item"> {{range .Parents}} - <a class="ui blue sha label" href="{{$.RepoLink}}/commit/{{.}}">{{ShortSha .}}</a> + <a class="ui blue sha label" href="{{$.RepoLink}}/commit/{{.}}">{{ShortSHA1 .}}</a> {{end}} </div> {{end}} <div class="item">{{.i18n.Tr "repo.diff.commit"}}</div> - <div class="item"><span class="ui blue sha label">{{ShortSha .CommitID}}</span></div> + <div class="item"><span class="ui blue sha label">{{ShortSHA1 .CommitID}}</span></div> </div> </div> </div> diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index ccb611fb..c4414534 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -28,7 +28,7 @@ </span> {{end}} <span class="commit"> - <a href="{{$.RepoLink}}/src/{{.Sha1}}" rel="nofollow"><i class="code icon"></i> {{ShortSha .Sha1}}</a> + <a href="{{$.RepoLink}}/src/{{.Sha1}}" rel="nofollow"><i class="code icon"></i> {{ShortSHA1 .Sha1}}</a> </span> </div> <div class="ui twelve wide column detail"> diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index f532dd74..1b7ae9e0 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -9,7 +9,7 @@ <img class="ui avatar image img-12" src="{{AvatarLink .LatestCommit.Author.Email}}" /> <strong>{{.LatestCommit.Author.Name}}</strong> {{end}} - <a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.LatestCommit.ID}}" rel="nofollow">{{ShortSha .LatestCommit.ID.String}}</a> + <a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.LatestCommit.ID}}" rel="nofollow">{{ShortSHA1 .LatestCommit.ID.String}}</a> <span class="grey has-emoji">{{RenderCommitMessage false .LatestCommit.Summary .RepoLink $.Repository.ComposeMetas}}</span> </th> <th class="nine wide"> @@ -32,9 +32,9 @@ <span class="octicon octicon-file-submodule"></span> {{$refURL := $commit.RefURL AppUrl $.BranchLink}} {{if $refURL}} - <a href="{{$refURL}}">{{$entry.Name}}</a> @ <a href="{{$refURL}}/commit/{{$commit.RefID}}">{{ShortSha $commit.RefID}}</a> + <a href="{{$refURL}}">{{$entry.Name}}</a> @ <a href="{{$refURL}}/commit/{{$commit.RefID}}">{{ShortSHA1 $commit.RefID}}</a> {{else}} - {{$entry.Name}} @ {{ShortSha $commit.RefID}} + {{$entry.Name}} @ {{ShortSHA1 $commit.RefID}} {{end}} </td> {{else}} @@ -44,7 +44,7 @@ </td> {{end}} <td class="message collapsing has-emoji"> - <a rel="nofollow" class="ui sha label" href="{{$.RepoLink}}/commit/{{$commit.ID}}">{{ShortSha $commit.ID.String}}</a> + <a rel="nofollow" class="ui sha label" href="{{$.RepoLink}}/commit/{{$commit.ID}}">{{ShortSHA1 $commit.ID.String}}</a> {{RenderCommitMessage false $commit.Summary $.RepoLink $.Repository.ComposeMetas}} </td> <td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td> |