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
Tatuya Kamada
gitlab-ce
Commits
0ae9ac15
Commit
0ae9ac15
authored
Dec 30, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repo tab added. activities page for repo
parent
e33aab0b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
0 deletions
+49
-0
app/controllers/repositories_controller.rb
app/controllers/repositories_controller.rb
+14
-0
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+6
-0
app/views/layouts/project.html.haml
app/views/layouts/project.html.haml
+1
-0
app/views/repositories/_head.html.haml
app/views/repositories/_head.html.haml
+19
-0
app/views/repositories/show.html.haml
app/views/repositories/show.html.haml
+7
-0
config/routes.rb
config/routes.rb
+2
-0
No files found.
app/controllers/repositories_controller.rb
0 → 100644
View file @
0ae9ac15
class
RepositoriesController
<
ApplicationController
before_filter
:project
# Authorize
before_filter
:add_project_abilities
before_filter
:authorize_read_project!
before_filter
:require_non_empty_project
layout
"project"
def
show
@activities
=
@project
.
fresh_commits
(
20
)
end
end
app/helpers/projects_helper.rb
View file @
0ae9ac15
...
@@ -33,4 +33,10 @@ module ProjectsHelper
...
@@ -33,4 +33,10 @@ module ProjectsHelper
:project_id
=>
@project
,
:project_id
=>
@project
,
:id
=>
@ref
||
@project
.
root_ref
)
?
"current"
:
nil
:id
=>
@ref
||
@project
.
root_ref
)
?
"current"
:
nil
end
end
def
repository_tab_class
if
controller
.
controller_name
==
"repositories"
"current"
end
end
end
end
app/views/layouts/project.html.haml
View file @
0ae9ac15
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
.fixed
.fixed
%aside
%aside
=
link_to
"Project"
,
project_path
(
@project
),
:class
=>
project_tab_class
=
link_to
"Project"
,
project_path
(
@project
),
:class
=>
project_tab_class
=
link_to
"Repository"
,
project_repository_path
(
@project
),
:class
=>
repository_tab_class
=
link_to
"Tree"
,
tree_project_ref_path
(
@project
,
@project
.
root_ref
),
:class
=>
tree_tab_class
=
link_to
"Tree"
,
tree_project_ref_path
(
@project
,
@project
.
root_ref
),
:class
=>
tree_tab_class
=
link_to
"Commits"
,
project_commits_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"commits"
,
:action
=>
"index"
,
:project_id
=>
@project
)
?
"current"
:
nil
=
link_to
"Commits"
,
project_commits_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"commits"
,
:action
=>
"index"
,
:project_id
=>
@project
)
?
"current"
:
nil
=
link_to
"Network graph"
,
graph_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"graph"
,
:id
=>
@project
)
?
"current"
:
nil
=
link_to
"Network graph"
,
graph_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"graph"
,
:id
=>
@project
)
?
"current"
:
nil
...
...
app/views/repositories/_head.html.haml
0 → 100644
View file @
0ae9ac15
.merge-tabs.repository
=
link_to
project_repository_path
(
@project
),
:class
=>
"tab
#{
'active'
if
current_page?
(
project_repository_path
(
@project
))
}
"
do
%span
Activities
=
link_to
"#"
,
:class
=>
"tab"
do
%span
Branches
=
link_to
"#"
,
:class
=>
"tab"
do
%span
Tags
=
link_to
"#"
,
:class
=>
"tab"
do
%span
Hooks
=
link_to
"#"
,
:class
=>
"tab"
do
%span
Deploy Keys
app/views/repositories/show.html.haml
0 → 100644
View file @
0ae9ac15
-
content_for
(
:body_class
,
"project-page dashboard"
)
=
render
"head"
#news-feed
.news-feed
.project-box.project-updates.ui-box.ui-box-small.ui-box-big
-
@activities
.
each
do
|
update
|
=
render
"projects/feed"
,
:update
=>
update
,
:project
=>
@project
config/routes.rb
View file @
0ae9ac15
...
@@ -46,6 +46,8 @@ Gitlab::Application.routes.draw do
...
@@ -46,6 +46,8 @@ Gitlab::Application.routes.draw do
get
"files"
get
"files"
end
end
resource
:repository
resources
:refs
,
:only
=>
[],
:path
=>
"/"
do
resources
:refs
,
:only
=>
[],
:path
=>
"/"
do
collection
do
collection
do
get
"switch"
get
"switch"
...
...
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