Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
52d8ed9e
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,发现更多精彩内容 >>
提交
52d8ed9e
编写于
3月 22, 2012
作者:
R
randx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Pagination for Merge Requests. Fixed for issues
上级
755a894c
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
24 addition
and
17 deletion
+24
-17
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+7
-8
app/controllers/issues_controller.rb
app/controllers/issues_controller.rb
+2
-2
app/controllers/merge_requests_controller.rb
app/controllers/merge_requests_controller.rb
+1
-1
app/views/issues/_issues.html.haml
app/views/issues/_issues.html.haml
+8
-3
app/views/kaminari/gitlab/_paginator.html.haml
app/views/kaminari/gitlab/_paginator.html.haml
+0
-2
app/views/merge_requests/index.html.haml
app/views/merge_requests/index.html.haml
+6
-1
未找到文件。
app/assets/stylesheets/common.scss
浏览文件 @
52d8ed9e
...
...
@@ -476,8 +476,7 @@ img.lil_av {
}
}
&
.bottom
{
padding
:
0
10px
;
.bottom
{
background
:
#f5f5f5
;
border-top
:
1px
solid
#eee
;
@include
round-borders-bottom
(
4px
);
...
...
@@ -1029,11 +1028,11 @@ p.time {
}
.gitlab_pagination
{
span
{
padding
:
0
10px
;
a
{
color
:
$link_color
;
}
span
a
{
color
:
$link_color
;
}
.prev
,
.next
,
.current
,
.page
a
{
padding
:
10px
;
}
.current
{
border-bottom
:
2px
solid
$style_color
;
}
}
app/controllers/issues_controller.rb
浏览文件 @
52d8ed9e
...
...
@@ -28,9 +28,9 @@ class IssuesController < ApplicationController
when
2
then
@project
.
issues
.
closed
when
3
then
@project
.
issues
.
opened
.
assigned
(
current_user
)
else
@project
.
issues
.
opened
end
.
page
(
params
[
:page
]).
per
(
1
0
)
end
.
page
(
params
[
:page
]).
per
(
2
0
)
@issues
=
@issues
.
includes
(
:author
,
:project
)
@issues
=
@issues
.
includes
(
:author
,
:project
)
.
order
(
"critical, updated_at"
)
respond_to
do
|
format
|
format
.
html
# index.html.erb
...
...
app/controllers/merge_requests_controller.rb
浏览文件 @
52d8ed9e
...
...
@@ -28,7 +28,7 @@ class MergeRequestsController < ApplicationController
when
2
then
@merge_requests
.
closed
when
3
then
@merge_requests
.
opened
.
assigned
(
current_user
)
else
@merge_requests
.
opened
end
end
.
page
(
params
[
:page
]).
per
(
20
)
@merge_requests
=
@merge_requests
.
includes
(
:author
,
:project
).
order
(
"created_at desc"
)
end
...
...
app/views/issues/_issues.html.haml
浏览文件 @
52d8ed9e
-
@issues
.
critical
.
each
do
|
issue
|
-
@issues
.
select
(
&
:critical
)
.
each
do
|
issue
|
=
render
(
:partial
=>
'issues/show'
,
:locals
=>
{
:issue
=>
issue
})
-
@issues
.
non_critical
.
each
do
|
issue
|
-
@issues
.
reject
(
&
:critical
)
.
each
do
|
issue
|
=
render
(
:partial
=>
'issues/show'
,
:locals
=>
{
:issue
=>
issue
})
%li
=
paginate
@issues
,
:remote
=>
true
,
:theme
=>
"gitlab"
-
if
@issues
.
present?
%li
.bottom
.row
.span10
=
paginate
@issues
,
:remote
=>
true
,
:theme
=>
"gitlab"
.span4.right
%span
.cgray.right
#{
@issues
.
total_count
}
issues for this filter
app/views/kaminari/gitlab/_paginator.html.haml
浏览文件 @
52d8ed9e
...
...
@@ -7,7 +7,6 @@
-# paginator: the paginator that renders the pagination tags inside
=
paginator
.
render
do
%nav
.gitlab_pagination
-#= first_page_tag unless current_page.first?
=
prev_page_tag
-
each_page
do
|
page
|
-
if
page
.
left_outer?
||
page
.
right_outer?
||
page
.
inside_window?
...
...
@@ -15,4 +14,3 @@
-
elsif
!
page
.
was_truncated?
=
gap_tag
=
next_page_tag
-#= last_page_tag unless current_page.last?
app/views/merge_requests/index.html.haml
浏览文件 @
52d8ed9e
...
...
@@ -27,5 +27,10 @@
-
if
@merge_requests
.
blank?
%li
%p
.padded
Nothing to show here
-
if
@merge_requests
.
present?
%li
.bottom
.row
.span10
=
paginate
@merge_requests
,
:theme
=>
"gitlab"
.span4.right
%span
.cgray.right
#{
@merge_requests
.
total_count
}
merge requests for this filter
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录