mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-05 04:56:02 +01:00
Use static values instead of magic number.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
@(account: Option[model.Account])(implicit context: app.Context)
|
||||
@import context._
|
||||
@import service.AccountService._
|
||||
@html.main(if(account.isEmpty) "New User" else "Update User"){
|
||||
<form method="POST" action="@if(account.isEmpty){@path/admin/users/_new} else {@path/admin/users/@account.get.userName/_edit}" validate="true">
|
||||
<fieldset>
|
||||
@@ -20,10 +21,10 @@
|
||||
<fieldset>
|
||||
<label><strong>User Type</strong></label>
|
||||
<label for="userType_Normal">
|
||||
<input type="radio" name="userType" id="userType_Normal" value="0"@if(account.isEmpty || account.get.userType==0){ checked}/> Normal
|
||||
<input type="radio" name="userType" id="userType_Normal" value="@Normal"@if(account.isEmpty || account.get.userType==Normal){ checked}/> Normal
|
||||
</label>
|
||||
<label for="userType_Admin">
|
||||
<input type="radio" name="userType" id="userType_Admin" value="1"@if(account.isDefined && account.get.userType==1){ checked}/> Administrator
|
||||
<input type="radio" name="userType" id="userType_Admin" value="@Administrator"@if(account.isDefined && account.get.userType==Administrator){ checked}/> Administrator
|
||||
</label>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
@(users: List[model.Account])(implicit context: app.Context)
|
||||
@import context._
|
||||
@import service.AccountService._
|
||||
@html.main("Manage Users"){
|
||||
<div style="text-align: right; margin-bottom: 4px;">
|
||||
<a href="@path/admin/users/_new" class="btn">New User</a>
|
||||
</div>
|
||||
<table class="table table-borderd">
|
||||
<table class="table table-borderd table-hover">
|
||||
<tr>
|
||||
<th>Username</th>
|
||||
<th>Mail Address</th>
|
||||
@@ -19,10 +20,10 @@
|
||||
<td><a href="@path/admin/users/@account.userName/_edit">@account.userName</a></td>
|
||||
<td>@account.mailAddress</td>
|
||||
<td>
|
||||
@if(account.userType == service.AccountService.Normal){
|
||||
@if(account.userType == Normal){
|
||||
Normal
|
||||
}
|
||||
@if(account.userType == service.AccountService.Administrator){
|
||||
@if(account.userType == Administrator){
|
||||
Administrator
|
||||
}
|
||||
</td>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
@(active: String, repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context)
|
||||
@import context._
|
||||
@import service.AccountService._
|
||||
<div class="head">
|
||||
<a href="@path/@repository.owner">@repository.owner</a> / <a href="@path/@repository.owner/@repository.name">@repository.name</a>
|
||||
</div>
|
||||
@@ -14,7 +15,7 @@
|
||||
<th class="box-header@if(active=="wiki"){ active}">
|
||||
<a href="@path/@repository.owner/@repository.name/wiki">Wiki</a>
|
||||
</th>
|
||||
@if(loginAccount.isDefined && (loginAccount.get.userType == 1 || loginAccount.get.userName == repository.owner)){
|
||||
@if(loginAccount.isDefined && (loginAccount.get.userType == Administrator || loginAccount.get.userName == repository.owner)){
|
||||
<th class="box-header@if(active=="settings"){ active}">
|
||||
<a href="@path/@repository.owner/@repository.name/settings">Settings</a>
|
||||
</th>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
@(repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context)
|
||||
@import context._
|
||||
@import service.RepositoryService._
|
||||
@html.main("Settings"){
|
||||
@html.header("settings", repository)
|
||||
@menu("options", repository){
|
||||
@@ -24,11 +25,11 @@
|
||||
<fieldset>
|
||||
<label><strong>Repository Type</strong></label>
|
||||
<label>
|
||||
<input type="radio" name="repositoryType" value="0"@if(repository.repository.repositoryType==0){ checked}>
|
||||
<input type="radio" name="repositoryType" value="@Public"@if(repository.repository.repositoryType==Public){ checked}>
|
||||
<strong>Public</strong> - All users and guests can read this repository.
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="repositoryType" value="1"@if(repository.repository.repositoryType==1){ checked}>
|
||||
<input type="radio" name="repositoryType" value="@Private"@if(repository.repository.repositoryType==Private){ checked}>
|
||||
<strong>Private</strong> - Only collaborators can read this repository.
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
Reference in New Issue
Block a user