Stijltjes op producten en al een beetje op profiles

This commit is contained in:
Caroline De Brouwer 2015-02-12 16:14:11 +01:00
parent f745de8153
commit 52b397e250
10 changed files with 80 additions and 25 deletions

18
.project Normal file
View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Tab</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.aptana.ide.core.unifiedBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.radrails.rails.core.railsnature</nature>
<nature>com.aptana.ruby.core.rubynature</nature>
</natures>
</projectDescription>

View file

@ -65,3 +65,6 @@ gem 'faker', '1.4.2'
# Safety first
gem 'paper_trail', '~> 4.0.0.beta'
# Windoos sux
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]

View file

@ -41,6 +41,7 @@ GEM
rake (>= 0.8.7)
arel (6.0.0)
bcrypt (3.1.10)
bcrypt (3.1.10-x64-mingw32)
bootstrap-sass (3.2.0.0)
sass (~> 3.2)
bootstrap-will_paginate (0.0.10)
@ -117,6 +118,8 @@ GEM
net-ssh (2.9.2)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
nokogiri (1.6.6.2-x64-mingw32)
mini_portile (~> 0.6.0)
orm_adapter (0.5.0)
paper_trail (4.0.0.beta2)
activerecord (>= 3.0, < 6.0)
@ -179,6 +182,7 @@ GEM
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.10)
sqlite3 (1.3.10-x64-mingw32)
sshkit (1.6.1)
colorize (>= 0.7.0)
net-scp (>= 1.1.2)
@ -190,6 +194,8 @@ GEM
coffee-rails
tzinfo (1.2.2)
thread_safe (~> 0.1)
tzinfo-data (1.2015.1)
tzinfo (>= 1.0.0)
uglifier (2.7.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
@ -199,6 +205,7 @@ GEM
PLATFORMS
ruby
x64-mingw32
DEPENDENCIES
annotate
@ -223,5 +230,6 @@ DEPENDENCIES
spring
sqlite3
turbolinks
tzinfo-data
uglifier (>= 1.3.0)
will_paginate (= 3.0.7)

View file

@ -5,3 +5,20 @@
.orders .thumbnail {
min-height: 200px;
}
.pic img {
padding-top: 10px;
}
.caption{
text-align: center;
}
.caption h3 {
margin: 8px 0;
}
.caption h6 {
margin-bottom: 20px;
}

View file

@ -0,0 +1,9 @@
/* User profile */
.user_info h2 {
display: inline;
}
.user_info h5 {
display: inline;
padding-left: 10px;
}

View file

@ -73,4 +73,4 @@ aside {
margin-top: 0px;
}
}
}
}

View file

@ -1,2 +1,2 @@
<%= order.created_at %>
<%= order.created_at.strftime("%d %b %Y at %H:%M") %>
<%= simple_format(order.to_sentence) %>

View file

@ -1,8 +1,10 @@
<div class="col-md-3">
<div class="thumbnail">
<div class="thumbnail pic">
<%= image_tag product.avatar %>
<div class="caption">
<h3><%= product.name %> - <%= euro(product.price) %> (<%= product.stock %>)</h3>
<h4><%= product.name %></h4>
<h3><%= euro(product.price) %></h3>
<h6>(In stock: <%= product.stock %>)</h6>
<% if current_user && current_user.admin? %>
<p>
<%= link_to "Edit", edit_product_path(product), class: "btn btn-default" %>

View file

@ -1,10 +1,8 @@
<%= render partial: 'flash' %>
<div class="row">
<div class="user_info">
<h2>
<%= @user.full_name %> - <%= @user.nickname %>
<%= link_to "edit" , edit_user_registration_path %>
</h2>
<h2><%= @user.nickname %> (<%= @user.full_name %>)</h2>
<h5><%= link_to "[Edit profile]" , edit_user_registration_path %></h5>
<h4>Balance: <%= euro(@user.balance) %></h4>
</div>

View file

@ -13,13 +13,13 @@
ActiveRecord::Schema.define(version: 20150210062809) do
create_table "order_items", force: true do |t|
create_table "order_items", force: :cascade do |t|
t.integer "order_id"
t.integer "product_id", null: false
t.integer "count", default: 0
end
create_table "orders", force: true do |t|
create_table "orders", force: :cascade do |t|
t.integer "user_id"
t.integer "cost"
t.datetime "created_at", null: false
@ -29,32 +29,24 @@ ActiveRecord::Schema.define(version: 20150210062809) do
add_index "orders", ["user_id", "created_at"], name: "index_orders_on_user_id_and_created_at"
add_index "orders", ["user_id"], name: "index_orders_on_user_id"
create_table "products", force: true do |t|
create_table "products", force: :cascade do |t|
t.string "name", null: false
t.integer "price_cents", default: 0, null: false
t.integer "category", default: 0
t.integer "stock", default: 0, null: false
t.datetime "created_at"
t.datetime "updated_at"
t.string "avatar_file_name"
t.string "avatar_content_type"
t.integer "avatar_file_size"
t.datetime "avatar_updated_at"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "category", default: 0
t.integer "stock", default: 0, null: false
end
create_table "users", force: true do |t|
create_table "users", force: :cascade do |t|
t.string "name"
t.string "last_name"
t.integer "balance_cents", default: 0, null: false
t.string "nickname"
t.boolean "admin"
t.boolean "koelkast", default: false
t.integer "dagschotel_id"
t.integer "orders_count", default: 0
t.string "avatar_file_name"
t.string "avatar_content_type"
t.integer "avatar_file_size"
t.datetime "avatar_updated_at"
t.datetime "created_at"
t.datetime "updated_at"
t.string "encrypted_password", default: "", null: false
@ -64,12 +56,20 @@ ActiveRecord::Schema.define(version: 20150210062809) do
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.boolean "admin"
t.integer "dagschotel_id"
t.string "avatar_file_name"
t.string "avatar_content_type"
t.integer "avatar_file_size"
t.datetime "avatar_updated_at"
t.integer "orders_count", default: 0
t.boolean "koelkast", default: false
end
add_index "users", ["koelkast"], name: "index_users_on_koelkast"
add_index "users", ["orders_count"], name: "index_users_on_orders_count"
create_table "versions", force: true do |t|
create_table "versions", force: :cascade do |t|
t.string "item_type", null: false
t.integer "item_id", null: false
t.string "event", null: false