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
39a4bb2a
Unverified
Commit
39a4bb2a
authored
Jul 08, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup and some test fixes after refactoring project home page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
bd08ac55
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
21 deletions
+22
-21
project_show.js.coffee
app/assets/javascripts/project_show.js.coffee
+1
-8
_star.html.haml
app/views/projects/buttons/_star.html.haml
+9
-10
show.html.haml
app/views/projects/show.html.haml
+1
-1
issues.feature
features/project/issues/issues.feature
+1
-0
shortcuts.feature
features/project/shortcuts.feature
+0
-1
issues.rb
features/steps/project/issues/issues.rb
+5
-0
star.rb
features/steps/project/star.rb
+1
-1
project_tab.rb
features/steps/shared/project_tab.rb
+4
-0
No files found.
app/assets/javascripts/project_show.js.coffee
View file @
39a4bb2a
class
@
ProjectShow
constructor
:
->
$
(
"a[data-toggle='tab']"
).
on
"shown.bs.tab"
,
(
e
)
->
$
.
cookie
"default_view"
,
$
(
e
.
target
).
attr
(
"href"
),
{
expires
:
30
,
path
:
'/'
}
defaultView
=
$
.
cookie
(
"default_view"
)
if
defaultView
$
(
"a[href="
+
defaultView
+
"]"
).
tab
"show"
else
$
(
"a[data-toggle='tab']:first"
).
tab
"show"
# I kept class for future
app/views/projects/buttons/_star.html.haml
View file @
39a4bb2a
-
if
current_user
=
link_to
toggle_star_namespace_project_path
(
@project
.
namespace
,
@project
),
class:
'btn toggle-star'
,
method: :post
,
remote:
true
do
=
link_to
toggle_star_namespace_project_path
(
@project
.
namespace
,
@project
),
class:
'btn
star-btn
toggle-star'
,
method: :post
,
remote:
true
do
-
if
current_user
.
starred?
(
@project
)
Unstar
-
else
Star
%span
.count
=
@project
.
star_count
:coffeescript
$('.project-home-panel .toggle-star').on 'ajax:success', (e, data, status, xhr) ->
$(@).replaceWith(data.html)
.on 'ajax:error', (e, xhr, status, error) ->
new Flash('Star toggle failed. Try again later.', 'alert')
-
else
=
link_to
new_user_session_path
,
class:
'btn has_tooltip'
,
title:
'You must sign in to star a project'
do
=
link_to
new_user_session_path
,
class:
'btn has_tooltip
star-btn
'
,
title:
'You must sign in to star a project'
do
=
icon
(
'star'
)
Star
%span
.count
=
@project
.
star_count
:coffeescript
$('.project-home-panel .toggle-star').on 'ajax:success', (e, data, status, xhr) ->
$(@).replaceWith(data.html)
.on 'ajax:error', (e, xhr, status, error) ->
new Flash('Star toggle failed. Try again later.', 'alert')
app/views/projects/show.html.haml
View file @
39a4bb2a
...
...
@@ -51,7 +51,7 @@
=
render_readme
(
readme
)
-
else
%h3
.page-title
This project does not have README yet
:(
This project does not have README yet
-
if
can?
(
current_user
,
:push_code
,
@project
)
%p
.slead
A
...
...
features/project/issues/issues.feature
View file @
39a4bb2a
...
...
@@ -189,6 +189,7 @@ Feature: Project Issues
Given
I logout
Given
public project
"Community"
When
I visit project
"Community"
page
And
I visit project
"Community"
issues page
And
I click link
"New Issue"
And
I should not see assignee field
And
I should not see milestone field
...
...
features/project/shortcuts.feature
View file @
39a4bb2a
...
...
@@ -53,6 +53,5 @@ Feature: Project Shortcuts
@javascript
Scenario
:
Navigate to project feed
Given
I visit my project's files page
Given
I press
"g"
and
"e"
Then
the active main tab should be Activity
features/steps/project/issues/issues.rb
View file @
39a4bb2a
...
...
@@ -194,6 +194,11 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
end
When
"I visit project
\"
Community
\"
issues page"
do
project
=
Project
.
find_by
(
name:
'Community'
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
end
When
"I visit empty project's issues page"
do
project
=
Project
.
find_by
(
name:
'Empty Project'
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
...
...
features/steps/project/star.rb
View file @
39a4bb2a
...
...
@@ -5,7 +5,7 @@ class Spinach::Features::ProjectStar < Spinach::FeatureSteps
include
SharedUser
step
"The project has no stars"
do
expect
(
page
).
not_to
have_content
'.
star-buttons
'
expect
(
page
).
not_to
have_content
'.
toggle-star
'
end
step
"The project has 0 stars"
do
...
...
features/steps/shared/project_tab.rb
View file @
39a4bb2a
...
...
@@ -49,4 +49,8 @@ module SharedProjectTab
expect
(
page
).
to
have_content
(
'Back to project'
)
end
end
step
'the active main tab should be Activity'
do
ensure_active_main_tab
(
'Activity'
)
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