Merge pull request #20 from ZeusWPI/stylez
Stijltjes op producten en al een beetje op profiles
This commit is contained in:
commit
c99c6c0afa
10 changed files with 64 additions and 25 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -18,3 +18,5 @@
|
||||||
# Avatars of producst
|
# Avatars of producst
|
||||||
public/system/products
|
public/system/products
|
||||||
public/system/users
|
public/system/users
|
||||||
|
|
||||||
|
.project
|
3
Gemfile
3
Gemfile
|
@ -65,3 +65,6 @@ gem 'faker', '1.4.2'
|
||||||
|
|
||||||
# Safety first
|
# Safety first
|
||||||
gem 'paper_trail', '~> 4.0.0.beta'
|
gem 'paper_trail', '~> 4.0.0.beta'
|
||||||
|
|
||||||
|
# Windoos sux
|
||||||
|
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
|
|
@ -41,6 +41,7 @@ GEM
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
arel (6.0.0)
|
arel (6.0.0)
|
||||||
bcrypt (3.1.10)
|
bcrypt (3.1.10)
|
||||||
|
bcrypt (3.1.10-x64-mingw32)
|
||||||
bootstrap-sass (3.2.0.0)
|
bootstrap-sass (3.2.0.0)
|
||||||
sass (~> 3.2)
|
sass (~> 3.2)
|
||||||
bootstrap-will_paginate (0.0.10)
|
bootstrap-will_paginate (0.0.10)
|
||||||
|
@ -117,6 +118,8 @@ GEM
|
||||||
net-ssh (2.9.2)
|
net-ssh (2.9.2)
|
||||||
nokogiri (1.6.6.2)
|
nokogiri (1.6.6.2)
|
||||||
mini_portile (~> 0.6.0)
|
mini_portile (~> 0.6.0)
|
||||||
|
nokogiri (1.6.6.2-x64-mingw32)
|
||||||
|
mini_portile (~> 0.6.0)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
paper_trail (4.0.0.beta2)
|
paper_trail (4.0.0.beta2)
|
||||||
activerecord (>= 3.0, < 6.0)
|
activerecord (>= 3.0, < 6.0)
|
||||||
|
@ -179,6 +182,7 @@ GEM
|
||||||
activesupport (>= 3.0)
|
activesupport (>= 3.0)
|
||||||
sprockets (>= 2.8, < 4.0)
|
sprockets (>= 2.8, < 4.0)
|
||||||
sqlite3 (1.3.10)
|
sqlite3 (1.3.10)
|
||||||
|
sqlite3 (1.3.10-x64-mingw32)
|
||||||
sshkit (1.6.1)
|
sshkit (1.6.1)
|
||||||
colorize (>= 0.7.0)
|
colorize (>= 0.7.0)
|
||||||
net-scp (>= 1.1.2)
|
net-scp (>= 1.1.2)
|
||||||
|
@ -190,6 +194,8 @@ GEM
|
||||||
coffee-rails
|
coffee-rails
|
||||||
tzinfo (1.2.2)
|
tzinfo (1.2.2)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
|
tzinfo-data (1.2015.1)
|
||||||
|
tzinfo (>= 1.0.0)
|
||||||
uglifier (2.7.0)
|
uglifier (2.7.0)
|
||||||
execjs (>= 0.3.0)
|
execjs (>= 0.3.0)
|
||||||
json (>= 1.8.0)
|
json (>= 1.8.0)
|
||||||
|
@ -199,6 +205,7 @@ GEM
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
x64-mingw32
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
annotate
|
annotate
|
||||||
|
@ -223,5 +230,6 @@ DEPENDENCIES
|
||||||
spring
|
spring
|
||||||
sqlite3
|
sqlite3
|
||||||
turbolinks
|
turbolinks
|
||||||
|
tzinfo-data
|
||||||
uglifier (>= 1.3.0)
|
uglifier (>= 1.3.0)
|
||||||
will_paginate (= 3.0.7)
|
will_paginate (= 3.0.7)
|
||||||
|
|
|
@ -5,3 +5,20 @@
|
||||||
.orders .thumbnail {
|
.orders .thumbnail {
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pic img {
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.caption{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.caption h3 {
|
||||||
|
margin: 8px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.caption h6 {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
9
app/assets/stylesheets/profile.css.scss
Normal file
9
app/assets/stylesheets/profile.css.scss
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
/* User profile */
|
||||||
|
|
||||||
|
.user_info h2 {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
.user_info h5 {
|
||||||
|
display: inline;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
|
@ -1,2 +1,2 @@
|
||||||
<%= order.created_at %>
|
<%= order.created_at.strftime("%d %b %Y at %H:%M") %>
|
||||||
<%= simple_format(order.to_sentence) %>
|
<%= simple_format(order.to_sentence) %>
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="thumbnail">
|
<div class="thumbnail pic">
|
||||||
<%= image_tag product.avatar %>
|
<%= image_tag product.avatar %>
|
||||||
<div class="caption">
|
<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? %>
|
<% if current_user && current_user.admin? %>
|
||||||
<p>
|
<p>
|
||||||
<%= link_to "Edit", edit_product_path(product), class: "btn btn-default" %>
|
<%= link_to "Edit", edit_product_path(product), class: "btn btn-default" %>
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
<%= render partial: 'flash' %>
|
<%= render partial: 'flash' %>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="user_info">
|
<div class="user_info">
|
||||||
<h2>
|
<h2><%= @user.nickname %> (<%= @user.full_name %>)</h2>
|
||||||
<%= @user.full_name %> - <%= @user.nickname %>
|
<h5><%= link_to "[Edit profile]" , edit_user_registration_path if current_user == @user%></h5>
|
||||||
<%= link_to "edit", edit_user_registration_path if current_user == @user %>
|
|
||||||
</h2>
|
|
||||||
<h4>Balance: <%= euro(@user.balance) %></h4>
|
<h4>Balance: <%= euro(@user.balance) %></h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
34
db/schema.rb
34
db/schema.rb
|
@ -13,13 +13,13 @@
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20150210062809) do
|
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 "order_id"
|
||||||
t.integer "product_id", null: false
|
t.integer "product_id", null: false
|
||||||
t.integer "count", default: 0
|
t.integer "count", default: 0
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "orders", force: true do |t|
|
create_table "orders", force: :cascade do |t|
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.integer "cost"
|
t.integer "cost"
|
||||||
t.datetime "created_at", null: false
|
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", "created_at"], name: "index_orders_on_user_id_and_created_at"
|
||||||
add_index "orders", ["user_id"], name: "index_orders_on_user_id"
|
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.string "name", null: false
|
||||||
t.integer "price_cents", default: 0, null: false
|
t.integer "price_cents", default: 0, null: false
|
||||||
t.integer "category", default: 0
|
t.datetime "created_at"
|
||||||
t.integer "stock", default: 0, null: false
|
t.datetime "updated_at"
|
||||||
t.string "avatar_file_name"
|
t.string "avatar_file_name"
|
||||||
t.string "avatar_content_type"
|
t.string "avatar_content_type"
|
||||||
t.integer "avatar_file_size"
|
t.integer "avatar_file_size"
|
||||||
t.datetime "avatar_updated_at"
|
t.datetime "avatar_updated_at"
|
||||||
t.datetime "created_at"
|
t.integer "category", default: 0
|
||||||
t.datetime "updated_at"
|
t.integer "stock", default: 0, null: false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "users", force: true do |t|
|
create_table "users", force: :cascade do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.string "last_name"
|
t.string "last_name"
|
||||||
t.integer "balance_cents", default: 0, null: false
|
t.integer "balance_cents", default: 0, null: false
|
||||||
t.string "nickname"
|
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 "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
t.string "encrypted_password", default: "", null: false
|
t.string "encrypted_password", default: "", null: false
|
||||||
|
@ -64,12 +56,20 @@ ActiveRecord::Schema.define(version: 20150210062809) do
|
||||||
t.datetime "last_sign_in_at"
|
t.datetime "last_sign_in_at"
|
||||||
t.string "current_sign_in_ip"
|
t.string "current_sign_in_ip"
|
||||||
t.string "last_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
|
end
|
||||||
|
|
||||||
add_index "users", ["koelkast"], name: "index_users_on_koelkast"
|
add_index "users", ["koelkast"], name: "index_users_on_koelkast"
|
||||||
add_index "users", ["orders_count"], name: "index_users_on_orders_count"
|
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.string "item_type", null: false
|
||||||
t.integer "item_id", null: false
|
t.integer "item_id", null: false
|
||||||
t.string "event", null: false
|
t.string "event", null: false
|
||||||
|
|
Loading…
Reference in a new issue