diff options
author | Rémy Boulanouar <rboulanouar@gmail.com> | 2017-09-14 13:46:14 +0200 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-09-14 14:46:14 +0300 |
commit | e5d80b7090d7c1088854e8a0f8223bdf8a769d12 (patch) | |
tree | 0ce2f8ded817b346d6637dd06cf78080dab17bf1 /templates | |
parent | 1739e84ac02c0384c04576a00abab9348293f9c7 (diff) | |
download | gitea-e5d80b7090d7c1088854e8a0f8223bdf8a769d12.tar.gz gitea-e5d80b7090d7c1088854e8a0f8223bdf8a769d12.zip |
Implementation of all repositories of a user from user->settings (#1740)
* Implementation of all repositories of a user from user->settings
* Update message when no repository found
* Update according to comments
* Change UI to have a better look
* improved user repositories UI
Diffstat (limited to 'templates')
-rw-r--r-- | templates/user/settings/navbar.tmpl | 2 | ||||
-rw-r--r-- | templates/user/settings/repos.tmpl | 53 |
2 files changed, 55 insertions, 0 deletions
diff --git a/templates/user/settings/navbar.tmpl b/templates/user/settings/navbar.tmpl index ab9b41666d..b0a3c9fcc3 100644 --- a/templates/user/settings/navbar.tmpl +++ b/templates/user/settings/navbar.tmpl @@ -30,6 +30,8 @@ </a> <a class="{{if .PageIsSettingsOrganization}}active{{end}} item" href="{{AppSubUrl}}/user/settings/organization"> {{.i18n.Tr "settings.organization"}} + <a class="{{if .PageIsSettingsRepos}}active{{end}} item" href="{{AppSubUrl}}/user/settings/repos"> + {{.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 new file mode 100644 index 0000000000..39d98c6d1e --- /dev/null +++ b/templates/user/settings/repos.tmpl @@ -0,0 +1,53 @@ +{{template "base/head" .}}
+<div class="user settings">
+ {{template "user/settings/navbar" .}}
+ <div class="ui container">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "settings.repos"}}
+ </h4>
+ <div class="ui attached segment">
+ {{if .Repos}}
+ <div class="ui middle aligned divided list">
+ {{range .Repos}}
+ <div class="item">
+ <div class="content">
+ {{if .IsPrivate}}
+ <span class="text gold iconFloat"><i class="octicon octicon-lock"></i></span>
+ {{else if .IsFork}}
+ <span class="iconFloat"><i class="octicon octicon-repo-forked"></i></span>
+ {{else if .IsMirror}}
+ <span class="iconFloat"><i class="octicon octicon-repo-clone"></i></span>
+ {{else}}
+ <span class="iconFloat"><i class="octicon octicon-repo"></i></span>
+ {{end}}
+ <a class="name" href="{{AppSubUrl}}/{{$.Owner.Name}}/{{.Name}}">{{$.Owner.Name}}/{{.Name}}</a>
+ <span>{{SizeFmt .Size}}</span>
+ {{if .IsFork}}
+ {{$.i18n.Tr "repo.forked_from"}}
+ <span><a href="{{AppSubUrl}}/{{.BaseRepo.Owner.Name}}/{{.BaseRepo.Name}}">{{.BaseRepo.Owner.Name}}/{{.BaseRepo.Name}}</a></span>
+ {{end}}
+ </div>
+ </div>
+ {{end}}
+ </div>
+ {{else}}
+ <div class="item">
+ {{.i18n.Tr "settings.repos_none"}}
+ </div>
+ {{end}}
+ </div>
+ </div>
+</div>
+
+<div class="ui small basic delete modal">
+ <div class="ui icon header">
+ <i class="trash icon"></i>
+ {{.i18n.Tr "settings.remove_account_link"}}
+ </div>
+ <div class="content">
+ <p>{{.i18n.Tr "settings.remove_account_link_desc"}}</p>
+ </div>
+ {{template "base/delete_modal_actions" .}}
+</div>
+{{template "base/footer" .}}
|