Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
c1c903fb
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,体验更适合开发者的 AI 搜索 >>
提交
c1c903fb
编写于
12月 28, 2011
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Project tab added. activities, team, snippets moved to project tab
上级
6e5caa19
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
80 addition
and
27 deletion
+80
-27
app/assets/stylesheets/projects.css.scss
app/assets/stylesheets/projects.css.scss
+5
-1
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+7
-0
app/views/dashboard/_sidebar.html.haml
app/views/dashboard/_sidebar.html.haml
+1
-1
app/views/layouts/project.html.haml
app/views/layouts/project.html.haml
+1
-11
app/views/projects/_project_head.html.haml
app/views/projects/_project_head.html.haml
+27
-0
app/views/projects/_tile.html.haml
app/views/projects/_tile.html.haml
+1
-1
app/views/projects/activities.html.haml
app/views/projects/activities.html.haml
+13
-0
app/views/projects/files.html.haml
app/views/projects/files.html.haml
+15
-0
app/views/projects/show.html.haml
app/views/projects/show.html.haml
+4
-13
app/views/projects/team.html.haml
app/views/projects/team.html.haml
+1
-0
app/views/snippets/index.html.haml
app/views/snippets/index.html.haml
+1
-0
config/routes.rb
config/routes.rb
+4
-0
未找到文件。
app/assets/stylesheets/projects.css.scss
浏览文件 @
c1c903fb
...
...
@@ -561,6 +561,7 @@ h4.middle-panel {
display
:none
;
}
.merge-tabs
{
margin
:
0
;
border
:
1px
solid
#ccc
;
...
...
@@ -576,7 +577,7 @@ h4.middle-panel {
border-right
:
1px
solid
#ddd
;
background
:none
;
padding
:
10px
;
width
:
60px
;
min-
width
:
60px
;
float
:left
;
position
:relative
;
top
:
-5px
;
...
...
@@ -598,6 +599,9 @@ h4.middle-panel {
}
}
}
.activities-tab
span
{
background
:
url("images.png")
no-repeat
-161px
-1px
;
}
.stat-tab
,
.team-tab
,
.snippets-tab
span
{
background
:
url("images.png")
no-repeat
-38px
-77px
;
}
.files-tab
span
{
background
:
url("images.png")
no-repeat
-112px
-23px
;
}
.merge-notes-tab
span
{
background
:
url("images.png")
no-repeat
-161px
-1px
;
}
.merge-commits-tab
span
{
background
:
url("images.png")
no-repeat
-86px
1px
;
}
...
...
app/controllers/projects_controller.rb
浏览文件 @
c1c903fb
...
...
@@ -67,6 +67,13 @@ class ProjectsController < ApplicationController
end
def
show
end
def
files
@notes
=
@project
.
notes
.
where
(
"attachment != 'NULL'"
).
order
(
"created_at DESC"
)
end
def
activities
return
render
"projects/empty"
unless
@project
.
repo_exists?
&&
@project
.
has_commits?
limit
=
(
params
[
:limit
]
||
20
).
to_i
@activities
=
@project
.
cached_updates
(
limit
)
...
...
app/views/dashboard/_sidebar.html.haml
浏览文件 @
c1c903fb
...
...
@@ -6,7 +6,7 @@
%ol
.project-list
-
@projects
.
each
do
|
project
|
%li
%a
{
:href
=>
project_path
(
project
)}
%a
{
:href
=>
activities_
project_path
(
project
)}
%span
.arrow
→
%span
.project-name
=
project
.
name
%span
.time
...
...
app/views/layouts/project.html.haml
浏览文件 @
c1c903fb
...
...
@@ -23,14 +23,10 @@
.project-sidebar
.fixed
%aside
=
link_to
"
Activities"
,
project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"show"
,
:id
=>
@project
)
?
"current"
:
nil
=
link_to
"
Project"
,
project_path
(
@project
),
:class
=>
(
current_page?
(
:controller
=>
"projects"
,
:action
=>
"activities"
,
:id
=>
@project
)
||
controller
.
controller_name
==
"snippets"
||
current_page?
(
:controller
=>
"projects"
,
:action
=>
"team"
,
:id
=>
@project
)
||
controller
.
controller_name
==
"team_members"
||
current_page?
(
project_path
(
@project
))
)
?
"current"
:
nil
=
link_to
"Tree"
,
tree_project_ref_path
(
@project
,
@project
.
root_ref
),
:class
=>
current_page?
(
:controller
=>
"refs"
,
:action
=>
"tree"
,
:project_id
=>
@project
,
:id
=>
@ref
||
@project
.
root_ref
)
?
"current"
:
nil
=
link_to
"Commits"
,
project_commits_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"commits"
,
:action
=>
"index"
,
:project_id
=>
@project
)
?
"current"
:
nil
=
link_to
"Network graph"
,
graph_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"graph"
,
:id
=>
@project
)
?
"current"
:
nil
=
link_to
team_project_path
(
@project
),
:class
=>
(
current_page?
(
:controller
=>
"projects"
,
:action
=>
"team"
,
:id
=>
@project
)
||
controller
.
controller_name
==
"team_members"
)
?
"current"
:
nil
do
Team
-
if
@project
.
users_projects
.
count
>
0
%span
{
:class
=>
"number"
}=
@project
.
users_projects
.
count
=
link_to
project_issues_filter_path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"issues"
)
?
"current"
:
nil
do
Issues
-
if
@project
.
issues
.
open_for
(
current_user
).
count
>
0
...
...
@@ -43,13 +39,7 @@
Merge Requests
-
if
@project
.
merge_requests
.
opened
.
count
>
0
%span
{
:class
=>
"number"
}=
@project
.
merge_requests
.
opened
.
count
=
link_to
project_snippets_path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"snippets"
)
?
"current"
:
nil
do
Snippets
-
if
@project
.
snippets
.
non_expired
.
count
>
0
%span
{
:class
=>
"number"
}=
@project
.
snippets
.
non_expired
.
count
-
if
can?
current_user
,
:admin_project
,
@project
=
link_to
"Admin"
,
edit_project_path
(
@project
),
:class
=>
(
current_page?
(
edit_project_path
(
@project
)))
?
"current"
:
nil
.medium-tags
{
:style
=>
'padding: 10px 0 0 10px; width: 210px;'
}=
tag_list
@project
...
...
app/views/projects/_project_head.html.haml
0 → 100644
浏览文件 @
c1c903fb
%div
-#- if can? current_user, :admin_project, @project
-#%span.entity-info
-#= link_to edit_project_path(@project) do
-#.entity-button
-#Edit Project
-#%i
-#%h2= @project.name
.merge-tabs
=
link_to
activities_project_path
(
@project
),
:class
=>
"activities-tab tab
#{
'active'
if
current_page?
(
activities_project_path
(
@project
))
}
"
do
%span
Activities
=
link_to
project_path
(
@project
),
:class
=>
"stat-tab tab"
do
%span
Info
=
link_to
team_project_path
(
@project
),
:class
=>
"team-tab tab"
do
%span
Team
=
link_to
files_project_path
(
@project
),
:class
=>
"files-tab tab"
do
%span
Files
=
link_to
project_snippets_path
(
@project
),
:class
=>
"snippets-tab tab"
do
%span
Snippets
app/views/projects/_tile.html.haml
浏览文件 @
c1c903fb
...
...
@@ -2,7 +2,7 @@
-
projects
.
each_with_index
do
|
project
,
i
|
%div
.grid_1.projects_selector
%div
{
:class
=>
"project-box ui-box ui-box-big"
}
=
link_to
project_path
(
project
)
do
=
link_to
activities_
project_path
(
project
)
do
%h3
=
truncate
(
project
.
name
,
:length
=>
20
)
.data
%p
.title.repository.git_url_wrapper
...
...
app/views/projects/activities.html.haml
0 → 100644
浏览文件 @
c1c903fb
-
content_for
(
:body_class
,
"project-page dashboard"
)
=
render
"project_head"
#news-feed
.news-feed
.project-box.project-updates.ui-box.ui-box-small.ui-box-big
-
@activities
.
each
do
|
update
|
=
render
"projects/feed"
,
:update
=>
update
,
:project
=>
@project
:javascript
function
updateDashboard
(){
$
(
'
.project-content
'
).
load
(
"
#{
escape_javascript
(
project_path
(
@project
))
}
.project-content>*
"
);
}
setInterval
(
"
updateDashboard()
"
,
300000
);
app/views/projects/files.html.haml
0 → 100644
浏览文件 @
c1c903fb
=
render
"project_head"
%div
{
:class
=>
"update-data ui-box ui-box-small ui-box-big"
}
.data
-
@notes
.
each
do
|
note
|
%a
.update-item
{
:href
=>
note
.
attachment
.
url
}
=
image_tag
gravatar_icon
(
note
.
author_email
),
:class
=>
"left"
,
:width
=>
16
%span
.update-title
{
:style
=>
"margin-bottom:0px;"
}
=
note
.
attachment_identifier
%span
.update-author.right
Added
=
time_ago_in_words
(
note
.
created_at
)
ago
app/views/projects/show.html.haml
浏览文件 @
c1c903fb
-
content_for
(
:body_class
,
"project-page dashboard"
)
=
render
"project_head"
.stats
-
unless
@project
.
description
.
empty?
%h3
=
simple_format
@project
.
description
#news-feed
.news-feed
%h2
.icon
%span
>
Activities
.project-box.project-updates.ui-box.ui-box-small.ui-box-big
-
@activities
.
each
do
|
update
|
=
render
"projects/feed"
,
:update
=>
update
,
:project
=>
@project
:javascript
function
updateDashboard
(){
$
(
'
.project-content
'
).
load
(
"
#{
escape_javascript
(
project_path
(
@project
))
}
.project-content>*
"
);
}
setInterval
(
"
updateDashboard()
"
,
300000
);
app/views/projects/team.html.haml
浏览文件 @
c1c903fb
=
render
"project_head"
%div
=
render
:partial
=>
"team"
,
:locals
=>
{
:project
=>
@project
}
app/views/snippets/index.html.haml
浏览文件 @
c1c903fb
=
render
"projects/project_head"
%h2
.icon
%span
>
Snippets
...
...
config/routes.rb
浏览文件 @
c1c903fb
...
...
@@ -42,6 +42,10 @@ Gitlab::Application.routes.draw do
get
"team"
get
"wall"
get
"graph"
get
"activities"
get
"branches"
get
"tags"
get
"files"
end
resources
:refs
,
:only
=>
[],
:path
=>
"/"
do
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录