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
aa86aff7
Commit
aa86aff7
authored
Nov 18, 2021
by
Jeremy Wu
Committed by
Kushal Pandya
Nov 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feat: extract code for group billing plan action
parent
fabcc24b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
ee/app/views/shared/billings/_billing_plan.html.haml
ee/app/views/shared/billings/_billing_plan.html.haml
+3
-7
ee/app/views/shared/billings/_billing_plan_actions.html.haml
ee/app/views/shared/billings/_billing_plan_actions.html.haml
+7
-0
No files found.
ee/app/views/shared/billings/_billing_plan.html.haml
View file @
aa86aff7
...
@@ -65,10 +65,6 @@
...
@@ -65,10 +65,6 @@
.card-footer
.card-footer
-
show_upgrade_button
=
show_upgrade_button?
(
purchase_link
.
action
,
plan_offer_type
)
-
show_upgrade_button
=
show_upgrade_button?
(
purchase_link
.
action
,
plan_offer_type
)
.gl-min-h-7.gl-display-flex.gl-flex-wrap.gl-justify-content-end
.gl-min-h-7.gl-display-flex.gl-flex-wrap.gl-justify-content-end
-
if
show_contact_sales_button?
(
purchase_link
.
action
,
plan_offer_type
)
=
render
"shared/billings/billing_plan_actions"
,
namespace:
namespace
,
plan:
plan
,
-
if
Feature
.
enabled?
(
:in_app_hand_raise_pql
,
namespace
)
purchase_link:
purchase_link
,
show_upgrade_button:
show_upgrade_button
,
.js-hand-raise-lead-button
{
data:
hand_raise_props
(
namespace
)
}
plan_offer_type:
plan_offer_type
,
is_current:
is_current
-
else
=
link_to
s_
(
'BillingPlan|Contact sales'
),
"
#{
contact_sales_url
}
?test=inappcontactsales
#{
plan
.
code
}
"
,
class:
[
"btn gl-button"
,
show_upgrade_button
?
"btn-success-secondary"
:
"btn-success"
],
data:
{
'track-action'
:
'click_button'
,
'track-label'
:
'contact_sales'
,
'track-property'
:
plan
.
code
}
-
if
show_upgrade_button
=
link_to
upgrade_button_text
(
plan_offer_type
),
plan_purchase_or_upgrade_url
(
namespace
,
plan
),
class:
[
"btn btn-success gl-button"
,
upgrade_button_css_classes
(
namespace
,
plan
,
is_current
),
"gl-ml-3"
],
data:
{
'track-action'
:
'click_button'
,
'track-label'
:
'upgrade'
,
'track-property'
:
plan
.
code
,
qa_selector:
"upgrade_to_
#{
plan
.
code
}
"
}
ee/app/views/shared/billings/_billing_plan_actions.html.haml
0 → 100644
View file @
aa86aff7
-
if
show_contact_sales_button?
(
purchase_link
.
action
,
plan_offer_type
)
-
if
Feature
.
enabled?
(
:in_app_hand_raise_pql
,
namespace
)
.js-hand-raise-lead-button
{
data:
hand_raise_props
(
namespace
)
}
-
else
=
link_to
s_
(
'BillingPlan|Contact sales'
),
"
#{
contact_sales_url
}
?test=inappcontactsales
#{
plan
.
code
}
"
,
class:
[
"btn gl-button"
,
show_upgrade_button
?
"btn-confirm-secondary"
:
"btn-confirm"
],
data:
{
'track-action'
:
'click_button'
,
'track-label'
:
'contact_sales'
,
'track-property'
:
plan
.
code
}
-
if
show_upgrade_button
=
link_to
upgrade_button_text
(
plan_offer_type
),
plan_purchase_or_upgrade_url
(
namespace
,
plan
),
class:
[
"btn btn-confirm gl-button"
,
upgrade_button_css_classes
(
namespace
,
plan
,
is_current
),
"gl-ml-3"
],
data:
{
'track-action'
:
'click_button'
,
'track-label'
:
'upgrade'
,
'track-property'
:
plan
.
code
,
qa_selector:
"upgrade_to_
#{
plan
.
code
}
"
}
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