diff options
author | Bwko <bouwko@gmail.com> | 2018-04-09 17:15:32 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-04-09 23:15:32 +0800 |
commit | 8ee45eb614eaa4814936a2166addc8c1208ea1f5 (patch) | |
tree | aa63463560f676b1be03ac53f817b32e52d5e334 /templates/repo/settings/options.tmpl | |
parent | 30c81a126c36da555f3e982d36c38779d962edfd (diff) | |
download | gitea-8ee45eb614eaa4814936a2166addc8c1208ea1f5.tar.gz gitea-8ee45eb614eaa4814936a2166addc8c1208ea1f5.zip |
Add EnableTimetracking option to app settings (#3719)
Diffstat (limited to 'templates/repo/settings/options.tmpl')
-rw-r--r-- | templates/repo/settings/options.tmpl | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 8470d6a5e2..3e811559ee 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -139,19 +139,20 @@ </div> </div> <div class="field {{if (.Repository.UnitEnabled $.UnitTypeExternalTracker)}}disabled{{end}}" id="internal_issue_box"> - <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}}> - <label>{{.i18n.Tr "repo.settings.enable_timetracker"}}</label> + {{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}}> + <label>{{.i18n.Tr "repo.settings.enable_timetracker"}}</label> + </div> </div> - </div> - <div class="field {{if not .Repository.IsTimetrackerEnabled}}disabled{{end}}" id="only_contributors"> - <div class="ui checkbox"> - - <input name="allow_only_contributors_to_track_time" type="checkbox" {{if .Repository.AllowOnlyContributorsToTrackTime}}checked{{end}}> - <label>{{.i18n.Tr "repo.settings.allow_only_contributors_to_track_time"}}</label> + <div class="field {{if not .Repository.IsTimetrackerEnabled}}disabled{{end}}" id="only_contributors"> + <div class="ui checkbox"> + <input name="allow_only_contributors_to_track_time" type="checkbox" {{if .Repository.AllowOnlyContributorsToTrackTime}}checked{{end}}> + <label>{{.i18n.Tr "repo.settings.allow_only_contributors_to_track_time"}}</label> + </div> </div> - </div> + {{end}} </div> <div class="field"> <div class="ui radio checkbox"> |