This is a very simple gem to use with Bootstrap 3 panels.
TODO: Make better tests (and more).
Add this line to your application's Gemfile:
gem 'section_helper'
And then execute:
$ bundle
Or install it yourself as:
$ gem install section_helper
The usage is simple, in view do (Slim example):
= section_for('Customer Information', icon: 'fa fa-user') do
- t.table do
- t.column 'Customer', @customer.name, icon: 'fa fa-user'
- t.column 'Age', @customer.age
This piece of code will generate:
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">
<i class="fa fa-user fa-right-space"></i>
Customer Information
</h3>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>
<i class="fa fa-user fa-right-space"></i>
Customer
</th>
<th>
Age
</th>
</tr>
</thead>
<tbody>
<tr>
<td>A cool customer</td>
<td>23 old years</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
- Fork it ( https://github.com/FelipeKoblinger/section_helper/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request