diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-12-10 10:46:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-10 10:46:31 +0800 |
commit | 68704532c28cf09db96c988291b2f82c5e615984 (patch) | |
tree | c6537092dc11054f96b202fdb957755ed116cd99 /templates | |
parent | 097d4e30b180eef30600beef2c08095e2571319c (diff) | |
download | gitea-68704532c28cf09db96c988291b2f82c5e615984.tar.gz gitea-68704532c28cf09db96c988291b2f82c5e615984.zip |
Rename almost all Ctx functions (#22071)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin/config.tmpl | 2 | ||||
-rw-r--r-- | templates/org/team/new.tmpl | 8 | ||||
-rw-r--r-- | templates/org/team/sidebar.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/editor/commit_form.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/graph/commits.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/header.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/view_content/pull.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/view_content/sidebar.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/settings/collaboration.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/options.tmpl | 46 |
10 files changed, 39 insertions, 39 deletions
diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 982cfb2800..de33c6c553 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -177,7 +177,7 @@ <dt>{{.locale.Tr "admin.config.default_enable_timetracking"}}</dt> <dd>{{if .Service.DefaultEnableTimetracking}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dt>{{.locale.Tr "admin.config.default_allow_only_contributors_to_track_time"}}</dt> - <dd>{{if .Service.DefaultAllowOnlyContributorsToTrackTime}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> + <dd>{{if .Service.DefaultAllowOnlyContributorsToTrackTime $.Context}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> {{end}} <dt>{{.locale.Tr "admin.config.default_visibility_organization"}}</dt> <dd>{{.Service.DefaultOrgVisibility}}</dd> diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl index f6786f3d8d..10b5abda31 100644 --- a/templates/org/team/new.tmpl +++ b/templates/org/team/new.tmpl @@ -99,17 +99,17 @@ </td> <td class="center aligned"> <div class="ui radio checkbox"> - <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="0"{{if or ($unit.Type.UnitGlobalDisabled) (eq ($.Team.UnitAccessMode $unit.Type) 0)}} checked{{end}}> + <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="0"{{if or ($unit.Type.UnitGlobalDisabled) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 0)}} checked{{end}}> </div> </td> <td class="center aligned"> <div class="ui radio checkbox"> - <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}> + <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}> </div> </td> <td class="center aligned"> <div class="ui radio checkbox"> - <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="2"{{if (eq ($.Team.UnitAccessMode $unit.Type) 2)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}> + <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="2"{{if (eq ($.Team.UnitAccessMode $.Context $unit.Type) 2)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}> </div> </td> </tr> @@ -121,7 +121,7 @@ {{if lt $unit.MaxPerm 2}} <div {{if $unit.Type.UnitGlobalDisabled}}class="field tooltip" data-content="{{$.locale.Tr "repo.unit_disabled"}}"{{else}}class="field"{{end}}> <div class="ui checkbox"> - <input type="checkbox" class="hidden" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}> + <input type="checkbox" class="hidden" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}> <label>{{$.locale.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{$.locale.Tr "org.team_unit_disabled"}}{{end}}</label> <span class="help">{{$.locale.Tr $unit.DescKey}}</span> </div> diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl index 5d952b501e..ab118a7e26 100644 --- a/templates/org/team/sidebar.tmpl +++ b/templates/org/team/sidebar.tmpl @@ -61,11 +61,11 @@ {{if and (lt $unit.MaxPerm 2) (not $unit.Type.UnitGlobalDisabled)}} <tr> <td><strong>{{$.locale.Tr $unit.NameKey}}</strong></td> - <td>{{if eq ($.Team.UnitAccessMode $unit.Type) 0 -}} + <td>{{if eq ($.Team.UnitAccessMode $.Context $unit.Type) 0 -}} {{$.locale.Tr "org.teams.none_access"}} - {{- else if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $unit.Type) 1) -}} + {{- else if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1) -}} {{$.locale.Tr "org.teams.read_access"}} - {{- else if eq ($.Team.UnitAccessMode $unit.Type) 2 -}} + {{- else if eq ($.Team.UnitAccessMode $.Context $unit.Type) 2 -}} {{$.locale.Tr "org.teams.write_access"}} {{- end}}</td> </tr> diff --git a/templates/repo/editor/commit_form.tmpl b/templates/repo/editor/commit_form.tmpl index 95fcf2b855..8700f77401 100644 --- a/templates/repo/editor/commit_form.tmpl +++ b/templates/repo/editor/commit_form.tmpl @@ -40,8 +40,8 @@ </div> </div> <div class="field"> - {{$pullRequestEnabled := .Repository.UnitEnabled $.UnitTypePullRequests}} - {{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}} + {{$pullRequestEnabled := .Repository.UnitEnabled $.Context $.UnitTypePullRequests}} + {{$prUnit := .Repository.MustGetUnit $.Context $.UnitTypePullRequests}} <div class="ui radio checkbox"> {{if $pullRequestEnabled}} <input type="radio" class="js-quick-pull-choice-option" name="commit_choice" value="commit-to-new-branch" button_text="{{.locale.Tr "repo.editor.propose_file_change"}}" {{if eq .commit_choice "commit-to-new-branch"}}checked{{end}}> diff --git a/templates/repo/graph/commits.tmpl b/templates/repo/graph/commits.tmpl index 357c99b2b8..fc4b1a1ea3 100644 --- a/templates/repo/graph/commits.tmpl +++ b/templates/repo/graph/commits.tmpl @@ -37,7 +37,7 @@ {{if eq $refGroup "pull"}} {{if or (not $.HidePRRefs) (containGeneric $.SelectedBranches .Name)}} <!-- it's intended to use issues not pulls, if it's a pull you will get redirected --> - <a class="ui labelled icon button basic tiny mr-2" href="{{$.RepoLink}}/{{if $.Repository.UnitEnabled $.UnitTypePullRequests}}pulls{{else}}issues{{end}}/{{.ShortName|PathEscape}}"> + <a class="ui labelled icon button basic tiny mr-2" href="{{$.RepoLink}}/{{if $.Repository.UnitEnabled $.Context $.UnitTypePullRequests}}pulls{{else}}issues{{end}}/{{.ShortName|PathEscape}}"> {{svg "octicon-git-pull-request" 16 "mr-2"}}#{{.ShortName}} </a> {{end}} diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index c706e00777..4da91e424d 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -208,7 +208,7 @@ {{end}} {{if or (.Permission.CanRead $.UnitTypeWiki) (.Permission.CanRead $.UnitTypeExternalWiki)}} - <a class="{{if .PageIsWiki}}active {{end}}item" href="{{.RepoLink}}/wiki" {{if and (.Permission.CanRead $.UnitTypeExternalWiki) (not (HasPrefix ((.Repository.MustGetUnit $.UnitTypeExternalWiki).ExternalWikiConfig.ExternalWikiURL) (.Repository.HTMLURL)))}} target="_blank" rel="noopener noreferrer" {{end}}> + <a class="{{if .PageIsWiki}}active {{end}}item" href="{{.RepoLink}}/wiki" {{if and (.Permission.CanRead $.UnitTypeExternalWiki) (not (HasPrefix ((.Repository.MustGetUnit $.Context $.UnitTypeExternalWiki).ExternalWikiConfig.ExternalWikiURL) (.Repository.HTMLURL)))}} target="_blank" rel="noopener noreferrer" {{end}}> {{svg "octicon-book"}} {{.locale.Tr "repo.wiki"}} </a> {{end}} diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl index 9e0909064d..d68f3e5414 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -330,7 +330,7 @@ {{end}} {{if .AllowMerge}} {{/* user is allowed to merge */}} - {{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}} + {{$prUnit := .Repository.MustGetUnit $.Context $.UnitTypePullRequests}} {{$approvers := .Issue.PullRequest.GetApprovers}} {{if or $prUnit.PullRequestsConfig.AllowMerge $prUnit.PullRequestsConfig.AllowRebase $prUnit.PullRequestsConfig.AllowRebaseMerge $prUnit.PullRequestsConfig.AllowSquash}} {{$hasPendingPullRequestMergeTip := ""}} diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index af648387db..63b99136a8 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -337,7 +337,7 @@ </div> </div> {{end}} - {{if .Repository.IsTimetrackerEnabled}} + {{if .Repository.IsTimetrackerEnabled $.Context}} {{if and .CanUseTimetracker (not .Repository.IsArchived)}} <div class="ui divider"></div> <div class="ui timetrack"> @@ -444,7 +444,7 @@ {{end}} </div> - {{if .Repository.IsDependenciesEnabled}} + {{if .Repository.IsDependenciesEnabled $.Context}} <div class="ui divider"></div> <div class="ui depending"> diff --git a/templates/repo/settings/collaboration.tmpl b/templates/repo/settings/collaboration.tmpl index 342b260db6..2f932b4c39 100644 --- a/templates/repo/settings/collaboration.tmpl +++ b/templates/repo/settings/collaboration.tmpl @@ -74,7 +74,7 @@ {{if or (eq .AccessMode 1) (eq .AccessMode 2)}} {{$first := true}} <div class="description"> - Sections: {{range $u, $unit := $.Units}}{{if and ($.Repo.UnitEnabled $unit.Type) ($team.UnitEnabled $unit.Type)}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{$.locale.Tr $unit.NameKey}}{{end}}{{end}} {{if $first}}None{{end}} + Sections: {{range $u, $unit := $.Units}}{{if and ($.Repo.UnitEnabled $.Context $unit.Type) ($team.UnitEnabled $.Context $unit.Type)}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{$.locale.Tr $unit.NameKey}}{{end}}{{end}} {{if $first}}None{{end}} </div> {{end}} </div> diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 3c5996e903..aa79f75617 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -249,7 +249,7 @@ {{.CsrfTokenHtml}} <input type="hidden" name="action" value="advanced"> - {{$isWikiEnabled := or (.Repository.UnitEnabled $.UnitTypeWiki) (.Repository.UnitEnabled $.UnitTypeExternalWiki)}} + {{$isWikiEnabled := or (.Repository.UnitEnabled $.Context $.UnitTypeWiki) (.Repository.UnitEnabled $.Context $.UnitTypeExternalWiki)}} <div class="inline field"> <label>{{.locale.Tr "repo.wiki"}}</label> {{if and (.UnitTypeWiki.UnitGlobalDisabled) (.UnitTypeExternalWiki.UnitGlobalDisabled)}} @@ -268,7 +268,7 @@ {{else}} <div class="ui radio checkbox"> {{end}} - <input class="hidden enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="false" data-target="#external_wiki_box" {{if not (.Repository.UnitEnabled $.UnitTypeExternalWiki)}}checked{{end}}/> + <input class="hidden enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="false" data-target="#external_wiki_box" {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalWiki)}}checked{{end}}/> <label>{{.locale.Tr "repo.settings.use_internal_wiki"}}</label> </div> </div> @@ -278,20 +278,20 @@ {{else}} <div class="ui radio checkbox"> {{end}} - <input class="hidden enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="true" data-target="#external_wiki_box" {{if .Repository.UnitEnabled $.UnitTypeExternalWiki}}checked{{end}}/> + <input class="hidden enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="true" data-target="#external_wiki_box" {{if .Repository.UnitEnabled $.Context $.UnitTypeExternalWiki}}checked{{end}}/> <label>{{.locale.Tr "repo.settings.use_external_wiki"}}</label> </div> </div> - <div class="field {{if not (.Repository.UnitEnabled $.UnitTypeExternalWiki)}}disabled{{end}}" id="external_wiki_box"> + <div class="field {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalWiki)}}disabled{{end}}" id="external_wiki_box"> <label for="external_wiki_url">{{.locale.Tr "repo.settings.external_wiki_url"}}</label> - <input id="external_wiki_url" name="external_wiki_url" type="url" value="{{(.Repository.MustGetUnit $.UnitTypeExternalWiki).ExternalWikiConfig.ExternalWikiURL}}"> + <input id="external_wiki_url" name="external_wiki_url" type="url" value="{{(.Repository.MustGetUnit $.Context $.UnitTypeExternalWiki).ExternalWikiConfig.ExternalWikiURL}}"> <p class="help">{{.locale.Tr "repo.settings.external_wiki_url_desc"}}</p> </div> </div> <div class="ui divider"></div> - {{$isIssuesEnabled := or (.Repository.UnitEnabled $.UnitTypeIssues) (.Repository.UnitEnabled $.UnitTypeExternalTracker)}} + {{$isIssuesEnabled := or (.Repository.UnitEnabled $.Context $.UnitTypeIssues) (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}} <div class="inline field"> <label>{{.locale.Tr "repo.issues"}}</label> {{if and (.UnitTypeIssues.UnitGlobalDisabled) (.UnitTypeExternalTracker.UnitGlobalDisabled)}} @@ -310,28 +310,28 @@ {{else}} <div class="ui radio checkbox"> {{end}} - <input class="hidden enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="false" data-context="#internal_issue_box" data-target="#external_issue_box" {{if not (.Repository.UnitEnabled $.UnitTypeExternalTracker)}}checked{{end}}/> + <input class="hidden enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="false" data-context="#internal_issue_box" data-target="#external_issue_box" {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}}checked{{end}}/> <label>{{.locale.Tr "repo.settings.use_internal_issue_tracker"}}</label> </div> </div> - <div class="field {{if (.Repository.UnitEnabled $.UnitTypeExternalTracker)}}disabled{{end}}" id="internal_issue_box"> + <div class="field {{if (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}}disabled{{end}}" id="internal_issue_box"> {{if .Repository.CanEnableTimetracker}} <div class="field"> <div class="ui checkbox"> - <input name="enable_timetracker" class="enable-system" data-target="#only_contributors" type="checkbox" {{if .Repository.IsTimetrackerEnabled}}checked{{end}}> + <input name="enable_timetracker" class="enable-system" data-target="#only_contributors" type="checkbox" {{if .Repository.IsTimetrackerEnabled $.Context}}checked{{end}}> <label>{{.locale.Tr "repo.settings.enable_timetracker"}}</label> </div> </div> - <div class="field {{if not .Repository.IsTimetrackerEnabled}}disabled{{end}}" id="only_contributors"> + <div class="field {{if not (.Repository.IsTimetrackerEnabled $.Context)}}disabled{{end}}" id="only_contributors"> <div class="ui checkbox"> - <input name="allow_only_contributors_to_track_time" type="checkbox" {{if .Repository.AllowOnlyContributorsToTrackTime}}checked{{end}}> + <input name="allow_only_contributors_to_track_time" type="checkbox" {{if .Repository.AllowOnlyContributorsToTrackTime $.Context}}checked{{end}}> <label>{{.locale.Tr "repo.settings.allow_only_contributors_to_track_time"}}</label> </div> </div> {{end}} <div class="field"> <div class="ui checkbox"> - <input name="enable_issue_dependencies" type="checkbox" {{if (.Repository.IsDependenciesEnabled)}}checked{{end}}> + <input name="enable_issue_dependencies" type="checkbox" {{if (.Repository.IsDependenciesEnabled $.Context)}}checked{{end}}> <label>{{.locale.Tr "repo.issues.dependency.setting"}}</label> </div> </div> @@ -346,26 +346,26 @@ {{else}} <div class="ui radio checkbox"> {{end}} - <input class="hidden enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="true" data-context="#internal_issue_box" data-target="#external_issue_box" {{if .Repository.UnitEnabled $.UnitTypeExternalTracker}}checked{{end}}/> + <input class="hidden enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="true" data-context="#internal_issue_box" data-target="#external_issue_box" {{if .Repository.UnitEnabled $.Context $.UnitTypeExternalTracker}}checked{{end}}/> <label>{{.locale.Tr "repo.settings.use_external_issue_tracker"}}</label> </div> </div> - <div class="field {{if not (.Repository.UnitEnabled $.UnitTypeExternalTracker)}}disabled{{end}}" id="external_issue_box"> + <div class="field {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}}disabled{{end}}" id="external_issue_box"> <div class="field"> <label for="external_tracker_url">{{.locale.Tr "repo.settings.external_tracker_url"}}</label> - <input id="external_tracker_url" name="external_tracker_url" type="url" value="{{(.Repository.MustGetUnit $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerURL}}"> + <input id="external_tracker_url" name="external_tracker_url" type="url" value="{{(.Repository.MustGetUnit $.Context $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerURL}}"> <p class="help">{{.locale.Tr "repo.settings.external_tracker_url_desc"}}</p> </div> <div class="field"> <label for="tracker_url_format">{{.locale.Tr "repo.settings.tracker_url_format"}}</label> - <input id="tracker_url_format" name="tracker_url_format" type="url" value="{{(.Repository.MustGetUnit $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerFormat}}" placeholder="e.g. https://github.com/{user}/{repo}/issues/{index}"> + <input id="tracker_url_format" name="tracker_url_format" type="url" value="{{(.Repository.MustGetUnit $.Context $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerFormat}}" placeholder="e.g. https://github.com/{user}/{repo}/issues/{index}"> <p class="help">{{.locale.Tr "repo.settings.tracker_url_format_desc" | Str2html}}</p> </div> <div class="inline fields"> <label for="issue_style">{{.locale.Tr "repo.settings.tracker_issue_style"}}</label> <div class="field"> <div class="ui radio checkbox"> - {{$externalTracker := (.Repository.MustGetUnit $.UnitTypeExternalTracker)}} + {{$externalTracker := (.Repository.MustGetUnit $.Context $.UnitTypeExternalTracker)}} {{$externalTrackerStyle := $externalTracker.ExternalTrackerConfig.ExternalTrackerStyle}} <input class="js-tracker-issue-style" name="tracker_issue_style" type="radio" value="numeric" {{if eq $externalTrackerStyle "numeric"}}checked{{end}}> <label>{{.locale.Tr "repo.settings.tracker_issue_style.numeric"}} <span class="ui light grey text">#1234</span></label> @@ -386,7 +386,7 @@ </div> <div class="field {{if ne $externalTrackerStyle "regexp"}}disabled{{end}}" id="tracker-issue-style-regex-box"> <label for="external_tracker_regexp_pattern">{{.locale.Tr "repo.settings.tracker_issue_style.regexp_pattern"}}</label> - <input id="external_tracker_regexp_pattern" name="external_tracker_regexp_pattern" value="{{(.Repository.MustGetUnit $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerRegexpPattern}}"> + <input id="external_tracker_regexp_pattern" name="external_tracker_regexp_pattern" value="{{(.Repository.MustGetUnit $.Context $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerRegexpPattern}}"> <p class="help">{{.locale.Tr "repo.settings.tracker_issue_style.regexp_pattern_desc" | Str2html}}</p> </div> </div> @@ -394,7 +394,7 @@ <div class="ui divider"></div> - {{$isProjectsEnabled := .Repository.UnitEnabled $.UnitTypeProjects}} + {{$isProjectsEnabled := .Repository.UnitEnabled $.Context $.UnitTypeProjects}} <div class="inline field"> <label>{{.locale.Tr "repo.project_board"}}</label> {{if .UnitTypeProjects.UnitGlobalDisabled}} @@ -407,7 +407,7 @@ </div> </div> - {{$isPackagesEnabled := .Repository.UnitEnabled $.UnitTypePackages}} + {{$isPackagesEnabled := .Repository.UnitEnabled $.Context $.UnitTypePackages}} <div class="inline field"> <label>{{.locale.Tr "repo.packages"}}</label> {{if .UnitTypePackages.UnitGlobalDisabled}} @@ -422,8 +422,8 @@ {{if not .IsMirror}} <div class="ui divider"></div> - {{$pullRequestEnabled := .Repository.UnitEnabled $.UnitTypePullRequests}} - {{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}} + {{$pullRequestEnabled := .Repository.UnitEnabled $.Context $.UnitTypePullRequests}} + {{$prUnit := .Repository.MustGetUnit $.Context $.UnitTypePullRequests}} <div class="inline field"> <label>{{.locale.Tr "repo.pulls"}}</label> {{if .UnitTypePullRequests.UnitGlobalDisabled}} @@ -880,7 +880,7 @@ </div> </div> - {{if .Repository.UnitEnabled $.UnitTypeWiki}} + {{if .Repository.UnitEnabled $.Context $.UnitTypeWiki}} <div class="ui small modal" id="delete-wiki-modal"> <div class="header"> {{.locale.Tr "repo.settings.wiki_delete"}} |