diff options
author | Unknwon <u@gogs.io> | 2016-03-05 18:08:42 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-03-05 18:08:42 -0500 |
commit | 045f14fbd0e3553521f5092cf839be363c74a090 (patch) | |
tree | 9c82f5111c5c5262c97bd7936462fa4170e76b4f /templates/repo/settings | |
parent | 05d8664f15013b0159b3689bda84e89dd7be22fd (diff) | |
download | gitea-045f14fbd0e3553521f5092cf839be363c74a090.tar.gz gitea-045f14fbd0e3553521f5092cf839be363c74a090.zip |
#1146 finsih UI work for access mode of collaborators
Collaborators have write access as default, and can be changed via repository
collaboration settings page to change between read, write and admin.
Diffstat (limited to 'templates/repo/settings')
-rw-r--r-- | templates/repo/settings/collaboration.tmpl | 43 |
1 files changed, 35 insertions, 8 deletions
diff --git a/templates/repo/settings/collaboration.tmpl b/templates/repo/settings/collaboration.tmpl index c06fc2d4ff..0ad48f8c90 100644 --- a/templates/repo/settings/collaboration.tmpl +++ b/templates/repo/settings/collaboration.tmpl @@ -11,14 +11,30 @@ </h4> <div class="ui attached segment collaborator list"> {{range .Collaborators}} - <div class="item"> - {{if not (eq .Id $.Owner.Id)}} - <a href="{{$.RepoLink}}/settings/collaboration?remove={{.Name}}" class="ui right text red"><i class="fa fa-times"></i></a> - {{end}} - <a href="{{AppSubUrl}}/{{.Name}}"> - <img class="ui avatar image" src="{{.AvatarLink}}"> - {{.DisplayName}} - </a> + <div class="item ui grid"> + <div class="ui five wide column"> + <a href="{{AppSubUrl}}/{{.Name}}"> + <img class="ui avatar image" src="{{.AvatarLink}}"> + {{.DisplayName}} + </a> + </div> + <div class="ui eight wide column"> + <span class="octicon octicon-shield"></span> + <div class="ui inline dropdown"> + <div class="text">{{.Collaboration.ModeName}}</div> + <i class="dropdown icon"></i> + <div class="access-mode menu" data-url="{{$.Link}}/access_mode" data-uid="{{.Id}}"> + <div class="item" data-text="Admin" data-value="3">Admin</div> + <div class="item" data-text="Write" data-value="2">Write</div> + <div class="item" data-text="Read" data-value="1">Read</div> + </div> + </div> + </div> + <div class="ui two wide column"> + <button class="ui red tiny button inline text-thin delete-button" data-url="{{$.Link}}/delete" data-id="{{.Id}}"> + {{$.i18n.Tr "repo.settings.delete_collaborator"}} + </button> + </div> </div> {{end}} </div> @@ -40,4 +56,15 @@ </div> </div> </div> + +<div class="ui small basic delete modal"> + <div class="ui icon header"> + <i class="trash icon"></i> + {{.i18n.Tr "repo.settings.collaborator_deletion"}} + </div> + <div class="content"> + <p>{{.i18n.Tr "repo.settings.collaborator_deletion_desc"}}</p> + </div> + {{template "base/delete_modal_actions" .}} +</div> {{template "base/footer" .}} |