diff options
Diffstat (limited to 'templates/org/team')
-rw-r--r-- | templates/org/team/members.tmpl | 64 | ||||
-rw-r--r-- | templates/org/team/new.tmpl | 150 | ||||
-rw-r--r-- | templates/org/team/repositories.tmpl | 62 | ||||
-rw-r--r-- | templates/org/team/sidebar.tmpl | 80 | ||||
-rw-r--r-- | templates/org/team/teams.tmpl | 56 |
5 files changed, 206 insertions, 206 deletions
diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl index 83b832e107..3f070b7412 100644 --- a/templates/org/team/members.tmpl +++ b/templates/org/team/members.tmpl @@ -1,46 +1,46 @@ {{template "base/head" .}} <div class="organization teams"> {{template "org/header" .}} - <div class="ui container"> - {{template "base/alert" .}} - <div class="ui grid"> + <div class="ui container"> + {{template "base/alert" .}} + <div class="ui grid"> {{template "org/team/sidebar" .}} <div class="ui ten wide column"> <div class="ui top attached header"> {{.i18n.Tr "org.teams.members"}} </div> <div class="ui attached table segment members"> - {{range .Team.Members}} - <div class="item"> - {{if $.IsOrganizationOwner}} - <a class="ui red small button right" href="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/remove?uid={{.Id}}">{{$.i18n.Tr "org.members.remove"}}</a> - {{end}} - <a href="{{.HomeLink}}"> - <img class="ui avatar image" src="{{.AvatarLink}}"> - {{.DisplayName}} - </a> - </div> - {{end}} - </div> - {{if .IsOrganizationOwner}} - <div class="ui bottom attached segment"> - <form class="ui form" id="add-member-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/add" method="post"> - {{.CsrfTokenHtml}} - <input type="hidden" name="uid" value="{{.SignedUser.Id}}"> - <div class="inline field ui left"> - <div id="search-user-box"> - <div class="ui input"> - <input class="prompt" name="uname" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required> - </div> - <div class="ui segment results hide"></div> - </div> - </div> - <button class="ui green button">{{.i18n.Tr "org.teams.add_team_member"}}</button> - </form> + {{range .Team.Members}} + <div class="item"> + {{if $.IsOrganizationOwner}} + <a class="ui red small button right" href="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/remove?uid={{.Id}}">{{$.i18n.Tr "org.members.remove"}}</a> + {{end}} + <a href="{{.HomeLink}}"> + <img class="ui avatar image" src="{{.AvatarLink}}"> + {{.DisplayName}} + </a> + </div> + {{end}} </div> + {{if .IsOrganizationOwner}} + <div class="ui bottom attached segment"> + <form class="ui form" id="add-member-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/add" method="post"> + {{.CsrfTokenHtml}} + <input type="hidden" name="uid" value="{{.SignedUser.Id}}"> + <div class="inline field ui left"> + <div id="search-user-box"> + <div class="ui input"> + <input class="prompt" name="uname" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required> + </div> + <div class="ui segment results hide"></div> + </div> + </div> + <button class="ui green button">{{.i18n.Tr "org.teams.add_team_member"}}</button> + </form> + </div> {{end}} </div> - </div> + </div> </div> </div> -{{template "base/footer" .}}
\ No newline at end of file +{{template "base/footer" .}} diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl index 8d09e2ac0f..6293efb62e 100644 --- a/templates/org/team/new.tmpl +++ b/templates/org/team/new.tmpl @@ -1,82 +1,82 @@ {{template "base/head" .}} <div class="organization new team"> - {{template "org/header" .}} - <div class="ui middle very relaxed page grid"> - <div class="column"> - <form class="ui form" action="{{if .PageIsOrgTeamsNew}}{{.OrgLink}}/teams/new{{else}}{{.OrgLink}}/teams/{{.Team.LowerName}}/edit{{end}}" data-delete-url="{{.OrgLink}}/teams/{{.Team.LowerName}}/delete" method="post"> - {{.CsrfTokenHtml}} - <h3 class="ui top attached header"> - {{if .PageIsOrgTeamsNew}}{{.i18n.Tr "org.create_new_team"}}{{else}}{{.i18n.Tr "org.teams.settings"}}{{end}} - </h3> - <div class="ui attached segment"> - {{template "base/alert" .}} - <div class="required field {{if .Err_TeamName}}error{{end}}"> - <label for="team_name">{{.i18n.Tr "org.team_name"}}</label> - {{if eq .Team.LowerName "owners"}} - <input type="hidden" name="team_name" value="{{.team_name}}"> - {{end}} - <input id="team_name" name="team_name" value="{{.team_name}}" required {{if eq .Team.LowerName "owners"}}disabled{{end}} autofocus> - <span class="help">{{.i18n.Tr "org.team_name_helper"}}</span> - </div> - <div class="field {{if .Err_Description}}error{{end}}"> - <label for="desc">{{.i18n.Tr "org.team_desc"}}</label> - <input id="desc" name="desc" value="{{.desc}}"> - <span class="help">{{.i18n.Tr "org.team_desc_helper"}}</span> - </div> - {{if not (eq .Team.LowerName "owners")}} - <div class="grouped field"> - <label>{{.i18n.Tr "org.team_permission_desc"}}</label> - <br> - <div class="field"> - <div class="ui radio checkbox"> - <input type="radio" name="permission" value="read" {{if or .PageIsOrgTeamsNew (eq .Team.Authorize 1)}}checked{{end}}> - <label>{{.i18n.Tr "org.teams.read_access"}}</label> - <span class="help">{{.i18n.Tr "org.teams.read_access_helper"}}</span> - </div> - </div> - <div class="field"> - <div class="ui radio checkbox"> - <input type="radio" name="permission" value="write" {{if eq .Team.Authorize 2}}checked{{end}}> - <label>{{.i18n.Tr "org.teams.write_access"}}</label> - <span class="help">{{.i18n.Tr "org.teams.write_access_helper"}}</span> - </div> - </div> - <div class="field"> - <div class="ui radio checkbox"> - <input type="radio" name="permission" value="admin" {{if eq .Team.Authorize 3}}checked{{end}}> - <label>{{.i18n.Tr "org.teams.admin_access"}}</label> - <span class="help">{{.i18n.Tr "org.teams.admin_access_helper"}}</span> - </div> - </div> - </div> - <div class="ui divider"></div> - {{end}} + {{template "org/header" .}} + <div class="ui middle very relaxed page grid"> + <div class="column"> + <form class="ui form" action="{{if .PageIsOrgTeamsNew}}{{.OrgLink}}/teams/new{{else}}{{.OrgLink}}/teams/{{.Team.LowerName}}/edit{{end}}" data-delete-url="{{.OrgLink}}/teams/{{.Team.LowerName}}/delete" method="post"> + {{.CsrfTokenHtml}} + <h3 class="ui top attached header"> + {{if .PageIsOrgTeamsNew}}{{.i18n.Tr "org.create_new_team"}}{{else}}{{.i18n.Tr "org.teams.settings"}}{{end}} + </h3> + <div class="ui attached segment"> + {{template "base/alert" .}} + <div class="required field {{if .Err_TeamName}}error{{end}}"> + <label for="team_name">{{.i18n.Tr "org.team_name"}}</label> + {{if eq .Team.LowerName "owners"}} + <input type="hidden" name="team_name" value="{{.team_name}}"> + {{end}} + <input id="team_name" name="team_name" value="{{.team_name}}" required {{if eq .Team.LowerName "owners"}}disabled{{end}} autofocus> + <span class="help">{{.i18n.Tr "org.team_name_helper"}}</span> + </div> + <div class="field {{if .Err_Description}}error{{end}}"> + <label for="desc">{{.i18n.Tr "org.team_desc"}}</label> + <input id="desc" name="desc" value="{{.desc}}"> + <span class="help">{{.i18n.Tr "org.team_desc_helper"}}</span> + </div> + {{if not (eq .Team.LowerName "owners")}} + <div class="grouped field"> + <label>{{.i18n.Tr "org.team_permission_desc"}}</label> + <br> + <div class="field"> + <div class="ui radio checkbox"> + <input type="radio" name="permission" value="read" {{if or .PageIsOrgTeamsNew (eq .Team.Authorize 1)}}checked{{end}}> + <label>{{.i18n.Tr "org.teams.read_access"}}</label> + <span class="help">{{.i18n.Tr "org.teams.read_access_helper"}}</span> + </div> + </div> + <div class="field"> + <div class="ui radio checkbox"> + <input type="radio" name="permission" value="write" {{if eq .Team.Authorize 2}}checked{{end}}> + <label>{{.i18n.Tr "org.teams.write_access"}}</label> + <span class="help">{{.i18n.Tr "org.teams.write_access_helper"}}</span> + </div> + </div> + <div class="field"> + <div class="ui radio checkbox"> + <input type="radio" name="permission" value="admin" {{if eq .Team.Authorize 3}}checked{{end}}> + <label>{{.i18n.Tr "org.teams.admin_access"}}</label> + <span class="help">{{.i18n.Tr "org.teams.admin_access_helper"}}</span> + </div> + </div> + </div> + <div class="ui divider"></div> + {{end}} - <div class="field"> - {{if .PageIsOrgTeamsNew}} - <button class="ui green button">{{.i18n.Tr "org.create_new_team"}}</button> - <a class="ui button" href="{{.OrgLink}}/teams">{{.i18n.Tr "cancel"}}</a> - {{else}} - <button class="ui green button">{{.i18n.Tr "org.teams.update_settings"}}</button> - {{if not (eq .Team.LowerName "owners")}} - <button class="ui red button delete-button" data-url="{{.OrgLink}}/teams/{{.team_name}}/delete">{{.i18n.Tr "org.teams.delete_team"}}</button> - {{end}} - {{end}} - </div> - </div> - </form> - </div> - </div> + <div class="field"> + {{if .PageIsOrgTeamsNew}} + <button class="ui green button">{{.i18n.Tr "org.create_new_team"}}</button> + <a class="ui button" href="{{.OrgLink}}/teams">{{.i18n.Tr "cancel"}}</a> + {{else}} + <button class="ui green button">{{.i18n.Tr "org.teams.update_settings"}}</button> + {{if not (eq .Team.LowerName "owners")}} + <button class="ui red button delete-button" data-url="{{.OrgLink}}/teams/{{.team_name}}/delete">{{.i18n.Tr "org.teams.delete_team"}}</button> + {{end}} + {{end}} + </div> + </div> + </form> + </div> + </div> </div> <div class="ui small basic delete modal"> - <div class="ui icon header"> - <i class="trash icon"></i> - {{.i18n.Tr "org.teams.delete_team_title"}} - </div> - <div class="content"> - <p>{{.i18n.Tr "org.teams.delete_team_desc"}}</p> - </div> - {{template "base/delete_modal_actions" .}} + <div class="ui icon header"> + <i class="trash icon"></i> + {{.i18n.Tr "org.teams.delete_team_title"}} + </div> + <div class="content"> + <p>{{.i18n.Tr "org.teams.delete_team_desc"}}</p> + </div> + {{template "base/delete_modal_actions" .}} </div> -{{template "base/footer" .}}
\ No newline at end of file +{{template "base/footer" .}} diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl index 28126bef32..1f8d1a08f0 100644 --- a/templates/org/team/repositories.tmpl +++ b/templates/org/team/repositories.tmpl @@ -1,9 +1,9 @@ {{template "base/head" .}} <div class="organization teams"> {{template "org/header" .}} - <div class="ui container"> - {{template "base/alert" .}} - <div class="ui grid"> + <div class="ui container"> + {{template "base/alert" .}} + <div class="ui grid"> {{template "org/team/sidebar" .}} <div class="ui ten wide column"> <div class="ui top attached header"> @@ -11,36 +11,36 @@ </div> <div class="ui attached table segment repositories"> {{$canAddRemove := and $.IsOrganizationOwner (not (eq $.Team.LowerName "owners"))}} - {{range .Team.Repos}} - <div class="item"> - {{if $canAddRemove}} - <a class="ui red small button right" href="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/repo/remove?repoid={{.ID}}">{{$.i18n.Tr "org.teams.remove_repo"}}</a> - {{end}} - <a class="member" href="{{AppSubUrl}}/{{$.Org.Name}}/{{.Name}}"> - <i class="icon octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i> - <strong>{{$.Org.Name}}/{{.Name}}</strong> - </a> - </div> - {{end}} - </div> - {{if $canAddRemove}} - <div class="ui bottom attached segment"> - <form class="ui form" id="add-repo-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/repo/add" method="post"> - {{.CsrfTokenHtml}} - <div class="inline field ui left"> - <div id="search-repo-box" data-uid="{{.Org.Id}}"> - <div class="ui input"> - <input class="prompt" name="repo_name" placeholder="{{.i18n.Tr "org.teams.search_repo_placeholder"}}" autocomplete="off" required> - </div> - <div class="ui segment results hide"></div> - </div> - </div> - <button class="ui green button">{{.i18n.Tr "org.teams.add_team_repository"}}</button> - </form> - </div> + {{range .Team.Repos}} + <div class="item"> + {{if $canAddRemove}} + <a class="ui red small button right" href="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/repo/remove?repoid={{.ID}}">{{$.i18n.Tr "org.teams.remove_repo"}}</a> + {{end}} + <a class="member" href="{{AppSubUrl}}/{{$.Org.Name}}/{{.Name}}"> + <i class="icon octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i> + <strong>{{$.Org.Name}}/{{.Name}}</strong> + </a> + </div> + {{end}} + </div> + {{if $canAddRemove}} + <div class="ui bottom attached segment"> + <form class="ui form" id="add-repo-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/repo/add" method="post"> + {{.CsrfTokenHtml}} + <div class="inline field ui left"> + <div id="search-repo-box" data-uid="{{.Org.Id}}"> + <div class="ui input"> + <input class="prompt" name="repo_name" placeholder="{{.i18n.Tr "org.teams.search_repo_placeholder"}}" autocomplete="off" required> + </div> + <div class="ui segment results hide"></div> + </div> + </div> + <button class="ui green button">{{.i18n.Tr "org.teams.add_team_repository"}}</button> + </form> + </div> {{end}} </div> </div> </div> </div> -{{template "base/footer" .}}
\ No newline at end of file +{{template "base/footer" .}} diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl index 5abf34be6c..d17261593d 100644 --- a/templates/org/team/sidebar.tmpl +++ b/templates/org/team/sidebar.tmpl @@ -1,41 +1,41 @@ <div class="ui six wide column"> - <h4 class="ui top attached header"> - <strong>{{.Team.Name}}</strong> - <div class="ui right"> - {{if .Team.IsMember $.SignedUser.Id}} - <a class="ui red tiny button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/leave?uid={{$.SignedUser.Id}}&page=team">{{$.i18n.Tr "org.teams.leave"}}</a> - {{else if .IsOrganizationOwner}} - <a class="ui blue tiny button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/join?uid={{$.SignedUser.Id}}&page=team">{{$.i18n.Tr "org.teams.join"}}</a> - {{end}} - </div> - </h4> - <div class="ui attached table segment detail"> - <div class="item"> - {{if .Team.Description}} - {{.Team.Description}} - {{else}} - <span class="text grey italic">{{.i18n.Tr "org.teams.no_desc"}}</span> - {{end}} - </div> - <div class="item"> - <a href="{{.OrgLink}}/teams/{{.Team.LowerName}}"><span class="octicon octicon-person"></span> <strong>{{.Team.NumMembers}}</strong> {{$.i18n.Tr "org.lower_members"}}</a> · - <a href="{{.OrgLink}}/teams/{{.Team.LowerName}}/repositories"><span class="octicon octicon-repo"></span> <strong>{{.Team.NumRepos}}</strong> {{$.i18n.Tr "org.lower_repositories"}}</a> - </div> - <div class="item"> - {{if eq .Team.LowerName "owners"}} - {{.i18n.Tr "org.teams.owners_permission_desc" | Str2html}} - {{else if (eq .Team.Authorize 1)}} - {{.i18n.Tr "org.teams.read_permission_desc" | Str2html}} - {{else if (eq .Team.Authorize 2)}} - {{.i18n.Tr "org.teams.write_permission_desc" | Str2html}} - {{else if (eq .Team.Authorize 3)}} - {{.i18n.Tr "org.teams.admin_permission_desc" | Str2html}} - {{end}} - </div> - </div> - {{if .IsOrganizationOwner}} - <div class="ui bottom attached segment"> - <a class="ui teal small button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/edit"><span class="octicon octicon-gear"></span> {{$.i18n.Tr "org.teams.settings"}}</a> - </div> - {{end}} -</div>
\ No newline at end of file + <h4 class="ui top attached header"> + <strong>{{.Team.Name}}</strong> + <div class="ui right"> + {{if .Team.IsMember $.SignedUser.Id}} + <a class="ui red tiny button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/leave?uid={{$.SignedUser.Id}}&page=team">{{$.i18n.Tr "org.teams.leave"}}</a> + {{else if .IsOrganizationOwner}} + <a class="ui blue tiny button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/join?uid={{$.SignedUser.Id}}&page=team">{{$.i18n.Tr "org.teams.join"}}</a> + {{end}} + </div> + </h4> + <div class="ui attached table segment detail"> + <div class="item"> + {{if .Team.Description}} + {{.Team.Description}} + {{else}} + <span class="text grey italic">{{.i18n.Tr "org.teams.no_desc"}}</span> + {{end}} + </div> + <div class="item"> + <a href="{{.OrgLink}}/teams/{{.Team.LowerName}}"><span class="octicon octicon-person"></span> <strong>{{.Team.NumMembers}}</strong> {{$.i18n.Tr "org.lower_members"}}</a> · + <a href="{{.OrgLink}}/teams/{{.Team.LowerName}}/repositories"><span class="octicon octicon-repo"></span> <strong>{{.Team.NumRepos}}</strong> {{$.i18n.Tr "org.lower_repositories"}}</a> + </div> + <div class="item"> + {{if eq .Team.LowerName "owners"}} + {{.i18n.Tr "org.teams.owners_permission_desc" | Str2html}} + {{else if (eq .Team.Authorize 1)}} + {{.i18n.Tr "org.teams.read_permission_desc" | Str2html}} + {{else if (eq .Team.Authorize 2)}} + {{.i18n.Tr "org.teams.write_permission_desc" | Str2html}} + {{else if (eq .Team.Authorize 3)}} + {{.i18n.Tr "org.teams.admin_permission_desc" | Str2html}} + {{end}} + </div> + </div> + {{if .IsOrganizationOwner}} + <div class="ui bottom attached segment"> + <a class="ui teal small button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/edit"><span class="octicon octicon-gear"></span> {{$.i18n.Tr "org.teams.settings"}}</a> + </div> + {{end}} +</div> diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl index 2289af123f..a5ad5d48c1 100644 --- a/templates/org/team/teams.tmpl +++ b/templates/org/team/teams.tmpl @@ -1,41 +1,41 @@ {{template "base/head" .}} <div class="organization teams"> {{template "org/header" .}} - <div class="ui container"> - {{template "base/alert" .}} + <div class="ui container"> + {{template "base/alert" .}} {{if .IsOrganizationOwner}} - <div class="text right"> - <a class="ui green button" href="{{.OrgLink}}/teams/new"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "org.create_new_team"}}</a> - </div> - <div class="ui divider"></div> + <div class="text right"> + <a class="ui green button" href="{{.OrgLink}}/teams/new"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "org.create_new_team"}}</a> + </div> + <div class="ui divider"></div> {{end}} <div class="ui two column grid"> {{range .Teams}} - <div class="column"> - <div class="ui top attached header"> - <a class="text black" href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong>{{.Name}}</strong></a> - <div class="ui right"> - {{if .IsMember $.SignedUser.Id}} - <a class="ui red small button" href="{{$.OrgLink}}/teams/{{.LowerName}}/action/leave?uid={{$.SignedUser.Id}}">{{$.i18n.Tr "org.teams.leave"}}</a> - {{else if $.IsOrganizationOwner}} - <a class="ui blue small button" href="{{$.OrgLink}}/teams/{{.LowerName}}/action/join?uid={{$.SignedUser.Id}}">{{$.i18n.Tr "org.teams.join"}}</a> - {{end}} - </div> - </div> - <div class="ui attached segment members"> - {{range .Members}} - <a href="{{.HomeLink}}" title="{{.Name}}"> - <img class="ui avatar image" src="{{.AvatarLink}}"> - </a> - {{end}} + <div class="column"> + <div class="ui top attached header"> + <a class="text black" href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong>{{.Name}}</strong></a> + <div class="ui right"> + {{if .IsMember $.SignedUser.Id}} + <a class="ui red small button" href="{{$.OrgLink}}/teams/{{.LowerName}}/action/leave?uid={{$.SignedUser.Id}}">{{$.i18n.Tr "org.teams.leave"}}</a> + {{else if $.IsOrganizationOwner}} + <a class="ui blue small button" href="{{$.OrgLink}}/teams/{{.LowerName}}/action/join?uid={{$.SignedUser.Id}}">{{$.i18n.Tr "org.teams.join"}}</a> + {{end}} + </div> + </div> + <div class="ui attached segment members"> + {{range .Members}} + <a href="{{.HomeLink}}" title="{{.Name}}"> + <img class="ui avatar image" src="{{.AvatarLink}}"> + </a> + {{end}} + </div> + <div class="ui bottom attached header"> + <p class="team-meta">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p> + </div> </div> - <div class="ui bottom attached header"> - <p class="team-meta">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p> - </div> - </div> {{end}} </div> </div> </div> -{{template "base/footer" .}}
\ No newline at end of file +{{template "base/footer" .}} |