diff options
author | fuxiaohei <fuxiaohei@vip.qq.com> | 2014-06-27 22:04:04 +0800 |
---|---|---|
committer | fuxiaohei <fuxiaohei@vip.qq.com> | 2014-06-27 22:04:04 +0800 |
commit | 1d55ecd29ce261cd3adf78649a44aaa30e4fd468 (patch) | |
tree | 382e94fe58866b8d6f5a30da123159e31e4510bd | |
parent | b5ba2bd268b144ae0c878fe17257d8685d92f9cc (diff) | |
download | gitea-1d55ecd29ce261cd3adf78649a44aaa30e4fd468.tar.gz gitea-1d55ecd29ce261cd3adf78649a44aaa30e4fd468.zip |
add organization team-create page
-rw-r--r-- | cmd/web.go | 3 | ||||
-rwxr-xr-x | public/css/gogs.css | 2 | ||||
-rw-r--r-- | routers/org/teams.go | 5 | ||||
-rw-r--r-- | templates/org/edit_team.tmpl | 75 |
4 files changed, 83 insertions, 2 deletions
diff --git a/cmd/web.go b/cmd/web.go index bf84d5872b..1668fae240 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -195,7 +195,8 @@ func runWeb(*cli.Context) { r.Get("/:org/dashboard", org.Dashboard) r.Get("/:org/members", org.Members) // organization teams - r.Get("/:org/teams/new",org.NewTeam) + r.Get("/:org/teams/:team/edit", org.EditTeam) + r.Get("/:org/teams/new", org.NewTeam) r.Get("/:org/teams", org.Teams) r.Get("/:org/settings", org.Settings) diff --git a/public/css/gogs.css b/public/css/gogs.css index eb95a1d088..98cb5ee188 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -375,7 +375,7 @@ html, body { /* gogits repo create */ -#repo-create, #org-create, #org-teams-create { +#repo-create, #org-create, #org-teams-create, #org-teams-edit { width: 800px; } diff --git a/routers/org/teams.go b/routers/org/teams.go index 9585cb272e..9ca5185a94 100644 --- a/routers/org/teams.go +++ b/routers/org/teams.go @@ -14,3 +14,8 @@ func NewTeam(ctx *middleware.Context, params martini.Params) { ctx.Data["Title"] = "Organization "+params["org"]+" New Team" ctx.HTML(200, "org/new_team") } + +func EditTeam(ctx *middleware.Context, params martini.Params){ + ctx.Data["Title"] = "Organization "+params["org"]+" Edit Team" + ctx.HTML(200,"org/edit_team") +} diff --git a/templates/org/edit_team.tmpl b/templates/org/edit_team.tmpl new file mode 100644 index 0000000000..4292575c87 --- /dev/null +++ b/templates/org/edit_team.tmpl @@ -0,0 +1,75 @@ +{{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"> + <form id="org-teams-edit" class="form-horizontal card"> + <h3>Edit team</h3> + <div class="form-group"> + <label class="col-md-2 control-label">Team Name<strong class="text-danger">*</strong></label> + <div class="col-md-8"> + <input name="team" type="text" class="form-control" placeholder="Type your team name" value="" required="required"> + <span class="help-block">You'll use this name to mention this team in conversations.</span> + </div> + </div> + <div class="form-group"> + <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=""> + </div> + </div> + <div class="form-group"> + <label class="col-md-2 control-label">Permission</label> + <div class="col-md-8"> + <div class="radio"> + <label> + <input type="radio" name="permission" value="pull" checked=""> + <strong>Read & Clone</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="push"> + <strong>Push, Read & Clone</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>Collaboration, Push, Read & Clone</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"> </label> + <div class="col-md-8"> + <button class="btn btn-primary">Edit this team</button> + <button class="btn btn-danger pull-right" value="delete" name="delete">Delete this team</button> + </div> + </div> + </form> + </div> +</div> +{{template "base/footer" .}} |