diff options
author | zeripath <art27@cantab.net> | 2019-01-18 00:01:04 +0000 |
---|---|---|
committer | techknowlogick <hello@techknowlogick.com> | 2019-01-17 19:01:04 -0500 |
commit | 07802a2bc503a8c13d50e7ef04a0e13ccf2a90f8 (patch) | |
tree | 87ced90635366b09e7e5f2634acfe2cbec2bc9f6 /templates/repo | |
parent | 9edc829c1758b436f8f52ebe61479af087940d60 (diff) | |
download | gitea-07802a2bc503a8c13d50e7ef04a0e13ccf2a90f8.tar.gz gitea-07802a2bc503a8c13d50e7ef04a0e13ccf2a90f8.zip |
Refactor repo.isBare to repo.isEmpty #5629 (#5714)
* Refactor repo.isBare to repo.isEmpty #5629
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove Sync call
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/empty.tmpl (renamed from templates/repo/bare.tmpl) | 2 | ||||
-rw-r--r-- | templates/repo/header.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/settings/branches.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/navbar.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/sub_menu.tmpl | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/templates/repo/bare.tmpl b/templates/repo/empty.tmpl index ec4be2bdea..c213381d78 100644 --- a/templates/repo/bare.tmpl +++ b/templates/repo/empty.tmpl @@ -59,7 +59,7 @@ git push -u origin master</code></pre> </div> {{else}} <div class="ui segment center"> - {{.i18n.Tr "repo.bare_message"}} + {{.i18n.Tr "repo.empty_message"}} </div> {{end}} </div> diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index b0ea694ff9..3dc5a40f18 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -30,7 +30,7 @@ {{.NumStars}} </a> </div> - {{if and (not .IsBare) ($.Permission.CanRead $.UnitTypeCode)}} + {{if and (not .IsEmpty) ($.Permission.CanRead $.UnitTypeCode)}} <div class="ui compact labeled button" tabindex="0"> <a class="ui compact button {{if or (not $.IsSigned) (not $.CanSignedUserFork)}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else if $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" {{ else }} data-content="{{$.i18n.Tr "repo.fork_guest_user" }}" href="{{AppSubUrl}}/user/login?redirect_to={{AppSubUrl}}/repo/fork/{{.ID}}" {{end}} data-position="top center" data-variation="tiny"> <i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}} @@ -71,7 +71,7 @@ </a> {{end}} - {{if and (.Permission.CanRead $.UnitTypeReleases) (not .IsBareRepo) }} + {{if and (.Permission.CanRead $.UnitTypeReleases) (not .IsEmptyRepo) }} <a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases"> <i class="octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .Repository.NumReleases}}gray{{else}}blue{{end}} small label">{{.Repository.NumReleases}}</span> </a> @@ -83,7 +83,7 @@ </a> {{end}} - {{if and (.Permission.CanReadAny $.UnitTypePullRequests $.UnitTypeIssues $.UnitTypeReleases) (not .IsBareRepo)}} + {{if and (.Permission.CanReadAny $.UnitTypePullRequests $.UnitTypeIssues $.UnitTypeReleases) (not .IsEmptyRepo)}} <a class="{{if .PageIsActivity}}active{{end}} item" href="{{.RepoLink}}/activity"> <i class="octicon octicon-pulse"></i> {{.i18n.Tr "repo.activity"}} </a> diff --git a/templates/repo/settings/branches.tmpl b/templates/repo/settings/branches.tmpl index 6df2517a94..369f73fcc7 100644 --- a/templates/repo/settings/branches.tmpl +++ b/templates/repo/settings/branches.tmpl @@ -14,7 +14,7 @@ <form class="ui form" action="{{.Link}}" method="post"> {{.CsrfTokenHtml}} <input type="hidden" name="action" value="default_branch"> - {{if not .Repository.IsBare}} + {{if not .Repository.IsEmpty}} <div class="required inline field"> <div class="ui dropdown selection" tabindex="0"> <select name="branch"> diff --git a/templates/repo/settings/navbar.tmpl b/templates/repo/settings/navbar.tmpl index 3d9d7d15a7..24082000e2 100644 --- a/templates/repo/settings/navbar.tmpl +++ b/templates/repo/settings/navbar.tmpl @@ -5,7 +5,7 @@ <a class="{{if .PageIsSettingsCollaboration}}active{{end}} item" href="{{.RepoLink}}/settings/collaboration"> {{.i18n.Tr "repo.settings.collaboration"}} </a> - {{if not .Repository.IsBare}} + {{if not .Repository.IsEmpty}} <a class="{{if .PageIsSettingsBranches}}active{{end}} item" href="{{.RepoLink}}/settings/branches"> {{.i18n.Tr "repo.settings.branches"}} </a> diff --git a/templates/repo/sub_menu.tmpl b/templates/repo/sub_menu.tmpl index 4ca1aa5cbb..54e219def8 100644 --- a/templates/repo/sub_menu.tmpl +++ b/templates/repo/sub_menu.tmpl @@ -1,11 +1,11 @@ <div class="ui segment sub-menu"> <div class="ui two horizontal center link list"> - {{if and (.Permission.CanRead $.UnitTypeCode) (not .IsBareRepo)}} + {{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo)}} <div class="item{{if .PageIsCommits}} active{{end}}"> <a href="{{.RepoLink}}/commits{{if .IsViewBranch}}/branch{{else if .IsViewTag}}/tag{{else if .IsViewCommit}}/commit{{end}}/{{EscapePound .BranchName}}"><i class="octicon octicon-history"></i> <b>{{.CommitsCount}}</b> {{.i18n.Tr (TrN .i18n.Lang .CommitsCount "repo.commit" "repo.commits") }}</a> </div> {{end}} - {{if and (.Permission.CanRead $.UnitTypeCode) (not .IsBareRepo) }} + {{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) }} <div class="item{{if .PageIsBranches}} active{{end}}"> <a href="{{.RepoLink}}/branches/"><i class="octicon octicon-git-branch"></i> <b>{{.BranchesCount}}</b> {{.i18n.Tr (TrN .i18n.Lang .BranchesCount "repo.branch" "repo.branches") }}</a> </div> |