mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-01 11:06:06 +01:00
Improve the repository settings page.
This commit is contained in:
@@ -7,8 +7,14 @@ class SettingsController extends ControllerBase {
|
|||||||
get("/:owner/:repository/settings") {
|
get("/:owner/:repository/settings") {
|
||||||
val owner = params("owner")
|
val owner = params("owner")
|
||||||
val repository = params("repository")
|
val repository = params("repository")
|
||||||
|
redirect("/%s/%s/settings/options".format(owner, repository))
|
||||||
|
}
|
||||||
|
|
||||||
html.settings(JGitUtil.getRepositoryInfo(owner, repository, servletContext))
|
get("/:owner/:repository/settings/options") {
|
||||||
|
val owner = params("owner")
|
||||||
|
val repository = params("repository")
|
||||||
|
|
||||||
|
settings.html.options(JGitUtil.getRepositoryInfo(owner, repository, servletContext))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
@(repository: app.RepositoryInfo)(implicit context: app.Context)
|
|
||||||
@import context._
|
|
||||||
@main("Settings"){
|
|
||||||
@header("settings", repository)
|
|
||||||
<form id="form" method="post" action="@path/new" validate="true">
|
|
||||||
<div class="box">
|
|
||||||
<div class="box-header">Settings</div>
|
|
||||||
<div class="box-content">
|
|
||||||
<fieldset>
|
|
||||||
<label for="defaultBranch"><strong>Default Branch</strong></label>
|
|
||||||
<select name="defaultBranch" id="defaultBranch">
|
|
||||||
<option value="master">master</option>
|
|
||||||
</select>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="box">
|
|
||||||
<div class="box-header">Features</div>
|
|
||||||
<div class="box-content">
|
|
||||||
<dl>
|
|
||||||
<dt>
|
|
||||||
<label class="checkbox">
|
|
||||||
<input type="checkbox" name="wiki" id="wiki"/> <strong>Wiki</strong>
|
|
||||||
</label>
|
|
||||||
</dt>
|
|
||||||
<dt>
|
|
||||||
<label class="checkbox">
|
|
||||||
<input type="checkbox" name="issue" id="issue"/> <strong>Issue</strong>
|
|
||||||
</label>
|
|
||||||
</dt>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<fieldset>
|
|
||||||
<input type="submit" class="btn btn-primary" value="Apply changes"/>
|
|
||||||
<input type="submit" class="btn btn-danger" value="Delete this repository"/>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
}
|
|
||||||
75
src/main/twirl/settings/options.scala.html
Normal file
75
src/main/twirl/settings/options.scala.html
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
@(repository: app.RepositoryInfo)(implicit context: app.Context)
|
||||||
|
@import context._
|
||||||
|
@html.main("Settings"){
|
||||||
|
@html.header("settings", repository)
|
||||||
|
<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">
|
||||||
|
<form id="form" method="post" action="@path/new" validate="true">
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">Settings</div>
|
||||||
|
<div class="box-content">
|
||||||
|
<fieldset>
|
||||||
|
<label for="defaultBranch"><strong>Default Branch</strong></label>
|
||||||
|
<select name="defaultBranch" id="defaultBranch">
|
||||||
|
<option value="master">master</option>
|
||||||
|
</select>
|
||||||
|
</fieldset>
|
||||||
|
<hr>
|
||||||
|
<fieldset>
|
||||||
|
<label><strong>Repository Type</strong></label>
|
||||||
|
<label>
|
||||||
|
<input type="radio" name="repositoryType" value="0" checked>
|
||||||
|
<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 class="box">
|
||||||
|
<div class="box-header">Features</div>
|
||||||
|
<div class="box-content">
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="wiki" id="wiki"/> <strong>Wiki</strong>
|
||||||
|
</label>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Adds lightweight Wiki system to this repository.
|
||||||
|
This is the simplest way to provide documentation or examples.
|
||||||
|
Only collaborators can edit Wiki pages.
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<hr>
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
<label class="checkbox">
|
||||||
|
<input type="checkbox" name="issue" id="issue"/> <strong>Issue</strong>
|
||||||
|
</label>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Adds lightweight issue tracking integrated with this repository.
|
||||||
|
All users who have signed in and can access this repository can register an issue.
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<fieldset>
|
||||||
|
<input type="submit" class="btn btn-primary" value="Apply changes"/>
|
||||||
|
<!--
|
||||||
|
<input type="submit" class="btn btn-danger" value="Delete this repository"/>
|
||||||
|
-->
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
@@ -144,3 +144,12 @@ th.box-header {
|
|||||||
dl {
|
dl {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
margin-top: 4px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user