mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-11 16:05:49 +01:00
(refs #529)Enhance dashboard header
This commit is contained in:
@@ -8,8 +8,8 @@
|
||||
@import context._
|
||||
@import view.helpers._
|
||||
@html.main("Issues"){
|
||||
@dashboard.html.tab("issues")
|
||||
<div class="container">
|
||||
@dashboard.html.tab("issues")
|
||||
@issueslist(issues, page, openCount, closedCount, condition, filter, groups)
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -10,10 +10,8 @@
|
||||
@import service.IssuesService.IssueInfo
|
||||
<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 == "assigned"){active} last"><a href="@path/dashboard/issues/assigned@condition.toURL">Assigned</a></li>
|
||||
@*
|
||||
<li class="last"><a href="#">Mentioned</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>
|
||||
</ul>
|
||||
<table class="table table-bordered table-hover table-issues">
|
||||
<tr>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
@import context._
|
||||
@import view.helpers._
|
||||
@html.main("Pull Requests"){
|
||||
@dashboard.html.tab("pulls")
|
||||
<div class="container">
|
||||
@dashboard.html.tab("pulls")
|
||||
@issueslist(issues, page, openCount, closedCount, condition, filter, groups)
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -10,61 +10,9 @@
|
||||
@import service.IssuesService.IssueInfo
|
||||
<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 == "assigned"){active} last"><a href="@path/dashboard/pulls/assigned@condition.toURL">Assigned</a></li>
|
||||
@*
|
||||
<li class="last"><a href="#">Mentioned</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>
|
||||
</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">
|
||||
<tr>
|
||||
<th style="background-color: #eee;">
|
||||
|
||||
@@ -1,13 +1,44 @@
|
||||
@(active: String = "")(implicit context: app.Context)
|
||||
@import context._
|
||||
@import view.helpers._
|
||||
<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/repos">Issues</a></li>
|
||||
}
|
||||
@if(active == ""){
|
||||
<li class="pull-right"><a href="@path/activities.atom"><img src="@assets/common/images/feed.png" alt="activities"></a></li>
|
||||
}
|
||||
</ul>
|
||||
<div class="dashboard-nav">
|
||||
<div class="container">
|
||||
<a href="@path/" @if(active == ""){ class="active"}>News Feed</a>
|
||||
@if(loginAccount.isDefined){
|
||||
<a href="@path/dashboard/pulls" @if(active == "pulls" ){ class="active"}>
|
||||
<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 == ""){
|
||||
<a href="@path/activities.atom"><img src="@assets/common/images/feed.png" alt="activities"></a>
|
||||
}
|
||||
*@
|
||||
</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 view.helpers._
|
||||
@main("GitBucket"){
|
||||
@dashboard.html.tab()
|
||||
<div class="container">
|
||||
@dashboard.html.tab()
|
||||
<div class="row-fluid">
|
||||
<div class="span8">
|
||||
@helper.html.activities(activities)
|
||||
|
||||
Reference in New Issue
Block a user