Skip to content

Commit 54cb030

Browse files
feat stocks/show.html.erb: task #7
Add show page with bootstrap classes.
1 parent 46c36c4 commit 54cb030

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

app/views/stocks/show.html.erb

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1-
<%- model_class = Stock -%>
2-
<div class="section-header">
3-
<div class="page-header">
4-
<h1><%= t '.title', :default => t(model_class.model_name.human.titleize) %></h1>
5-
</div>
6-
</div>
1+
<section class="main-content">
2+
<div class="row">
3+
<div class="col-md-12">
4+
<h1 class="display-4"><%= t('stocks.one') %></h1>
5+
<hr>
6+
<dl class="row">
7+
<dt class="col-sm-3"><%= t('stocks.name') %></dt>
8+
<dd class="col-sm-9"><%= @stock.name %></dd>
79

8-
<div class="section-body">
9-
<div class="card">
10-
<div class="card-body">
11-
<dl class="dl-horizontal">
12-
<dt><strong><%= model_class.human_attribute_name(t(:name)) %>:</strong></dt>
13-
<dd><%= @stock.name %></dd>
14-
<dd>Saldo total: <%= @stock.total_balance %></dd>
15-
<dd>Saldo Virtual total: <%= @stock.total_virtual_balance %></dd>
16-
</dl>
10+
<dt class="col-sm-3"><%= t('stocks.total_balance') %></dt>
11+
<dd class="col-sm-9"><%= @stock.total_balance %></dd>
1712

18-
<%= link_to t('.back', :default => t("helpers.links.back")), stocks_path, :class => 'btn btn-default' %>
13+
<dt class="col-sm-3"><%= t('stocks.total_virtual_balance') %></dt>
14+
<dd class="col-sm-9"><%= @stock.total_virtual_balance %></dd>
15+
</dl>
16+
<%= link_to t('helpers.links.back'), stocks_path, class: 'btn btn-primary' %>
1917
</div>
2018
</div>
21-
</div>
19+
</section>

0 commit comments

Comments
 (0)