aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/settings/options.tmpl
diff options
context:
space:
mode:
authorBwko <bouwko@gmail.com>2018-04-09 17:15:32 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2018-04-09 23:15:32 +0800
commit8ee45eb614eaa4814936a2166addc8c1208ea1f5 (patch)
treeaa63463560f676b1be03ac53f817b32e52d5e334 /templates/repo/settings/options.tmpl
parent30c81a126c36da555f3e982d36c38779d962edfd (diff)
downloadgitea-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.tmpl23
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">