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
iv
gitlab-ce
Commits
5f4a7c3e
Commit
5f4a7c3e
authored
Feb 20, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Home tab added, Repository tab removed\n Ability to download branch
parent
40ac2ebc
Changes
22
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
125 additions
and
94 deletions
+125
-94
app/assets/images/Home-UI.PNG
app/assets/images/Home-UI.PNG
+0
-0
app/assets/images/home_icon.PNG
app/assets/images/home_icon.PNG
+0
-0
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+27
-3
app/controllers/protected_branches_controller.rb
app/controllers/protected_branches_controller.rb
+1
-0
app/controllers/repositories_controller.rb
app/controllers/repositories_controller.rb
+1
-0
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+21
-4
app/views/commits/_head.html.haml
app/views/commits/_head.html.haml
+9
-2
app/views/hooks/index.html.haml
app/views/hooks/index.html.haml
+1
-1
app/views/layouts/_app_menu.html.haml
app/views/layouts/_app_menu.html.haml
+2
-1
app/views/layouts/_const_menu_links.html.haml
app/views/layouts/_const_menu_links.html.haml
+1
-0
app/views/layouts/_project_menu.html.haml
app/views/layouts/_project_menu.html.haml
+2
-2
app/views/layouts/admin.html.haml
app/views/layouts/admin.html.haml
+1
-0
app/views/layouts/profile.html.haml
app/views/layouts/profile.html.haml
+1
-0
app/views/projects/_project_head.html.haml
app/views/projects/_project_head.html.haml
+13
-0
app/views/repositories/_branch.html.haml
app/views/repositories/_branch.html.haml
+20
-0
app/views/repositories/_branches_head.html.haml
app/views/repositories/_branches_head.html.haml
+7
-4
app/views/repositories/_feed.html.haml
app/views/repositories/_feed.html.haml
+5
-1
app/views/repositories/_head.html.haml
app/views/repositories/_head.html.haml
+1
-23
app/views/repositories/branches.html.haml
app/views/repositories/branches.html.haml
+1
-15
app/views/repositories/show.html.haml
app/views/repositories/show.html.haml
+2
-29
app/views/repositories/tags.html.haml
app/views/repositories/tags.html.haml
+9
-5
spec/requests/repositories_spec.rb
spec/requests/repositories_spec.rb
+0
-4
No files found.
app/assets/images/Home-UI.PNG
deleted
100644 → 0
View file @
40ac2ebc
782 Bytes
app/assets/images/home_icon.PNG
0 → 100644
View file @
5f4a7c3e
596 Bytes
app/assets/stylesheets/common.scss
View file @
5f4a7c3e
...
@@ -98,6 +98,7 @@ a {
...
@@ -98,6 +98,7 @@ a {
}
}
nav
.main_menu
{
nav
.main_menu
{
overflow
:hidden
;
border-radius
:
4px
;
border-radius
:
4px
;
margin
:
auto
;
margin
:
auto
;
margin
:
30px
$app_padding
;
margin
:
30px
$app_padding
;
...
@@ -116,7 +117,7 @@ nav.main_menu {
...
@@ -116,7 +117,7 @@ nav.main_menu {
.count
{
.count
{
color
:
#
bbb
;
color
:
#
aaa
;
margin-left
:
3px
;
margin-left
:
3px
;
}
}
...
@@ -149,7 +150,9 @@ nav.main_menu {
...
@@ -149,7 +150,9 @@ nav.main_menu {
&
.home
{
&
.home
{
padding
:
7px
35px
;
background
:
url(home_icon.PNG)
no-repeat
center
center
;
text-indent
:
-9999px
;
min-width
:
40px
;
img
{
img
{
position
:relative
;
position
:relative
;
...
@@ -157,7 +160,7 @@ nav.main_menu {
...
@@ -157,7 +160,7 @@ nav.main_menu {
}
}
}
}
&
.current
{
&
.current
{
background
:
#DDD
;
background
-color
:
#DDD
;
}
}
}
}
}
}
...
@@ -346,3 +349,24 @@ img.lil_av {
...
@@ -346,3 +349,24 @@ img.lil_av {
.well.padded
{
.well.padded
{
padding
:
29px
;
padding
:
29px
;
}
}
.download_repo_link
{
background
:
url("images.png")
no-repeat
0
-48px
;
padding-left
:
20px
;
}
.number
{
border-radius
:
4px
;
text-shadow
:
none
;
background
:
rgba
(
0
,
0
,
0
,.
12
);
text-align
:
center
;
padding
:
2px
4px
;
line-height
:
20px
;
margin-left
:
2px
;
}
table
a
code
{
position
:
relative
;
top
:
-2px
;
margin-right
:
3px
;
}
app/controllers/protected_branches_controller.rb
View file @
5f4a7c3e
...
@@ -7,6 +7,7 @@ class ProtectedBranchesController < ApplicationController
...
@@ -7,6 +7,7 @@ class ProtectedBranchesController < ApplicationController
before_filter
:require_non_empty_project
before_filter
:require_non_empty_project
before_filter
:authorize_admin_project!
,
:only
=>
[
:destroy
,
:create
]
before_filter
:authorize_admin_project!
,
:only
=>
[
:destroy
,
:create
]
before_filter
:render_full_content
layout
"project"
layout
"project"
...
...
app/controllers/repositories_controller.rb
View file @
5f4a7c3e
...
@@ -5,6 +5,7 @@ class RepositoriesController < ApplicationController
...
@@ -5,6 +5,7 @@ class RepositoriesController < ApplicationController
before_filter
:add_project_abilities
before_filter
:add_project_abilities
before_filter
:authorize_read_project!
before_filter
:authorize_read_project!
before_filter
:require_non_empty_project
before_filter
:require_non_empty_project
before_filter
:render_full_content
layout
"project"
layout
"project"
...
...
app/helpers/projects_helper.rb
View file @
5f4a7c3e
...
@@ -22,6 +22,8 @@ module ProjectsHelper
...
@@ -22,6 +22,8 @@ module ProjectsHelper
end
end
if
controller
.
controller_name
==
"snippets"
||
if
controller
.
controller_name
==
"snippets"
||
controller
.
controller_name
==
"hooks"
||
controller
.
controller_name
==
"deploy_keys"
||
controller
.
controller_name
==
"team_members"
controller
.
controller_name
==
"team_members"
"current"
"current"
end
end
...
@@ -33,11 +35,26 @@ module ProjectsHelper
...
@@ -33,11 +35,26 @@ module ProjectsHelper
end
end
def
repository_tab_class
def
repository_tab_class
if
controller
.
controller_name
==
"repositories"
||
#if controller.controller_name == "repositories" ||
controller
.
controller_name
==
"hooks"
||
#controller.controller_name == "hooks" ||
controller
.
controller_name
==
"protected_branches"
||
#controller.controller_name == "deploy_keys"
controller
.
controller_name
==
"deploy_keys"
#"current"
#end
end
def
commit_tab_class
if
controller
.
controller_name
==
"commits"
||
controller
.
controller_name
==
"repositories"
||
controller
.
controller_name
==
"protected_branches"
"current"
"current"
end
end
end
end
def
branches_tab_class
if
current_page?
(
branches_project_repository_path
(
@project
))
||
controller
.
controller_name
==
"protected_branches"
||
current_page?
(
project_repository_path
(
@project
))
'active'
end
end
end
end
app/views/commits/_head.html.haml
View file @
5f4a7c3e
...
@@ -6,12 +6,19 @@
...
@@ -6,12 +6,19 @@
%li
{
:class
=>
"#{'active' if current_page?(project_commits_path(@project)) }"
}
%li
{
:class
=>
"#{'active' if current_page?(project_commits_path(@project)) }"
}
=
link_to
project_commits_path
(
@project
)
do
=
link_to
project_commits_path
(
@project
)
do
%span
Commits
Commits
%li
{
:class
=>
"#{'active' if current_page?(compare_project_commits_path(@project)) }"
}
%li
{
:class
=>
"#{'active' if current_page?(compare_project_commits_path(@project)) }"
}
=
link_to
compare_project_commits_path
(
@project
)
do
=
link_to
compare_project_commits_path
(
@project
)
do
%span
Compare
Compare
%li
{
:class
=>
"#{branches_tab_class}"
}
=
link_to
project_repository_path
(
@project
)
do
Branches
%span
.number
=
@project
.
repo
.
branches
.
count
%li
{
:class
=>
"#{'active' if current_page?(tags_project_repository_path(@project)) }"
}
=
link_to
tags_project_repository_path
(
@project
)
do
Tags
%span
.number
=
@project
.
repo
.
tags
.
count
...
...
app/views/hooks/index.html.haml
View file @
5f4a7c3e
=
render
"
repositories/
head"
=
render
"
projects/project_
head"
-
if
can?
current_user
,
:admin_project
,
@project
-
if
can?
current_user
,
:admin_project
,
@project
.alert-message.block-message
.alert-message.block-message
...
...
app/views/layouts/_app_menu.html.haml
View file @
5f4a7c3e
%nav
.main_menu
%nav
.main_menu
=
link_to
"Projects"
,
projects_path
,
:class
=>
"
#{
"current"
if
current_page?
(
projects_path
)
||
current_page?
(
root_path
)
}
"
=
render
"layouts/const_menu_links"
-#= link_to "Projects", projects_path, :class => "#{"current" if current_page?(projects_path) || current_page?(root_path)}"
=
link_to
"Issues"
,
dashboard_issues_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_issues_path
)
}
"
,
:id
=>
"issues_slide"
=
link_to
"Issues"
,
dashboard_issues_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_issues_path
)
}
"
,
:id
=>
"issues_slide"
=
link_to
"Requests"
,
dashboard_merge_requests_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_merge_requests_path
)
}
"
,
:id
=>
"merge_requests_slide"
=
link_to
"Requests"
,
dashboard_merge_requests_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_merge_requests_path
)
}
"
,
:id
=>
"merge_requests_slide"
=
link_to
"Help"
,
help_path
,
:class
=>
"
#{
"current"
if
controller
.
controller_name
==
"help"
}
"
=
link_to
"Help"
,
help_path
,
:class
=>
"
#{
"current"
if
controller
.
controller_name
==
"help"
}
"
app/views/layouts/_const_menu_links.html.haml
0 → 100644
View file @
5f4a7c3e
=
link_to
"Home"
,
root_path
,
:class
=>
"home
#{
"current"
if
current_page?
(
projects_path
)
||
current_page?
(
root_path
)
}
"
,
:title
=>
"Home"
app/views/layouts/_project_menu.html.haml
View file @
5f4a7c3e
%nav
.main_menu
%nav
.main_menu
=
render
"layouts/const_menu_links"
=
link_to
project_path
(
@project
),
:class
=>
"
#{
project_tab_class
}
"
,
:title
=>
"Project"
do
=
link_to
project_path
(
@project
),
:class
=>
"
#{
project_tab_class
}
"
,
:title
=>
"Project"
do
Project
Project
-
if
@project
.
repo_exists?
-
if
@project
.
repo_exists?
=
link_to
"Repository"
,
project_repository_path
(
@project
),
:class
=>
repository_tab_class
=
link_to
"Files"
,
tree_project_ref_path
(
@project
,
@project
.
root_ref
),
:class
=>
tree_tab_class
=
link_to
"Files"
,
tree_project_ref_path
(
@project
,
@project
.
root_ref
),
:class
=>
tree_tab_class
=
link_to
"Commits"
,
project_commits_path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"commits"
)
?
"current"
:
nil
=
link_to
"Commits"
,
project_commits_path
(
@project
),
:class
=>
commit_tab_class
=
link_to
"Network"
,
graph_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"graph"
,
:id
=>
@project
)
?
"current"
:
nil
=
link_to
"Network"
,
graph_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"graph"
,
:id
=>
@project
)
?
"current"
:
nil
-
if
@project
.
issues_enabled
-
if
@project
.
issues_enabled
...
...
app/views/layouts/admin.html.haml
View file @
5f4a7c3e
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
=
render
"layouts/head_panel"
,
:title
=>
"Admin area"
=
render
"layouts/head_panel"
,
:title
=>
"Admin area"
.container
.container
%nav
.main_menu
%nav
.main_menu
=
render
"layouts/const_menu_links"
=
link_to
"Users"
,
admin_users_path
,
:class
=>
controller
.
controller_name
==
"users"
?
"current"
:
nil
=
link_to
"Users"
,
admin_users_path
,
:class
=>
controller
.
controller_name
==
"users"
?
"current"
:
nil
=
link_to
"Projects"
,
admin_projects_path
,
:class
=>
controller
.
controller_name
==
"projects"
?
"current"
:
nil
=
link_to
"Projects"
,
admin_projects_path
,
:class
=>
controller
.
controller_name
==
"projects"
?
"current"
:
nil
=
link_to
"Emails"
,
admin_emails_path
,
:class
=>
controller
.
controller_name
==
"mailer"
?
"current"
:
nil
=
link_to
"Emails"
,
admin_emails_path
,
:class
=>
controller
.
controller_name
==
"mailer"
?
"current"
:
nil
...
...
app/views/layouts/profile.html.haml
View file @
5f4a7c3e
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
=
render
"layouts/head_panel"
,
:title
=>
"Profile"
=
render
"layouts/head_panel"
,
:title
=>
"Profile"
.container
.container
%nav
.main_menu
%nav
.main_menu
=
render
"layouts/const_menu_links"
=
link_to
"Profile"
,
profile_path
,
:class
=>
current_page?
(
:controller
=>
"profile"
,
:action
=>
:show
)
?
"current"
:
nil
=
link_to
"Profile"
,
profile_path
,
:class
=>
current_page?
(
:controller
=>
"profile"
,
:action
=>
:show
)
?
"current"
:
nil
=
link_to
"Password & token"
,
profile_password_path
,
:class
=>
current_page?
(
:controller
=>
"profile"
,
:action
=>
:password
)
?
"current"
:
nil
=
link_to
"Password & token"
,
profile_password_path
,
:class
=>
current_page?
(
:controller
=>
"profile"
,
:action
=>
:password
)
?
"current"
:
nil
=
link_to
"Design"
,
profile_design_path
,
:class
=>
current_page?
(
:controller
=>
"profile"
,
:action
=>
:design
)
?
"current"
:
nil
=
link_to
"Design"
,
profile_design_path
,
:class
=>
current_page?
(
:controller
=>
"profile"
,
:action
=>
:design
)
?
"current"
:
nil
...
...
app/views/projects/_project_head.html.haml
View file @
5f4a7c3e
...
@@ -16,3 +16,16 @@
...
@@ -16,3 +16,16 @@
%li
{
:class
=>
" #{'active' if (controller.controller_name == "
snippets
") }"
}
%li
{
:class
=>
" #{'active' if (controller.controller_name == "
snippets
") }"
}
=
link_to
project_snippets_path
(
@project
),
:class
=>
"snippets-tab tab"
do
=
link_to
project_snippets_path
(
@project
),
:class
=>
"snippets-tab tab"
do
Snippets
Snippets
-#%li{:class => "#{'active' if current_page?(project_repository_path(@project)) }"}
-#= link_to project_repository_path(@project) do
-#%span
-#Activities
%li
{
:class
=>
"#{'active' if controller.controller_name == "
hooks
" }"
}
=
link_to
project_hooks_path
(
@project
)
do
%span
Hooks
%li
{
:class
=>
"#{'active' if controller.controller_name == "
deploy_keys
"}"
}
-
if
can?
current_user
,
:admin_project
,
@project
=
link_to
project_deploy_keys_path
(
@project
)
do
%span
Deploy Keys
app/views/repositories/_branch.html.haml
0 → 100644
View file @
5f4a7c3e
%tr
%td
=
link_to
project_commits_path
(
@project
,
:ref
=>
branch
.
name
)
do
%strong
=
branch
.
name
-
if
branch
.
name
==
@project
.
root_ref
%span
.label
default
%td
=
link_to
project_commits_path
(
@project
,
branch
.
commit
.
id
)
do
%code
=
branch
.
commit
.
id
.
to_s
[
0
..
10
]
=
image_tag
gravatar_icon
(
Commit
.
new
(
branch
.
commit
).
author_email
),
:class
=>
""
,
:width
=>
16
=
truncate
(
Commit
.
new
(
branch
.
commit
).
safe_message
,
:length
=>
40
)
%td
%span
.update-author.right
=
time_ago_in_words
(
branch
.
commit
.
committed_date
)
ago
%td
-
if
can?
current_user
,
:download_code
,
@project
=
link_to
"Download"
,
archive_project_repository_path
(
@project
,
:ref
=>
branch
.
name
),
:class
=>
"visible_link download_repo_link"
app/views/repositories/_branches_head.html.haml
View file @
5f4a7c3e
=
render
"
repositorie
s/head"
=
render
"
commit
s/head"
%ul
.pills
%ul
.pills
%li
{
:class
=>
(
"active"
if
current_page?
(
branches_
project_repository_path
(
@project
)))}
%li
{
:class
=>
(
"active"
if
current_page?
(
project_repository_path
(
@project
)))}
=
link_to
branches_
project_repository_path
(
@project
)
do
=
link_to
project_repository_path
(
@project
)
do
All
Recent
%li
{
:class
=>
(
"active"
if
current_page?
(
project_protected_branches_path
(
@project
)))}
%li
{
:class
=>
(
"active"
if
current_page?
(
project_protected_branches_path
(
@project
)))}
=
link_to
project_protected_branches_path
(
@project
)
do
=
link_to
project_protected_branches_path
(
@project
)
do
Protected
Protected
%li
{
:class
=>
(
"active"
if
current_page?
(
branches_project_repository_path
(
@project
)))}
=
link_to
branches_project_repository_path
(
@project
)
do
All
%hr
%hr
app/views/repositories/_feed.html.haml
View file @
5f4a7c3e
...
@@ -4,8 +4,12 @@
...
@@ -4,8 +4,12 @@
=
link_to
project_commits_path
(
@project
,
:ref
=>
commit
.
head
.
name
)
do
=
link_to
project_commits_path
(
@project
,
:ref
=>
commit
.
head
.
name
)
do
%strong
%strong
=
commit
.
head
.
name
=
commit
.
head
.
name
-
if
commit
.
head
.
name
==
@project
.
root_ref
%span
.label
default
%td
%td
%div
%div
=
link_to
project_commits_path
(
@project
,
commit
.
id
)
do
%code
=
commit
.
id
.
to_s
[
0
..
10
]
%code
=
commit
.
id
.
to_s
[
0
..
10
]
=
image_tag
gravatar_icon
(
commit
.
author_email
),
:class
=>
""
,
:width
=>
16
=
image_tag
gravatar_icon
(
commit
.
author_email
),
:class
=>
""
,
:width
=>
16
=
truncate
(
commit
.
safe_message
,
:length
=>
40
)
=
truncate
(
commit
.
safe_message
,
:length
=>
40
)
...
...
app/views/repositories/_head.html.haml
View file @
5f4a7c3e
%ul
.tabs
=
render
"projects/project_head"
%li
{
:class
=>
"#{'active' if current_page?(project_repository_path(@project)) }"
}
=
link_to
project_repository_path
(
@project
)
do
%span
Activities
%li
{
:class
=>
"#{'active' if current_page?(branches_project_repository_path(@project)) || current_page?(project_protected_branches_path(@project)) }"
}
=
link_to
branches_project_repository_path
(
@project
)
do
%span
Branches
%li
{
:class
=>
"#{'active' if current_page?(tags_project_repository_path(@project)) }"
}
=
link_to
tags_project_repository_path
(
@project
)
do
%span
Tags
%li
{
:class
=>
"#{'active' if controller.controller_name == "
hooks
" }"
}
=
link_to
project_hooks_path
do
%span
Hooks
%li
{
:class
=>
"#{'active' if controller.controller_name == "
deploy_keys
"}"
}
-
if
can?
current_user
,
:admin_project
,
@project
=
link_to
project_deploy_keys_path
(
@project
)
do
%span
Deploy Keys
app/views/repositories/branches.html.haml
View file @
5f4a7c3e
=
render
"repositories/branches_head"
=
render
"repositories/branches_head"
-
unless
@branches
.
empty?
-
unless
@branches
.
empty?
%table
.zebra-striped.borders
%table
.zebra-striped.borders
%thead
%tr
%th
Name
%th
Last commit
%tbody
%tbody
-
@branches
.
each
do
|
branch
|
-
@branches
.
each
do
|
branch
|
%tr
=
render
"repositories/branch"
,
:branch
=>
branch
%td
=
link_to
project_commits_path
(
@project
,
:ref
=>
branch
.
name
)
do
%strong
=
branch
.
name
-
if
branch
.
name
==
@project
.
root_ref
%span
.label
default
%td
=
link_to
project_commits_path
(
@project
,
branch
.
commit
.
id
)
do
=
truncate
branch
.
commit
.
id
.
to_s
,
:length
=>
10
=
time_ago_in_words
(
branch
.
commit
.
committed_date
)
ago
app/views/repositories/show.html.haml
View file @
5f4a7c3e
=
render
"head"
=
render
"branches_head"
%h3
=
@project
.
name
-
if
can?
current_user
,
:download_code
,
@project
=
link_to
"Download"
,
archive_project_repository_path
(
@project
),
:class
=>
"btn small right"
%hr
.entry
%p
Last commit was
%small
%code
=
@activities
.
first
.
commit
.
id
.
to_s
[
0
..
10
]
=
time_ago_in_words
(
@activities
.
first
.
commit
.
committed_date
)
ago to
=
link_to
project_commits_path
(
@project
,
:ref
=>
@activities
.
first
.
head
.
name
),
:class
=>
"visible_link"
do
%span
.label
=
@activities
.
first
.
head
.
name
.alert-message.block-message.warning
.input
.input-prepend
%span
.add-on
git clone
=
text_field_tag
:project_clone
,
@project
.
url_to_repo
,
:class
=>
"xlarge one_click_select git_clone_url"
%h5
.cgray
Recently updated branches
%table
.zebra-striped.borders
%table
.zebra-striped.borders
-
@activities
.
each
do
|
update
|
-
@activities
.
each
do
|
update
|
=
render
"repositories/
feed"
,
:update
=>
update
,
:project
=>
@project
=
render
"repositories/
branch"
,
:branch
=>
update
.
head
app/views/repositories/tags.html.haml
View file @
5f4a7c3e
=
render
"head"
=
render
"
commits/
head"
-
unless
@tags
.
empty?
-
unless
@tags
.
empty?
%table
.zebra-striped.borders
%table
.zebra-striped.borders
-
@tags
.
each
do
|
tag
|
-
@tags
.
each
do
|
tag
|
%tr
%tr
%td
%td
=
tag
.
name
%strong
=
link_to
tag
.
name
,
project_commits_path
(
@project
,
:ref
=>
tag
.
name
),
:class
=>
""
%td
=
link_to
project_commits_path
(
@project
,
tag
.
commit
.
id
)
do
%code
=
tag
.
commit
.
id
.
to_s
[
0
..
10
]
%code
=
tag
.
commit
.
id
.
to_s
[
0
..
10
]
=
image_tag
gravatar_icon
(
Commit
.
new
(
tag
.
commit
).
author_email
),
:class
=>
""
,
:width
=>
16
=
truncate
(
Commit
.
new
(
tag
.
commit
).
safe_message
,
:length
=>
40
)
%td
%span
.update-author.right
%span
.update-author.right
=
time_ago_in_words
(
tag
.
commit
.
committed_date
)
=
time_ago_in_words
(
tag
.
commit
.
committed_date
)
ago
ago
%td
%td
-
if
can?
current_user
,
:download_code
,
@project
-
if
can?
current_user
,
:download_code
,
@project
=
link_to
"Download"
,
archive_project_repository_path
(
@project
,
:ref
=>
tag
.
name
),
:class
=>
"btn small"
=
link_to
"Download"
,
archive_project_repository_path
(
@project
,
:ref
=>
tag
.
name
),
:class
=>
"visible_link download_repo_link"
=
link_to
"Commits"
,
project_commits_path
(
@project
,
:ref
=>
tag
.
name
),
:class
=>
"btn small"
-
else
-
else
%h3
No tags
%h3
No tags
spec/requests/repositories_spec.rb
View file @
5f4a7c3e
...
@@ -18,10 +18,6 @@ describe "Repository" do
...
@@ -18,10 +18,6 @@ describe "Repository" do
current_path
.
should
==
project_repository_path
(
@project
)
current_path
.
should
==
project_repository_path
(
@project
)
end
end
it
"should have link to repo activities"
do
page
.
should
have_content
(
"Activities"
)
end
it
"should have link to last commit for activities tab"
do
it
"should have link to last commit for activities tab"
do
page
.
should
have_content
(
@project
.
commit
.
safe_message
[
0
..
20
])
page
.
should
have_content
(
@project
.
commit
.
safe_message
[
0
..
20
])
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