diff options
author | Unknwon <u@gogs.io> | 2017-03-23 14:28:31 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-03-23 14:28:31 -0400 |
commit | 66c1e6b0e8308068dbddaec03585f388875f4192 (patch) | |
tree | 1b34d0977ddd45ca2e6db84fb7939f874b04af2a /templates/user | |
parent | beee6e03b15e594f396fb2fb769b58e543ef1794 (diff) |
user/settings: complete repositories panel (#4312)
Diffstat (limited to 'templates/user')
-rw-r--r-- | templates/user/settings/navbar.tmpl | 4 | ||||
-rw-r--r-- | templates/user/settings/repos.tmpl | 49 | ||||
-rw-r--r-- | templates/user/settings/repositories.tmpl | 54 |
3 files changed, 56 insertions, 51 deletions
diff --git a/templates/user/settings/navbar.tmpl b/templates/user/settings/navbar.tmpl index a7744b5a..250bf77c 100644 --- a/templates/user/settings/navbar.tmpl +++ b/templates/user/settings/navbar.tmpl @@ -22,8 +22,8 @@ <a class="{{if .PageIsSettingsOrganizations}}active{{end}} item" href="{{AppSubUrl}}/user/settings/organizations"> {{.i18n.Tr "settings.orgs"}} </a> - <a class="{{if .PageIsSettingsRepositories}}active{{end}} item" href="{{AppSubUrl}}/user/settings/repos"> - {{.i18n.Tr "admin.repositories"}} + <a class="{{if .PageIsSettingsRepositories}}active{{end}} item" href="{{AppSubUrl}}/user/settings/repositories"> + {{.i18n.Tr "settings.repos"}} </a> <a class="{{if .PageIsSettingsDelete}}active{{end}} item" href="{{AppSubUrl}}/user/settings/delete"> {{.i18n.Tr "settings.delete"}} diff --git a/templates/user/settings/repos.tmpl b/templates/user/settings/repos.tmpl deleted file mode 100644 index e19dbfb4..00000000 --- a/templates/user/settings/repos.tmpl +++ /dev/null @@ -1,49 +0,0 @@ -{{template "base/head" .}} -<div class="user"> - <div class="ui container"> - <div class="ui grid"> - {{template "user/settings/navbar" .}} - <div class="twelve wide column content"> - {{template "base/alert" .}} - <h4 class="ui top attached header"> - {{.i18n.Tr "admin.repositories"}} ({{.i18n.Tr "admin.total" .Total}}) - </h4> - <div class="ui attached segment"> - {{template "admin/base/search" .}} - </div> - - {{range .Repos}} - <div class="ui attached segment repos"> - <div class="ui list"> - <div class="item"> - <a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}"> - <span class="octicon octicon-repo text light grey"></span> - {{.Owner.Name}}/{{.Name}} - </a> - <span class="ui text light grey">{{.Size | FileSize}}</span> - {{if .IsPrivate}} - <div class="right floated content"> - <a class="ui red tiny button inline text-thin delete-button" href="" data-url="{{$.Link}}/leave?page={{$.Page.Current}}" data-id="{{.ID}}">{{$.i18n.Tr "settings.leave"}}</a> - </div> - {{end}} - </div> - </div> - </div> - {{end}} - - {{template "admin/base/page" .}} - </div> - </div> - </div> -</div> - -<div class="ui small basic leave modal"> - <div class="ui icon header"> - {{.i18n.Tr "teams.leave"}} - </div> - <div class="content"> - <p>{{.i18n.Tr "teams.leave_desc"}}</p> - </div> - {{template "base/delete_modal_actions" .}} -</div> -{{template "base/footer" .}} diff --git a/templates/user/settings/repositories.tmpl b/templates/user/settings/repositories.tmpl new file mode 100644 index 00000000..e4fd1a3e --- /dev/null +++ b/templates/user/settings/repositories.tmpl @@ -0,0 +1,54 @@ +{{template "base/head" .}} +<div class="user settings repositories"> + <div class="ui container"> + <div class="ui grid"> + {{template "user/settings/navbar" .}} + <div class="twelve wide column content"> + {{template "base/alert" .}} + <h4 class="ui top attached header"> + {{.i18n.Tr "settings.repos"}} + </h4> + + <div class="ui attached segment repos"> + <div class="ui middle aligned divided list"> + {{range .Repos}} + <div class="item"> + <span class="text light grey"> + {{if .IsPrivate}} + <span class="text gold"><i class="octicon octicon-lock"></i></span> + {{else if .IsFork}} + <i class="octicon octicon-repo-forked"></i> + {{else if .IsMirror}} + <i class="octicon octicon-repo-clone"></i> + {{else}} + <i class="octicon octicon-repo"></i> + {{end}} + </span> + <a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}"> + {{.Owner.Name}}/{{.Name}} + </a> + <span class="ui text light grey">{{.Size | FileSize}}</span> + {{if not (eq .OwnerID $.SignedUserID)}} + <div class="right floated content"> + <a class="ui red tiny button inline text-thin delete-button" href="" data-url="{{$.Link}}/leave" data-id="{{.ID}}">{{$.i18n.Tr "settings.repos.leave"}}</a> + </div> + {{end}} + </div> + {{end}} + </div> + </div> + </div> + </div> + </div> +</div> + +<div class="ui small basic delete modal"> + <div class="ui icon header"> + {{.i18n.Tr "settings.repos.leave_title"}} + </div> + <div class="content"> + <p>{{.i18n.Tr "settings.repos.leave_desc"}}</p> + </div> + {{template "base/delete_modal_actions" .}} +</div> +{{template "base/footer" .}} |