Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
487ae906
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,发现更多精彩内容 >>
提交
487ae906
编写于
10月 28, 2011
作者:
G
gitlabhq
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
project layout
上级
1ffb4b98
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
71 addition
and
9 deletion
+71
-9
app/assets/stylesheets/projects.css.scss
app/assets/stylesheets/projects.css.scss
+15
-8
app/controllers/issues_controller.rb
app/controllers/issues_controller.rb
+1
-0
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+9
-0
app/views/layouts/project.html.haml
app/views/layouts/project.html.haml
+46
-0
app/views/projects/_top_menu.html.haml
app/views/projects/_top_menu.html.haml
+0
-1
未找到文件。
app/assets/stylesheets/projects.css.scss
浏览文件 @
487ae906
...
...
@@ -390,16 +390,17 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
}
.top_menu_count
{
background
:
none
repeat
scroll
0
0
#FFF6BF
;
border-color
:
#FFD324
;
color
:
#514721
;
border
:
1px
solid
#DDDDDD
;
background
:
none
repeat
scroll
0
0
white
;
color
:
#333
;
border-color
:
#4BB8D2
;
padding
:
2px
;
font-size
:
12px
;
position
:relative
;
top
:
-14px
;
left
:
10px
;
font-size
:
10px
;
border-top
:none
;
text-align
:center
;
float
:right
;
width
:
25px
;
}
#logo
{
...
...
@@ -700,3 +701,9 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
}
}
.left
{
float
:left
;
}
.right
{
float
:right
;
}
app/controllers/issues_controller.rb
浏览文件 @
487ae906
...
...
@@ -2,6 +2,7 @@ class IssuesController < ApplicationController
before_filter
:authenticate_user!
before_filter
:project
before_filter
:issue
,
:only
=>
[
:edit
,
:update
,
:destroy
,
:show
]
layout
"project"
# Authorize
before_filter
:add_project_abilities
...
...
app/controllers/projects_controller.rb
浏览文件 @
487ae906
class
ProjectsController
<
ApplicationController
before_filter
:project
,
:except
=>
[
:index
,
:new
,
:create
]
layout
:determine_layout
# Authorize
before_filter
:add_project_abilities
...
...
@@ -152,4 +153,12 @@ class ProjectsController < ApplicationController
def
project
@project
||=
Project
.
find_by_code
(
params
[
:id
])
end
def
determine_layout
if
@project
&&
!
@project
.
new_record?
"project"
else
"application"
end
end
end
app/views/layouts/project.html.haml
0 → 100644
浏览文件 @
487ae906
!!!
%html
%head
%title
GitLab
#{
" - #{@project.name}"
if
@project
&&
!
@project
.
new_record?
}
=
stylesheet_link_tag
"application"
=
javascript_include_tag
"application"
=
csrf_meta_tags
%link
{
:href
=>
"/assets/favicon.png"
,
:rel
=>
"icon"
,
:type
=>
"image/png"
}
/
=
javascript_tag
do
REQ_URI = "
#{
request
.
env
[
"REQUEST_URI"
]
}
";
REQ_REFFER = "
#{
request
.
env
[
"HTTP_REFERER"
]
}
";
%body
.project-page
#container
=
render
:partial
=>
"layouts/flash"
=
render
:partial
=>
"layouts/head_panel"
=
render
:partial
=>
"layouts/page_title"
.project-container
.project-sidebar.grid_1
%input
.git-url.text
{
:id
=>
""
,
:name
=>
""
,
:readonly
=>
""
,
:type
=>
"text"
,
:value
=>
@project
.
url_to_repo
}
%aside
=
link_to
image_tag
(
"home.png"
,
:width
=>
20
),
project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"show"
,
:id
=>
@project
)
?
"current"
:
nil
=
link_to
"Tree"
,
tree_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"tree"
,
:id
=>
@project
)
?
"current"
:
nil
=
link_to
"Commits"
,
project_commits_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"commits"
,
:action
=>
"index"
,
:project_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
=>
"top_menu_count"
}=
@project
.
users_projects
.
count
=
link_to
project_issues_path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"issues"
)
?
"current"
:
nil
do
Issues
-
if
@project
.
issues
.
opened
.
count
>
0
%span
{
:class
=>
"top_menu_count"
}=
@project
.
issues
.
opened
.
count
=
link_to
wall_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"wall"
,
:id
=>
@project
)
?
"current"
:
nil
do
Wall
-
if
@project
.
common_notes
.
count
>
0
%span
{
:class
=>
"top_menu_count"
}=
@project
.
common_notes
.
count
=
link_to
project_snippets_path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"snippets"
)
?
"current"
:
nil
do
Snippets
-
if
@project
.
snippets
.
count
>
0
%span
{
:class
=>
"top_menu_count"
}=
@project
.
snippets
.
non_expired
.
count
-
if
@commit
=
link_to
truncate
(
commit_name
(
@project
,
@commit
),
:length
=>
15
),
project_commit_path
(
@project
,
:id
=>
@commit
.
id
),
:class
=>
current_page?
(
:controller
=>
"commits"
,
:action
=>
"show"
,
:project_id
=>
@project
,
:id
=>
@commit
.
id
)
?
"current"
:
nil
.project-content
=
yield
app/views/projects/_top_menu.html.haml
浏览文件 @
487ae906
%div
.top_project_menu
-#%span= link_to @project.code.capitalize, @project, :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
-
if
@project
.
repo_exists?
%span
=
link_to
image_tag
(
"home.png"
,
:width
=>
20
),
project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"show"
,
:id
=>
@project
)
?
"current"
:
nil
%span
=
link_to
"Tree"
,
tree_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"tree"
,
:id
=>
@project
)
?
"current"
:
nil
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录