BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
2e5ed4ad
Commit
2e5ed4ad
authored
Oct 18, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard
parent
d702d744
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
projects_controller.rb
app/controllers/projects_controller.rb
+5
-1
projects_spec.rb
spec/requests/projects_spec.rb
+4
-3
No files found.
app/controllers/projects_controller.rb
View file @
2e5ed4ad
...
...
@@ -6,7 +6,7 @@ class ProjectsController < ApplicationController
before_filter
:authorize_read_project!
,
:except
=>
[
:index
,
:new
,
:create
]
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
@projects
=
current_user
.
projects
.
all
...
...
@@ -60,6 +60,7 @@ class ProjectsController < ApplicationController
end
def
show
if
@project
.
repo_exists?
@date
=
case
params
[
:view
]
when
"week"
then
Date
.
today
-
7
.
days
else
Date
.
today
...
...
@@ -75,6 +76,9 @@ class ProjectsController < ApplicationController
end
@messages
=
project
.
notes
.
since
(
@date
).
limit
(
40
).
order
(
"created_at DESC"
)
else
return
render
"projects/empty"
end
end
#
...
...
spec/requests/projects_spec.rb
View file @
2e5ed4ad
...
...
@@ -72,7 +72,10 @@ describe "Projects" do
current_path
.
should
==
project_path
(
@project
)
end
it_behaves_like
:tree_view
it
"should beahave like dashboard"
do
page
.
should
have_content
(
"Recent history"
)
end
end
describe
"GET /projects/team"
do
...
...
@@ -134,8 +137,6 @@ describe "Projects" do
it
"should show project"
do
page
.
should
have_content
(
"Awesome"
)
end
it_behaves_like
:tree_view
end
#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