diff options
author | Unknwon <u@gogs.io> | 2016-08-30 16:18:33 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-30 16:18:33 -0700 |
commit | 8516dfcb6cb008f286ec84bed4243928acb94844 (patch) | |
tree | 9b3882438a04a3e659e49e35364a5643a71c9258 /templates | |
parent | c1ecb6c60a1acacf530e226b8043ca93d2fe4a07 (diff) | |
download | gitea-8516dfcb6cb008f286ec84bed4243928acb94844.tar.gz gitea-8516dfcb6cb008f286ec84bed4243928acb94844.zip |
#2018 able to sync now for mirrors
- Refactor code to use sync.UniqueQueue
- Closes #3509
Diffstat (limited to 'templates')
-rw-r--r-- | templates/.VERSION | 2 | ||||
-rw-r--r-- | templates/repo/settings/options.tmpl | 51 |
2 files changed, 40 insertions, 13 deletions
diff --git a/templates/.VERSION b/templates/.VERSION index 68c6d095c7..93b1bf2a43 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.9.95.0830
\ No newline at end of file +0.9.96.0830
\ No newline at end of file diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 956669eabf..6b61cb7f8e 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -50,12 +50,26 @@ </div> </div> {{end}} - {{if .Repository.IsMirror}} + + <div class="field"> + <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button> + </div> + </form> + </div> + + {{if .Repository.IsMirror}} + <h4 class="ui top attached header"> + {{.i18n.Tr "repo.settings.mirror_settings"}} + </h4> + <div class="ui attached segment"> + <form class="ui form" method="post"> + {{.CsrfTokenHtml}} + <input type="hidden" name="action" value="mirror"> <div class="inline field {{if .Err_EnablePrune}}error{{end}}"> - <label>{{.i18n.Tr "repo.mirror_prune"}}</label> + <label>{{.i18n.Tr "repo.mirror_prune"}}</label> <div class="ui checkbox"> - <input id="enable_prune" name="enable_prune" type="checkbox" {{if .MirrorEnablePrune}}checked{{end}}> - <label>{{.i18n.Tr "repo.mirror_prune_desc"}}</label> + <input id="enable_prune" name="enable_prune" type="checkbox" {{if .MirrorEnablePrune}}checked{{end}}> + <label>{{.i18n.Tr "repo.mirror_prune_desc"}}</label> </div> </div> <div class="inline field {{if .Err_Interval}}error{{end}}"> @@ -64,23 +78,36 @@ </div> <div class="field"> <label for="mirror_address">{{.i18n.Tr "repo.mirror_address"}}</label> - <input id="mirror_address" name="mirror_address" value="{{.Mirror.FullAddress}}"> + <input id="mirror_address" name="mirror_address" value="{{.Mirror.FullAddress}}" required> <p class="help">{{.i18n.Tr "repo.mirror_address_desc"}}</p> </div> - {{end}} + + <div class="field"> + <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button> + </div> + </form> <div class="ui divider"></div> - <div class="field"> - <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button> - </div> - </form> - </div> + + <form class="ui form" method="post"> + {{.CsrfTokenHtml}} + <input type="hidden" name="action" value="mirror-sync"> + <div class="inline field"> + <label>{{.i18n.Tr "repo.mirror_last_synced"}}</label> + <span>{{.Mirror.Updated}}</span> + </div> + <div class="field"> + <button class="ui blue button">{{$.i18n.Tr "repo.settings.sync_mirror"}}</button> + </div> + </form> + </div> + {{end}} <h4 class="ui top attached header"> {{.i18n.Tr "repo.settings.advanced_settings"}} </h4> <div class="ui attached segment"> - <form class="ui form" action="{{.Link}}" method="post"> + <form class="ui form" method="post"> {{.CsrfTokenHtml}} <input type="hidden" name="action" value="advanced"> |