Merge branch 'dev' of github.com:gogits/gogs into dev

This commit is contained in:
Unknown 2014-06-08 04:45:38 -04:00
commit a80d8d96fa
4 changed files with 194 additions and 1 deletions

View file

@ -27,6 +27,7 @@ import (
"github.com/gogits/gogs/routers/admin" "github.com/gogits/gogs/routers/admin"
"github.com/gogits/gogs/routers/api/v1" "github.com/gogits/gogs/routers/api/v1"
"github.com/gogits/gogs/routers/dev" "github.com/gogits/gogs/routers/dev"
"github.com/gogits/gogs/routers/org"
"github.com/gogits/gogs/routers/repo" "github.com/gogits/gogs/routers/repo"
"github.com/gogits/gogs/routers/user" "github.com/gogits/gogs/routers/user"
) )
@ -186,6 +187,10 @@ func runWeb(*cli.Context) {
reqOwner := middleware.RequireOwner() reqOwner := middleware.RequireOwner()
m.Group("/o", func(r martini.Router) {
r.Get("/:org", org.Organization)
})
m.Group("/:username/:reponame", func(r martini.Router) { m.Group("/:username/:reponame", func(r martini.Router) {
r.Get("/settings", repo.Setting) r.Get("/settings", repo.Setting)
r.Post("/settings", bindIgnErr(auth.RepoSettingForm{}), repo.SettingPost) r.Post("/settings", bindIgnErr(auth.RepoSettingForm{}), repo.SettingPost)

View file

@ -1643,7 +1643,7 @@ html, body {
vertical-align: top; vertical-align: top;
} }
#label-color-change-ipt2{ #label-color-change-ipt2 {
margin-top: 1px; margin-top: 1px;
} }
@ -1815,3 +1815,95 @@ html, body {
#release-preview { #release-preview {
margin: 6px 0; margin: 6px 0;
} }
/* organization */
#body-nav.org-nav {
height: 140px;
padding: 16px 0;
}
.org-nav .org-logo {
margin-right: 16px;
width: 100px;
height: 100px;
}
.org-nav .org-name {
margin-top: 0;
}
.org-description {
font-size: 16px;
}
.org-meta li, .org-meta li a, .org-repo-update, .org-repo-status, .org-team-meta {
color: #888;
}
.org-meta li {
margin-right: 12px;
}
.org-meta li a:hover {
text-decoration: underline;
}
.org-meta .fa {
margin-left: 0;
}
.org-sidebar {
margin-top: -100px;
}
.org-panel .panel-heading {
font-size: 18px;
}
.org-repo-status {
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.org-repo-item {
border-bottom: 1px solid #DDD;
padding-bottom: 18px;
}
.org-member img {
width: 60px;
height: 60px;
border-radius: 4px;
}
.org-member {
display: inline-block;
padding: 2px;
}
.org-team-name {
font-size: 15px;
margin-bottom: 0;
color: #444;
}
.org-team {
border-bottom: 1px solid #DDD;
margin-bottom: 12px;
}
.org-team:last-child {
border: none;
}
.org-team a {
display: block;
}
.org-team a:hover {
text-decoration: none;
}
.org-team a:hover .org-team-name {
color: #0079bc !important;
}

11
routers/org/org.go Normal file
View file

@ -0,0 +1,11 @@
package org
import (
"github.com/go-martini/martini"
"github.com/gogits/gogs/modules/middleware"
)
func Organization(ctx *middleware.Context, params martini.Params) {
ctx.Data["Title"] = "Organization Name" + params["org"]
ctx.HTML(200, "org/org")
}

85
templates/org/org.tmpl Normal file
View file

@ -0,0 +1,85 @@
{{template "base/head" .}}
{{template "base/navbar" .}}
<div id="body-nav" class="org-nav">
<div class="container clearfix">
<div class="col-md-8" id="org-nav-wrapper">
<img class="pull-left org-logo" src="https://avatars3.githubusercontent.com/u/6656686?s=140" alt="" width="100"/>
<div id="org-nav-info">
<h2 class="org-name">Organization Name</h2>
<p class="org-description">Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language.</p>
<ul class="org-meta list-inline">
<li><i class="fa fa-link"></i><a href="#">http://gogs.io</a></li>
<li><i class="fa fa-envelope"></i><a href="#">info@gogs.io</a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="body" class="container">
<div id="org">
<div class="org-main col-md-8">
<div class="org-toolbar clearfix">
<button class="btn pull-right btn-success"><i class="fa fa-plus"></i> New Repository</button>
</div>
<hr style="width: 100%;border-color: #DDD"/>
<div class="org-repo-list" id="org-repo-list">
<div class="org-repo-item">
<div class="org-repo-status pull-right">
<ul class="list-inline">
<li><strong>Go</strong></li>
<li><i class="i fa fa-star"></i><strong>6</strong></li>
<li><i class="fa fa-code-fork"></i><strong>2</strong></li>
</ul>
</div>
<h3 class="org-repo-name"><a href="#">gogs</a></h3>
<p class="org-repo-description">Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language.</p>
<p class="org-repo-update">Updated 17 hours ago</p>
</div>
<div class="org-repo-item">
<div class="org-repo-status pull-right">
<ul class="list-inline">
<li><strong>Go</strong></li>
<li><i class="i fa fa-star"></i><strong>6</strong></li>
<li><i class="fa fa-code-fork"></i><strong>2</strong></li>
</ul>
</div>
<h3 class="org-repo-name"><a href="#">gogs</a></h3>
<p class="org-repo-description">Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language.</p>
<p class="org-repo-update">Updated 17 hours ago</p>
</div>
</div>
</div>
<div class="org-sidebar col-md-4">
<div class="org-panel panel panel-default" id="org-sidebar-members">
<div class="panel-heading"><strong>Members</strong></div>
<div class="panel-body">
<a class="org-member" href="#" data-toggle="tooltip" title="username" data-placement="bottom"><img src="https://avatars3.githubusercontent.com/u/6656686?s=140" alt=""/></a>
<a class="org-member" href="#" data-toggle="tooltip" title="username" data-placement="bottom"><img src="https://avatars3.githubusercontent.com/u/6656686?s=140" alt=""/></a>
<a class="org-member" href="#" data-toggle="tooltip" title="username" data-placement="bottom"><img src="https://avatars3.githubusercontent.com/u/6656686?s=140" alt=""/></a>
</div>
</div>
<div class="org-panel panel panel-default" id="org-sidebar-teams">
<div class="panel-heading"><strong>Teams</strong></div>
<div class="panel-body">
<div class="org-team">
<a href="#">
<p class="org-team-name"><strong>Team name</strong></p>
<p class="org-team-meta">
4 members · 10 repositories
</p>
</a>
</div>
<div class="org-team">
<a href="#">
<p class="org-team-name"><strong>Team name</strong></p>
<p class="org-team-meta">
4 members · 10 repositories
</p>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
{{template "base/footer" .}}