Skip to content

Commit 57efd41

Browse files
committed
layouts and indentation
1 parent dbbf3b9 commit 57efd41

File tree

10 files changed

+168
-192
lines changed

10 files changed

+168
-192
lines changed

app/views/expenses/edit.html.erb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<div class="row">
2-
<div class="col-md-8">
3-
<%= render 'expenses/new_expenses_form' %>
4-
5-
</div>
6-
<div class="col-md-4">
7-
</div>
2+
<div class="col-md-8">
3+
<%= render 'expenses/new_expenses_form' %>
4+
</div>
5+
<div class="col-md-4">
6+
</div>
87
</div>

app/views/incomes/_form.html.erb

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,25 @@
11
<div class="bordered-form">
2-
<%= form_for [@mybudget, @income] do |f| %>
2+
<%= form_for [@mybudget, @income] do |f| %>
33

4-
<table>
5-
<tr>
4+
<table>
5+
<tr>
66
<td class="field-name">
7-
<%= f.label :income %><br>
8-
</td>
9-
<td class="field">
10-
<%= f.text_field :income %>
11-
</td>
12-
</tr>
13-
14-
<tr>
15-
<td class="field-name">
16-
<%= f.label :amount %><br>
17-
</td>
18-
<td class="field">
19-
<%= f.number_field :amount %>
20-
</td>
21-
</tr>
22-
23-
<tr>
24-
<td class="field-name" id="total-field-name">
25-
<%= f.label :total_income %><br></td>
26-
<td class="total-output"><%= @income.total_income%></td>
27-
</tr>
28-
29-
</table>
30-
7+
<%= f.label :income %><br>
8+
</td>
9+
<td class="field"><%= f.text_field :income %></td>
10+
</tr>
11+
<tr>
12+
<td class="field-name"> <%= f.label :amount %><br></td>
13+
<td class="field"><%= f.number_field :amount %></td>
14+
</tr>
15+
<tr>
16+
<td class="field-name" id="total-field-name">
17+
<%= f.label :total_income %><br></td>
18+
<td class="total-output"><%= @income.total_income%></td>
19+
</tr>
20+
</table>
3121
<div class="actions">
32-
<%= f.submit %>
22+
<%= f.submit %>
3323
</div>
34-
35-
<% end %>
24+
<% end %>
3625
</div>

app/views/incomes/edit.html.erb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<div class="row">
2-
<div class="col-md-8">
3-
<%= render 'incomes/new_incomes_form' %>
4-
</div>
5-
<div class="col-md-4">
6-
</div>
2+
<div class="col-md-8">
3+
<%= render 'incomes/new_incomes_form' %>
4+
<div class="col-md-4">
5+
</div>
76
</div>

app/views/incomes/new.html.erb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
NEW
2-
31
<%= render 'form' %>
Lines changed: 41 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,48 @@
11
<div class="application">
2-
<!DOCTYPE html>
3-
<html>
4-
<head>
5-
<title>MyBudget</title>
6-
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
7-
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
8-
<%= csrf_meta_tags %>
9-
</head>
10-
<body>
11-
12-
<nav class="navbar navbar-default">
13-
<div class="container-fluid">
14-
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
2+
<!DOCTYPE html>
3+
<html>
4+
<head>
5+
<title>MyBudget</title>
6+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
7+
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
8+
<%= csrf_meta_tags %>
9+
</head>
10+
<body>
1511

