Skip to content

Commit bee092f

Browse files
committed
incomes partial formatted
1 parent 957f870 commit bee092f

File tree

2 files changed

+56
-32
lines changed

2 files changed

+56
-32
lines changed

app/assets/stylesheets/mybudget.scss

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
padding-top: 20px;
3838
padding-right: 20px;
3939
}
40-
4140
}
4241

4342
.col-md-12 {
@@ -49,17 +48,48 @@
4948
margin: 15px;
5049
}
5150

51+
.col-md-3 {
52+
}
53+
5254
.bordered-form {
5355
margin-left: 50px;
5456
margin-top: 20px;
5557
margin-bottom: 20px;
5658
padding: 20px;
57-
padding-left: 40px;
58-
padding-right: 40px;
59+
5960
background-color: #ADD6FF;
6061
border-radius: 15px;
6162
width: 750px;
6263

64+
.bordered-form-header {
65+
font-size: -webkit-xxx-large;
66+
text-align: left;
67+
border-bottom: solid black 1px;
68+
69+
.bordered-form-header-note {
70+
padding-left: 20;
71+
font-size: 12px;
72+
}
73+
}
74+
75+
.bordered-form-footer {
76+
font-size: -small;
77+
text-align: left;
78+
border-bottom: solid black 1px;
79+
80+
.bordered-form-footer-total {
81+
text-align: right;
82+
padding-left: 20;
83+
font-size: 12px;
84+
}
85+
}
86+
87+
.bordered-form-new-item {
88+
padding-top: 5px;
89+
padding-bottom: 5px;
90+
text-align: right;
91+
}
92+
6393
.field-name {
6494
padding-left: 40px;
6595
}
@@ -77,23 +107,14 @@
77107
text-align: right;
78108
}
79109

80-
.total-output {
110+
.bordered-form-total {
81111
text-align: right;
82-
padding-right: 20px;
83112
font-style: bold;
84-
font-size: 40px
113+
font-size: 40px;
85114
}
86115

87116
.actions {
88117
padding-left: 472px;
89118
font-size: 18px;
90119
}
91-
92-
h2 {
93-
font-size: 40px;
94-
font-weight: inherit;
95-
border-bottom: solid black 1px;
96-
text-align: left;
97-
}
98-
99120
}

app/views/mybudgets/_incomes.html.erb

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
<div class="bordered-form" >
2-
<h2>Incomes</h2>
3-
<div> - this is going to be an incomes show page which will list all of the incomes and allow the user to add new income values as the week goes. In the long run this will help keep track of projections.</div>
4-
5-
<%= link_to new_mybudget_income_path(@mybudget, @income),
6-
remote: true, id: "new-item-link", class: "btn btn-sm btn-default round" do %> New
7-
<%end%>
8-
9-
10-
<table class="table" >
11-
<thead>
2+
<table class="bordered-form-header">
123
<tr>
13-
<th>Incomes</th>
4+
<td>Incomes</td>
5+
<td class="bordered-form-header-note">Incomes show page will list all of the incomes and allow the user to add new income values throughout the week.
6+
</td>
147
</tr>
15-
</thead>
8+
</table>
9+
10+
<div class="bordered-form-new-item">
11+
<%= link_to new_mybudget_income_path(@mybudget, @income),
12+
remote: true, id: "new-item-link", class: "btn btn-sm btn-default round" do %>Add Income
13+
<%end%>
14+
</div>
15+
16+
<table class="table">
1617
<tbody>
1718
<% @mybudget.incomes.each do |income| %>
1819
<tr>
@@ -23,11 +24,13 @@
2324
</tr>
2425
<% end %>
2526
<tr>
26-
</tr>
27-
<tr>
28-
<td class="table-items">TOTAL INCOME</td>
29-
<td class="total-output"><%= Income.sum(:amount) %></td>
30-
</tr>
3127
</tbody>
28+
<tfoot class="bordered-form-total">
29+
<tr>
30+
<td>TOTAL INCOME</td>
31+
<td>$<%= Income.sum(:amount) %></td>
32+
<td></td>
33+
</tr>
34+
</tfoot>
3235
</table>
33-
</div>
36+
</div>

0 commit comments

Comments
 (0)