Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -302,15 +302,17 @@ h1 {
margin-bottom: .8%;
}

/* Orders */
/* Orders and Consoles*/

.orders {
.orders,
.consoles {
text-align: left;
margin-right: auto;
margin-left: auto;
}

.orders-table {
.orders-table,
.consoles-table {
margin-left: auto;
margin-right: auto;
width: 60%;
Expand All @@ -329,6 +331,7 @@ h1 {
}
}

/* Cart and Checkout */

#customers {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
Expand Down
2 changes: 1 addition & 1 deletion app/views/cart/createOrder.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

</tr>
<tr>
<td colspan="4">You pay: &euro; <%= @overall %></td>
<td colspan="4"><h3>You pay: &euro; <%= @overall %></h3></td>

</tr>

Expand Down
3 changes: 1 addition & 2 deletions app/views/cart/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@

<tr>
<td colspan="6">
Grand Total: <%= number_to_currency(total, :unit => "€") %>
<h3>Grand Total: <%= number_to_currency(total, :unit => "€") %></h3>
</td>

</tr>


Expand Down
8 changes: 6 additions & 2 deletions app/views/consoles/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<h1>Editing Console</h1>

<div class="mainCont">

<%= render 'form', console: @console %>

<%= link_to 'Show', @console %> |
<%= link_to 'Back', consoles_path %>
<%= link_to 'Show', @console, :class => "button", :role => "button" %>
<%= link_to 'Back', consoles_path, :class => "button", :role => "button" %>

</div>
11 changes: 7 additions & 4 deletions app/views/consoles/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<p id="notice"><%= notice %></p>

<div class="mainCont consoles">

<h1>Consoles</h1>

<table>
<table class="consoles-table">
<thead>
<tr>
<th>Title</th>
Expand All @@ -23,9 +25,10 @@
<td><%= link_to 'Destroy', console, :class => "button", :role => "button", method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
<tr>
<td><%= link_to 'New Console', new_console_path, :class => "button", :role => "button" %></td>
</tr>
</tbody>
</table>

<br>

<%= link_to 'New Console', new_console_path, :class => "button", :role => "button" %>
</div>
5 changes: 4 additions & 1 deletion app/views/consoles/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<h1>New Console</h1>

<div class="mainCont item-new">
<div class="mainCont">

<%= render 'form', console: @console %>

<%= link_to 'Back', consoles_path, :class => "button", :role => "button" %>

<br>
<br>

</div>
6 changes: 5 additions & 1 deletion app/views/consoles/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<p id="notice"><%= notice %></p>

<div class="mainCont">

<p>
<strong>Title:</strong>
<%= @console.title %>
Expand All @@ -15,5 +17,7 @@
<%= @console.image %>
</p>

<%= link_to 'Edit', edit_console_path(@console), :class => "button", :role => "button" %> |
<%= link_to 'Edit', edit_console_path(@console), :class => "button", :role => "button" %>
<%= link_to 'Back', consoles_path, :class => "button", :role => "button" %>

</div>
6 changes: 5 additions & 1 deletion app/views/devise/confirmations/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<div class="mainCont devise-new">

<h2>Resend confirmation instructions</h2>

<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
Expand All @@ -9,8 +11,10 @@
</div>

<div class="actions">
<%= f.submit "Resend confirmation instructions" %>
<%= f.submit "Resend confirmation instructions", :class => "button", :role => "button" %>
</div>
<% end %>

<%= render "devise/shared/links" %>

</div>
6 changes: 5 additions & 1 deletion app/views/devise/passwords/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<div class="mainCont devise-new">

<h2>Change your password</h2>

<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
Expand All @@ -18,8 +20,10 @@
</div>

<div class="actions">
<%= f.submit "Change my password" %>
<%= f.submit "Change my password", :class => "button", :role => "button" %>
</div>
<% end %>

<%= render "devise/shared/links" %>

</div>
6 changes: 5 additions & 1 deletion app/views/devise/passwords/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<div class="mainCont devise-new">

<h2>Forgot your password?</h2>

<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
Expand All @@ -9,8 +11,10 @@
</div>

<div class="actions">
<%= f.submit "Send me reset password instructions" %>
<%= f.submit "Send me reset password instructions", :class => "button", :role => "button" %>
</div>
<% end %>

<%= render "devise/shared/links" %>

</div>
10 changes: 7 additions & 3 deletions app/views/devise/registrations/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<div class="mainCont devise-new">

<h2>Edit <%= resource_name.to_s.humanize %></h2>

<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
Expand Down Expand Up @@ -32,12 +34,14 @@
</div>

<div class="actions">
<%= f.submit "Update" %>
<%= f.submit "Update", :class => "button", :role => "button" %>
</div>
<% end %>

<h3>Cancel my account</h3>

<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :class => "button", :role => "button", data: { confirm: "Are you sure?" }, method: :delete %></p>

<%= link_to "Back", :back, :class => "button", :role => "button" %>

<%= link_to "Back", :back %>
</div>
6 changes: 5 additions & 1 deletion app/views/devise/unlocks/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<div class="mainCont devise-new">

<h2>Resend unlock instructions</h2>

<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
Expand All @@ -9,8 +11,10 @@
</div>

<div class="actions">
<%= f.submit "Resend unlock instructions" %>
<%= f.submit "Resend unlock instructions", :class => "button", :role => "button" %>
</div>
<% end %>

<%= render "devise/shared/links" %>

</div>
8 changes: 6 additions & 2 deletions app/views/genres/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<h1>Editing Genre</h1>

<div class="mainCont">

<%= render 'form', genre: @genre %>

<%= link_to 'Show', @genre %> |
<%= link_to 'Back', genres_path %>
<%= link_to 'Show', @genre, :class => "button", :role => "button" %>
<%= link_to 'Back', genres_path, :class => "button", :role => "button" %>

</div>
17 changes: 10 additions & 7 deletions app/views/genres/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<p id="notice"><%= notice %></p>

<div class="mainCont consoles">

<h1>Genres</h1>

<table>
<table class="consoles-table">
<thead>
<tr>
<th>Title</th>
Expand All @@ -18,14 +20,15 @@
<td><%= genre.title %></td>
<td><%= genre.description %></td>
<td><%= genre.image %></td>
<td><%= link_to 'Show', genre %></td>
<td><%= link_to 'Edit', edit_genre_path(genre) %></td>
<td><%= link_to 'Destroy', genre, method: :delete, data: { confirm: 'Are you sure?' } %></td>
<td><%= link_to 'Show', genre, :class => "button", :role => "button" %></td>
<td><%= link_to 'Edit', edit_genre_path(genre), :class => "button", :role => "button" %></td>
<td><%= link_to 'Destroy', genre, :class => "button", :role => "button", method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
<tr>
<td><%= link_to 'New Genre', new_genre_path, :class => "button", :role => "button" %></td>
</tr>
</tbody>
</table>

<br>

<%= link_to 'New Genre', new_genre_path %>
</div>
5 changes: 4 additions & 1 deletion app/views/genres/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<h1>New Genre</h1>

<div class="mainCont item-new">
<div class="mainCont">

<%= render 'form', genre: @genre %>

<%= link_to 'Back', genres_path, :class =>"button", :role=>"button" %>

<br>
<br>

</div>
8 changes: 6 additions & 2 deletions app/views/genres/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<p id="notice"><%= notice %></p>

<div class="mainCont">

<p>
<strong>Title:</strong>
<%= @genre.title %>
Expand All @@ -15,5 +17,7 @@
<%= @genre.image %>
</p>

<%= link_to 'Edit', edit_genre_path(@genre) %> |
<%= link_to 'Back', genres_path %>
<%= link_to 'Edit', edit_genre_path(@genre), :class => "button", :role => "button" %>
<%= link_to 'Back', genres_path, :class => "button", :role => "button" %>

</div>
4 changes: 4 additions & 0 deletions app/views/items/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<h1>Editing Item</h1>

<div class="mainCont">

<%= render 'form', item: @item %>

<%= link_to 'Details', @item, :class => "button", :role => "button" %>
<%= link_to 'Back', items_path, :class => "button", :role => "button" %>

</div>
6 changes: 0 additions & 6 deletions app/views/items/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,5 @@
</p>
</div>
<% end %>



<br>



</div>
2 changes: 1 addition & 1 deletion app/views/items/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1>New Item</h1>

<div class="mainCont item-new">
<div class="mainCont">

<%= render 'form', item: @item %>

Expand Down
4 changes: 2 additions & 2 deletions app/views/items/search.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

<p><%= item.description %></p>

<p><%= item.price %></p>
<p><%= item.price %></p>

<p>
<a href = "/cart/<%= item.id %>" class = "button">Add to cart</a>
<%= link_to 'Show', item, :class => "button", :role => "button" %>
<%= link_to 'Details', item, :class => "button", :role => "button" %>

<% if user_signed_in? %>
<%= link_to 'Edit', edit_item_path(item), :class => "button", :role => "button" %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/orders/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
</div>

<div class="actions">
<%= form.submit %>
<%= form.submit :class => "button", :role => "button"%>
</div>
<% end %>
11 changes: 9 additions & 2 deletions app/views/orders/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
<div class="mainCont">

<h1>Editing Order</h1>

<%= render 'form', order: @order %>

<%= link_to 'Show', @order %> |
<%= link_to 'Back', orders_path %>
<%= link_to 'Show', @order, :class => "button", :role => "button" %>
<%= link_to 'Back', orders_path, :class => "button", :role => "button" %>

<br>
<br>

</div>
Loading