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
e9ab09c6
Commit
e9ab09c6
authored
Jul 09, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'project-home-page'
parents
11e43cdd
f0e1da04
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
29 additions
and
4 deletions
+29
-4
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+0
-1
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+6
-0
app/views/projects/_last_push.html.haml
app/views/projects/_last_push.html.haml
+14
-0
app/views/projects/activity.html.haml
app/views/projects/activity.html.haml
+1
-2
app/views/projects/blob/show.html.haml
app/views/projects/blob/show.html.haml
+3
-0
app/views/projects/merge_requests/index.html.haml
app/views/projects/merge_requests/index.html.haml
+1
-0
app/views/projects/show.html.haml
app/views/projects/show.html.haml
+1
-0
app/views/projects/tree/show.html.haml
app/views/projects/tree/show.html.haml
+3
-1
No files found.
app/controllers/projects_controller.rb
View file @
e9ab09c6
...
@@ -81,7 +81,6 @@ class ProjectsController < ApplicationController
...
@@ -81,7 +81,6 @@ class ProjectsController < ApplicationController
if
@project
.
empty_repo?
if
@project
.
empty_repo?
render
'projects/empty'
render
'projects/empty'
else
else
@last_push
=
current_user
.
recent_push
(
@project
.
id
)
if
current_user
render
:show
render
:show
end
end
else
else
...
...
app/helpers/projects_helper.rb
View file @
e9ab09c6
...
@@ -266,4 +266,10 @@ module ProjectsHelper
...
@@ -266,4 +266,10 @@ module ProjectsHelper
namespace_project_new_blob_path
(
@project
.
namespace
,
@project
,
tree_join
(
ref
),
file_name:
'README.md'
)
namespace_project_new_blob_path
(
@project
.
namespace
,
@project
,
tree_join
(
ref
),
file_name:
'README.md'
)
end
end
def
last_push_event
if
current_user
current_user
.
recent_push
(
@project
.
id
)
end
end
end
end
app/views/projects/_last_push.html.haml
0 → 100644
View file @
e9ab09c6
-
if
event
=
last_push_event
-
if
show_last_push_widget?
(
event
)
.hidden-xs.center
.slead
%span
You pushed to
=
link_to
namespace_project_commits_path
(
event
.
project
.
namespace
,
event
.
project
,
event
.
ref_name
)
do
%strong
=
event
.
ref_name
branch
#{
time_ago_with_tooltip
(
event
.
created_at
)
}
%div
=
link_to
new_mr_path_from_push_event
(
event
),
title:
"New Merge Request"
,
class:
"btn btn-info btn-sm"
do
Create Merge Request
%hr
app/views/projects/activity.html.haml
View file @
e9ab09c6
=
render
'projects/last_push'
.hidden-xs
.hidden-xs
=
render
"events/event_last_push"
,
event:
@last_push
-
if
current_user
-
if
current_user
%ul
.nav.nav-pills.event_filter.pull-right
%ul
.nav.nav-pills.event_filter.pull-right
%li
%li
...
...
app/views/projects/blob/show.html.haml
View file @
e9ab09c6
-
page_title
@blob
.
path
,
@ref
-
page_title
@blob
.
path
,
@ref
=
render
'projects/last_push'
%div
.tree-ref-holder
%div
.tree-ref-holder
=
render
'shared/ref_switcher'
,
destination:
'blob'
,
path:
@path
=
render
'shared/ref_switcher'
,
destination:
'blob'
,
path:
@path
...
...
app/views/projects/merge_requests/index.html.haml
View file @
e9ab09c6
-
page_title
"Merge Requests"
-
page_title
"Merge Requests"
=
render
'projects/last_push'
.append-bottom-10
.append-bottom-10
.pull-right
.pull-right
=
render
'shared/issuable/search_form'
,
path:
namespace_project_merge_requests_path
(
@project
.
namespace
,
@project
)
=
render
'shared/issuable/search_form'
,
path:
namespace_project_merge_requests_path
(
@project
.
namespace
,
@project
)
...
...
app/views/projects/show.html.haml
View file @
e9ab09c6
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
=
render
'shared/no_ssh'
=
render
'shared/no_ssh'
=
render
'shared/no_password'
=
render
'shared/no_password'
=
render
'projects/last_push'
=
render
"home_panel"
=
render
"home_panel"
.project-stats
.project-stats
...
...
app/views/projects/tree/show.html.haml
View file @
e9ab09c6
...
@@ -2,7 +2,9 @@
...
@@ -2,7 +2,9 @@
=
content_for
:meta_tags
do
=
content_for
:meta_tags
do
-
if
current_user
-
if
current_user
=
auto_discovery_link_tag
(
:atom
,
namespace_project_commits_url
(
@project
.
namespace
,
@project
,
@ref
,
format: :atom
,
private_token:
current_user
.
private_token
),
title:
"
#{
@project
.
name
}
:
#{
@ref
}
commits"
)
=
auto_discovery_link_tag
(
:atom
,
namespace_project_commits_url
(
@project
.
namespace
,
@project
,
@ref
,
format: :atom
,
private_token:
current_user
.
private_token
),
title:
"
#{
@project
.
name
}
:
#{
@ref
}
commits"
)
=
render
'projects/last_push'
.tree-ref-holder
.tree-ref-holder
=
render
'shared/ref_switcher'
,
destination:
'tree'
,
path:
@path
=
render
'shared/ref_switcher'
,
destination:
'tree'
,
path:
@path
...
...
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