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
Jérome Perrin
gitlab-ce
Commits
f8b5e5f7
Commit
f8b5e5f7
authored
Oct 18, 2011
by
gitlabhq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard
parent
1a03b17a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
18 deletions
+23
-18
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+19
-15
spec/requests/projects_spec.rb
spec/requests/projects_spec.rb
+4
-3
No files found.
app/controllers/projects_controller.rb
View file @
f8b5e5f7
...
@@ -6,7 +6,7 @@ class ProjectsController < ApplicationController
...
@@ -6,7 +6,7 @@ class ProjectsController < ApplicationController
before_filter
:authorize_read_project!
,
:except
=>
[
:index
,
:new
,
:create
]
before_filter
:authorize_read_project!
,
:except
=>
[
:index
,
:new
,
:create
]
before_filter
:authorize_admin_project!
,
:only
=>
[
:edit
,
:update
,
:destroy
]
before_filter
:authorize_admin_project!
,
:only
=>
[
:edit
,
:update
,
:destroy
]
before_filter
:require_non_empty_project
,
:only
=>
[
:blob
,
:tree
,
:show
]
before_filter
:require_non_empty_project
,
:only
=>
[
:blob
,
:tree
]
def
index
def
index
@projects
=
current_user
.
projects
.
all
@projects
=
current_user
.
projects
.
all
...
@@ -60,6 +60,7 @@ class ProjectsController < ApplicationController
...
@@ -60,6 +60,7 @@ class ProjectsController < ApplicationController
end
end
def
show
def
show
if
@project
.
repo_exists?
@date
=
case
params
[
:view
]
@date
=
case
params
[
:view
]
when
"week"
then
Date
.
today
-
7
.
days
when
"week"
then
Date
.
today
-
7
.
days
else
Date
.
today
else
Date
.
today
...
@@ -75,6 +76,9 @@ class ProjectsController < ApplicationController
...
@@ -75,6 +76,9 @@ class ProjectsController < ApplicationController
end
end
@messages
=
project
.
notes
.
since
(
@date
).
limit
(
40
).
order
(
"created_at DESC"
)
@messages
=
project
.
notes
.
since
(
@date
).
limit
(
40
).
order
(
"created_at DESC"
)
else
return
render
"projects/empty"
end
end
end
#
#
...
...
spec/requests/projects_spec.rb
View file @
f8b5e5f7
...
@@ -72,7 +72,10 @@ describe "Projects" do
...
@@ -72,7 +72,10 @@ describe "Projects" do
current_path
.
should
==
project_path
(
@project
)
current_path
.
should
==
project_path
(
@project
)
end
end
it_behaves_like
:tree_view
it
"should beahave like dashboard"
do
page
.
should
have_content
(
"Recent history"
)
end
end
end
describe
"GET /projects/team"
do
describe
"GET /projects/team"
do
...
@@ -134,8 +137,6 @@ describe "Projects" do
...
@@ -134,8 +137,6 @@ describe "Projects" do
it
"should show project"
do
it
"should show project"
do
page
.
should
have_content
(
"Awesome"
)
page
.
should
have_content
(
"Awesome"
)
end
end
it_behaves_like
:tree_view
end
end
#describe "DELETE /projects/:id", :js => true do
#describe "DELETE /projects/:id", :js => true do
...
...
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