mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-23 13:55:27 +00:00
Merge branch 'dev' of github.com:gogits/gogs into dev
This commit is contained in:
commit
9c82073091
|
@ -96,7 +96,7 @@ func runWeb(*cli.Context) {
|
|||
r.Get("/stars", user.Stars)
|
||||
}, reqSignIn)
|
||||
|
||||
m.Group("/api", func(r martini.Router) {
|
||||
m.Group("/api", func(_ martini.Router) {
|
||||
m.Group("/v1", func(r martini.Router) {
|
||||
// Miscellaneous.
|
||||
r.Post("/markdown", bindIgnErr(apiv1.MarkdownForm{}), v1.Markdown)
|
||||
|
@ -190,6 +190,8 @@ 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) {
|
||||
|
|
|
@ -638,6 +638,47 @@ html, body {
|
|||
margin: 0 .5em;
|
||||
}
|
||||
|
||||
#dashboard-switch .btn {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
#dashboard-switch {
|
||||
margin-top: 14px;
|
||||
margin-right: 18px;
|
||||
}
|
||||
|
||||
#dashboard-switch .dropdown-menu {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#dashboard-switch-menu {
|
||||
width: 180px;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
#dashboard-switch-menu > li > a {
|
||||
display: block;
|
||||
padding: .8em 1.2em;
|
||||
}
|
||||
|
||||
#dashboard-switch-menu > li {
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
}
|
||||
|
||||
#dashboard-switch-menu > li .fa {
|
||||
opacity: 0;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
#dashboard-switch-menu > li.checked .fa {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#dashboard-switch-menu > li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* gogits repo single page */
|
||||
|
||||
#body-nav.repo-nav {
|
||||
|
@ -1823,16 +1864,44 @@ html, body {
|
|||
padding: 16px 0;
|
||||
}
|
||||
|
||||
#body-nav.org-nav.org-nav-auto {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.org-nav > .container {
|
||||
padding-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.org-nav .org-logo {
|
||||
margin-right: 16px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.org-nav .org-small-logo {
|
||||
margin-right: 16px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.org-nav .org-name {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.org-nav-auto .org-name {
|
||||
font-size: 1.4em;
|
||||
line-height: 48px;
|
||||
}
|
||||
|
||||
#body-nav.org-nav-auto .nav {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
#body-nav.org-nav-auto .nav a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.org-description {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
@ -1853,6 +1922,10 @@ html, body {
|
|||
margin-left: 0;
|
||||
}
|
||||
|
||||
.org-main {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.org-sidebar {
|
||||
margin-top: -100px;
|
||||
}
|
||||
|
@ -1906,4 +1979,72 @@ html, body {
|
|||
|
||||
.org-team a:hover .org-team-name {
|
||||
color: #0079bc !important;
|
||||
}
|
||||
|
||||
#org-members {
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
#org-members .member .avatar img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
#org-members .member {
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: 20px;
|
||||
border-bottom: 1px solid #DDD;
|
||||
height: 70px;
|
||||
}
|
||||
|
||||
#org-members .member .name {
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
#org-members .member .nick {
|
||||
display: block;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
#org-members .member .name a {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
#org-members .member .name strong {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
#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;
|
||||
}
|
|
@ -31,7 +31,7 @@ func Home(ctx *middleware.Context) {
|
|||
|
||||
ctx.Data["PageIsHome"] = true
|
||||
|
||||
// Show recent updated repositoires for new visiters.
|
||||
// Show recent updated repositories for new visitors.
|
||||
repos, err := models.GetRecentUpdatedRepositories()
|
||||
if err != nil {
|
||||
ctx.Handle(500, "dashboard.Home(GetRecentUpdatedRepositories)", err)
|
||||
|
|
|
@ -6,6 +6,17 @@ import (
|
|||
)
|
||||
|
||||
func Organization(ctx *middleware.Context, params martini.Params) {
|
||||
ctx.Data["Title"] = "Organization Name" + params["org"]
|
||||
ctx.Data["Title"] = "Organization " + params["org"]
|
||||
ctx.HTML(200, "org/org")
|
||||
}
|
||||
|
||||
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" .}}
|
|
@ -2,6 +2,20 @@
|
|||
{{template "base/navbar" .}}
|
||||
<div id="body-nav">
|
||||
<div class="container">
|
||||
<div class="btn-group pull-left" id="dashboard-switch">
|
||||
<button type="button" class="btn btn-default">
|
||||
<img src="//1.gravatar.com/avatar/f72f7454ce9d710baa506394f68f4132?s=28" alt="user-avatar" title="username">
|
||||
fuxiaohei
|
||||
</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<div class="dropdown-menu clone-group-btn no-propagation">
|
||||
<ul id="dashboard-switch-menu" class="list-unstyled">
|
||||
<li class="checked"><a href="#"><i class="fa fa-check"></i> gogits/gogs</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="nav nav-pills pull-right">
|
||||
<li class="active"><a href="/">Feed</a></li>
|
||||
<li><a href="/issues">Issues</a></li>
|
||||
|
|
Loading…
Reference in a new issue