mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-12 08:25:50 +01:00
(refs #529)Enhance dashboard header
This commit is contained in:
@@ -8,8 +8,8 @@
|
|||||||
@import context._
|
@import context._
|
||||||
@import view.helpers._
|
@import view.helpers._
|
||||||
@html.main("Issues"){
|
@html.main("Issues"){
|
||||||
<div class="container">
|
|
||||||
@dashboard.html.tab("issues")
|
@dashboard.html.tab("issues")
|
||||||
|
<div class="container">
|
||||||
@issueslist(issues, page, openCount, closedCount, condition, filter, groups)
|
@issueslist(issues, page, openCount, closedCount, condition, filter, groups)
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,10 +10,8 @@
|
|||||||
@import service.IssuesService.IssueInfo
|
@import service.IssuesService.IssueInfo
|
||||||
<ul class="nav nav-pills-group pull-left fill-width">
|
<ul class="nav nav-pills-group pull-left fill-width">
|
||||||
<li class="@if(filter == "created_by"){active} first"><a href="@path/dashboard/issues/created_by@condition.toURL">Created</a></li>
|
<li class="@if(filter == "created_by"){active} first"><a href="@path/dashboard/issues/created_by@condition.toURL">Created</a></li>
|
||||||
<li class="@if(filter == "assigned"){active} last"><a href="@path/dashboard/issues/assigned@condition.toURL">Assigned</a></li>
|
<li class="@if(filter == "assigned"){active}"><a href="@path/dashboard/issues/assigned@condition.toURL">Assigned</a></li>
|
||||||
@*
|
<li class="@if(filter == "mentioned"){active} last"><a href="@path/dashboard/mentioned/assigned@condition.toURL">Mentioned</a></li>
|
||||||
<li class="last"><a href="#">Mentioned</a></li>
|
|
||||||
*@
|
|
||||||
</ul>
|
</ul>
|
||||||
<table class="table table-bordered table-hover table-issues">
|
<table class="table table-bordered table-hover table-issues">
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
@import context._
|
@import context._
|
||||||
@import view.helpers._
|
@import view.helpers._
|
||||||
@html.main("Pull Requests"){
|
@html.main("Pull Requests"){
|
||||||
<div class="container">
|
|
||||||
@dashboard.html.tab("pulls")
|
@dashboard.html.tab("pulls")
|
||||||
|
<div class="container">
|
||||||
@issueslist(issues, page, openCount, closedCount, condition, filter, groups)
|
@issueslist(issues, page, openCount, closedCount, condition, filter, groups)
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,61 +10,9 @@
|
|||||||
@import service.IssuesService.IssueInfo
|
@import service.IssuesService.IssueInfo
|
||||||
<ul class="nav nav-pills-group pull-left fill-width">
|
<ul class="nav nav-pills-group pull-left fill-width">
|
||||||
<li class="@if(filter == "created_by"){active} first"><a href="@path/dashboard/pulls/created_by@condition.toURL">Created</a></li>
|
<li class="@if(filter == "created_by"){active} first"><a href="@path/dashboard/pulls/created_by@condition.toURL">Created</a></li>
|
||||||
<li class="@if(filter == "assigned"){active} last"><a href="@path/dashboard/pulls/assigned@condition.toURL">Assigned</a></li>
|
<li class="@if(filter == "assigned"){active}"><a href="@path/dashboard/pulls/assigned@condition.toURL">Assigned</a></li>
|
||||||
@*
|
<li class="@if(filter == "mentioned"){active} last"><a href="@path/dashboard/mentioned/assigned@condition.toURL">Mentioned</a></li>
|
||||||
<li class="last"><a href="#">Mentioned</a></li>
|
|
||||||
*@
|
|
||||||
</ul>
|
</ul>
|
||||||
@*
|
|
||||||
<div class="span9">
|
|
||||||
<div class="btn-group">
|
|
||||||
<a class="btn btn-small@if(condition.state == "open"){ active}" href="@condition.copy(state = "open").toURL">@openCount Open</a>
|
|
||||||
<a class="btn btn-small@if(condition.state == "closed"){ active}" href="@condition.copy(state = "closed").toURL">@closedCount Closed</a>
|
|
||||||
</div>
|
|
||||||
@helper.html.dropdown(
|
|
||||||
value = (condition.sort, condition.direction) match {
|
|
||||||
case ("created" , "desc") => "Newest"
|
|
||||||
case ("created" , "asc" ) => "Oldest"
|
|
||||||
case ("comments", "desc") => "Most commented"
|
|
||||||
case ("comments", "asc" ) => "Least commented"
|
|
||||||
case ("updated" , "desc") => "Recently updated"
|
|
||||||
case ("updated" , "asc" ) => "Least recently updated"
|
|
||||||
},
|
|
||||||
prefix = "Sort",
|
|
||||||
mini = false
|
|
||||||
){
|
|
||||||
<li>
|
|
||||||
<a href="@condition.copy(sort="created", direction="desc").toURL">
|
|
||||||
@helper.html.checkicon(condition.sort == "created" && condition.direction == "desc") Newest
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="@condition.copy(sort="created", direction="asc" ).toURL">
|
|
||||||
@helper.html.checkicon(condition.sort == "created" && condition.direction == "asc") Oldest
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="@condition.copy(sort="comments", direction="desc").toURL">
|
|
||||||
@helper.html.checkicon(condition.sort == "comments" && condition.direction == "desc") Most commented
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="@condition.copy(sort="comments", direction="asc" ).toURL">
|
|
||||||
@helper.html.checkicon(condition.sort == "comments" && condition.direction == "asc") Least commented
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="@condition.copy(sort="updated", direction="desc").toURL">
|
|
||||||
@helper.html.checkicon(condition.sort == "updated" && condition.direction == "desc") Recently updated
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="@condition.copy(sort="updated", direction="asc" ).toURL">
|
|
||||||
@helper.html.checkicon(condition.sort == "updated" && condition.direction == "asc") Least recently updated
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
}
|
|
||||||
*@
|
|
||||||
<table class="table table-bordered table-hover table-issues">
|
<table class="table table-bordered table-hover table-issues">
|
||||||
<tr>
|
<tr>
|
||||||
<th style="background-color: #eee;">
|
<th style="background-color: #eee;">
|
||||||
|
|||||||
@@ -1,13 +1,44 @@
|
|||||||
@(active: String = "")(implicit context: app.Context)
|
@(active: String = "")(implicit context: app.Context)
|
||||||
@import context._
|
@import context._
|
||||||
@import view.helpers._
|
@import view.helpers._
|
||||||
<ul class="nav nav-tabs">
|
<div class="dashboard-nav">
|
||||||
<li@if(active == ""){ class="active"}><a href="@path/">News Feed</a></li>
|
<div class="container">
|
||||||
|
<a href="@path/" @if(active == ""){ class="active"}>News Feed</a>
|
||||||
@if(loginAccount.isDefined){
|
@if(loginAccount.isDefined){
|
||||||
<li@if(active == "pulls" ){ class="active"}><a href="@path/dashboard/pulls">Pull Requests</a></li>
|
<a href="@path/dashboard/pulls" @if(active == "pulls" ){ class="active"}>
|
||||||
<li@if(active == "issues"){ class="active"}><a href="@path/dashboard/issues/repos">Issues</a></li>
|
<img src="@assets/common/images/activity-merge.png" width="16">
|
||||||
|
Pull Requests
|
||||||
|
</a>
|
||||||
|
<a href="@path/dashboard/issues/repos" @if(active == "issues"){ class="active"}>
|
||||||
|
<img src="@assets/common/images/activity-issue.png" width="16">
|
||||||
|
Issues
|
||||||
|
</a>
|
||||||
}
|
}
|
||||||
|
@*
|
||||||
@if(active == ""){
|
@if(active == ""){
|
||||||
<li class="pull-right"><a href="@path/activities.atom"><img src="@assets/common/images/feed.png" alt="activities"></a></li>
|
<a href="@path/activities.atom"><img src="@assets/common/images/feed.png" alt="activities"></a>
|
||||||
}
|
}
|
||||||
</ul>
|
*@
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<style type="text/css">
|
||||||
|
div.dashboard-nav {
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
text-align: right;
|
||||||
|
height: 32px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
div.dashboard-nav a {
|
||||||
|
line-height: 10px;
|
||||||
|
margin-left: 20px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
padding-left: 4px;
|
||||||
|
padding-right: 4px;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.dashboard-nav a.active {
|
||||||
|
border-bottom: 2px solid #bb4444;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -4,8 +4,8 @@
|
|||||||
@import context._
|
@import context._
|
||||||
@import view.helpers._
|
@import view.helpers._
|
||||||
@main("GitBucket"){
|
@main("GitBucket"){
|
||||||
<div class="container">
|
|
||||||
@dashboard.html.tab()
|
@dashboard.html.tab()
|
||||||
|
<div class="container">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span8">
|
<div class="span8">
|
||||||
@helper.html.activities(activities)
|
@helper.html.activities(activities)
|
||||||
|
|||||||
Reference in New Issue
Block a user