forked from NYANDEV/forgejo
add organization teams page
This commit is contained in:
parent
514d7e1922
commit
adda10f4a4
5 changed files with 163 additions and 1 deletions
|
@ -191,6 +191,7 @@ func runWeb(*cli.Context) {
|
|||
m.Group("/o", func(r martini.Router) {
|
||||
r.Get("/:org", org.Organization)
|
||||
r.Get("/:org/members", org.Members)
|
||||
r.Get("/:org/teams", org.Teams)
|
||||
})
|
||||
|
||||
m.Group("/:username/:reponame", func(r martini.Router) {
|
||||
|
|
|
@ -1898,6 +1898,10 @@ html, body {
|
|||
margin-top: 6px;
|
||||
}
|
||||
|
||||
#body-nav.org-nav-auto .nav a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.org-description {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
@ -1978,7 +1982,7 @@ html, body {
|
|||
}
|
||||
|
||||
#org-members {
|
||||
margin-right: 24px;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
#org-members .member .avatar img {
|
||||
|
@ -2013,4 +2017,34 @@ html, body {
|
|||
#org-members .status, #org-members .role {
|
||||
line-height: 48px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#org-teams .org-team .panel-heading {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#org-teams .org-team .panel-heading a {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
#org-teams .org-team-members {
|
||||
margin-top: 18px;
|
||||
}
|
||||
|
||||
#org-teams .org-team-members img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
#org-teams .org-team-members a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#org-teams .org-team .panel-footer {
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
#org-teams .org-team {
|
||||
border-bottom: none;
|
||||
}
|
|
@ -14,3 +14,9 @@ func Members(ctx *middleware.Context,params martini.Params){
|
|||
ctx.Data["Title"] = "Organization " + params["org"]+" Members"
|
||||
ctx.HTML(200,"org/members")
|
||||
}
|
||||
|
||||
func Teams(ctx *middleware.Context,params martini.Params){
|
||||
ctx.Data["Title"] = "Organization " + params["org"]+" Teams"
|
||||
ctx.HTML(200,"org/teams")
|
||||
}
|
||||
|
||||
|
|
56
templates/org/members.tmpl
Normal file
56
templates/org/members.tmpl
Normal file
|
@ -0,0 +1,56 @@
|
|||
{{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 class="active"><a href="#"><i class="fa fa-users"></i>Members
|
||||
<span class="label label-default">5</span></a>
|
||||
</li>
|
||||
<li><a href="#"><i class="fa fa-tags"></i>Teams
|
||||
<span class="label label-default">2</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
<img class="pull-left org-small-logo" src="https://avatars3.githubusercontent.com/u/6656686?s=140" alt="" width="60"/>
|
||||
<div id="org-nav-info">
|
||||
<h2 class="org-name">Organization Name</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="body" class="container">
|
||||
<div id="org">
|
||||
<div id="org-members">
|
||||
<div class="member">
|
||||
<div class="avatar col-md-1">
|
||||
<img src="https://avatars3.githubusercontent.com/u/2142787?s=140" alt=""/>
|
||||
</div>
|
||||
<div class="name col-md-4">
|
||||
<a href="#"><strong>fuxiaohei</strong><span class="nick">傅小黑</span></a>
|
||||
</div>
|
||||
<div class="role col-md-2 pull-right">
|
||||
<strong>Member</strong>
|
||||
</div>
|
||||
<div class="status col-md-1 pull-right">
|
||||
<strong>Public</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member">
|
||||
<div class="avatar col-md-1">
|
||||
<img src="https://avatars3.githubusercontent.com/u/2142787?s=140" alt=""/>
|
||||
</div>
|
||||
<div class="name col-md-4">
|
||||
<a href="#"><strong>fuxiaohei</strong><span class="nick">傅小黑</span></a>
|
||||
</div>
|
||||
<div class="role col-md-2 pull-right">
|
||||
<strong><i class="fa fa-user"></i>Owner</strong>
|
||||
</div>
|
||||
<div class="status col-md-1 pull-right">
|
||||
<i class="fa fa-lock"></i>Private
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
65
templates/org/teams.tmpl
Normal file
65
templates/org/teams.tmpl
Normal file
|
@ -0,0 +1,65 @@
|
|||
{{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="#"><i class="fa fa-users"></i>Members
|
||||
<span class="label label-default">5</span></a>
|
||||
</li>
|
||||
<li class="active"><a href="#"><i class="fa fa-tags"></i>Teams
|
||||
<span class="label label-default">2</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
<img class="pull-left org-small-logo" src="https://avatars3.githubusercontent.com/u/6656686?s=140" alt="" width="60"/>
|
||||
<div id="org-nav-info">
|
||||
<h2 class="org-name">Organization Name</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="body" class="container">
|
||||
<div id="org">
|
||||
<div id="org-teams">
|
||||
<div class="org-team col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<h2 class="panel-heading org-team-name"><a href="#"><strong>Team Name</strong></a></h2>
|
||||
<div class="panel-body">
|
||||
<p class="org-team-meta">4 members · 10 repositories</p>
|
||||
<p class="org-team-members">
|
||||
<a href="#">
|
||||
<img class="img-thumbnail" src="https://avatars2.githubusercontent.com/u/2946214?s=60" alt=""/>
|
||||
</a>
|
||||
<a href="#">
|
||||
<img class="img-thumbnail" src="https://avatars2.githubusercontent.com/u/2946214?s=60" alt=""/>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<button class="pull-right btn btn-default">Join</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="org-team col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<h2 class="panel-heading org-team-name"><a href="#"><strong>Team Name</strong></a></h2>
|
||||
<div class="panel-body">
|
||||
<p class="org-team-meta">4 members · 10 repositories</p>
|
||||
<p class="org-team-members">
|
||||
<a href="#">
|
||||
<img class="img-thumbnail" src="https://avatars2.githubusercontent.com/u/2946214?s=60" alt=""/>
|
||||
</a>
|
||||
<a href="#">
|
||||
<img class="img-thumbnail" src="https://avatars2.githubusercontent.com/u/2946214?s=60" alt=""/>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<button class="pull-right btn btn-danger">Leave</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
Loading…
Reference in a new issue