Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
8812d9de
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8812d9de
编写于
3月 10, 2013
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move groups and teams to tabs on dashboard. Remember tab with cookie
上级
96c627ed
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
44 addition
and
10 deletion
+44
-10
app/assets/javascripts/dashboard.js.coffee
app/assets/javascripts/dashboard.js.coffee
+12
-0
app/assets/stylesheets/sections/projects.scss
app/assets/stylesheets/sections/projects.scss
+4
-0
app/views/dashboard/_groups.html.haml
app/views/dashboard/_groups.html.haml
+3
-0
app/views/dashboard/_sidebar.html.haml
app/views/dashboard/_sidebar.html.haml
+20
-8
app/views/dashboard/_teams.html.haml
app/views/dashboard/_teams.html.haml
+5
-2
未找到文件。
app/assets/javascripts/dashboard.js.coffee
浏览文件 @
8812d9de
window
.
dashboardPage
=
->
Pager
.
init
20
,
true
initSidebarTab
()
$
(
".event_filter_link"
).
bind
"click"
,
(
event
)
->
event
.
preventDefault
()
toggleFilter
$
(
this
)
...
...
@@ -25,3 +26,14 @@ toggleFilter = (sender) ->
event_filters
.
splice
index
,
1
$
.
cookie
"event_filter"
,
event_filters
.
join
(
","
)
initSidebarTab
=
->
key
=
"dashboard_sidebar_filter"
# store selection in cookie
$
(
'.dash-sidebar-tabs a'
).
on
'click'
,
(
e
)
->
$
.
cookie
(
key
,
$
(
e
.
target
).
attr
(
'id'
))
# show tab from cookie
sidebar_filter
=
$
.
cookie
(
key
)
$
(
"#"
+
sidebar_filter
).
tab
(
'show'
)
if
sidebar_filter
app/assets/stylesheets/sections/projects.scss
浏览文件 @
8812d9de
...
...
@@ -6,6 +6,10 @@
.side
{
@extend
.pull-right
;
.projects_box
,
.ui-box
{
margin
:
3px
;
}
.projects_box
{
>
.title
{
padding
:
2px
15px
;
...
...
app/views/dashboard/_groups.html.haml
浏览文件 @
8812d9de
...
...
@@ -16,3 +16,6 @@
%span
.pull-right.light
-
if
group
.
owner
==
current_user
%i
.icon-wrench
-
if
groups
.
blank?
%li
%h3
.nothing_here_message
You have no groups yet.
app/views/dashboard/_sidebar.html.haml
浏览文件 @
8812d9de
-
if
@teams
.
present?
=
render
"teams"
,
teams:
@teams
-
if
@groups
.
present?
=
render
"groups"
,
groups:
@groups
=
render
"projects"
,
projects:
@projects
%div
%ul
.nav.nav-tabs.dash-sidebar-tabs
%li
.active
=
link_to
'Projects'
,
'#projects'
,
'data-toggle'
=>
'tab'
,
id:
'sidebar-projects-tab'
%li
=
link_to
'Groups'
,
'#groups'
,
'data-toggle'
=>
'tab'
,
id:
'sidebar-groups-tab'
%li
=
link_to
'Teams'
,
'#teams'
,
'data-toggle'
=>
'tab'
,
id:
'sidebar-teams-tab'
.tab-content
.tab-pane.active
#projects
=
render
"projects"
,
projects:
@projects
.tab-pane
#groups
=
render
"groups"
,
groups:
@groups
.tab-pane
#teams
=
render
"teams"
,
teams:
@teams
.prepend-top-20
%span
.rss-icon
=
link_to
dashboard_path
(
:atom
,
{
private_token:
current_user
.
private_token
})
do
=
image_tag
"rss_ui.png"
,
title:
"feed"
%strong
News Feed
%strong
%i
.icon-rss
News Feed
%hr
.gitlab-promo
...
...
app/views/dashboard/_teams.html.haml
浏览文件 @
8812d9de
...
...
@@ -2,13 +2,13 @@
%h5
.title
Teams
%small
(
#{
@
teams
.
count
}
)
(
#{
teams
.
count
}
)
%span
.pull-right
=
link_to
new_team_path
,
class:
"btn btn-tiny info"
do
%i
.icon-plus
New Team
%ul
.well-list
-
@
teams
.
each
do
|
team
|
-
teams
.
each
do
|
team
|
%li
=
link_to
team_path
(
id:
team
.
path
),
class:
dom_class
(
team
)
do
%strong
.well-title
=
truncate
(
team
.
name
,
length:
35
)
...
...
@@ -18,3 +18,6 @@
-
tm
=
current_user
.
user_team_user_relationships
.
find_by_user_team_id
(
team
.
id
)
-
if
tm
=
tm
.
access_human
-
if
teams
.
blank?
%li
%h3
.nothing_here_message
You have no teams yet.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录