12+
<nav class="navbar navbar-default">
13+
<div class="container-fluid">
14+
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
1615
<ul class="nav navbar-nav navbar-right">
17-
<li class="dropdown">
18-
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">LOGIN/OUT <span class="caret"></span></a>
19-
<ul class="dropdown-menu">
20-
<li><a href="#">List </a></li>
21-
<li><a href="#">of </a></li>
22-
<li><a href="#">Users</a></li>
23-
<li role="separator" class="divider"></li>
24-
<li><a href="#">Create New User</a></li>
25-
</ul>
16+
<li class="dropdown">
17+
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">LOGIN/OUT <span class="caret"></span></a>
18+
<ul class="dropdown-menu">
19+
<li><a href="#">List </a></li>
20+
<li><a href="#">of </a></li>
21+
<li><a href="#">Users</a></li>
22+
<li role="separator" class="divider"></li>
23+
<li><a href="#">Create New User</a></li>
24+
</ul>
25+
</li>
2626
</ul>
2727
<ul class="nav navbar-nav navbar-right">
28-
<li class="dropdown">
29-
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">MENU <span class="caret"></span></a>
30-
<ul class="dropdown-menu">
31-
<li role="separator" class="divider"></li>
32-
</ul>
33-
</li>
28+
<li class="dropdown">
29+
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">MENU <span class="caret"></span></a>
30+
<ul class="dropdown-menu">
31+
<li role="separator" class="divider"></li>
32+
</ul>
33+
</li>
3434
</ul>
35-
36-
</div><!-- /.navbar-collapse -->
37-
</div><!-- /.container-fluid -->
38-
</nav>
39-
<div class="row">
40-
<div class="col-md-12">
41-
<h1><center><%= @mybudget.name %></center></h1>
42-
43-
<body><center>
44-
<p>This is an app designed to assist individuals in projecting their own budgets, savings and expenses from week to week. It will be built with Ruby on Rails, customized boostrap and postgreSQL assisted by tutorials demonstyrating an understanding of development processes</p>
45-
</center><body>
46-
47-
</div>
48-
</div>
49-
<%= yield %>
50-
51-
</body>
52-
</html>
35+
</div><!-- /.navbar-collapse -->
36+
</div><!-- /.container-fluid -->
37+
</nav>
38+
<div class="row">
39+
<div class="col-md-12">
40+
<h1><center><%= @mybudget.name %></center></h1>
41+
<center>
42+
<p>This is an app designed to assist individuals in projecting their own budgets, savings and expenses from week to week. It will be built with Ruby on Rails, customized boostrap and postgreSQL assisted by tutorials demonstyrating an understanding of development processes</p>
43+
</center>
44+
</div>
45+
<%= yield %>
46+
</body>
47+
</html>
5348
</div>
Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
11
<div class="bordered-form" >
22

3-
<h2>Expenses</h2>
3+
<h2>Expenses</h2>
4+
<div> - this will do the same as above. There will be links for each allowing for the calculation of new expenses added on the spot.</div>
5+
<%= link_to 'Add Expense', new_mybudget_expense_path(@mybudget, @expense) %>
46

5-
<div> - this will do the same as above. There will be links for each allowing for the calculation of new expenses added on the spot.</div>
6-
7-
<%= link_to 'Add Expense', new_mybudget_expense_path(@mybudget, @expense) %>
8-
9-
<table class="table" >
7+
<table class="table" >
108
<thead>
11-
<tr>
12-
<th>Expense Type</th>
13-
<th>Amount</th>
14-
</tr>
9+
<tr>
10+
<th>Expense Type</th>
11+
<th>Amount</th>
12+
</tr>
1513
</thead>
16-
<tbody>
17-
<% @mybudget.expenses.each do |expense| %>
18-
<tr>
19-
<div id="expenses"></div>
20-
<td><%= expense.expense %></td>
21-
<td><%= expense.amount %></td>
22-
<td></td>
23-
<% end %>
14+
<tbody>
15+
<% @mybudget.expenses.each do |expense| %>
16+
<tr>
17+
<div id="expenses"></div>
18+
<td><%= expense.expense %></td>
19+
<td><%= expense.amount %></td>
20+
<td></td>
21+
</tr>
22+
<% end %>
2423
</tbody>
25-
</table>
26-
<br>
27-
<div>TOTAL EXPENSES</div>
28-
<div class="total-output"><%= Expense.sum(:amount) %>
29-
30-
</div>
24+
</table>
25+
26+
<br>
27+
<div>TOTAL EXPENSES</div>
28+
<div class="total-output"><%= Expense.sum(:amount) %>
29+
</div>
3130
</div>

