aboutsummaryrefslogtreecommitdiffstats
path: root/templates/org
diff options
context:
space:
mode:
Diffstat (limited to 'templates/org')
-rw-r--r--templates/org/base/header.tmpl (renamed from templates/org/header.tmpl)0
-rw-r--r--templates/org/home.tmpl13
-rw-r--r--templates/org/member/invite.tmpl (renamed from templates/org/invite.tmpl)2
-rw-r--r--templates/org/member/members.tmpl (renamed from templates/org/members.tmpl)30
-rw-r--r--templates/org/settings/delete.tmpl1
-rw-r--r--templates/org/settings/options.tmpl1
-rw-r--r--templates/org/team/new.tmpl48
-rw-r--r--templates/org/team/teams.tmpl42
-rw-r--r--templates/org/team_new.tmpl79
-rw-r--r--templates/org/teams.tmpl58
10 files changed, 119 insertions, 155 deletions
diff --git a/templates/org/header.tmpl b/templates/org/base/header.tmpl
index 8566d0a3c5..8566d0a3c5 100644
--- a/templates/org/header.tmpl
+++ b/templates/org/base/header.tmpl
diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl
index d96624010f..afd695ec7d 100644
--- a/templates/org/home.tmpl
+++ b/templates/org/home.tmpl
@@ -4,7 +4,10 @@
<div class="container clear">
<img class="avatar-100 left" src="{{.Org.AvatarLink}}?s=140"/>
<div id="org-home-header-info">
- <h2>{{.Org.FullName}} <a class="text-grey" href="/org/{{.Org.LowerName}}/settings"><span class="octicon octicon-gear"></span></a></h2>
+ <h2>
+ {{.Org.FullName}}
+ {{if .IsOrganizationOwner}}<a class="text-grey" href="{{.OrgLink}}/settings"><span class="octicon octicon-gear"></span></a>{{end}}
+ </h2>
{{if .Org.Description}}<p>{{.Org.Description}}</p>{{end}}
<ul class="text-grey">
{{if .Org.Location}}<li><span class="octicon octicon-location"></span> <span>{{.Org.Location}}</span></li>{{end}}
@@ -17,7 +20,7 @@
<div class="container">
<div id="org-home-repo-list" class="left grid-2-3">
<div class="clear">
- {{if .IsAdminTeam}}
+ {{if .IsOrganizationOwner}}
<a class="btn btn-green btn-large btn-link btn-radius right" href="/repo/create?org={{.Org.Id}}"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "new_repo"}}</a>
{{end}}
</div>
@@ -42,12 +45,12 @@
<a class="text-grey right" href="/org/{{.Org.LowerName}}/members"><strong>{{.Org.NumMembers}}</strong><span class="octicon octicon-chevron-right"></span></a>
<strong>{{.i18n.Tr "org.people"}}</strong>
</div>
- <div class="panel-body" id="org-member-avatar-group">
+ <div class="panel-body member-avatar-group">
{{range .Members}}
- <a href="/{{.Name}}"><img src="{{.AvatarLink}}"></a>
+ <a href="/{{.Name}}" title="{{.Name}}"><img src="{{.AvatarLink}}"></a>
{{end}}
</div>
- {{if .IsAdminTeam}}
+ {{if .IsOrganizationOwner}}
<div class="panel-footer">
<a class="btn btn-medium btn-blue btn-link btn-radius" href="/org/{{.Org.LowerName}}/invitations/new">{{.i18n.Tr "org.invite_someone"}}</a>
</div>
diff --git a/templates/org/invite.tmpl b/templates/org/member/invite.tmpl
index b9901aeb48..bff1b98b4c 100644
--- a/templates/org/invite.tmpl
+++ b/templates/org/member/invite.tmpl
@@ -1,6 +1,6 @@
{{template "ng/base/head" .}}
{{template "ng/base/header" .}}
-{{template "org/header" .}}
+{{template "org/base/header" .}}
<div class="container">
<div class="invite-box" id="invite-box">
{{template "ng/base/alert" .}}
diff --git a/templates/org/members.tmpl b/templates/org/member/members.tmpl
index bea4340ffb..3ab92bbfc0 100644
--- a/templates/org/members.tmpl
+++ b/templates/org/member/members.tmpl
@@ -1,9 +1,11 @@
{{template "ng/base/head" .}}
{{template "ng/base/header" .}}
-{{template "org/header" .}}
+{{template "org/base/header" .}}
<div class="container">
- {{template "ng/base/alert" .}}
- <div class="clear" id="org-member-toolbar">
+ <div class="org-header-alert">
+ {{template "ng/base/alert" .}}
+ </div>
+ <div class="org-toolbar clear">
{{if .IsAdminTeam}}
<a class="btn btn-green btn-large btn-link btn-radius right" href="{{.OrgLink}}/invitations/new"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "org.invite_someone"}}</a>
{{end}}
@@ -25,15 +27,19 @@
{{end}}
</li>
<li class="grid-1-4">{{if .IsUserOrgOwner $.Org.Id}}<strong>{{$.i18n.Tr "org.members.owner"}}</strong>{{else}}{{$.i18n.Tr "org.members.member"}}{{end}}</li>
- {{if $.IsOrganizationOwner}}
- <li class="grid-1-6 right">
- <a class="btn btn-red btn-link btn-radius" href="{{$.OrgLink}}/members/action/remove?uid={{.Id}}">{{$.i18n.Tr "org.members.remove"}}</a>
- </li>
- {{if $isPublic}}
- <li class="grid-1-6 right">
- <a class="btn btn-blue btn-link btn-radius" href="{{$.OrgLink}}/members/action/private?uid={{.Id}}">{{$.i18n.Tr "org.members.conceal"}}</a>
- </li>
- {{end}}
+ {{if eq $.SignedUser.Id .Id}}
+ <li class="grid-1-6 right">
+ <a class="btn btn-red btn-link btn-radius" href="{{$.OrgLink}}/members/action/leave?uid={{.Id}}">{{$.i18n.Tr "org.members.leave"}}</a>
+ </li>
+ {{else if $.IsOrganizationOwner}}
+ <li class="grid-1-6 right">
+ <a class="btn btn-red btn-link btn-radius" href="{{$.OrgLink}}/members/action/remove?uid={{.Id}}">{{$.i18n.Tr "org.members.remove"}}</a>
+ </li>
+ {{if $isPublic}}
+ <li class="grid-1-6 right">
+ <a class="btn btn-blue btn-link btn-radius" href="{{$.OrgLink}}/members/action/private?uid={{.Id}}">{{$.i18n.Tr "org.members.conceal"}}</a>
+ </li>
+ {{end}}
{{end}}
</ul>
</div>
diff --git a/templates/org/settings/delete.tmpl b/templates/org/settings/delete.tmpl
index 7e24f85144..828389d6ff 100644
--- a/templates/org/settings/delete.tmpl
+++ b/templates/org/settings/delete.tmpl
@@ -1,5 +1,6 @@
{{template "ng/base/head" .}}
{{template "ng/base/header" .}}
+{{template "org/header" .}}
<div id="setting-wrapper" class="main-wrapper">
<div id="org-setting" class="container clear">
{{template "org/settings/nav" .}}
diff --git a/templates/org/settings/options.tmpl b/templates/org/settings/options.tmpl
index 7548ad5aef..c5c6a7e221 100644
--- a/templates/org/settings/options.tmpl
+++ b/templates/org/settings/options.tmpl
@@ -1,5 +1,6 @@
{{template "ng/base/head" .}}
{{template "ng/base/header" .}}
+{{template "org/header" .}}
<div id="setting-wrapper" class="main-wrapper">
<div id="org-setting" class="container clear">
{{template "org/settings/nav" .}}
diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl
new file mode 100644
index 0000000000..f02512e052
--- /dev/null
+++ b/templates/org/team/new.tmpl
@@ -0,0 +1,48 @@
+{{template "ng/base/head" .}}
+{{template "ng/base/header" .}}
+{{template "org/base/header" .}}
+<div id="repo-wrapper">
+ <form id="team-create-form" class="form form-align panel panel-radius" action="{{.OrgLink}}/teams/new" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="panel-header">
+ <h2>{{.i18n.Tr "org.create_new_team"}}</h2>
+ </div>
+ <div class="panel-content">
+ {{template "ng/base/alert" .}}
+ <div class="field">
+ <label class="req" for="team-name">{{.i18n.Tr "org.team_name"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_TeamName}}ipt-error{{end}}" id="team-name" name="team_name" value="{{.team_name}}" required />
+ <span class="form-label"></span>
+ <span class="help">{{.i18n.Tr "org.team_name_helper"}}</span>
+ </div>
+ <div class="field">
+ <label for="desc">{{.i18n.Tr "org.team_desc"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Description}}ipt-error{{end}}" id="desc" name="desc" value="{{.desc}}" />
+ <span class="form-label"></span>
+ <span class="help">{{.i18n.Tr "org.team_desc_helper"}}</span>
+ </div>
+ <div class="field">
+ <h4 class="text-center">{{.i18n.Tr "org.team_permission_desc"}}</h4>
+ <label></label>
+ <input name="permission" type="radio" value="read" {{if or .PageIsOrgTeamsNew (eq .Team.Authorize 1)}}checked{{end}}> {{.i18n.Tr "org.teams.read_access"}}
+ <label></label>
+ <p class="text-grey note">{{.i18n.Tr "org.teams.read_access_helper"}}</p>
+ <label></label>
+ <input name="permission" type="radio" value="write" {{if eq .Team.Authorize 2}}checked{{end}}> {{.i18n.Tr "org.teams.write_access"}}
+ <label></label>
+ <p class="text-grey note">{{.i18n.Tr "org.teams.write_access_helper"}}</p>
+ <label></label>
+ <input name="permission" type="radio" value="admin" {{if eq .Team.Authorize 3}}checked{{end}}> {{.i18n.Tr "org.teams.admin_access"}}
+ <label></label>
+ <p class="text-grey note">{{.i18n.Tr "org.teams.admin_access_helper"}}</p>
+ </div>
+ <hr>
+ <div class="field">
+ <label></label>
+ <button class="btn btn-large btn-blue btn-radius">{{.i18n.Tr "org.create_new_team"}}</button>
+ <a class="btn btn-small btn-gray btn-radius" id="repo-create-cancel" href="{{.OrgLink}}/teams"><strong>{{.i18n.Tr "cancel"}}</strong></a>
+ </div>
+ </div>
+ </form>
+</div>
+{{template "ng/base/footer" .}} \ No newline at end of file
diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl
new file mode 100644
index 0000000000..3e0846d652
--- /dev/null
+++ b/templates/org/team/teams.tmpl
@@ -0,0 +1,42 @@
+{{template "ng/base/head" .}}
+{{template "ng/base/header" .}}
+{{template "org/base/header" .}}
+<div class="container">
+ <div class="org-header-alert">
+ {{template "ng/base/alert" .}}
+ </div>
+ <div class="org-toolbar clear">
+ {{if .IsAdminTeam}}
+ <a class="btn btn-green btn-large btn-link btn-radius right" href="{{.OrgLink}}/teams/new"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "org.create_new_team"}}</a>
+ {{end}}
+ </div>
+ <div class="org-team-list">
+ {{range .Teams}}
+ <div class="org-team-list-item">
+ <div class="panel panel-radius">
+ <div class="panel-header">
+ {{if .IsMember $.SignedUser.Id}}
+ <a class="btn btn-small btn-red btn-header btn-radius right" href="{{$.OrgLink}}/teams/{{.LowerName}}/action/leave">{{$.i18n.Tr "org.teams.leave"}}</a>
+ {{else}}
+ <a class="btn btn-small btn-blue btn-header btn-radius right" href="{{$.OrgLink}}/teams/{{.LowerName}}/action/join">{{$.i18n.Tr "org.teams.join"}}</a>
+ {{end}}
+ <a class="text-black" href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong>{{.Name}}</strong></a>
+ </div>
+ {{if .NumMembers}}
+ <div class="panel-body member-avatar-group">
+ {{range .Members}}
+ <a href="/{{.Name}}" title="{{.Name}}">
+ <img src="{{.AvatarLink}}">
+ </a>
+ {{end}}
+ </div>
+ {{end}}
+ <div class="panel-footer">
+ <p class="team-meta">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p>
+ </div>
+ </div>
+ </div>
+ {{end}}
+ </div>
+</div>
+{{template "ng/base/footer" .}} \ No newline at end of file
diff --git a/templates/org/team_new.tmpl b/templates/org/team_new.tmpl
deleted file mode 100644
index 0936ec29b3..0000000000
--- a/templates/org/team_new.tmpl
+++ /dev/null
@@ -1,79 +0,0 @@
-{{template "base/head" .}}
-{{template "base/navbar" .}}
-<div id="body-nav" class="org-nav org-nav-auto">
- <div class="container clearfix">
- <div id="org-nav-wrapper">
- <ul class="nav nav-pills pull-right">
- <li><a href="/org/{{.Org.Name}}/members"><i class="fa fa-users"></i>Members
- <span class="label label-default">{{.Org.NumMembers}}</span></a>
- </li>
- <li class="active"><a href="/org/{{.Org.Name}}/teams"><i class="fa fa-tags"></i>Teams
- <span class="label label-default">{{.Org.NumTeams}}</span></a>
- </li>
- </ul>
- <img class="pull-left org-small-logo" src="{{.Org.AvatarLink}}?s=140" alt="" width="60"/>
- <div id="org-nav-info">
- <h2 class="org-name">{{.Org.FullName}}</h2>
- </div>
- </div>
- </div>
-</div>
-
-<div id="body" class="container">
- <div id="org">
- <form action="/org/{{.Org.Name}}/teams/new" method="post" id="org-teams-create" class="form-horizontal card">
- {{.CsrfTokenHtml}}
- <h3>Create new team</h3>
- {{template "base/alert" .}}
- <div class="form-group{{if .Err_TeamName}} has-error has-feedback{{end}}">
- <label class="col-md-2 control-label">Team Name<strong class="text-danger">*</strong></label>
- <div class="col-md-8">
- <input name="name" type="text" class="form-control" placeholder="Type your team name" value="{{.name}}" required="required">
- <span class="help-block">You'll use this name to mention this team in conversations.</span>
- </div>
- </div>
-
- <div class="form-group{{if .Err_Description}} has-error has-feedback{{end}}">
- <label class="col-md-2 control-label">Description</label>
- <div class="col-md-8">
- <input name="desc" type="text" class="form-control" placeholder="Type your team description (optional)" value="{{.desc}}">
- </div>
- </div>
-
- <div class="form-group{{if .Err_Permission}} has-error has-feedback{{end}}">
- <label class="col-md-2 control-label">Permission</label>
- <div class="col-md-8">
- <div class="radio">
- <label>
- <input type="radio" name="permission" value="read" checked="">
- <strong>Read Access</strong>
- </label>
- <p>This team will be able to view and clone its repositories.</p>
- </div>
- <div class="radio">
- <label>
- <input type="radio" name="permission" value="write">
- <strong>Write Access</strong>
- </label>
- <p>This team will be able to read its repositories, as well as push to them.</p>
- </div>
- <div class="radio">
- <label>
- <input type="radio" name="permission" value="admin">
- <strong>Admin Access</strong>
- </label>
- <p>This team will be able to push/pull to its repositories, as well as add other collaborators to them.</p>
- </div>
- </div>
- </div>
- <hr/>
- <div class="form-group">
- <label class="col-md-2">&nbsp;</label>
- <div class="col-md-8">
- <button class="btn btn-primary">Create team</button>
- </div>
- </div>
- </form>
- </div>
-</div>
-{{template "base/footer" .}}
diff --git a/templates/org/teams.tmpl b/templates/org/teams.tmpl
deleted file mode 100644
index 90ee209c0a..0000000000
--- a/templates/org/teams.tmpl
+++ /dev/null
@@ -1,58 +0,0 @@
-{{template "base/head" .}}
-{{template "base/navbar" .}}
-<div id="body-nav" class="org-nav org-nav-auto">
- <div class="container clearfix">
- <div id="org-nav-wrapper">
- <ul class="nav nav-pills pull-right">
- <li><a href="/org/{{.Org.Name}}/members"><i class="fa fa-users"></i>Members
- <span class="label label-default">{{.Org.NumMembers}}</span></a>
- </li>
- <li class="active"><a href="/org/{{.Org.Name}}/teams"><i class="fa fa-tags"></i>Teams
- <span class="label label-default">{{.Org.NumTeams}}</span></a>
- </li>
- </ul>
- <img class="pull-left org-small-logo" src="{{.Org.AvatarLink}}?s=140" alt="" width="60"/>
- <div id="org-nav-info">
- <h2 class="org-name">{{.Org.FullName}}</h2>
- </div>
- </div>
- </div>
-</div>
-
-<div id="body" class="container">
- <div id="org">
- <div id="org-teams">
- <div id="org-teams-action">
- <div class="col-md-12">
- <a href="/org/{{.Org.Name}}/teams/new"><button class="btn btn-success"><i class="fa fa-plus-square"></i>New Team</button></a>
- <hr/>
- </div>
- </div>
- {{range .Teams}}
- <div class="org-team col-md-6">
- <div class="panel panel-default">
- <h2 class="panel-heading org-team-name"><a href="/org/{{$.Org.Name}}/teams/{{.LowerName}}"><strong>{{.Name}}</strong></a></h2>
- <div class="panel-body">
- <p class="org-team-meta">{{.NumMembers}} members · {{.NumRepos}} repositories</p>
- <p class="org-team-members">
- {{range .Members}}
- <a href="/user/{{.LowerName}}">
- <img class="img-thumbnail" src="{{.AvatarLink}}?s=60" alt=""/>
- </a>
- {{end}}
- </p>
- </div>
- <div class="panel-footer">
- {{if .IsMember $.SignedUser.Id}}
- <a class="pull-right btn btn-danger" href="/org/{{$.Org.Name}}/teams/{{.LowerName}}?action=leave">Leave</a>
- {{else}}
- <a class="pull-right btn btn-default" href="/org/{{$.Org.Name}}/teams/{{.LowerName}}?action=join">Join</a>
- {{end}}
- </div>
- </div>
- </div>
- {{end}}
- </div>
- </div>
-</div>
-{{template "base/footer" .}}