Commit fb4995df authored by Matt Vanderpol's avatar Matt Vanderpol

Refactor code to be 3 columns and not use table layout

Iterating towards desired display
parent 2e1efdcb
......@@ -18,41 +18,45 @@ extra_js:
.row
.col-md-10.col-md-offset-1
.roi-calculator-container.u-margin-top-lg
%table.table.js-roi-calculator.roi-calculator--category
%thead
%tr
%th Category
%th GitLab
%th Vendor
%th Monthly Cost
%tfoot
%tr
%td{ colspan: 3 }
 
%td
%span#js-roi-calculator-total
Total
%tbody
- data.categories.each do |category_key, category|
- next unless category.roi
%tr
%th{ scope: "row" }
= category.name
%td Included
%td
.dropdown.level.js-competitor-dropdown
%button.dropdown-menu-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
.dropdown-title
%i.fa.fa-chevron-down
%ul.dropdown-menu.dropdown-scroll
- data.features.competitors.each do |competitor_key, competitor|
- next if competitor_key[0..6] == 'gitlab_'
- next unless competitor.category && competitor.category.include?(category_key)
%li
= competitor.name
%td
.input-group
%span.input-group-addon $
%input.form-control.js-roi-calculator-input{ type: "number", name: "#{category_key}_cost" }
%span.input-group-addon /mo
.roi-calculator-container.js-roi-calculator.u-margin-top-lg
.row
.col-md-3
.brand-title.text-center
Category
.col-md-4
.brand-title.text-center
GitLab
.col-md-5
.brand-title.text-center
Your toolchain
.row
.col-md-3
.col-md-4
.col-md-5
%span#js-roi-calculator-total
Total
- data.categories.each do |category_key, category|
- next unless category.roi
.row
.col-md-3
= category.name
.col-md-4
Included
.col-md-5
.dropdown.level.js-competitor-dropdown
%button.dropdown-menu-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
.dropdown-title
%i.fa.fa-chevron-down
%ul.dropdown-menu.dropdown-scroll
- data.features.competitors.each do |competitor_key, competitor|
- next if competitor_key[0..6] == 'gitlab_'
- next unless competitor.category && competitor.category.include?(category_key)
%li
= competitor.name
.input-group
%span.input-group-addon $
%input.form-control.js-roi-calculator-input{ type: "number", name: "#{category_key}_cost" }
%span.input-group-addon /mo
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment