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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
107314d0
Commit
107314d0
authored
Jun 10, 2020
by
Doug Stull
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add buy ci minutes link subtext
- needed to tie in notification dot alert.
parent
725e6972
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
2 deletions
+27
-2
ee/app/views/layouts/header/_buy_pipeline_minutes.html.haml
ee/app/views/layouts/header/_buy_pipeline_minutes.html.haml
+12
-2
ee/spec/views/layouts/header/_current_user_dropdown.html.haml_spec.rb
...s/layouts/header/_current_user_dropdown.html.haml_spec.rb
+12
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
ee/app/views/layouts/header/_buy_pipeline_minutes.html.haml
View file @
107314d0
-
return
unless
show_buy_pipeline_minutes?
(
project
,
namespace
)
-
link_text
=
s_
(
"CurrentUser|Buy Pipeline minutes"
)
-
link_emoji
=
emoji_icon
(
'clock9'
,
'aria-hidden'
:
true
)
%li
=
link_to
profile_usage_quotas_path
,
class:
'ci-minutes-emoji js-buy-pipeline-minutes-link'
,
data:
{
'track-event'
:
'click_buy_ci_minutes'
,
'track-label'
:
current_user
.
namespace
.
actual_plan_name
,
'track-property'
:
'user_dropdown'
}
do
=
s_
(
"CurrentUser|Buy Pipeline minutes"
)
=
emoji_icon
(
'clock9'
,
'aria-hidden'
:
true
)
-
if
show_pipeline_minutes_notification_dot?
(
project
,
namespace
)
.gl-pb-2
=
link_text
=
link_emoji
%span
.small.gl-pb-3.gl-text-orange-800
=
s_
(
"CurrentUser|One of your groups is running out"
)
-
else
=
link_text
=
link_emoji
ee/spec/views/layouts/header/_current_user_dropdown.html.haml_spec.rb
View file @
107314d0
...
...
@@ -7,11 +7,13 @@ RSpec.describe 'layouts/header/_current_user_dropdown' do
describe
'Buy Pipeline Minutes link in user dropdown'
do
let
(
:need_minutes
)
{
true
}
let
(
:show_notification_dot
)
{
false
}
before
do
allow
(
view
).
to
receive
(
:current_user
).
and_return
(
user
)
allow
(
view
).
to
receive
(
:show_upgrade_link?
).
and_return
(
false
)
allow
(
view
).
to
receive
(
:show_buy_pipeline_minutes?
).
and_return
(
need_minutes
)
allow
(
view
).
to
receive
(
:show_pipeline_minutes_notification_dot?
).
and_return
(
show_notification_dot
)
render
end
...
...
@@ -24,6 +26,16 @@ RSpec.describe 'layouts/header/_current_user_dropdown' do
expect
(
subject
).
to
have_selector
(
"[data-track-label='
#{
user
.
namespace
.
actual_plan_name
}
']"
)
expect
(
subject
).
to
have_selector
(
'[data-track-property="user_dropdown"]'
)
expect
(
subject
).
to
have_link
(
'Buy Pipeline minutes'
)
expect
(
subject
).
not_to
have_content
(
'One of your groups is running out'
)
end
end
context
'when pipeline minutes need bought and there is a notification dot'
do
let
(
:show_notification_dot
)
{
true
}
it
'has "Buy Pipeline minutes" link with correct text'
,
:aggregate_failures
do
expect
(
subject
).
to
have_link
(
'Buy Pipeline minutes'
)
expect
(
subject
).
to
have_content
(
'One of your groups is running out'
)
end
end
...
...
locale/gitlab.pot
View file @
107314d0
...
...
@@ -6744,6 +6744,9 @@ msgstr ""
msgid "CurrentUser|Buy Pipeline minutes"
msgstr ""
msgid "CurrentUser|One of your groups is running out"
msgstr ""
msgid "CurrentUser|Profile"
msgstr ""
...
...
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