summaryrefslogtreecommitdiffstats
path: root/templates/org
diff options
context:
space:
mode:
authorAdam Strzelecki <ono@java.pl>2015-12-07 23:30:52 +0100
committerAdam Strzelecki <ono@java.pl>2015-12-08 00:57:46 +0100
commitda2585c11e11023ffa7a8c69d21c6fecac520a8e (patch)
tree1c2a575dfc00e0e78f47c497a6d9347b3edeca9a /templates/org
parentdd8a06a397e26c46639eba1313102560dfa49c95 (diff)
downloadgitea-da2585c11e11023ffa7a8c69d21c6fecac520a8e.tar.gz
gitea-da2585c11e11023ffa7a8c69d21c6fecac520a8e.zip
Indent all templates with tabs
This commit improves templates readability, since all of them use consistent indent with all template command blocks indented too. 1. Indents both HTML containers such as <div>, <p> and Go HTML template blocks such as {{if}} {{with}} 2. Cleans all trailing white-space 3. Adds trailing last line-break to each file
Diffstat (limited to 'templates/org')
-rw-r--r--templates/org/create.tmpl52
-rw-r--r--templates/org/header.tmpl40
-rw-r--r--templates/org/home.tmpl154
-rw-r--r--templates/org/member/invite.tmpl30
-rw-r--r--templates/org/member/members.tmpl86
-rw-r--r--templates/org/settings/delete.tmpl74
-rw-r--r--templates/org/settings/hook_new.tmpl48
-rw-r--r--templates/org/settings/hooks.tmpl14
-rw-r--r--templates/org/settings/navbar.tmpl18
-rw-r--r--templates/org/settings/options.tmpl104
-rw-r--r--templates/org/team/members.tmpl64
-rw-r--r--templates/org/team/new.tmpl150
-rw-r--r--templates/org/team/repositories.tmpl62
-rw-r--r--templates/org/team/sidebar.tmpl80
-rw-r--r--templates/org/team/teams.tmpl56
15 files changed, 516 insertions, 516 deletions
diff --git a/templates/org/create.tmpl b/templates/org/create.tmpl
index debc1b6a93..765ef240e5 100644
--- a/templates/org/create.tmpl
+++ b/templates/org/create.tmpl
@@ -1,30 +1,30 @@
{{template "base/head" .}}
<div class="organization new org">
- <div class="ui middle very relaxed page grid">
- <div class="column">
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <h3 class="ui top attached header">
- {{.i18n.Tr "new_org"}}
- </h3>
- <div class="ui attached segment">
- {{template "base/alert" .}}
- <div class="inline required field {{if .Err_OrgName}}error{{end}}">
- <label for="org_name">{{.i18n.Tr "org.org_name_holder"}}</label>
- <input id="org_name" name="org_name" value="{{.org_name}}" autofocus required>
- <span class="help">{{.i18n.Tr "org.org_name_helper"}}</span>
- </div>
+ <div class="ui middle very relaxed page grid">
+ <div class="column">
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <h3 class="ui top attached header">
+ {{.i18n.Tr "new_org"}}
+ </h3>
+ <div class="ui attached segment">
+ {{template "base/alert" .}}
+ <div class="inline required field {{if .Err_OrgName}}error{{end}}">
+ <label for="org_name">{{.i18n.Tr "org.org_name_holder"}}</label>
+ <input id="org_name" name="org_name" value="{{.org_name}}" autofocus required>
+ <span class="help">{{.i18n.Tr "org.org_name_helper"}}</span>
+ </div>
- <div class="inline field">
- <label></label>
- <button class="ui green button">
- {{.i18n.Tr "org.create_org"}}
- </button>
- <a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
- </div>
- </div>
- </form>
- </div>
- </div>
+ <div class="inline field">
+ <label></label>
+ <button class="ui green button">
+ {{.i18n.Tr "org.create_org"}}
+ </button>
+ <a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/org/header.tmpl b/templates/org/header.tmpl
index c30433d96b..8fa1c2b269 100644
--- a/templates/org/header.tmpl
+++ b/templates/org/header.tmpl
@@ -1,26 +1,26 @@
{{with .Org}}
-<div class="ui container">
- <div class="ui vertically grid head">
- <div class="column">
- <div class="ui header">
- <img class="ui image" src="{{.AvatarLink}}?s=100">
- <span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span>
+ <div class="ui container">
+ <div class="ui vertically grid head">
+ <div class="column">
+ <div class="ui header">
+ <img class="ui image" src="{{.AvatarLink}}?s=100">
+ <span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span>
- <div class="ui right">
- <div class="ui menu">
- <a class="{{if $.PageIsOrgMembers}}active{{end}} item" href="{{$.OrgLink}}/members">
- <i class="octicon octicon-organization"></i>&nbsp;{{$.i18n.Tr "org.people"}}
- <div class="floating ui black label">{{.NumMembers}}</div>
- </a>
- <a class="{{if $.PageIsOrgTeams}}active{{end}} item" href="{{$.OrgLink}}/teams">
- <i class="octicon octicon-jersey"></i>&nbsp;{{$.i18n.Tr "org.teams"}}
- <div class="floating ui black label">{{.NumTeams}}</div>
- </a>
- </div>
+ <div class="ui right">
+ <div class="ui menu">
+ <a class="{{if $.PageIsOrgMembers}}active{{end}} item" href="{{$.OrgLink}}/members">
+ <i class="octicon octicon-organization"></i>&nbsp;{{$.i18n.Tr "org.people"}}
+ <div class="floating ui black label">{{.NumMembers}}</div>
+ </a>
+ <a class="{{if $.PageIsOrgTeams}}active{{end}} item" href="{{$.OrgLink}}/teams">
+ <i class="octicon octicon-jersey"></i>&nbsp;{{$.i18n.Tr "org.teams"}}
+ <div class="floating ui black label">{{.NumTeams}}</div>
+ </a>
+ </div>
+ </div>
</div>
</div>
</div>
</div>
-</div>
-<div class="ui divider"></div>
-{{end}} \ No newline at end of file
+ <div class="ui divider"></div>
+{{end}}
diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl
index fdd494b19b..78caa3fe12 100644
--- a/templates/org/home.tmpl
+++ b/templates/org/home.tmpl
@@ -1,85 +1,85 @@
{{template "base/head" .}}
<div class="organization profile">
- <div class="ui container">
- <div class="ui grid">
- <div class="ui sixteen wide column">
- <img class="ui left" id="org-avatar" src="{{.Org.AvatarLink}}?s=140"/>
- <div id="org-info">
- <div class="ui header">
- {{.Org.FullName}}
- {{if .IsOrganizationOwner}}<a class="text grey" href="{{.OrgLink}}/settings"><span class="icon octicon octicon-gear"></span></a>{{end}}
- </div>
- {{if .Org.Description}}<p class="desc">{{.Org.Description}}</p>{{end}}
- <div class="text grey meta">
- {{if .Org.Location}}<div class="item"><span class="icon octicon octicon-location"></span> <span>{{.Org.Location}}</span></div>{{end}}
- {{if .Org.Website}}<div class="item"><span class="icon octicon octicon-link"></span> <a target="_blank" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
- </div>
- </div>
+ <div class="ui container">
+ <div class="ui grid">
+ <div class="ui sixteen wide column">
+ <img class="ui left" id="org-avatar" src="{{.Org.AvatarLink}}?s=140"/>
+ <div id="org-info">
+ <div class="ui header">
+ {{.Org.FullName}}
+ {{if .IsOrganizationOwner}}<a class="text grey" href="{{.OrgLink}}/settings"><span class="icon octicon octicon-gear"></span></a>{{end}}
+ </div>
+ {{if .Org.Description}}<p class="desc">{{.Org.Description}}</p>{{end}}
+ <div class="text grey meta">
+ {{if .Org.Location}}<div class="item"><span class="icon octicon octicon-location"></span> <span>{{.Org.Location}}</span></div>{{end}}
+ {{if .Org.Website}}<div class="item"><span class="icon octicon octicon-link"></span> <a target="_blank" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
+ </div>
+ </div>
- </div>
- </div>
- </div>
+ </div>
+ </div>
+ </div>
- <div class="ui divider"></div>
+ <div class="ui divider"></div>
- <div class="ui container">
- <div class="ui grid">
- <div class="ui eleven wide column">
- {{if .IsOrganizationOwner}}
- <div class="text right">
- <a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.Id}}"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "new_repo"}}</a>
- </div>
- <div class="ui divider"></div>
- {{end}}
- {{template "explore/repo_list" .}}
- </div>
+ <div class="ui container">
+ <div class="ui grid">
+ <div class="ui eleven wide column">
+ {{if .IsOrganizationOwner}}
+ <div class="text right">
+ <a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.Id}}"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "new_repo"}}</a>
+ </div>
+ <div class="ui divider"></div>
+ {{end}}
+ {{template "explore/repo_list" .}}
+ </div>
- <div class="ui five wide column">
- <h4 class="ui top attached header">
- <strong>{{.i18n.Tr "org.people"}}</strong>
- {{if .IsOrganizationMember}}
- <div class="ui right">
- <a class="text grey" href="{{.OrgLink}}/members"><strong>{{.Org.NumMembers}}</strong><span class="octicon octicon-chevron-right"></span></a>
- </div>
- {{end}}
- </h4>
- <div class="ui attached segment members">
- {{$isMember := .IsOrganizationMember}}
- {{range .Members}}
- {{if or $isMember (.IsPublicMember $.Org.Id)}}
- <a href="{{.HomeLink}}" title="{{.Name}}"><img class="ui avatar" src="{{.AvatarLink}}"></a>
- {{end}}
- {{end}}
- </div>
- {{if .IsOrganizationOwner}}
- <div class="ui bottom attached segment">
- <a class="ui blue small button" href="{{.OrgLink}}/invitations/new">{{.i18n.Tr "org.invite_someone"}}</a>
- </div>
- {{end}}
+ <div class="ui five wide column">
+ <h4 class="ui top attached header">
+ <strong>{{.i18n.Tr "org.people"}}</strong>
+ {{if .IsOrganizationMember}}
+ <div class="ui right">
+ <a class="text grey" href="{{.OrgLink}}/members"><strong>{{.Org.NumMembers}}</strong><span class="octicon octicon-chevron-right"></span></a>
+ </div>
+ {{end}}
+ </h4>
+ <div class="ui attached segment members">
+ {{$isMember := .IsOrganizationMember}}
+ {{range .Members}}
+ {{if or $isMember (.IsPublicMember $.Org.Id)}}
+ <a href="{{.HomeLink}}" title="{{.Name}}"><img class="ui avatar" src="{{.AvatarLink}}"></a>
+ {{end}}
+ {{end}}
+ </div>
+ {{if .IsOrganizationOwner}}
+ <div class="ui bottom attached segment">
+ <a class="ui blue small button" href="{{.OrgLink}}/invitations/new">{{.i18n.Tr "org.invite_someone"}}</a>
+ </div>
+ {{end}}
- {{if .IsOrganizationMember}}
- <div class="ui top attached header">
- <strong>{{.i18n.Tr "org.teams"}}</strong>
- <div class="ui right">
- <a class="text grey" href="{{.OrgLink}}/teams"><strong>{{.Org.NumTeams}}</strong><span class="octicon octicon-chevron-right"></span></a>
- </div>
- </div>
- <div class="ui attached table segment teams">
- {{range .Teams}}
- <div class="item">
- <a href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong class="team-name">{{.Name}}</strong></a>
- <p class="text grey">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p>
- </div>
- {{end}}
- </div>
- {{if .IsOrganizationOwner}}
- <div class="ui bottom attached segment">
- <a class="ui blue small button" href="{{.OrgLink}}/teams/new">{{.i18n.Tr "org.create_new_team"}}</a>
- </div>
- {{end}}
- {{end}}
- </div>
- </div>
- </div>
+ {{if .IsOrganizationMember}}
+ <div class="ui top attached header">
+ <strong>{{.i18n.Tr "org.teams"}}</strong>
+ <div class="ui right">
+ <a class="text grey" href="{{.OrgLink}}/teams"><strong>{{.Org.NumTeams}}</strong><span class="octicon octicon-chevron-right"></span></a>
+ </div>
+ </div>
+ <div class="ui attached table segment teams">
+ {{range .Teams}}
+ <div class="item">
+ <a href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong class="team-name">{{.Name}}</strong></a>
+ <p class="text grey">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p>
+ </div>
+ {{end}}
+ </div>
+ {{if .IsOrganizationOwner}}
+ <div class="ui bottom attached segment">
+ <a class="ui blue small button" href="{{.OrgLink}}/teams/new">{{.i18n.Tr "org.create_new_team"}}</a>
+ </div>
+ {{end}}
+ {{end}}
+ </div>
+ </div>
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/org/member/invite.tmpl b/templates/org/member/invite.tmpl
index d412dd30a3..29e7928f0c 100644
--- a/templates/org/member/invite.tmpl
+++ b/templates/org/member/invite.tmpl
@@ -1,23 +1,23 @@
{{template "base/head" .}}
<div class="organization invite">
{{template "org/header" .}}
- <div class="ui container">
+ <div class="ui container">
<div id="invite-box">
- {{template "base/alert" .}}
+ {{template "base/alert" .}}
<h2>{{.i18n.Tr "org.members.invite_desc" .Org.DisplayName}}</h2>
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <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" autofocus required>
- </div>
- <div class="ui segment results hide"></div>
- </div>
- </div>
- <button class="ui blue button">{{.i18n.Tr "org.members.invite_now"}}</button>
- </form>
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <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" autofocus required>
+ </div>
+ <div class="ui segment results hide"></div>
+ </div>
+ </div>
+ <button class="ui blue button">{{.i18n.Tr "org.members.invite_now"}}</button>
+ </form>
</div>
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl
index 8399e044d2..ddd341af2e 100644
--- a/templates/org/member/members.tmpl
+++ b/templates/org/member/members.tmpl
@@ -1,60 +1,60 @@
{{template "base/head" .}}
<div class="organization members">
{{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 blue button" href="{{.OrgLink}}/invitations/new"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "org.invite_someone"}}</a>
- </div>
- <div class="ui divider"></div>
+ <div class="text right">
+ <a class="ui blue button" href="{{.OrgLink}}/invitations/new"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "org.invite_someone"}}</a>
+ </div>
+ <div class="ui divider"></div>
{{end}}
-
+
<div class="list">
{{range .Members}}
- <div class="item ui grid">
- <div class="ui one wide column">
- <img class="ui avatar" src="{{.AvatarLink}}?s=48">
- </div>
- <div class="ui three wide column">
- <div class="meta"><a href="{{.HomeLink}}">{{.Name}}</a></div>
- <div class="meta">{{.FullName}}</div>
- </div>
- <div class="ui five wide column center">
- <div class="meta">
- {{$.i18n.Tr "org.members.membership_visibility"}}
+ <div class="item ui grid">
+ <div class="ui one wide column">
+ <img class="ui avatar" src="{{.AvatarLink}}?s=48">
</div>
- <div class="meta">
- {{ $isPublic := .IsPublicMember $.Org.Id}}
- {{if $isPublic}}
- <strong>{{$.i18n.Tr "org.members.public"}}</strong>
- {{if or (eq $.SignedUser.Id .Id) $.IsOrganizationOwner}}(<a href="{{$.OrgLink}}/members/action/private?uid={{.Id}}">{{$.i18n.Tr "org.members.public_helper"}}</a>){{end}}
- {{else}}
- <strong>{{$.i18n.Tr "org.members.private"}}</strong>
- {{if or (eq $.SignedUser.Id .Id) $.IsOrganizationOwner}}(<a href="{{$.OrgLink}}/members/action/public?uid={{.Id}}">{{$.i18n.Tr "org.members.private_helper"}}</a>){{end}}
- {{end}}
+ <div class="ui three wide column">
+ <div class="meta"><a href="{{.HomeLink}}">{{.Name}}</a></div>
+ <div class="meta">{{.FullName}}</div>
</div>
- </div>
- <div class="ui three wide column center">
- <div class="meta">
- {{$.i18n.Tr "org.members.member_role"}}
+ <div class="ui five wide column center">
+ <div class="meta">
+ {{$.i18n.Tr "org.members.membership_visibility"}}
+ </div>
+ <div class="meta">
+ {{ $isPublic := .IsPublicMember $.Org.Id}}
+ {{if $isPublic}}
+ <strong>{{$.i18n.Tr "org.members.public"}}</strong>
+ {{if or (eq $.SignedUser.Id .Id) $.IsOrganizationOwner}}(<a href="{{$.OrgLink}}/members/action/private?uid={{.Id}}">{{$.i18n.Tr "org.members.public_helper"}}</a>){{end}}
+ {{else}}
+ <strong>{{$.i18n.Tr "org.members.private"}}</strong>
+ {{if or (eq $.SignedUser.Id .Id) $.IsOrganizationOwner}}(<a href="{{$.OrgLink}}/members/action/public?uid={{.Id}}">{{$.i18n.Tr "org.members.private_helper"}}</a>){{end}}
+ {{end}}
+ </div>
</div>
- <div class="meta">
- <strong>{{if .IsUserOrgOwner $.Org.Id}}<span class="octicon octicon-shield"></span> {{$.i18n.Tr "org.members.owner"}}{{else}}{{$.i18n.Tr "org.members.member"}}{{end}}</strong>
+ <div class="ui three wide column center">
+ <div class="meta">
+ {{$.i18n.Tr "org.members.member_role"}}
+ </div>
+ <div class="meta">
+ <strong>{{if .IsUserOrgOwner $.Org.Id}}<span class="octicon octicon-shield"></span> {{$.i18n.Tr "org.members.owner"}}{{else}}{{$.i18n.Tr "org.members.member"}}{{end}}</strong>
+ </div>
</div>
- </div>
- <div class="ui four wide column">
- <div class="text right">
- {{if eq $.SignedUser.Id .Id}}
- <a class="ui red small button" href="{{$.OrgLink}}/members/action/leave?uid={{.Id}}">{{$.i18n.Tr "org.members.leave"}}</a>
- {{else if $.IsOrganizationOwner}}
- <a class="ui red small button" href="{{$.OrgLink}}/members/action/remove?uid={{.Id}}">{{$.i18n.Tr "org.members.remove"}}</a>
- {{end}}
+ <div class="ui four wide column">
+ <div class="text right">
+ {{if eq $.SignedUser.Id .Id}}
+ <a class="ui red small button" href="{{$.OrgLink}}/members/action/leave?uid={{.Id}}">{{$.i18n.Tr "org.members.leave"}}</a>
+ {{else if $.IsOrganizationOwner}}
+ <a class="ui red small button" href="{{$.OrgLink}}/members/action/remove?uid={{.Id}}">{{$.i18n.Tr "org.members.remove"}}</a>
+ {{end}}
+ </div>
</div>
</div>
- </div>
{{end}}
</div>
</div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/org/settings/delete.tmpl b/templates/org/settings/delete.tmpl
index 707d6f88b2..dc1858e5c4 100644
--- a/templates/org/settings/delete.tmpl
+++ b/templates/org/settings/delete.tmpl
@@ -1,43 +1,43 @@
{{template "base/head" .}}
<div class="organization settings delete">
- {{template "org/header" .}}
- <div class="ui container">
- <div class="ui grid">
- {{template "org/settings/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached warning header">
- {{.i18n.Tr "org.settings.delete_account"}}
- </h4>
- <div class="ui attached warning segment">
- <div class="ui red message">
- <p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "org.settings.delete_prompt" | Str2html}}</p>
- </div>
- <form class="ui form" id="delete-form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <input class="fake" type="password">
- <div class="inline required field {{if .Err_Password}}error{{end}}">
- <label for="password">{{.i18n.Tr "password"}}</label>
- <input id="password" name="password" type="password" autofocus required>
- </div>
- <div class="ui red button delete-button" data-type="form" data-form="#delete-form">
- {{.i18n.Tr "org.settings.confirm_delete_account"}}
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
+ {{template "org/header" .}}
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "org/settings/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached warning header">
+ {{.i18n.Tr "org.settings.delete_account"}}
+ </h4>
+ <div class="ui attached warning segment">
+ <div class="ui red message">
+ <p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "org.settings.delete_prompt" | Str2html}}</p>
+ </div>
+ <form class="ui form" id="delete-form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <input class="fake" type="password">
+ <div class="inline required field {{if .Err_Password}}error{{end}}">
+ <label for="password">{{.i18n.Tr "password"}}</label>
+ <input id="password" name="password" type="password" autofocus required>
+ </div>
+ <div class="ui red button delete-button" data-type="form" data-form="#delete-form">
+ {{.i18n.Tr "org.settings.confirm_delete_account"}}
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
<div class="ui small basic delete modal">
- <div class="ui icon header">
- <i class="trash icon"></i>
- {{.i18n.Tr "org.settings.delete_org_title"}}
- </div>
- <div class="content">
- <p>{{.i18n.Tr "org.settings.delete_org_desc"}}</p>
- </div>
- {{template "base/delete_modal_actions" .}}
+ <div class="ui icon header">
+ <i class="trash icon"></i>
+ {{.i18n.Tr "org.settings.delete_org_title"}}
+ </div>
+ <div class="content">
+ <p>{{.i18n.Tr "org.settings.delete_org_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/settings/hook_new.tmpl b/templates/org/settings/hook_new.tmpl
index d9a9b16928..2324788d33 100644
--- a/templates/org/settings/hook_new.tmpl
+++ b/templates/org/settings/hook_new.tmpl
@@ -1,29 +1,29 @@
{{template "base/head" .}}
<div class="organization settings new webhook">
- {{template "org/header" .}}
- <div class="ui container">
- <div class="ui grid">
- {{template "org/settings/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
- <div class="ui right">
- {{if eq .HookType "gogs"}}
- <img class="img-13" src="{{AppSubUrl}}/img/favicon.png">
- {{else if eq .HookType "slack"}}
- <img class="img-13" src="{{AppSubUrl}}/img/slack.png">
- {{end}}
- </div>
- </h4>
- <div class="ui attached segment">
- {{template "repo/settings/hook_gogs" .}}
- {{template "repo/settings/hook_slack" .}}
- </div>
+ {{template "org/header" .}}
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "org/settings/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
+ <div class="ui right">
+ {{if eq .HookType "gogs"}}
+ <img class="img-13" src="{{AppSubUrl}}/img/favicon.png">
+ {{else if eq .HookType "slack"}}
+ <img class="img-13" src="{{AppSubUrl}}/img/slack.png">
+ {{end}}
+ </div>
+ </h4>
+ <div class="ui attached segment">
+ {{template "repo/settings/hook_gogs" .}}
+ {{template "repo/settings/hook_slack" .}}
+ </div>
- {{template "repo/settings/hook_history" .}}
- </div>
- </div>
- </div>
+ {{template "repo/settings/hook_history" .}}
+ </div>
+ </div>
+ </div>
</div>
{{template "base/footer" .}}
diff --git a/templates/org/settings/hooks.tmpl b/templates/org/settings/hooks.tmpl
index 3b5bf4d9df..98b00f794c 100644
--- a/templates/org/settings/hooks.tmpl
+++ b/templates/org/settings/hooks.tmpl
@@ -1,11 +1,11 @@
{{template "base/head" .}}
<div class="organization settings webhooks">
- {{template "org/header" .}}
- <div class="ui container">
- <div class="ui grid">
- {{template "org/settings/navbar" .}}
- {{template "repo/settings/hook_list" .}}
- </div>
- </div>
+ {{template "org/header" .}}
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "org/settings/navbar" .}}
+ {{template "repo/settings/hook_list" .}}
+ </div>
+ </div>
</div>
{{template "base/footer" .}}
diff --git a/templates/org/settings/navbar.tmpl b/templates/org/settings/navbar.tmpl
index d6bfe04145..09fca5d7f6 100644
--- a/templates/org/settings/navbar.tmpl
+++ b/templates/org/settings/navbar.tmpl
@@ -1,14 +1,14 @@
<div class="four wide column">
<div class="ui vertical menu">
<div class="header item">{{.i18n.Tr "org.settings"}}</div>
- <a class="{{if .PageIsSettingsOptions}}active{{end}} item" href="{{.OrgLink}}/settings">
- {{.i18n.Tr "org.settings.options"}}
- </a>
- <a class="{{if .PageIsSettingsHooks}}active{{end}} item" href="{{.OrgLink}}/settings/hooks">
- {{.i18n.Tr "repo.settings.hooks"}}
- </a>
- <a class="{{if .PageIsSettingsDelete}}active{{end}} item" href="{{.OrgLink}}/settings/delete">
- {{.i18n.Tr "org.settings.delete"}}
- </a>
+ <a class="{{if .PageIsSettingsOptions}}active{{end}} item" href="{{.OrgLink}}/settings">
+ {{.i18n.Tr "org.settings.options"}}
+ </a>
+ <a class="{{if .PageIsSettingsHooks}}active{{end}} item" href="{{.OrgLink}}/settings/hooks">
+ {{.i18n.Tr "repo.settings.hooks"}}
+ </a>
+ <a class="{{if .PageIsSettingsDelete}}active{{end}} item" href="{{.OrgLink}}/settings/delete">
+ {{.i18n.Tr "org.settings.delete"}}
+ </a>
</div>
</div>
diff --git a/templates/org/settings/options.tmpl b/templates/org/settings/options.tmpl
index 157ff97549..ce3610ae2f 100644
--- a/templates/org/settings/options.tmpl
+++ b/templates/org/settings/options.tmpl
@@ -1,59 +1,59 @@
{{template "base/head" .}}
<div class="organization settings options">
- {{template "org/header" .}}
- <div class="ui container">
- <div class="ui grid">
- {{template "org/settings/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "org.settings.options"}}
- </h4>
- <div class="ui attached segment">
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <div class="required field {{if .Err_Name}}error{{end}}">
- <label for="org_name">{{.i18n.Tr "org.org_name_holder"}}<span class="text red hide" id="org-name-change-prompt"> {{.i18n.Tr "org.settings.change_orgname_prompt"}}</span></label>
- <input id="org_name" name="name" value="{{.Org.Name}}" data-org-name="{{.Org.Name}}" autofocus required>
- </div>
- <div class="field {{if .Err_FullName}}error{{end}}">
- <label for="full_name">{{.i18n.Tr "org.org_full_name_holder"}}</label>
- <input id="full_name" name="full_name" value="{{.Org.FullName}}">
- </div>
- <div class="field {{if .Err_Description}}error{{end}}">
- <label for="description">{{$.i18n.Tr "org.org_desc"}}</label>
- <textarea id="description" name="description" rows="2">{{.Org.Description}}</textarea>
- </div>
- <div class="field {{if .Err_Website}}error{{end}}">
- <label for="website">{{.i18n.Tr "org.settings.website"}}</label>
- <input id="website" name="website" type="url" value="{{.Org.Website}}">
- </div>
- <div class="field">
- <label for="location">{{.i18n.Tr "org.settings.location"}}</label>
- <input id="location" name="location" value="{{.Org.Location}}">
- </div>
+ {{template "org/header" .}}
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "org/settings/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "org.settings.options"}}
+ </h4>
+ <div class="ui attached segment">
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="required field {{if .Err_Name}}error{{end}}">
+ <label for="org_name">{{.i18n.Tr "org.org_name_holder"}}<span class="text red hide" id="org-name-change-prompt"> {{.i18n.Tr "org.settings.change_orgname_prompt"}}</span></label>
+ <input id="org_name" name="name" value="{{.Org.Name}}" data-org-name="{{.Org.Name}}" autofocus required>
+ </div>
+ <div class="field {{if .Err_FullName}}error{{end}}">
+ <label for="full_name">{{.i18n.Tr "org.org_full_name_holder"}}</label>
+ <input id="full_name" name="full_name" value="{{.Org.FullName}}">
+ </div>
+ <div class="field {{if .Err_Description}}error{{end}}">
+ <label for="description">{{$.i18n.Tr "org.org_desc"}}</label>
+ <textarea id="description" name="description" rows="2">{{.Org.Description}}</textarea>
+ </div>
+ <div class="field {{if .Err_Website}}error{{end}}">
+ <label for="website">{{.i18n.Tr "org.settings.website"}}</label>
+ <input id="website" name="website" type="url" value="{{.Org.Website}}">
+ </div>
+ <div class="field">
+ <label for="location">{{.i18n.Tr "org.settings.location"}}</label>
+ <input id="location" name="location" value="{{.Org.Location}}">
+ </div>
- <div class="field">
- <button class="ui green button">{{$.i18n.Tr "org.settings.update_settings"}}</button>
- </div>
- </form>
+ <div class="field">
+ <button class="ui green button">{{$.i18n.Tr "org.settings.update_settings"}}</button>
+ </div>
+ </form>
- <div class="ui divider"></div>
+ <div class="ui divider"></div>
- <form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
- {{.CsrfTokenHtml}}
- <div class="inline field">
- <label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
- <input name="avatar" type="file" >
- </div>
+ <form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
+ {{.CsrfTokenHtml}}
+ <div class="inline field">
+ <label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
+ <input name="avatar" type="file" >
+ </div>
- <div class="field">
- <button class="ui green button">{{$.i18n.Tr "settings.update_avatar"}}</button>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
+ <div class="field">
+ <button class="ui green button">{{$.i18n.Tr "settings.update_avatar"}}</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
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" .}}