Add the manage collaborators page.

This commit is contained in:
takezoe
2013-06-02 00:38:05 +09:00
parent c811582c6e
commit 25f642a97b
4 changed files with 91 additions and 68 deletions

View File

@@ -16,5 +16,12 @@ class SettingsController extends ControllerBase {
settings.html.options(JGitUtil.getRepositoryInfo(owner, repository, servletContext)) settings.html.options(JGitUtil.getRepositoryInfo(owner, repository, servletContext))
} }
get("/:owner/:repository/settings/collaborators") {
val owner = params("owner")
val repository = params("repository")
settings.html.collaborators(JGitUtil.getRepositoryInfo(owner, repository, servletContext))
}
} }

View File

@@ -0,0 +1,11 @@
@(repository: app.RepositoryInfo)(implicit context: app.Context)
@import context._
@html.main("Settings"){
@html.header("settings", repository)
@menu("collaborators"){
<h3>Manage Collaborators</h3>
<input type="text" style="width: 300px; margin-bottom: 0px;"/>
<input type="submit" class="btn" value="Add"/>
}
}

View File

@@ -0,0 +1,13 @@
@(active: String)(body: Html)(implicit context: app.Context)
@import context._
<div class="row-fluid">
<div class="span3">
<ul class="nav nav-tabs nav-stacked">
<li class="active"><a href="@path/settings/options">Options</a></li>
<li><a href="@path/settings/collaborators">Collaborators</a></li>
</ul>
</div>
<div class="span9">
@body
</div>
</div>

View File

@@ -2,74 +2,66 @@
@import context._ @import context._
@html.main("Settings"){ @html.main("Settings"){
@html.header("settings", repository) @html.header("settings", repository)
<div class="row-fluid"> @menu("options"){
<div class="span3"> <form id="form" method="post" action="@path/new" validate="true">
<ul class="nav nav-tabs nav-stacked"> <div class="box">
<li class="active"><a href="@path/settings/options">Options</a></li> <div class="box-header">Settings</div>
<li><a href="@path/settings/collaborators">Collaborators</a></li> <div class="box-content">
</ul> <fieldset>
</div> <label for="defaultBranch"><strong>Default Branch</strong></label>
<div class="span9"> <select name="defaultBranch" id="defaultBranch">
<form id="form" method="post" action="@path/new" validate="true"> <option value="master">master</option>
<div class="box"> </select>
<div class="box-header">Settings</div> </fieldset>
<div class="box-content"> <hr>
<fieldset> <fieldset>
<label for="defaultBranch"><strong>Default Branch</strong></label> <label><strong>Repository Type</strong></label>
<select name="defaultBranch" id="defaultBranch"> <label>
<option value="master">master</option> <input type="radio" name="repositoryType" value="0" checked>
</select> <strong>Public</strong> - All users and guests can read this repository.
</fieldset> </label>
<hr> <label>
<fieldset> <input type="radio" name="repositoryType" value="1">
<label><strong>Repository Type</strong></label> <strong>Private</strong> - Only collaborators can read this repository.
<label> </label>
<input type="radio" name="repositoryType" value="0" checked> </fieldset>
<strong>Public</strong> - All users and guests can read this repository.
</label>
<label>
<input type="radio" name="repositoryType" value="1">
<strong>Private</strong> - Only collaborators can read this repository.
</label>
</fieldset>
</div>
</div> </div>
<div class="box"> </div>
<div class="box-header">Features</div> <div class="box">
<div class="box-content"> <div class="box-header">Features</div>
<dl> <div class="box-content">
<dt> <dl>
<label class="checkbox"> <dt>
<input type="checkbox" name="wiki" id="wiki"/> <strong>Wiki</strong> <label class="checkbox">
</label> <input type="checkbox" name="wiki" id="wiki"/> <strong>Wiki</strong>
</dt> </label>
<dd> </dt>
Adds lightweight Wiki system to this repository. <dd>
This is the simplest way to provide documentation or examples. Adds lightweight Wiki system to this repository.
Only collaborators can edit Wiki pages. This is the simplest way to provide documentation or examples.
</dd> Only collaborators can edit Wiki pages.
</dl> </dd>
<hr> </dl>
<dl> <hr>
<dt> <dl>
<label class="checkbox"> <dt>
<input type="checkbox" name="issue" id="issue"/> <strong>Issue</strong> <label class="checkbox">
</label> <input type="checkbox" name="issue" id="issue"/> <strong>Issue</strong>
</dt> </label>
<dd> </dt>
Adds lightweight issue tracking integrated with this repository. <dd>
All users who have signed in and can access this repository can register an issue. Adds lightweight issue tracking integrated with this repository.
</dd> All users who have signed in and can access this repository can register an issue.
</dl> </dd>
</div> </dl>
</div> </div>
<fieldset> </div>
<input type="submit" class="btn btn-primary" value="Apply changes"/> <fieldset>
<!-- <input type="submit" class="btn btn-primary" value="Apply changes"/>
<input type="submit" class="btn btn-danger" value="Delete this repository"/> <!--
--> <input type="submit" class="btn btn-danger" value="Delete this repository"/>
</fieldset> -->
</form> </fieldset>
</div> </form>
</div> }
} }