BigW Consortium Gitlab

Commit 0c81279e by Grzegorz Bizon

Render collection of badges instead of using iterator

parent eec0f5da
- badges.each do |badge| .row{ class: badge.title.gsub(' ', '-') }
.row{ class: badge.title.gsub(' ', '-') } .col-lg-3.profile-settings-sidebar
.col-lg-3.profile-settings-sidebar %h4.prepend-top-0
%h4.prepend-top-0 = badge.title.capitalize
= badge.title.capitalize .col-lg-9
.col-lg-9 .prepend-top-10
.prepend-top-10 .panel.panel-default
.panel.panel-default .panel-heading
.panel-heading %b
%b = badge.title.capitalize
= badge.title.capitalize ·
· = badge.to_html
= badge.to_html .pull-right
.pull-right = render 'shared/ref_switcher', destination: 'badges', align_right: true
= render 'shared/ref_switcher', destination: 'badges', align_right: true .panel-body
.panel-body .row
.row .col-md-2.text-center
.col-md-2.text-center Markdown
Markdown .col-md-10.code.js-syntax-highlight
.col-md-10.code.js-syntax-highlight = highlight('.md', badge.to_markdown)
= highlight('.md', badge.to_markdown) .row
.row %hr
%hr .row
.row .col-md-2.text-center
.col-md-2.text-center HTML
HTML .col-md-10.code.js-syntax-highlight
.col-md-10.code.js-syntax-highlight = highlight('.html', badge.to_html)
= highlight('.html', badge.to_html)
...@@ -77,4 +77,4 @@ ...@@ -77,4 +77,4 @@
%hr %hr
.row.prepend-top-default .row.prepend-top-default
= render partial: 'badges', object: @badges = render partial: 'badge', collection: @badges
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