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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
cadf12c6
Commit
cadf12c6
authored
Mar 20, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged activities & projects pages
parent
724ea16c
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
11 additions
and
65 deletions
+11
-65
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+1
-1
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+0
-5
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+1
-1
app/views/dashboard/activities.html.haml
app/views/dashboard/activities.html.haml
+0
-10
app/views/dashboard/index.html.haml
app/views/dashboard/index.html.haml
+0
-3
app/views/layouts/_app_menu.html.haml
app/views/layouts/_app_menu.html.haml
+0
-1
app/views/projects/index.html.haml
app/views/projects/index.html.haml
+9
-23
app/views/projects/show.js.haml
app/views/projects/show.js.haml
+0
-7
spec/requests/dashboard_spec.rb
spec/requests/dashboard_spec.rb
+0
-14
No files found.
app/assets/stylesheets/common.scss
View file @
cadf12c6
...
@@ -925,7 +925,7 @@ p.time {
...
@@ -925,7 +925,7 @@ p.time {
}
}
a
:last-child
h4
{
border
:none
;
}
a
:last-child
h4
{
border
:none
;
}
a
.active
{
a
:hover
{
h4
{
h4
{
color
:
#111
;
color
:
#111
;
border-right
:
4px
solid
$styled_border_color
;
border-right
:
4px
solid
$styled_border_color
;
...
...
app/controllers/dashboard_controller.rb
View file @
cadf12c6
...
@@ -34,9 +34,4 @@ class DashboardController < ApplicationController
...
@@ -34,9 +34,4 @@ class DashboardController < ApplicationController
format
.
atom
{
render
:layout
=>
false
}
format
.
atom
{
render
:layout
=>
false
}
end
end
end
end
def
activities
@projects
=
current_user
.
projects
.
all
@events
=
Event
.
where
(
:project_id
=>
@projects
.
map
(
&
:id
)).
recent
.
limit
(
40
)
end
end
end
app/controllers/projects_controller.rb
View file @
cadf12c6
...
@@ -13,6 +13,7 @@ class ProjectsController < ApplicationController
...
@@ -13,6 +13,7 @@ class ProjectsController < ApplicationController
def
index
def
index
@projects
=
current_user
.
projects
@projects
=
current_user
.
projects
@projects
=
@projects
.
select
(
&
:last_activity_date
).
sort_by
(
&
:last_activity_date
).
reverse
@projects
=
@projects
.
select
(
&
:last_activity_date
).
sort_by
(
&
:last_activity_date
).
reverse
@events
=
Event
.
where
(
:project_id
=>
@projects
.
map
(
&
:id
)).
recent
.
limit
(
40
)
end
end
def
new
def
new
...
@@ -78,7 +79,6 @@ class ProjectsController < ApplicationController
...
@@ -78,7 +79,6 @@ class ProjectsController < ApplicationController
render
"projects/empty"
render
"projects/empty"
end
end
end
end
format
.
js
end
end
end
end
...
...
app/views/dashboard/activities.html.haml
deleted
100644 → 0
View file @
724ea16c
-
if
@events
.
any?
%div
.dashboard_category
%h3
%span
.ico.activities
=
link_to
"Activities"
,
"#activities"
,
:id
=>
"activities"
%hr
=
render
@events
-
else
%h3
Nothing here
app/views/dashboard/index.html.haml
View file @
cadf12c6
...
@@ -62,9 +62,6 @@
...
@@ -62,9 +62,6 @@
%h3
%h3
%span
.ico.activities
%span
.ico.activities
=
link_to
"Activities"
,
"#activities"
,
:id
=>
"activities"
=
link_to
"Activities"
,
"#activities"
,
:id
=>
"activities"
%strong
.right
=
link_to
dashboard_activities_path
do
Visit activities page
→
%hr
%hr
.row
.row
...
...
app/views/layouts/_app_menu.html.haml
View file @
cadf12c6
%nav
.main_menu
%nav
.main_menu
=
render
"layouts/const_menu_links"
=
render
"layouts/const_menu_links"
=
link_to
"Projects"
,
projects_path
,
:class
=>
"
#{
"current"
if
current_page?
(
projects_path
)
}
"
=
link_to
"Projects"
,
projects_path
,
:class
=>
"
#{
"current"
if
current_page?
(
projects_path
)
}
"
=
link_to
"Activities"
,
dashboard_activities_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_activities_path
)
}
"
=
link_to
dashboard_issues_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_issues_path
)
}
"
,
:id
=>
"issues_slide"
do
=
link_to
dashboard_issues_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_issues_path
)
}
"
,
:id
=>
"issues_slide"
do
Issues
Issues
%span
.count
=
current_user
.
assigned_issues
.
opened
.
count
%span
.count
=
current_user
.
assigned_issues
.
opened
.
count
...
...
app/views/projects/index.html.haml
View file @
cadf12c6
-
if
@projects
.
any?
-
if
@projects
.
any?
.row
.row
.span4
.span11
=
render
@events
.span5.right
%div
.leftbar.ui-box
%div
.leftbar.ui-box
%h5
%h5
Projects
Projects
%small
(
#{
@projects
.
count
}
)
-
if
current_user
.
can_create_project?
-
if
current_user
.
can_create_project?
%span
.right
%span
.right
=
link_to
new_project_path
,
:class
=>
"btn very_small info"
do
=
link_to
new_project_path
,
:class
=>
"btn very_small info"
do
New Project
New Project
.content_list
.content_list
-
@projects
.
each
do
|
project
|
-
@projects
.
each
do
|
project
|
=
link_to
project_path
(
project
),
:
remote
=>
true
,
:
class
=>
dom_class
(
project
)
do
=
link_to
project_path
(
project
),
:class
=>
dom_class
(
project
)
do
%h4
%h4
%span
.ico.project
%span
.ico.project
=
truncate
(
project
.
name
,
:length
=>
22
)
=
truncate
(
project
.
name
,
:length
=>
25
)
.span12.right
%span
.right
.show_holder.ui-box.padded
→
.loading
-
else
-
else
%h3
Nothing here
%h3
Nothing here
...
@@ -31,20 +34,3 @@
...
@@ -31,20 +34,3 @@
New Project »
New Project »
-
else
-
else
If you will be added to project - it will be displayed here
If you will be added to project - it will be displayed here
:javascript
$
(
function
(){
$
(
"
a.project
"
).
live
(
"
ajax:before
"
,
function
()
{
$
(
"
.show_holder
"
).
html
(
"
<div class='loading'>
"
);
$
(
'
a.project
'
).
removeClass
(
"
active
"
);
$
(
this
).
addClass
(
"
active
"
);
});
$
(
'
a.project:first-child
'
).
trigger
(
"
click
"
);
});
-
if
@projects
.
count
==
@limit
:javascript
$
(
function
(){
Pager
.
init
(
#{
@limit
}
);
});
app/views/projects/show.js.haml
deleted
100644 → 0
View file @
724ea16c
-
if
@project
.
repo_exists?
&&
@project
.
has_commits?
:plain
$(".show_holder").html("
#{
escape_javascript
(
render
(
:partial
=>
'projects/show'
))
}
");
-
else
:plain
$(".show_holder").html("
#{
escape_javascript
(
render
(
:template
=>
'projects/empty'
))
}
");
spec/requests/dashboard_spec.rb
View file @
cadf12c6
...
@@ -23,18 +23,4 @@ describe "Dashboard" do
...
@@ -23,18 +23,4 @@ describe "Dashboard" do
page
.
should
have_content
(
@project
.
name
)
page
.
should
have_content
(
@project
.
name
)
end
end
end
end
describe
"GET /dashboard/activities"
do
before
do
visit
dashboard_activities_path
end
it
"should be on dashboard page"
do
current_path
.
should
==
dashboard_activities_path
end
it
"should have projects panel"
do
page
.
should
have_content
(
@project
.
name
)
end
end
end
end
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