Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
1d601616
Commit
1d601616
authored
Apr 20, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pagination and better perfomance for projects page.
parent
60bf502b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
19 deletions
+42
-19
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+4
-1
app/assets/stylesheets/main.scss
app/assets/stylesheets/main.scss
+5
-0
app/assets/stylesheets/sections/projects.scss
app/assets/stylesheets/sections/projects.scss
+15
-0
app/controllers/commits_controller.rb
app/controllers/commits_controller.rb
+2
-2
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+3
-3
app/views/projects/index.html.haml
app/views/projects/index.html.haml
+13
-13
No files found.
app/assets/stylesheets/common.scss
View file @
1d601616
...
...
@@ -668,12 +668,15 @@ p.time {
}
}
}
.bottom
{
padding
:
10px
;
}
}
.btn
{
&
.very_small
{
font-size
:
11px
;
padding
:
4
px
;
padding
:
2px
6
px
;
margin
:
2px
;
}
}
...
...
app/assets/stylesheets/main.scss
View file @
1d601616
...
...
@@ -103,6 +103,11 @@ $hover: #FDF5D9;
*/
@import
"sections/issues.scss"
;
/**
* Styles related to projects
*/
@import
"sections/projects.scss"
;
/**
* This scss file redefine chozen selectbox styles for
* project Branch/Tag select element
...
...
app/assets/stylesheets/sections/projects.scss
0 → 100644
View file @
1d601616
.projects
{
@extend
.row
;
.activities
{
}
.side
{
@extend
.span4
;
@extend
.right
;
.projects_box
{
@extend
.leftbar
;
@extend
.ui-box
;
}
}
}
app/controllers/commits_controller.rb
View file @
1d601616
...
...
@@ -43,8 +43,8 @@ class CommitsController < ApplicationController
end
def
compare
first
=
project
.
commit
(
params
[
:to
])
last
=
project
.
commit
(
params
[
:from
])
first
=
project
.
commit
(
params
[
:to
]
.
try
(
:strip
)
)
last
=
project
.
commit
(
params
[
:from
]
.
try
(
:strip
)
)
@diffs
=
[]
@commits
=
[]
...
...
app/controllers/projects_controller.rb
View file @
1d601616
...
...
@@ -11,9 +11,9 @@ class ProjectsController < ApplicationController
before_filter
:require_non_empty_project
,
:only
=>
[
:blob
,
:tree
,
:graph
]
def
index
@projects
=
current_user
.
projects
@projects
=
@projects
.
select
(
&
:last_activity_date
).
sort_by
(
&
:last_activity_date
).
reverse
@events
=
Event
.
where
(
:project_id
=>
@
projects
.
map
(
&
:id
)).
recent
.
limit
(
20
)
@projects
=
current_user
.
projects
.
includes
(
:events
).
order
(
"events.created_at DESC"
)
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
40
)
@events
=
Event
.
where
(
:project_id
=>
current_user
.
projects
.
map
(
&
:id
)).
recent
.
limit
(
20
)
end
def
new
...
...
app/views/projects/index.html.haml
View file @
1d601616
-
if
@projects
.
any?
.
row
.span8
.
projects
.
activities.
span8
-
if
current_user
.
require_ssh_key?
.alert.alert-error.padded
%span
...
...
@@ -14,24 +14,24 @@
-
else
.padded
%strong
.cgray
Projects activity will be displayed here
.s
pan4.right
%div
.leftbar.ui-
box
.s
ide
.projects_
box
%h5
Projects
%small
(
#{
@projects
.
count
}
)
(
#{
@projects
.
total_
count
}
)
-
if
current_user
.
can_create_project?
%span
.right
=
link_to
new_project_path
,
:class
=>
"btn very_small info"
do
New Project
.content_list
-
@projects
.
each
do
|
project
|
=
link_to
project_path
(
project
),
:class
=>
dom_class
(
project
)
do
%
h4
%span
.ico.project
=
truncate
(
project
.
name
,
:length
=>
25
)
%span
.right
→
-
@projects
.
each
do
|
project
|
=
link_to
project_path
(
project
),
:class
=>
dom_class
(
project
)
do
%h4
%
span
.ico.project
=
truncate
(
project
.
name
,
:length
=>
25
)
%span
.right
→
.bottom
=
paginate
@projects
,
:theme
=>
"gitlab"
-
else
%h3
Nothing here
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment