You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.6 KiB

9 years ago
9 years ago
  1. {{template "base/head" .}}
  2. <div class="repository settings collaboration">
  3. {{template "repo/header" .}}
  4. {{template "repo/settings/navbar" .}}
  5. <div class="ui container">
  6. {{template "base/alert" .}}
  7. <h4 class="ui top attached header">
  8. {{.i18n.Tr "repo.settings.collaboration"}}
  9. </h4>
  10. {{if .Collaborators}}
  11. <div class="ui attached segment collaborator list">
  12. {{range .Collaborators}}
  13. <div class="item ui grid">
  14. <div class="ui five wide column">
  15. <a href="{{AppSubUrl}}/{{.Name}}">
  16. <img class="ui avatar image" src="{{.RelAvatarLink}}">
  17. {{.DisplayName}}
  18. </a>
  19. </div>
  20. <div class="ui eight wide column">
  21. <span class="octicon octicon-shield"></span>
  22. <div class="ui inline dropdown">
  23. <div class="text">{{$.i18n.Tr .Collaboration.ModeI18nKey}}</div>
  24. <i class="dropdown icon"></i>
  25. <div class="access-mode menu" data-url="{{$.Link}}/access_mode" data-uid="{{.ID}}">
  26. <div class="item" data-text="{{$.i18n.Tr "repo.settings.collaboration.admin"}}" data-value="3">{{$.i18n.Tr "repo.settings.collaboration.admin"}}</div>
  27. <div class="item" data-text="{{$.i18n.Tr "repo.settings.collaboration.write"}}" data-value="2">{{$.i18n.Tr "repo.settings.collaboration.write"}}</div>
  28. <div class="item" data-text="{{$.i18n.Tr "repo.settings.collaboration.read"}}" data-value="1">{{$.i18n.Tr "repo.settings.collaboration.read"}}</div>
  29. </div>
  30. </div>
  31. </div>
  32. <div class="ui two wide column">
  33. <button class="ui red tiny button inline text-thin delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
  34. {{$.i18n.Tr "repo.settings.delete_collaborator"}}
  35. </button>
  36. </div>
  37. </div>
  38. {{end}}
  39. </div>
  40. {{end}}
  41. <div class="ui bottom attached segment">
  42. <form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post">
  43. {{.CsrfTokenHtml}}
  44. <div class="inline field ui left">
  45. <div id="search-user-box" class="ui search">
  46. <div class="ui input">
  47. <input class="prompt" name="collaborator" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" autofocus required>
  48. </div>
  49. </div>
  50. </div>
  51. <button class="ui green button">{{.i18n.Tr "repo.settings.add_collaborator"}}</button>
  52. </form>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="ui small basic delete modal">
  57. <div class="ui icon header">
  58. <i class="trash icon"></i>
  59. {{.i18n.Tr "repo.settings.collaborator_deletion"}}
  60. </div>
  61. <div class="content">
  62. <p>{{.i18n.Tr "repo.settings.collaborator_deletion_desc"}}</p>
  63. </div>
  64. {{template "base/delete_modal_actions" .}}
  65. </div>
  66. {{template "base/footer" .}}