diff --git a/app/models/accion.rb b/app/models/accion.rb index 47216b6..6ec1dd7 100644 --- a/app/models/accion.rb +++ b/app/models/accion.rb @@ -1,3 +1,24 @@ +# == Schema Information +# +# Table name: acciones +# +# id :integer not null, primary key +# name :string(255) +# desc :text +# points :integer +# created_at :datetime +# updated_at :datetime +# level :integer default(1) +# canjeable :boolean default(FALSE) +# code :string(255) +# lugar :string(255) +# promotor :string(255) +# recurrente :boolean +# fecha :string(255) +# horario :string(255) +# url :string(255) +# + class Accion< ActiveRecord::Base validates :points, presence: true diff --git a/app/models/badge.rb b/app/models/badge.rb index 625b211..0174487 100644 --- a/app/models/badge.rb +++ b/app/models/badge.rb @@ -1,3 +1,15 @@ +# == Schema Information +# +# Table name: badges +# +# id :integer not null, primary key +# name :string(255) +# desc :text +# points :integer +# created_at :datetime +# updated_at :datetime +# + class Badge < ActiveRecord::Base has_many :badge_relationships, foreign_key: "badge_id", dependent: :destroy diff --git a/app/models/badge_relationship.rb b/app/models/badge_relationship.rb index 1b04130..63a6a56 100644 --- a/app/models/badge_relationship.rb +++ b/app/models/badge_relationship.rb @@ -1,3 +1,14 @@ +# == Schema Information +# +# Table name: badge_relationships +# +# id :integer not null, primary key +# user_id :integer +# badge_id :integer +# created_at :datetime +# updated_at :datetime +# + class BadgeRelationship < ActiveRecord::Base belongs_to :badge belongs_to :user diff --git a/app/models/friend_relationship.rb b/app/models/friend_relationship.rb index 1280968..c624c7d 100644 --- a/app/models/friend_relationship.rb +++ b/app/models/friend_relationship.rb @@ -1,3 +1,14 @@ +# == Schema Information +# +# Table name: friend_relationships +# +# id :integer not null, primary key +# follower_id :integer +# followed_id :integer +# created_at :datetime +# updated_at :datetime +# + class FriendRelationship < ActiveRecord::Base belongs_to :follower, class_name: "User" diff --git a/app/models/relationship.rb b/app/models/relationship.rb index c52ab13..09708b1 100644 --- a/app/models/relationship.rb +++ b/app/models/relationship.rb @@ -1,3 +1,15 @@ +# == Schema Information +# +# Table name: relationships +# +# id :integer not null, primary key +# user_id :integer +# accion_id :integer +# created_at :datetime +# updated_at :datetime +# completed :boolean default(FALSE) +# + class Relationship < ActiveRecord::Base belongs_to :user, class_name: "User" belongs_to :accion, class_name: "Accion" diff --git a/app/models/user.rb b/app/models/user.rb index 31be79c..3f9b300 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,3 +1,32 @@ +# == Schema Information +# +# Table name: users +# +# id :integer not null, primary key +# email :string(255) default(""), not null +# encrypted_password :string(255) default(""), not null +# reset_password_token :string(255) +# reset_password_sent_at :datetime +# remember_created_at :datetime +# sign_in_count :integer default(0), not null +# current_sign_in_at :datetime +# last_sign_in_at :datetime +# current_sign_in_ip :string(255) +# last_sign_in_ip :string(255) +# created_at :datetime +# updated_at :datetime +# first_name :string(255) +# last_name :string(255) +# points :integer default(0) +# level :integer default(1) +# provider :string(255) +# uid :string(255) +# access_token_fb :string(255) +# access_token_tw :string(255) +# access_token_gp :string(255) +# admin :boolean default(FALSE) +# + class User < ActiveRecord::Base # Include default devise modules. Others available are: diff --git a/app/views/shared/_action_show.html.haml b/app/views/shared/_action_show.html.haml index 1e1ce42..9eb7178 100644 --- a/app/views/shared/_action_show.html.haml +++ b/app/views/shared/_action_show.html.haml @@ -16,9 +16,12 @@ %p = accion.desc .portlet-footer - Esta acción vale: - = accion.points - puntos // - Promotor: - =accion.promotor + .bottom-container + .participa-container + %a.btn.btn-xs.btn-purple{href: accion_path(accion)} + Participa + .puntos-container + =accion.points + puntos + diff --git a/spec/models/accion_spec.rb b/spec/models/accion_spec.rb index 4f263ae..7e739c3 100644 --- a/spec/models/accion_spec.rb +++ b/spec/models/accion_spec.rb @@ -1,3 +1,24 @@ +# == Schema Information +# +# Table name: acciones +# +# id :integer not null, primary key +# name :string(255) +# desc :text +# points :integer +# created_at :datetime +# updated_at :datetime +# level :integer default(1) +# canjeable :boolean default(FALSE) +# code :string(255) +# lugar :string(255) +# promotor :string(255) +# recurrente :boolean +# fecha :string(255) +# horario :string(255) +# url :string(255) +# + require 'spec_helper' describe Accion do diff --git a/spec/models/badge_relationship_spec.rb b/spec/models/badge_relationship_spec.rb index b183654..25eb6f9 100644 --- a/spec/models/badge_relationship_spec.rb +++ b/spec/models/badge_relationship_spec.rb @@ -1,3 +1,14 @@ +# == Schema Information +# +# Table name: badge_relationships +# +# id :integer not null, primary key +# user_id :integer +# badge_id :integer +# created_at :datetime +# updated_at :datetime +# + require 'spec_helper' describe BadgeRelationship do diff --git a/spec/models/badge_spec.rb b/spec/models/badge_spec.rb index 644b662..5bfce29 100644 --- a/spec/models/badge_spec.rb +++ b/spec/models/badge_spec.rb @@ -1,3 +1,15 @@ +# == Schema Information +# +# Table name: badges +# +# id :integer not null, primary key +# name :string(255) +# desc :text +# points :integer +# created_at :datetime +# updated_at :datetime +# + require 'spec_helper' describe Badge do diff --git a/spec/models/friend_relationship_spec.rb b/spec/models/friend_relationship_spec.rb index 9af0253..b8a989a 100644 --- a/spec/models/friend_relationship_spec.rb +++ b/spec/models/friend_relationship_spec.rb @@ -1,3 +1,14 @@ +# == Schema Information +# +# Table name: friend_relationships +# +# id :integer not null, primary key +# follower_id :integer +# followed_id :integer +# created_at :datetime +# updated_at :datetime +# + require 'spec_helper' describe FriendRelationship do diff --git a/spec/models/relationship_spec.rb b/spec/models/relationship_spec.rb index aed9d86..b9ffa5c 100644 --- a/spec/models/relationship_spec.rb +++ b/spec/models/relationship_spec.rb @@ -1,3 +1,15 @@ +# == Schema Information +# +# Table name: relationships +# +# id :integer not null, primary key +# user_id :integer +# accion_id :integer +# created_at :datetime +# updated_at :datetime +# completed :boolean default(FALSE) +# + require 'spec_helper' describe Relationship do diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 5f4d904..a4f7803 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -1,3 +1,32 @@ +# == Schema Information +# +# Table name: users +# +# id :integer not null, primary key +# email :string(255) default(""), not null +# encrypted_password :string(255) default(""), not null +# reset_password_token :string(255) +# reset_password_sent_at :datetime +# remember_created_at :datetime +# sign_in_count :integer default(0), not null +# current_sign_in_at :datetime +# last_sign_in_at :datetime +# current_sign_in_ip :string(255) +# last_sign_in_ip :string(255) +# created_at :datetime +# updated_at :datetime +# first_name :string(255) +# last_name :string(255) +# points :integer default(0) +# level :integer default(1) +# provider :string(255) +# uid :string(255) +# access_token_fb :string(255) +# access_token_tw :string(255) +# access_token_gp :string(255) +# admin :boolean default(FALSE) +# + require 'spec_helper' describe User do diff --git a/vendor/assets/stylesheets/dashboard.css b/vendor/assets/stylesheets/dashboard.css index 74fab1a..f3d9642 100644 --- a/vendor/assets/stylesheets/dashboard.css +++ b/vendor/assets/stylesheets/dashboard.css @@ -163,7 +163,7 @@ a:focus { margin: 50px 0 0 225px; padding: 0 30px; /* min-height: 1300px; */ - border-left: 1px solid #2c3e50; + border-left: 1px solid #ffffff ; } #page-wrapper.collapsed { @@ -200,7 +200,7 @@ a:focus { .navbar-top { margin-left: 0; - background-color: #2c3e50; + background-color: #ffffff ; } .navbar-top .navbar-brand a { @@ -406,7 +406,7 @@ a:focus { text-align: center; font-size: 11px; line-height: 20px; - background-color: #2c3e50; + background-color: #ffffff ; } @media(min-width:768px) { @@ -612,7 +612,7 @@ a:focus { } .navbar-side .side-nav > li > a.active { - background-color: #2c3e50; + background-color: #ffffff ; } .navbar-side .side-nav li.panel ul li a.active { @@ -885,6 +885,14 @@ a:focus { } } +.participa-container { + float: left; +} + +.puntos-container { + margin-left: 60%; +} + /* Flex Tile Styles 8888888 8888888888 8 8888 8 8888 8 8888888888 d888888o. @@ -1258,7 +1266,7 @@ fieldset[disabled] .btn-purple.active { .btn-dark-blue.active, .open .dropdown-toggle.btn-default, .open .dropdown-toggle.btn-dark-blue { - border-color: #2c3e50; + border-color: #ffffff ; color: #fff; background-color: #2f4254; }