mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-18 03:10:39 +01:00
Merge remote-tracking branch 'origin/kounoike-pr-sidebar-mini'
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
personalTokens: List[gitbucket.core.model.AccessToken],
|
personalTokens: List[gitbucket.core.model.AccessToken],
|
||||||
gneratedToken: Option[(gitbucket.core.model.AccessToken, String)])(implicit context: gitbucket.core.controller.Context)
|
gneratedToken: Option[(gitbucket.core.model.AccessToken, String)])(implicit context: gitbucket.core.controller.Context)
|
||||||
@gitbucket.core.html.main("Applications"){
|
@gitbucket.core.html.main("Applications"){
|
||||||
<div class="container body">
|
|
||||||
@gitbucket.core.account.html.menu("application", context.settings.ssh){
|
@gitbucket.core.account.html.menu("application", context.settings.ssh){
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading strong">Personal access tokens</div>
|
<div class="panel-heading strong">Personal access tokens</div>
|
||||||
@@ -49,5 +48,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
}
|
}
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
@import gitbucket.core.util.LDAPUtil
|
@import gitbucket.core.util.LDAPUtil
|
||||||
@import gitbucket.core.view.helpers
|
@import gitbucket.core.view.helpers
|
||||||
@gitbucket.core.html.main("Edit your profile"){
|
@gitbucket.core.html.main("Edit your profile"){
|
||||||
<div class="container body">
|
|
||||||
@gitbucket.core.account.html.menu("profile", context.settings.ssh){
|
@gitbucket.core.account.html.menu("profile", context.settings.ssh){
|
||||||
@gitbucket.core.helper.html.information(info)
|
@gitbucket.core.helper.html.information(info)
|
||||||
@gitbucket.core.helper.html.error(error)
|
@gitbucket.core.helper.html.error(error)
|
||||||
@@ -61,7 +60,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
}
|
}
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
<script>
|
<script>
|
||||||
$(function(){
|
$(function(){
|
||||||
|
|||||||
@@ -2,21 +2,33 @@
|
|||||||
<div class="main-sidebar">
|
<div class="main-sidebar">
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<ul class="sidebar-menu">
|
<ul class="sidebar-menu">
|
||||||
<li@if(active=="profile"){ class="active"}>
|
<li class="menu-item-hover @if(active=="profile"){active}">
|
||||||
<a href="@context.path/@context.loginAccount.get.userName/_edit">Profile</a>
|
<a href="@context.path/@context.loginAccount.get.userName/_edit">
|
||||||
|
<i class="menu-icon octicon octicon-person"></i>
|
||||||
|
<span>Profile</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@if(ssh){
|
@if(ssh){
|
||||||
<li@if(active=="ssh"){ class="active"}>
|
<li class="menu-item-hover @if(active=="ssh"){active}">
|
||||||
<a href="@context.path/@context.loginAccount.get.userName/_ssh">SSH Keys</a>
|
<a href="@context.path/@context.loginAccount.get.userName/_ssh">
|
||||||
|
<i class="menu-icon octicon octicon-key"></i>
|
||||||
|
<span>SSH Keys</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
<li@if(active=="application"){ class="active"}>
|
<li class="menu-item-hover @if(active=="application"){active}">
|
||||||
<a href="@context.path/@context.loginAccount.get.userName/_application">Applications</a>
|
<a href="@context.path/@context.loginAccount.get.userName/_application">
|
||||||
|
<i class="menu-icon octicon octicon-rocket"></i>
|
||||||
|
<span>Applications</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@gitbucket.core.plugin.PluginRegistry().getAccountSettingMenus.map { menu =>
|
@gitbucket.core.plugin.PluginRegistry().getAccountSettingMenus.map { menu =>
|
||||||
@menu(context).map { link =>
|
@menu(context).map { link =>
|
||||||
<li@if(active==link.id){ class="active"}>
|
<li class="menu-item-hover @if(active==link.id){active}">
|
||||||
<a href="@context.path/@link.path">@link.label</a>
|
<a href="@context.path/@link.path">
|
||||||
|
<i class="menu-icon octicon octicon-plug"></i>
|
||||||
|
<span>@link.label</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
@(account: gitbucket.core.model.Account, sshKeys: List[gitbucket.core.model.SshKey])(implicit context: gitbucket.core.controller.Context)
|
@(account: gitbucket.core.model.Account, sshKeys: List[gitbucket.core.model.SshKey])(implicit context: gitbucket.core.controller.Context)
|
||||||
@import gitbucket.core.ssh.SshUtil
|
@import gitbucket.core.ssh.SshUtil
|
||||||
@gitbucket.core.html.main("SSH Keys"){
|
@gitbucket.core.html.main("SSH Keys"){
|
||||||
<div class="container body">
|
|
||||||
@gitbucket.core.account.html.menu("ssh", context.settings.ssh){
|
@gitbucket.core.account.html.menu("ssh", context.settings.ssh){
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading strong">SSH Keys</div>
|
<div class="panel-heading strong">SSH Keys</div>
|
||||||
@@ -37,5 +36,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
}
|
}
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,25 +2,42 @@
|
|||||||
<div class="main-sidebar">
|
<div class="main-sidebar">
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<ul class="sidebar-menu" id="system-admin-menu-container">
|
<ul class="sidebar-menu" id="system-admin-menu-container">
|
||||||
<li@if(active=="users"){ class="active"}>
|
<li class="menu-item-hover @if(active=="users"){active}">
|
||||||
<a href="@context.path/admin/users">User management</a>
|
<a href="@context.path/admin/users">
|
||||||
|
<i class="menu-icon octicon octicon-person"></i>
|
||||||
|
<span>User management</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li@if(active=="system"){ class="active"}>
|
<li class="menu-item-hover @if(active=="system"){active}">
|
||||||
<a href="@context.path/admin/system">System settings</a>
|
<a href="@context.path/admin/system">
|
||||||
|
<i class="menu-icon octicon octicon-gear"></i>
|
||||||
|
<span>System settings</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li@if(active=="plugins"){ class="active"}>
|
<li class="menu-item-hover @if(active=="plugins"){active}">
|
||||||
<a href="@context.path/admin/plugins">Plugins</a>
|
<a href="@context.path/admin/plugins">
|
||||||
|
<i class="menu-icon octicon octicon-plug"></i>
|
||||||
|
<span>Plugins</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li@if(active=="data"){ class="active"}>
|
<li class="menu-item-hover @if(active=="data"){active}">
|
||||||
<a href="@context.path/admin/data">Data export / import</a>
|
<a href="@context.path/admin/data">
|
||||||
|
<i class="menu-icon octicon octicon-database"></i>
|
||||||
|
<span>Data export / import</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li class="menu-item-hover">
|
||||||
<a href="@context.path/console/login.jsp" target="_blank">H2 console</a>
|
<a href="@context.path/console/login.jsp" target="_blank">
|
||||||
|
<i class="menu-icon octicon octicon-database"></i>
|
||||||
|
<span>H2 console</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@gitbucket.core.plugin.PluginRegistry().getSystemSettingMenus.map { menu =>
|
@gitbucket.core.plugin.PluginRegistry().getSystemSettingMenus.map { menu =>
|
||||||
@menu(context).map { link =>
|
@menu(context).map { link =>
|
||||||
<li@if(active==link.id){ class="active"}>
|
<li@if(active==link.id){ class="active"}>
|
||||||
<a href="@context.path/@link.path">@link.label</a>
|
<a href="@context.path/@link.path">
|
||||||
|
<i class="menu-icon octicon octicon-plug"></i>
|
||||||
|
<span>@link.label</span>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,11 +14,11 @@
|
|||||||
} else {
|
} else {
|
||||||
<li><form class="sidebar-form"><input type="text" id="filter-box" class="form-control input-sm" placeholder="Find repository"/></form></li>
|
<li><form class="sidebar-form"><input type="text" id="filter-box" class="form-control input-sm" placeholder="Find repository"/></form></li>
|
||||||
@userRepositories.zipWithIndex.map { case (repository, i) =>
|
@userRepositories.zipWithIndex.map { case (repository, i) =>
|
||||||
<li class="repo-link">
|
<li class="menu-item-hover">
|
||||||
@if(repository.owner == context.loginAccount.get.userName){
|
@if(repository.owner == context.loginAccount.get.userName){
|
||||||
<a href="@helpers.url(repository)">@gitbucket.core.helper.html.repositoryicon(repository, false) <span class="strong">@repository.name</span></a>
|
<a href="@helpers.url(repository)">@gitbucket.core.helper.html.repositoryicon(repository, false) <span class="strong">@repository.name</span></a>
|
||||||
} else {
|
} else {
|
||||||
<a href="@helpers.url(repository)">@gitbucket.core.helper.html.repositoryicon(repository, false) @repository.owner/<span class="strong">@repository.name</span></a>
|
<a href="@helpers.url(repository)">@gitbucket.core.helper.html.repositoryicon(repository, false) <span>@repository.owner/<span class="strong">@repository.name</span></span></a>
|
||||||
}
|
}
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
@@ -30,8 +30,8 @@
|
|||||||
} else {
|
} else {
|
||||||
<li><form class="sidebar-form"><input type="text" id="filter-box" class="form-control input-sm" placeholder="Find repository"/></form></li>
|
<li><form class="sidebar-form"><input type="text" id="filter-box" class="form-control input-sm" placeholder="Find repository"/></form></li>
|
||||||
@recentRepositories.zipWithIndex.map { case (repository, i) =>
|
@recentRepositories.zipWithIndex.map { case (repository, i) =>
|
||||||
<li class="repo-link">
|
<li class="menu-item-hover">
|
||||||
<a href="@helpers.url(repository)">@gitbucket.core.helper.html.repositoryicon(repository, false) @repository.owner/<span class="strong">@repository.name</span></a>
|
<a href="@helpers.url(repository)">@gitbucket.core.helper.html.repositoryicon(repository, false) <span>@repository.owner/<span class="strong">@repository.name</span></span></a>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
}
|
}
|
||||||
<script src="@helpers.assets("/vendors/AdminLTE-2.3.8/js/app.js")" type="text/javascript"></script>
|
<script src="@helpers.assets("/vendors/AdminLTE-2.3.8/js/app.js")" type="text/javascript"></script>
|
||||||
</head>
|
</head>
|
||||||
<body class="skin-blue page-load @if(context.sidebarCollapse){sidebar-collapse}">
|
<body class="skin-blue page-load @if(body.toString.contains("menu-item-hover")){sidebar-mini} @if(context.sidebarCollapse){sidebar-collapse}">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<header class="main-header">
|
<header class="main-header">
|
||||||
<a href="@context.path/" class="logo">
|
<a href="@context.path/" class="logo">
|
||||||
|
|||||||
@@ -6,20 +6,28 @@
|
|||||||
@import gitbucket.core.view.helpers
|
@import gitbucket.core.view.helpers
|
||||||
|
|
||||||
@menuitem(path: String, name: String, label: String, icon: String, count: Int = 0) = {
|
@menuitem(path: String, name: String, label: String, icon: String, count: Int = 0) = {
|
||||||
<li @if(active == name){class="active"}>
|
<li class = "menu-item-hover @if(active == name){active}">
|
||||||
@if(path.startsWith("http")){
|
@if(path.startsWith("http")){
|
||||||
<a href="@path" target="_blank">
|
<a href="@path" target="_blank">
|
||||||
<i class="menu-icon octicon octicon-@icon"></i> @label @if(count > 0) { <span class="label label-primary pull-right-container">@count</span> }
|
<i class="menu-icon octicon octicon-@icon"></i>
|
||||||
|
<span>@label</span>
|
||||||
|
@if(count > 0){
|
||||||
|
<span class="pull-right-container"><span class="label label-primary pull-right-container">@count</span></span>
|
||||||
|
}
|
||||||
</a>
|
</a>
|
||||||
} else {
|
} else {
|
||||||
<a href="@helpers.url(repository)@path">
|
<a href="@helpers.url(repository)@path">
|
||||||
<i class="menu-icon octicon octicon-@icon"></i> @label @if(count > 0) { <span class="label label-primary pull-right-container">@count</span> }
|
<i class="menu-icon octicon octicon-@icon"></i>
|
||||||
|
<span>@label</span>
|
||||||
|
@if(count > 0) {
|
||||||
|
<span class="pull-right-container"><span class="label label-primary pull-right">@count</span></span>
|
||||||
|
}
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
|
|
||||||
<div class="main-sidebar">
|
<div class="main-sidebar">
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<ul class="sidebar-menu">
|
<ul class="sidebar-menu">
|
||||||
@menuitem("", "files", "Files", "code")
|
@menuitem("", "files", "Files", "code")
|
||||||
@@ -57,8 +65,8 @@
|
|||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="content body clearfix">
|
<div class="content body clearfix">
|
||||||
<div class="headbar">
|
<div class="headbar">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@@ -83,6 +91,5 @@
|
|||||||
</div>
|
</div>
|
||||||
@body
|
@body
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -264,14 +264,6 @@ div.box-content {
|
|||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
li.repo-link, li.page-link {
|
|
||||||
padding-top: 4px;
|
|
||||||
padding-bottom: 4px;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.box-content-bottom {
|
div.box-content-bottom {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border: 1px solid #d8d8d8;
|
border: 1px solid #d8d8d8;
|
||||||
@@ -1842,3 +1834,15 @@ body.page-load * {
|
|||||||
-o-transition: none !important;
|
-o-transition: none !important;
|
||||||
transition: none !important;
|
transition: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.sidebar-collapse .main-sidebar li.menu-item-hover:not(:hover) span.pull-right-container {
|
||||||
|
display: inline !important;
|
||||||
|
position: absolute;
|
||||||
|
top: 8px;
|
||||||
|
right: 0px;
|
||||||
|
font-size: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.sidebar-collapse .main-sidebar li.treeview:not(:hover) span.pull-right-container span.label {
|
||||||
|
padding: 2px 4px;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user