mirror of
https://github.com/gitbucket/gitbucket.git
synced 2026-01-06 07:40:01 +01:00
Merge pull request #1156 from gitbucket/update_ui_sidebar
Move the repository menu to the sidebar
This commit is contained in:
@@ -108,7 +108,9 @@ trait DashboardControllerBase extends ControllerBase {
|
||||
case _ => condition.copy(author = Some(userName))
|
||||
},
|
||||
filter,
|
||||
getGroupNames(userName))
|
||||
getGroupNames(userName),
|
||||
getVisibleRepositories(context.loginAccount, withoutPhysicalInfo = true),
|
||||
getUserRepositories(userName, withoutPhysicalInfo = true))
|
||||
}
|
||||
|
||||
private def searchPullRequests(filter: String) = {
|
||||
@@ -131,7 +133,9 @@ trait DashboardControllerBase extends ControllerBase {
|
||||
case _ => condition.copy(author = Some(userName))
|
||||
},
|
||||
filter,
|
||||
getGroupNames(userName))
|
||||
getGroupNames(userName),
|
||||
getVisibleRepositories(context.loginAccount, withoutPhysicalInfo = true),
|
||||
getUserRepositories(userName, withoutPhysicalInfo = true))
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,56 +5,51 @@
|
||||
@import gitbucket.core.view.helpers._
|
||||
@html.main("Applications"){
|
||||
<div class="container body">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
@menu("application", settings.ssh)
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading strong">Personal access tokens</div>
|
||||
<div class="panel-body">
|
||||
@if(personalTokens.isEmpty && gneratedToken.isEmpty){
|
||||
No tokens.
|
||||
} else {
|
||||
Tokens you have generated that can be used to access the GitBucket API.
|
||||
<hr style="margin-top: 10px;">
|
||||
}
|
||||
@gneratedToken.map{ case (token, tokenString) =>
|
||||
<div class="alert alert-info">
|
||||
Make sure to copy your new personal access token now. You won't be able to see it again!
|
||||
</div>
|
||||
<a href="@path/@account.userName/_personalToken/delete/@token.accessTokenId" class="btn btn-sm btn-danger pull-right">Delete</a>
|
||||
<div style="width: 50%;">
|
||||
@helper.html.copy("generated-token-copy", tokenString){
|
||||
<input type="text" value="@tokenString" class="form-control input-sm" readonly>
|
||||
}
|
||||
</div>
|
||||
<hr style="margin-top: 10px;">
|
||||
}
|
||||
@personalTokens.zipWithIndex.map { case (token, i) =>
|
||||
@if(i != 0){
|
||||
<hr>
|
||||
@menu("application", settings.ssh){
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading strong">Personal access tokens</div>
|
||||
<div class="panel-body">
|
||||
@if(personalTokens.isEmpty && gneratedToken.isEmpty){
|
||||
No tokens.
|
||||
} else {
|
||||
Tokens you have generated that can be used to access the GitBucket API.
|
||||
<hr style="margin-top: 10px;">
|
||||
}
|
||||
@gneratedToken.map{ case (token, tokenString) =>
|
||||
<div class="alert alert-info">
|
||||
Make sure to copy your new personal access token now. You won't be able to see it again!
|
||||
</div>
|
||||
<a href="@path/@account.userName/_personalToken/delete/@token.accessTokenId" class="btn btn-sm btn-danger pull-right">Delete</a>
|
||||
<div style="width: 50%;">
|
||||
@helper.html.copy("generated-token-copy", tokenString){
|
||||
<input type="text" value="@tokenString" class="form-control input-sm" readonly>
|
||||
}
|
||||
<strong style="line-height: 30px;">@token.note</strong>
|
||||
<a href="@path/@account.userName/_personalToken/delete/@token.accessTokenId" class="btn btn-sm btn-danger pull-right">Delete</a>
|
||||
</div>
|
||||
<hr style="margin-top: 10px;">
|
||||
}
|
||||
@personalTokens.zipWithIndex.map { case (token, i) =>
|
||||
@if(i != 0){
|
||||
<hr>
|
||||
}
|
||||
<strong style="line-height: 30px;">@token.note</strong>
|
||||
<a href="@path/@account.userName/_personalToken/delete/@token.accessTokenId" class="btn btn-sm btn-danger pull-right">Delete</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<form method="POST" action="@path/@account.userName/_personalToken" validate="true">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading strong">Generate new token</div>
|
||||
<div class="panel-body">
|
||||
<fieldset>
|
||||
<label for="note" class="strong">Token description</label>
|
||||
<div><span id="error-note" class="error"></span></div>
|
||||
<input type="text" name="note" id="note" class="form-control"/>
|
||||
<p class="muted">What's this token for?</p>
|
||||
</fieldset>
|
||||
<input type="submit" class="btn btn-success" value="Generate token"/>
|
||||
</div>
|
||||
</div>
|
||||
<form method="POST" action="@path/@account.userName/_personalToken" validate="true">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading strong">Generate new token</div>
|
||||
<div class="panel-body">
|
||||
<fieldset>
|
||||
<label for="note" class="strong">Token description</label>
|
||||
<div><span id="error-note" class="error"></span></div>
|
||||
<input type="text" name="note" id="note" class="form-control"/>
|
||||
<p class="muted">What's this token for?</p>
|
||||
</fieldset>
|
||||
<input type="submit" class="btn btn-success" value="Generate token"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -4,14 +4,10 @@
|
||||
@import gitbucket.core.view.helpers._
|
||||
@html.main("Edit your profile"){
|
||||
<div class="container body">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
@menu("profile", settings.ssh)
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@helper.html.information(info)
|
||||
@if(LDAPUtil.isDummyMailAddress(account)){<div class="alert alert-danger">Please register your mail address.</div>}
|
||||
<form action="@url(account.userName)/_edit" method="POST" validate="true">
|
||||
@menu("profile", settings.ssh){
|
||||
@helper.html.information(info)
|
||||
@if(LDAPUtil.isDummyMailAddress(account)){<div class="alert alert-danger">Please register your mail address.</div>}
|
||||
<form action="@url(account.userName)/_edit" method="POST" validate="true">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading strong">Profile</div>
|
||||
<div class="panel-body">
|
||||
@@ -49,17 +45,17 @@
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 20px;">
|
||||
<div class="pull-right">
|
||||
<a href="@path/@account.userName/_delete" class="btn btn-danger" id="delete">Delete account</a>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-success" value="Save"/>
|
||||
@if(!LDAPUtil.isDummyMailAddress(account)){<a href="@url(account.userName)" class="btn btn-default">Cancel</a>}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="pull-right">
|
||||
<a href="@path/@account.userName/_delete" class="btn btn-danger" id="delete">Delete account</a>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-success" value="Save"/>
|
||||
@if(!LDAPUtil.isDummyMailAddress(account)){<a href="@url(account.userName)" class="btn btn-default">Cancel</a>}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
<script>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@import context._
|
||||
@import gitbucket.core.view.helpers._
|
||||
@html.main(if(account.isEmpty) "Create group" else "Edit group"){
|
||||
<div class="container body">
|
||||
<div class="body main-center">
|
||||
<form id="form" method="post" action="@if(account.isEmpty){@path/groups/new} else {@path/@account.get.userName/_editgroup}" validate="true">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
|
||||
@@ -4,56 +4,51 @@
|
||||
@import gitbucket.core.view.helpers._
|
||||
@html.main(account.userName){
|
||||
<div class="container body">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="block">
|
||||
<div class="account-image">@avatar(account.userName, 270)</div>
|
||||
<div class="account-fullname">@account.fullName</div>
|
||||
<div class="account-username">@account.userName</div>
|
||||
</div>
|
||||
<div class="block">
|
||||
@if(account.url.isDefined){
|
||||
<div><i class="octicon octicon-home"></i> <a href="@account.url">@account.url</a></div>
|
||||
}
|
||||
<div><i class="octicon octicon-clock"></i> <span class="muted">Joined on</span> @date(account.registeredDate)</div>
|
||||
</div>
|
||||
@if(groupNames.nonEmpty){
|
||||
<div>
|
||||
<div>Groups</div>
|
||||
@groupNames.map { groupName =>
|
||||
@avatarLink(groupName, 36, tooltip = true)
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<ul class="nav nav-tabs" style="margin-bottom: 5px;">
|
||||
<li@if(active == "repositories"){ class="active"}><a href="@url(account.userName)?tab=repositories">Repositories</a></li>
|
||||
@if(account.isGroupAccount){
|
||||
<li@if(active == "members"){ class="active"}><a href="@url(account.userName)?tab=members">Members</a></li>
|
||||
} else {
|
||||
<li@if(active == "activity"){ class="active"}><a href="@url(account.userName)?tab=activity">Public Activity</a></li>
|
||||
}
|
||||
@if(loginAccount.isDefined && loginAccount.get.userName == account.userName){
|
||||
<li class="pull-right">
|
||||
<div class="button-group">
|
||||
<a href="@url(account.userName)/_edit" class="btn btn-default">Edit Your Profile</a>
|
||||
</div>
|
||||
</li>
|
||||
}
|
||||
@if(loginAccount.isDefined && account.isGroupAccount && isGroupManager){
|
||||
<li class="pull-right">
|
||||
<div class="button-group">
|
||||
<a href="@url(account.userName)/_editgroup" class="btn btn-default">Edit Group</a>
|
||||
</div>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
@body
|
||||
</div>
|
||||
<div style="float: left; width: 250px;">
|
||||
<div class="block">
|
||||
<div class="account-image">@avatar(account.userName, 240)</div>
|
||||
<div class="account-fullname">@account.fullName</div>
|
||||
<div class="account-username">@account.userName</div>
|
||||
</div>
|
||||
<div class="block">
|
||||
@if(account.url.isDefined){
|
||||
<div><i class="octicon octicon-home"></i> <a href="@account.url">@account.url</a></div>
|
||||
}
|
||||
<div><i class="octicon octicon-clock"></i> <span class="muted">Joined on</span> @date(account.registeredDate)</div>
|
||||
</div>
|
||||
@if(groupNames.nonEmpty){
|
||||
<div>
|
||||
<div>Groups</div>
|
||||
@groupNames.map { groupName =>
|
||||
@avatarLink(groupName, 36, tooltip = true)
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div style="margin-left: 260px; overflow: hidden;">
|
||||
<ul class="nav nav-tabs" style="margin-bottom: 5px;">
|
||||
<li@if(active == "repositories"){ class="active"}><a href="@url(account.userName)?tab=repositories">Repositories</a></li>
|
||||
@if(account.isGroupAccount){
|
||||
<li@if(active == "members"){ class="active"}><a href="@url(account.userName)?tab=members">Members</a></li>
|
||||
} else {
|
||||
<li@if(active == "activity"){ class="active"}><a href="@url(account.userName)?tab=activity">Public Activity</a></li>
|
||||
}
|
||||
@if(loginAccount.isDefined && loginAccount.get.userName == account.userName){
|
||||
<li class="pull-right">
|
||||
<div class="button-group">
|
||||
<a href="@url(account.userName)/_edit" class="btn btn-default">Edit Your Profile</a>
|
||||
</div>
|
||||
</li>
|
||||
}
|
||||
@if(loginAccount.isDefined && account.isGroupAccount && isGroupManager){
|
||||
<li class="pull-right">
|
||||
<div class="button-group">
|
||||
<a href="@url(account.userName)/_editgroup" class="btn btn-default">Edit Group</a>
|
||||
</div>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
@body
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@(active: String, ssh: Boolean)(implicit context: gitbucket.core.controller.Context)
|
||||
@(active: String, ssh: Boolean)(body: Html)(implicit context: gitbucket.core.controller.Context)
|
||||
@import context._
|
||||
<div class="box">
|
||||
<div class="main-sidebar">
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li@if(active=="profile"){ class="active"}>
|
||||
<a href="@path/@loginAccount.get.userName/_edit">Profile</a>
|
||||
@@ -15,3 +15,6 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="main-content">
|
||||
@body
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@ isCreateRepoOptionPublic: Boolean)(implicit context: gitbucket.core.controller.C
|
||||
@import context._
|
||||
@import gitbucket.core.view.helpers._
|
||||
@html.main("Create a New Repository"){
|
||||
<div class="body" style="width: 600px; margin: 10px auto;">
|
||||
<div class="body main-center">
|
||||
<h2>Create a new repository</h2>
|
||||
<p class="muted">
|
||||
A repository contains all the files for your project, including the revision history.
|
||||
|
||||
@@ -4,45 +4,40 @@
|
||||
@import gitbucket.core.view.helpers._
|
||||
@html.main("SSH Keys"){
|
||||
<div class="container body">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
@menu("ssh", settings.ssh)
|
||||
@menu("ssh", settings.ssh){
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading strong">SSH Keys</div>
|
||||
<div class="panel-body">
|
||||
@if(sshKeys.isEmpty){
|
||||
No keys
|
||||
}
|
||||
@sshKeys.zipWithIndex.map { case (key, i) =>
|
||||
@if(i != 0){
|
||||
<hr>
|
||||
}
|
||||
<strong style="line-height: 30px;">@key.title</strong> (@SshUtil.fingerPrint(key.publicKey).getOrElse("Key is invalid."))
|
||||
<a href="@path/@account.userName/_ssh/delete/@key.sshKeyId" class="btn btn-sm btn-danger pull-right">Delete</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<form method="POST" action="@path/@account.userName/_ssh" validate="true">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading strong">SSH Keys</div>
|
||||
<div class="panel-heading strong">Add an SSH Key</div>
|
||||
<div class="panel-body">
|
||||
@if(sshKeys.isEmpty){
|
||||
No keys
|
||||
}
|
||||
@sshKeys.zipWithIndex.map { case (key, i) =>
|
||||
@if(i != 0){
|
||||
<hr>
|
||||
}
|
||||
<strong style="line-height: 30px;">@key.title</strong> (@SshUtil.fingerPrint(key.publicKey).getOrElse("Key is invalid."))
|
||||
<a href="@path/@account.userName/_ssh/delete/@key.sshKeyId" class="btn btn-sm btn-danger pull-right">Delete</a>
|
||||
}
|
||||
<fieldset class="form-group">
|
||||
<label for="title" class="strong">Title</label>
|
||||
<div><span id="error-title" class="error"></span></div>
|
||||
<input type="text" name="title" id="title" class="form-control"/>
|
||||
</fieldset>
|
||||
<fieldset class="form-group">
|
||||
<label for="publicKey" class="strong">Key</label>
|
||||
<div><span id="error-publicKey" class="error"></span></div>
|
||||
<textarea name="publicKey" id="publicKey" class="form-control" style="height: 250px;"></textarea>
|
||||
</fieldset>
|
||||
<input type="submit" class="btn btn-success" value="Add"/>
|
||||
</div>
|
||||
</div>
|
||||
<form method="POST" action="@path/@account.userName/_ssh" validate="true">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading strong">Add an SSH Key</div>
|
||||
<div class="panel-body">
|
||||
<fieldset class="form-group">
|
||||
<label for="title" class="strong">Title</label>
|
||||
<div><span id="error-title" class="error"></span></div>
|
||||
<input type="text" name="title" id="title" class="form-control"/>
|
||||
</fieldset>
|
||||
<fieldset class="form-group">
|
||||
<label for="publicKey" class="strong">Key</label>
|
||||
<div><span id="error-publicKey" class="error"></span></div>
|
||||
<textarea name="publicKey" id="publicKey" class="form-control" style="height: 250px;"></textarea>
|
||||
</fieldset>
|
||||
<input type="submit" class="btn btn-success" value="Add"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
@(active: String)(body: Html)(implicit context: gitbucket.core.controller.Context)
|
||||
@import context._
|
||||
<div class="container body">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<ul class="nav nav-pills nav-stacked" id="system-admin-menu-container">
|
||||
<li@if(active=="users"){ class="active"}>
|
||||
<a href="@path/admin/users">User Management</a>
|
||||
</li>
|
||||
<li@if(active=="system"){ class="active"}>
|
||||
<a href="@path/admin/system">System Settings</a>
|
||||
</li>
|
||||
<li@if(active=="plugins"){ class="active"}>
|
||||
<a href="@path/admin/plugins">Plugins</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@path/console/login.jsp">H2 Console</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@body
|
||||
</div>
|
||||
<div class="main-sidebar">
|
||||
<ul class="nav nav-pills nav-stacked" id="system-admin-menu-container">
|
||||
<li@if(active=="users"){ class="active"}>
|
||||
<a href="@path/admin/users">User Management</a>
|
||||
</li>
|
||||
<li@if(active=="system"){ class="active"}>
|
||||
<a href="@path/admin/system">System Settings</a>
|
||||
</li>
|
||||
<li@if(active=="plugins"){ class="active"}>
|
||||
<a href="@path/admin/plugins">Plugins</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@path/console/login.jsp">H2 Console</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="main-content">
|
||||
@body
|
||||
</div>
|
||||
</div>
|
||||
@@ -4,15 +4,19 @@
|
||||
closedCount: Int,
|
||||
condition: gitbucket.core.service.IssuesService.IssueSearchCondition,
|
||||
filter: String,
|
||||
groups: List[String])(implicit context: gitbucket.core.controller.Context)
|
||||
groups: List[String],
|
||||
recentRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo],
|
||||
userRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo])(implicit context: gitbucket.core.controller.Context)
|
||||
@import context._
|
||||
@import gitbucket.core.view.helpers._
|
||||
@html.main("Issues"){
|
||||
<div class="body">
|
||||
@dashboard.html.tab("issues")
|
||||
<div class="container">
|
||||
@issuesnavi(filter, openCount, closedCount, condition)
|
||||
@issueslist(issues, page, openCount, closedCount, condition, filter, groups)
|
||||
@sidebar(recentRepositories, userRepositories){
|
||||
<div style="overflow: hidden;">
|
||||
@dashboard.html.tab("issues")
|
||||
<div class="container">
|
||||
@issuesnavi(filter, openCount, closedCount, condition)
|
||||
@issueslist(issues, page, openCount, closedCount, condition, filter, groups)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<li class="@(if(condition.state == "open"){"active"})">
|
||||
<a href="@condition.copy(state = "open").toURL">Open <span class="badge">@openCount</span></a>
|
||||
</li>
|
||||
<li class="@if(condition.state == "closed"){ selected}">
|
||||
<li class="@(if(condition.state == "closed"){"active"})">
|
||||
<a href="@condition.copy(state = "closed").toURL">Closed <span class="badge">@closedCount</span></a>
|
||||
</li>
|
||||
@*
|
||||
|
||||
@@ -4,15 +4,19 @@
|
||||
closedCount: Int,
|
||||
condition: gitbucket.core.service.IssuesService.IssueSearchCondition,
|
||||
filter: String,
|
||||
groups: List[String])(implicit context: gitbucket.core.controller.Context)
|
||||
groups: List[String],
|
||||
recentRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo],
|
||||
userRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo])(implicit context: gitbucket.core.controller.Context)
|
||||
@import context._
|
||||
@import gitbucket.core.view.helpers._
|
||||
@html.main("Pull Requests"){
|
||||
<div class="body">
|
||||
@dashboard.html.tab("pulls")
|
||||
<div class="container">
|
||||
@issuesnavi(filter, openCount, closedCount, condition)
|
||||
@issueslist(issues, page, openCount, closedCount, condition, filter, groups)
|
||||
@sidebar(recentRepositories, userRepositories){
|
||||
<div style="overflow: hidden;">
|
||||
@dashboard.html.tab("pulls")
|
||||
<div class="container">
|
||||
@issuesnavi(filter, openCount, closedCount, condition)
|
||||
@issueslist(issues, page, openCount, closedCount, condition, filter, groups)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
65
src/main/twirl/gitbucket/core/dashboard/sidebar.scala.html
Normal file
65
src/main/twirl/gitbucket/core/dashboard/sidebar.scala.html
Normal file
@@ -0,0 +1,65 @@
|
||||
@(recentRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo],
|
||||
userRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo])(body: Html)(implicit context: gitbucket.core.controller.Context)
|
||||
@import context._
|
||||
@import gitbucket.core.view.helpers._
|
||||
<div class="container body">
|
||||
<div class="dashboard-sidebar">
|
||||
@if(loginAccount.isEmpty){
|
||||
<div id="dashboard-signin-form">@html.signinform(settings)</div>
|
||||
} else {
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading strong">
|
||||
Your repositories <span class="badge">@userRepositories.size</span>
|
||||
</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
@if(userRepositories.isEmpty){
|
||||
<li class="list-group-item">No repositories</li>
|
||||
} else {
|
||||
@defining(20){ max =>
|
||||
@userRepositories.zipWithIndex.map { case (repository, i) =>
|
||||
<li class="list-group-item repo-link" style="@if(i > max - 1){display:none;}">
|
||||
@helper.html.repositoryicon(repository, false)
|
||||
@if(repository.owner == loginAccount.get.userName){
|
||||
<a href="@url(repository)"><span class="strong">@repository.name</span></a>
|
||||
} else {
|
||||
<a href="@url(repository)">@repository.owner/<span class="strong">@repository.name</span></a>
|
||||
}
|
||||
</li>
|
||||
}
|
||||
@if(userRepositories.size > max){
|
||||
<li class="list-group-item show-more">
|
||||
<a href="javascript:void(0);" id="show-more-repos">Show @{userRepositories.size - max} more repositories...</a>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading strong">Recent updated repositories</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
@if(recentRepositories.isEmpty){
|
||||
<li class="list-group-item">No repositories</li>
|
||||
} else {
|
||||
@defining(20){ max =>
|
||||
@recentRepositories.zipWithIndex.map { case (repository, i) =>
|
||||
<li class="list-group-item repo-link" style="@if(i > max - 1){display:none;}">
|
||||
@helper.html.repositoryicon(repository, false)
|
||||
<a href="@url(repository)">@repository.owner/<span class="strong">@repository.name</span></a>
|
||||
</li>
|
||||
}
|
||||
@if(recentRepositories.size > max){
|
||||
<li class="list-group-item show-more">
|
||||
<a href="javascript:void(0);" id="show-more-recent-repos">Show @{recentRepositories.size - max} more repositories...</a>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-content">
|
||||
@body
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,12 +1,10 @@
|
||||
@(active: String = "")(implicit context: gitbucket.core.controller.Context)
|
||||
@import context._
|
||||
@import gitbucket.core.view.helpers._
|
||||
<div class="container headbar">
|
||||
<ul class="nav nav-tabs">
|
||||
<li @if(active == ""){ class="active"}><a href="@path/">News Feed</a></li>
|
||||
@if(loginAccount.isDefined){
|
||||
<li @if(active == "pulls" ){ class="active"}><a href="@path/dashboard/pulls">Pull Requests</a></li>
|
||||
<li @if(active == "issues"){ class="active"}><a href="@path/dashboard/issues">Issues</a></li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="nav nav-tabs" style="margin-bottom: 20px;">
|
||||
<li @if(active == ""){ class="active"}><a href="@path/">News Feed</a></li>
|
||||
@if(loginAccount.isDefined){
|
||||
<li @if(active == "pulls" ){ class="active"}><a href="@path/dashboard/pulls">Pull Requests</a></li>
|
||||
<li @if(active == "issues"){ class="active"}><a href="@path/dashboard/issues">Issues</a></li>
|
||||
}
|
||||
</ul>
|
||||
|
||||
@@ -4,82 +4,23 @@
|
||||
@import context._
|
||||
@import gitbucket.core.view.helpers._
|
||||
@main("GitBucket"){
|
||||
<div class="body">
|
||||
@dashboard.html.tab()
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="pull-right">
|
||||
<a href="@path/activities.atom"><img src="@assets/common/images/feed.png" alt="activities"></a>
|
||||
</div>
|
||||
@helper.html.activities(activities)
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
@settings.information.map { information =>
|
||||
<div class="alert alert-info" style="background-color: white; color: #555; border-color: #4183c4; font-size: small; line-height: 120%;">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
@Html(information)
|
||||
</div>
|
||||
}
|
||||
@if(loginAccount.isEmpty){
|
||||
<div id="dashboard-signin-form">@signinform(settings)</div>
|
||||
} else {
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading strong">
|
||||
Your repositories <span class="badge">@userRepositories.size</span>
|
||||
</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
@if(userRepositories.isEmpty){
|
||||
<li class="list-group-item">No repositories</li>
|
||||
} else {
|
||||
@defining(20){ max =>
|
||||
@userRepositories.zipWithIndex.map { case (repository, i) =>
|
||||
<li class="list-group-item repo-link" style="@if(i > max - 1){display:none;}">
|
||||
@helper.html.repositoryicon(repository, false)
|
||||
@if(repository.owner == loginAccount.get.userName){
|
||||
<a href="@url(repository)"><span class="strong">@repository.name</span></a>
|
||||
} else {
|
||||
<a href="@url(repository)">@repository.owner/<span class="strong">@repository.name</span></a>
|
||||
}
|
||||
</li>
|
||||
}
|
||||
@if(userRepositories.size > max){
|
||||
<li class="list-group-item show-more">
|
||||
<a href="javascript:void(0);" id="show-more-repos">Show @{userRepositories.size - max} more repositories...</a>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading strong">Recent updated repositories</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
@if(recentRepositories.isEmpty){
|
||||
<li class="list-group-item">No repositories</li>
|
||||
} else {
|
||||
@defining(20){ max =>
|
||||
@recentRepositories.zipWithIndex.map { case (repository, i) =>
|
||||
<li class="list-group-item repo-link" style="@if(i > max - 1){display:none;}">
|
||||
@helper.html.repositoryicon(repository, false)
|
||||
<a href="@url(repository)">@repository.owner/<span class="strong">@repository.name</span></a>
|
||||
</li>
|
||||
}
|
||||
@if(recentRepositories.size > max){
|
||||
<li class="list-group-item show-more">
|
||||
<a href="javascript:void(0);" id="show-more-recent-repos">Show @{recentRepositories.size - max} more repositories...</a>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
@dashboard.html.sidebar(recentRepositories, userRepositories){
|
||||
@settings.information.map { information =>
|
||||
<div class="alert alert-info" style="background-color: white; color: #555; border-color: #4183c4; font-size: small; line-height: 120%;">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
@Html(information)
|
||||
</div>
|
||||
}
|
||||
<div style="overflow: hidden;">
|
||||
@dashboard.html.tab()
|
||||
<div class="container">
|
||||
<div class="pull-right">
|
||||
<a href="@path/activities.atom"><img src="@assets/common/images/feed.png" alt="activities"></a>
|
||||
</div>
|
||||
@helper.html.activities(activities)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
<script>
|
||||
$(function(){
|
||||
|
||||
@@ -12,9 +12,6 @@
|
||||
<link rel="icon" href="@assets/common/images/gitbucket.png" type="image/vnd.microsoft.icon" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="@assets/vendors/bootstrap-3.3.6/css/bootstrap.min.css" rel="stylesheet">
|
||||
@*
|
||||
<link href="@assets/vendors/bootstrap-theme-github-3.1.1/css/bootstrap-responsive.css" rel="stylesheet">
|
||||
*@
|
||||
<link href="@assets/vendors/octicons/octicons.css" rel="stylesheet">
|
||||
<link href="@assets/vendors/datepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
|
||||
<link href="@assets/vendors/colorpicker/css/bootstrap-colorpicker.css" rel="stylesheet">
|
||||
@@ -44,7 +41,7 @@
|
||||
<body>
|
||||
<form id="search" action="@path/search" method="POST" class="form-inline">
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container" style="width: 980px;">
|
||||
<div class="container">
|
||||
@* TODO: for plugi-ins?
|
||||
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
@@ -60,7 +57,7 @@
|
||||
</a>
|
||||
@if(loginAccount.isDefined){
|
||||
@repository.map { repository =>
|
||||
<input type="text" name="query" class="form-control" style="width: 200px; margin-top: 3px; margin-bottom: 3px;" placeholder="Search this repository"/>
|
||||
<input type="text" name="query" class="form-control" style="width: 400px; margin-top: 3px; margin-bottom: 3px;" placeholder="Search this repository"/>
|
||||
<input type="hidden" name="owner" value="@repository.owner"/>
|
||||
<input type="hidden" name="repository" value="@repository.name"/>
|
||||
}
|
||||
@@ -69,7 +66,7 @@
|
||||
} else {
|
||||
@* TODO: merge with below *@
|
||||
@repository.map { repository =>
|
||||
<input type="text" name="query" class="form-control" style="width: 200px; margin-top: 3px; margin-bottom: 3px;" placeholder="Search this repository"/>
|
||||
<input type="text" name="query" class="form-control" style="width: 400px; margin-top: 3px; margin-bottom: 3px;" placeholder="Search this repository"/>
|
||||
<input type="hidden" name="owner" value="@repository.owner"/>
|
||||
<input type="hidden" name="repository" value="@repository.name"/>
|
||||
}
|
||||
|
||||
@@ -21,26 +21,6 @@
|
||||
<div class="container">
|
||||
@helper.html.information(info)
|
||||
@helper.html.error(error)
|
||||
@*
|
||||
<div class="pull-right">
|
||||
<a href="@url(repository)/commits/@encodeRefName(id.getOrElse(repository.repository.defaultBranch))" class="header-link">
|
||||
<i class="octicon octicon-history"></i>
|
||||
@if(repository.commitCount > 10000){
|
||||
<strong>10000+</strong> commits
|
||||
} else {
|
||||
<strong>@repository.commitCount</strong> commits
|
||||
}
|
||||
</a>
|
||||
<a href="@url(repository)/branches" class="header-link" class="header-link">
|
||||
<i class="octicon octicon-git-branch"></i>
|
||||
<strong>@repository.branchList.length</strong> branches
|
||||
</a>
|
||||
<a href="@url(repository)/tags" class="header-link" class="header-link">
|
||||
<i class="octicon octicon-tag"></i>
|
||||
<strong>@repository.tags.length</strong> releases
|
||||
</a>
|
||||
</div>
|
||||
*@
|
||||
<div class="head">
|
||||
@helper.html.repositoryicon(repository, true)
|
||||
<a href="@url(repository.owner)">@repository.owner</a> / <a href="@url(repository)" class="strong">@repository.name</a>
|
||||
@@ -56,7 +36,11 @@
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
</div>
|
||||
</div>
|
||||
<div class="container body">
|
||||
<div class="main-sidebar">
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
@menuitem("" ,"files" ,"Files")
|
||||
@if(repository.commitCount != 0) {
|
||||
@menuitem("/branches" ,"branches" ,"Branches", repository.branchList.length)
|
||||
@@ -67,13 +51,14 @@
|
||||
@menuitem("/issues/labels" ,"labels" ,"Labels")
|
||||
@menuitem("/issues/milestones" ,"milestones" ,"Milestones")
|
||||
@menuitem("/wiki" ,"wiki" ,"Wiki")
|
||||
@menuitem("/network/members", "fork", "Forks", repository.forkedCount)
|
||||
@if(loginAccount.isDefined && (loginAccount.get.isAdmin || repository.managers.contains(loginAccount.get.userName))){
|
||||
@menuitem("/settings" , "settings" , "Settings")
|
||||
}
|
||||
@menuitem("/network/members", "fork", "Forks", repository.forkedCount)
|
||||
</ul>
|
||||
</div>
|
||||
<div class="main-content">
|
||||
@body
|
||||
</div>
|
||||
</div>
|
||||
<div class="container body">
|
||||
@body
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
@import gitbucket.core.view.helpers._
|
||||
@html.main(s"${repository.owner}/${repository.name}", Some(repository)) {
|
||||
@html.menu("branches", repository){
|
||||
<table class="table table-bordered table-hover table-issues branches">
|
||||
<table class="table table-bordered table-hover branches">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="background: #f5f5f5;color: #666;">All branches</th>
|
||||
|
||||
@@ -3,36 +3,30 @@
|
||||
@import context._
|
||||
@import gitbucket.core.view.helpers._
|
||||
@html.menu("", repository){
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="box">
|
||||
<ul class="nav nav-tabs nav-stacked side-menu">
|
||||
<li@if(active=="code"){ class="active"}>
|
||||
<a href="@url(repository)/search?q=@urlEncode(query)&type=code">
|
||||
@if(fileCount != 0){
|
||||
<span class="badge pull-right">@fileCount</span>
|
||||
}
|
||||
Code
|
||||
</a>
|
||||
</li>
|
||||
<li@if(active=="issue"){ class="active"}>
|
||||
<a href="@url(repository)/search?q=@urlEncode(query)&type=issue">
|
||||
@if(issueCount != 0){
|
||||
<span class="badge pull-right">@issueCount</span>
|
||||
}
|
||||
Issue
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<form action="@url(repository)/search" method="GET" class="form-inline">
|
||||
<input type="text" name="q" value="@query" class="form-control" style="width: 80%; margin-bottom: 0px;"/>
|
||||
<input type="submit" value="Search" class="btn btn-default" style="width: 15%;"/>
|
||||
<input type="hidden" name="type" value="@active"/>
|
||||
</form>
|
||||
@body
|
||||
</div>
|
||||
</div>
|
||||
<div style="overflow: hidden;">
|
||||
<ul class="nav nav-tabs" style="margin-bottom: 20px;">
|
||||
<li@if(active=="code"){ class="active"}>
|
||||
<a href="@url(repository)/search?q=@urlEncode(query)&type=code">
|
||||
Files
|
||||
@if(fileCount != 0){
|
||||
<span class="badge">@fileCount</span>
|
||||
}
|
||||
</a>
|
||||
</li>
|
||||
<li@if(active=="issue"){ class="active"}>
|
||||
<a href="@url(repository)/search?q=@urlEncode(query)&type=issue">
|
||||
Issues
|
||||
@if(issueCount != 0){
|
||||
<span class="badge">@issueCount</span>
|
||||
}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form action="@url(repository)/search" method="GET" class="form-inline">
|
||||
<input type="text" name="q" value="@query" class="form-control" style="width: 400px; margin-bottom: 0px;"/>
|
||||
<input type="submit" value="Search" class="btn btn-default"/>
|
||||
<input type="hidden" name="type" value="@active"/>
|
||||
</form>
|
||||
@body
|
||||
</div>
|
||||
}
|
||||
@@ -1,31 +1,25 @@
|
||||
@(active: String, repository: gitbucket.core.service.RepositoryService.RepositoryInfo)(body: Html)(implicit context: gitbucket.core.controller.Context)
|
||||
@import context._
|
||||
@import gitbucket.core.view.helpers._
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="box">
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li@if(active=="options"){ class="active"}>
|
||||
<a href="@url(repository)/settings/options">Options</a>
|
||||
</li>
|
||||
<li@if(active=="collaborators"){ class="active"}>
|
||||
<a href="@url(repository)/settings/collaborators">Collaborators</a>
|
||||
</li>
|
||||
@if(!repository.branchList.isEmpty){
|
||||
<li@if(active=="branches"){ class="active"}>
|
||||
<a href="@url(repository)/settings/branches">Branches</a>
|
||||
</li>
|
||||
}
|
||||
<li@if(active=="hooks"){ class="active"}>
|
||||
<a href="@url(repository)/settings/hooks">Service Hooks</a>
|
||||
</li>
|
||||
<li@if(active=="danger"){ class="active"}>
|
||||
<a href="@url(repository)/settings/danger">Danger Zone</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@body
|
||||
</div>
|
||||
</div>
|
||||
<div style="overflow: hidden;">
|
||||
<ul class="nav nav-tabs" style="margin-bottom: 20px;">
|
||||
<li@if(active=="options"){ class="active"}>
|
||||
<a href="@url(repository)/settings/options">Options</a>
|
||||
</li>
|
||||
<li@if(active=="collaborators"){ class="active"}>
|
||||
<a href="@url(repository)/settings/collaborators">Collaborators</a>
|
||||
</li>
|
||||
@if(!repository.branchList.isEmpty){
|
||||
<li@if(active=="branches"){ class="active"}>
|
||||
<a href="@url(repository)/settings/branches">Branches</a>
|
||||
</li>
|
||||
}
|
||||
<li@if(active=="hooks"){ class="active"}>
|
||||
<a href="@url(repository)/settings/hooks">Service Hooks</a>
|
||||
</li>
|
||||
<li@if(active=="danger"){ class="active"}>
|
||||
<a href="@url(repository)/settings/danger">Danger Zone</a>
|
||||
</li>
|
||||
</ul>
|
||||
@body
|
||||
</div>
|
||||
@@ -10,23 +10,20 @@
|
||||
@import gitbucket.core.service.WikiService.{wikiHttpUrl, wikiSshUrl}
|
||||
@html.main(s"${pageName} - ${repository.owner}/${repository.name}", Some(repository)){
|
||||
@html.menu("wiki", repository){
|
||||
<ul class="nav nav-tabs fill-width">
|
||||
<li>
|
||||
<h1 class="wiki-title">@pageName</h1>
|
||||
<div>
|
||||
<span class="muted"><strong>@page.committer</strong> edited this page @helper.html.datetimeago(page.time)</span>
|
||||
<div>
|
||||
@if(hasWritePermission){
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-default" href="@url(repository)/wiki/@urlEncode(pageName)/_edit">Edit Page</a>
|
||||
<a class="btn btn-success" href="@url(repository)/wiki/_new">New Page</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="pull-right">
|
||||
@if(hasWritePermission){
|
||||
<div>
|
||||
<a class="btn btn-default" href="@url(repository)/wiki/@urlEncode(pageName)/_edit">Edit Page</a>
|
||||
<a class="btn btn-success" href="@url(repository)/wiki/_new">New Page</a>
|
||||
</div>
|
||||
}
|
||||
</li>
|
||||
</ul>
|
||||
<div style="width: 200px; margin-top: 20px;" class="pull-right pc">
|
||||
}
|
||||
<h1 class="wiki-title">@pageName</h1>
|
||||
<div>
|
||||
<span class="muted"><strong>@page.committer</strong> edited this page @helper.html.datetimeago(page.time)</span>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<div style="width: 250px; margin-top: 20px;" class="pull-right pc">
|
||||
@defining(15){ max =>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading strong">
|
||||
@@ -76,7 +73,7 @@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div style="width: 740px;" class="pull-left">
|
||||
<div style="margin-right: 260px;">
|
||||
<div class="markdown-body">
|
||||
@markdown(
|
||||
markdown = page.content,
|
||||
|
||||
@@ -135,12 +135,13 @@ span.header-version {
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
/*
|
||||
div.input-group>span.fork {
|
||||
display: table;
|
||||
margin-left: 4px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
*/
|
||||
/*
|
||||
div.input-group>span.fork>span.count {
|
||||
background-color: white;
|
||||
@@ -180,7 +181,12 @@ div.head div.forked {
|
||||
}
|
||||
|
||||
div.container {
|
||||
/*
|
||||
width: 980px;
|
||||
*/
|
||||
width: 100%;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
div.container-wide {
|
||||
@@ -188,6 +194,29 @@ div.container-wide {
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
div.main-sidebar {
|
||||
width: 250px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
div.main-content {
|
||||
margin-left: 260px;
|
||||
}
|
||||
|
||||
div.main-center {
|
||||
width: 980px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
div.dashboard-sidebar {
|
||||
width: 300px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
div.dashboard-content {
|
||||
margin-left: 310px;
|
||||
}
|
||||
|
||||
div.body {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 40px;
|
||||
@@ -239,10 +268,12 @@ div.show-more a {
|
||||
color: #7aa1d3;
|
||||
}
|
||||
|
||||
/*
|
||||
span.count-right {
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
}
|
||||
*/
|
||||
|
||||
.monospace {
|
||||
font-family: Consolas, 'Courier New', Courier, Monaco, monospace;
|
||||
@@ -581,7 +612,7 @@ table.blobview {
|
||||
table-layout: fixed;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
table.table-file-list {
|
||||
margin-bottom: 0px;
|
||||
border: 1px solid #ddd;
|
||||
@@ -593,6 +624,7 @@ table.table-file-list th, table.table-file-list td {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
*/
|
||||
|
||||
table.table-file-list td.latest-commit {
|
||||
padding-top: 4px;
|
||||
@@ -604,7 +636,7 @@ table.table-file-list td {
|
||||
background-color: #F8F8F8;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
/*
|
||||
table.table-file-list .file-icon {
|
||||
padding-right: 1px;
|
||||
}
|
||||
@@ -632,7 +664,7 @@ th, td, .table th, .table td {
|
||||
padding-bottom: 4px;
|
||||
line-height: 100%;
|
||||
}
|
||||
|
||||
*/
|
||||
div.commit-avatar-image {
|
||||
float: left;
|
||||
margin-right: 4px;
|
||||
|
||||
Reference in New Issue
Block a user