app/views/mybudgets/_form.html.erb

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
11
<div class="bordered-form">
2-
<%= form_for [@mybudget] do |f| %>
3-
4-
<h1>New Budget</h1>
5-
<table>
6-
<tr>
2+
<%= form_for [@mybudget] do |f| %>
3+
<h1>New Budget</h1>
4+
<table>
5+
<tr>
76
<td class="field-name">
8-
<%= f.label :name %><br>
9-
</td>
10-
<td class="field">
11-
<%= f.text_field :name %>
12-
</td>
13-
</tr>
14-
15-
<tr>
16-
<td class="field-name">
17-
<%= f.label :open_bal %><br>
18-
</td>
19-
<td class="field">
20-
<%= f.number_field :open_bal, :step => 0.01 %>
21-
</td>
22-
</tr>
7+
<%= f.label :name %><br>
8+
</td>
9+
<td class="field">
10+
<%= f.text_field :name %>
11+
</td>
12+
</tr>
13+
<tr>
14+
<td class="field-name">
15+
<%= f.label :open_bal %><br>
16+
</td>
17+
<td class="field">
18+
<%= f.number_field :open_bal, :step => 0.01 %>
19+
</td>
20+
</tr>
21+
</table>
2322

2423
<div class="actions">
25-
<%= f.submit %>
24+
<%= f.submit %>
2625
</div>
27-
28-
<% end %>
26+
<% end %>
2927
</div>

app/views/mybudgets/_incomes.html.erb

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
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+
<%= link_to 'Add Income', new_mybudget_income_path(@mybudget, @income) %>
25

3-
<h2>Incomes</h2>
4-
5-
<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>
6-
7-
<%= link_to 'Add Income', new_mybudget_income_path(@mybudget, @income) %>
8-
9-
<table class="table" >
6+
<table class="table" >
107
<thead>
11-
<tr>
12-
<th>Incomes</th>
13-
</tr>
8+
<tr>
9+
<th>Incomes</th>
10+
</tr>
1411
</thead>
15-
<tbody>
16-
<% @mybudget.incomes.each do |income| %>
17-
<tr>
18-
<div id="incomes"></div>
19-
<td class="table-items"><%= income.income %></td>
20-
<td class="amount">$<%= income.amount %></td>
21-
<td></td>
22-
<% end %>
12+
<tbody>
13+
<% @mybudget.incomes.each do |income| %>
14+
<tr>
15+
<div id="incomes"></div>
16+
<td class="table-items"><%= income.income %></td>
17+
<td class="amount">$<%= income.amount %></td>
18+
<td></td>
19+
</tr>
20+
<% end %>
2321
</tbody>
24-
</table>
25-
<br>
26-
<div>TOTAL INCOME</div>
27-
<div class="total-output"><%= Income.sum(:amount) %>
28-
29-
</div>
22+
</table>
23+
<br>
24+
<div>TOTAL INCOME</div>
25+
<div class="total-output"><%= Income.sum(:amount) %>
26+
</div>
3027
</div>

app/views/mybudgets/index.html.erb

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
<div class="row">
2-
<div class="col-md-8">
3-
<%= link_to 'first budget', new_mybudget_path %>
2+
<div class="col-md-8">
3+
<%= link_to 'first budget', new_mybudget_path %>
44

5-
<table class="table">
6-
<thead>
5+
<table class="table">
6+
<thead>
77
<tr>
8-
<th>Name</th>
9-
<th>Opening Balance</th>
10-
<th colspan="3"></th>
8+
<th>Name</th>
9+
<th>Opening Balance</th>
10+
<th colspan="3"></th>
1111
</tr>
12-
</thead>
13-
14-
<tbody>
12+
</thead>
13+
<tbody>
1514
<% @mybudget.each do |mybudget| %>
16-
<tr>
17-
<td><%= mybudget.name %></td>
18-
<td><%= mybudget.open_bal %></td> >
19-
</tr>
15+
<tr>
16+
<td><%= mybudget.name %></td>
17+
<td><%= mybudget.open_bal %></td> >
18+
</tr>
2019
<% end %>
21-
</tbody>
22-
</table>
20+
</tbody>
21+
</table>
2322

24-
</div>
25-
<div class="col-md-4">
26-
</div>
23+
</div>
24+
<div class="col-md-4">
25+
</div>
2726
</div>

0 commit comments

Comments
 (0)