mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
[feature] allow user to add links to his socials networks
This commit is contained in:
parent
a5dd2153d6
commit
7ec5e5ba03
16
Gemfile.lock
16
Gemfile.lock
@ -155,8 +155,8 @@ GEM
|
||||
ffi (1.9.8)
|
||||
figaro (1.1.0)
|
||||
thor (~> 0.14)
|
||||
font-awesome-rails (4.3.0.0)
|
||||
railties (>= 3.2, < 5.0)
|
||||
font-awesome-rails (4.6.3.0)
|
||||
railties (>= 3.2, < 5.1)
|
||||
foreman (0.78.0)
|
||||
thor (~> 0.19.1)
|
||||
forgery (0.6.0)
|
||||
@ -207,8 +207,8 @@ GEM
|
||||
twitter_cldr (~> 3.1)
|
||||
mime-types (2.99)
|
||||
mini_magick (4.2.0)
|
||||
mini_portile (0.6.2)
|
||||
minitest (5.8.3)
|
||||
mini_portile2 (2.0.0)
|
||||
minitest (5.8.4)
|
||||
minitest-reporters (1.1.8)
|
||||
ansi
|
||||
builder
|
||||
@ -226,8 +226,8 @@ GEM
|
||||
net-ssh-gateway (1.2.0)
|
||||
net-ssh (>= 2.6.5)
|
||||
netrc (0.10.3)
|
||||
nokogiri (1.6.6.4)
|
||||
mini_portile (~> 0.6.0)
|
||||
nokogiri (1.6.7.2)
|
||||
mini_portile2 (~> 2.0.0.rc2)
|
||||
notify_with (0.0.2)
|
||||
jbuilder (~> 2.0)
|
||||
rails (>= 4.2.0)
|
||||
@ -283,7 +283,7 @@ GEM
|
||||
activesupport (>= 4.2.0.beta, < 5.0)
|
||||
nokogiri (~> 1.6.0)
|
||||
rails-deprecated_sanitizer (>= 1.0.1)
|
||||
rails-html-sanitizer (1.0.2)
|
||||
rails-html-sanitizer (1.0.3)
|
||||
loofah (~> 2.0)
|
||||
rails-observers (0.1.2)
|
||||
activemodel (~> 4.0)
|
||||
@ -298,7 +298,7 @@ GEM
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.18.1, < 2.0)
|
||||
raindrops (0.13.0)
|
||||
rake (10.4.2)
|
||||
rake (11.1.2)
|
||||
rb-fsevent (0.9.4)
|
||||
rb-inotify (0.9.5)
|
||||
ffi (>= 0.5.0)
|
||||
|
BIN
app/assets/images/social/dailymotion.png
Normal file
BIN
app/assets/images/social/dailymotion.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1015 B |
BIN
app/assets/images/social/echosciences.png
Normal file
BIN
app/assets/images/social/echosciences.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 513 B |
@ -474,4 +474,19 @@ body.container{
|
||||
z-index: 1001;
|
||||
width: 33%;
|
||||
left: 33%;
|
||||
}
|
||||
|
||||
.social-icons {
|
||||
& > div {
|
||||
cursor: pointer;
|
||||
padding: 0.2em;
|
||||
width: 3em;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
|
||||
&:hover {
|
||||
background-color: $yellow;
|
||||
}
|
||||
}
|
||||
}
|
@ -286,6 +286,16 @@ p, .widget p {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
.fa-img {
|
||||
display: inline-block;
|
||||
height: 0.9em;
|
||||
width: auto;
|
||||
vertical-align: sub;
|
||||
}
|
||||
.contrast-250 {
|
||||
-webkit-filter: contrast(250%);
|
||||
filter: contrast(250%);
|
||||
}
|
||||
.clear{display:block;overflow: hidden;}
|
||||
|
||||
.scroll-x, .scroll-y{overflow:hidden;-webkit-overflow-scrolling:touch;}
|
||||
|
@ -236,6 +236,177 @@
|
||||
ng-disabled="preventField['profile.software_mastered'] && user.profile.software_mastered && !userForm['user[profile_attributes][software_mastered]'].$dirty"></textarea>
|
||||
</div>
|
||||
|
||||
<div id="social" ng-init="social={}">
|
||||
<div class="form-group" ng-show="social.facebook || user.profile.facebook" ng-class="{'has-error': userForm['user[profile_attributes][facebook]'].$dirty && userForm['user[profile_attributes][facebook]'].$invalid}">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-facebook"></i></span>
|
||||
<input type="text"
|
||||
name="user[profile_attributes][facebook]"
|
||||
ng-model="user.profile.facebook"
|
||||
class="form-control"
|
||||
id="user_facebook"
|
||||
placeholder="{{ 'facebook' | translate }}"
|
||||
ng-disabled="preventField['profile.facebook'] && user.profile.first_name && !userForm['user[profile_attributes][facebook]'].$dirty"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="social.twitter || user.profile.twitter" ng-class="{'has-error': userForm['user[profile_attributes][twitter]'].$dirty && userForm['user[profile_attributes][twitter]'].$invalid}">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-twitter"></i></span>
|
||||
<input type="text"
|
||||
name="user[profile_attributes][twitter]"
|
||||
ng-model="user.profile.twitter"
|
||||
class="form-control"
|
||||
id="user_twitter"
|
||||
placeholder="{{ 'twitter' | translate }}"
|
||||
ng-disabled="preventField['profile.twitter'] && user.profile.first_name && !userForm['user[profile_attributes][twitter]'].$dirty"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="social.google_plus || user.profile.google_plus" ng-class="{'has-error': userForm['user[profile_attributes][google_plus]'].$dirty && userForm['user[profile_attributes][google_plus]'].$invalid}">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-google-plus"></i></span>
|
||||
<input type="text"
|
||||
name="user[profile_attributes][google_plus]"
|
||||
ng-model="user.profile.google_plus"
|
||||
class="form-control"
|
||||
id="user_google_plus"
|
||||
placeholder="{{ 'google_plus' | translate }}"
|
||||
ng-disabled="preventField['profile.google_plus'] && user.profile.first_name && !userForm['user[profile_attributes][google_plus]'].$dirty"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="social.viadeo || user.profile.viadeo" ng-class="{'has-error': userForm['user[profile_attributes][viadeo]'].$dirty && userForm['user[profile_attributes][viadeo]'].$invalid}">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-viadeo"></i></span>
|
||||
<input type="text"
|
||||
name="user[profile_attributes][viadeo]"
|
||||
ng-model="user.profile.viadeo"
|
||||
class="form-control"
|
||||
id="user_viadeo"
|
||||
placeholder="{{ 'viadeo' | translate }}"
|
||||
ng-disabled="preventField['profile.viadeo'] && user.profile.first_name && !userForm['user[profile_attributes][viadeo]'].$dirty"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="social.linkedin || user.profile.linkedin" ng-class="{'has-error': userForm['user[profile_attributes][linkedin]'].$dirty && userForm['user[profile_attributes][linkedin]'].$invalid}">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-linkedin"></i></span>
|
||||
<input type="text"
|
||||
name="user[profile_attributes][linkedin]"
|
||||
ng-model="user.profile.linkedin"
|
||||
class="form-control"
|
||||
id="user_linkedin"
|
||||
placeholder="{{ 'linkedin' | translate }}"
|
||||
ng-disabled="preventField['profile.linkedin'] && user.profile.first_name && !userForm['user[profile_attributes][linkedin]'].$dirty"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="social.instagram || user.profile.instragram" ng-class="{'has-error': userForm['user[profile_attributes][instagram]'].$dirty && userForm['user[profile_attributes][instagram]'].$invalid}">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-instagram"></i></span>
|
||||
<input type="text"
|
||||
name="user[profile_attributes][instagram]"
|
||||
ng-model="user.profile.instagram"
|
||||
class="form-control"
|
||||
id="user_instagram"
|
||||
placeholder="{{ 'instagram' | translate }}"
|
||||
ng-disabled="preventField['profile.instagram'] && user.profile.first_name && !userForm['user[profile_attributes][instagram]'].$dirty"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="social.youtube || user.profile.youtube" ng-class="{'has-error': userForm['user[profile_attributes][youtube]'].$dirty && userForm['user[profile_attributes][youtube]'].$invalid}">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-youtube"></i></span>
|
||||
<input type="text"
|
||||
name="user[profile_attributes][youtube]"
|
||||
ng-model="user.profile.youtube"
|
||||
class="form-control"
|
||||
id="user_youtube"
|
||||
placeholder="{{ 'youtube' | translate }}"
|
||||
ng-disabled="preventField['profile.youtube'] && user.profile.first_name && !userForm['user[profile_attributes][youtube]'].$dirty"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="social.vimeo || user.profile.vimeo" ng-class="{'has-error': userForm['user[profile_attributes][vimeo]'].$dirty && userForm['user[profile_attributes][vimeo]'].$invalid}">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-vimeo"></i></span>
|
||||
<input type="text"
|
||||
name="user[profile_attributes][vimeo]"
|
||||
ng-model="user.profile.vimeo"
|
||||
class="form-control"
|
||||
id="user_vimeo"
|
||||
placeholder="{{ 'vimeo' | translate }}"
|
||||
ng-disabled="preventField['profile.vimeo'] && user.profile.first_name && !userForm['user[profile_attributes][vimeo]'].$dirty"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="social.dailymotion || user.profile.dailymotion" ng-class="{'has-error': userForm['user[profile_attributes][dailymotion]'].$dirty && userForm['user[profile_attributes][dailymotion]'].$invalid}">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><img src="<%= asset_path('social/dailymotion.png') %>" alt="d" class="fa-img"/></span>
|
||||
<input type="text"
|
||||
name="user[profile_attributes][dailymotion]"
|
||||
ng-model="user.profile.dailymotion"
|
||||
class="form-control"
|
||||
id="user_dailymotion"
|
||||
placeholder="{{ 'dailymotion' | translate }}"
|
||||
ng-disabled="preventField['profile.dailymotion'] && user.profile.first_name && !userForm['user[profile_attributes][dailymotion]'].$dirty"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" ng-show="social.github || user.profile.github" ng-class="{'has-error': userForm['user[profile_attributes][github]'].$dirty && userForm['user[profile_attributes][github]'].$invalid}">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-github"></i></span>
|
||||
<input type="text"
|
||||
name="user[profile_attributes][github]"
|
||||
ng-model="user.profile.github"
|
||||
class="form-control"
|
||||
id="user_github"
|
||||
placeholder="{{ 'github' | translate }}"
|
||||
ng-disabled="preventField['profile.github'] && user.profile.first_name && !userForm['user[profile_attributes][github]'].$dirty"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="social.echosciences || user.profile.echosciences" ng-class="{'has-error': userForm['user[profile_attributes][echosciences]'].$dirty && userForm['user[profile_attributes][echosciences]'].$invalid}">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><img src="<%= asset_path('social/echosciences.png') %>" alt="d" class="fa-img"/></span>
|
||||
<input type="text"
|
||||
name="user[profile_attributes][echosciences]"
|
||||
ng-model="user.profile.echosciences"
|
||||
class="form-control"
|
||||
id="user_echosciences"
|
||||
placeholder="{{ 'echosciences' | translate }}"
|
||||
ng-disabled="preventField['profile.echosciences'] && user.profile.first_name && !userForm['user[profile_attributes][echosciences]'].$dirty"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="social-icons m-b">
|
||||
<div ng-click="social.facebook = !social.facebook"><i class="fa fa-facebook fa-2x"></i></div>
|
||||
<div ng-click="social.twitter = !social.twitter"><i class="fa fa-twitter fa-2x"></i></div>
|
||||
<div ng-click="social.google_plus = !social.google_plus"><i class="fa fa-google-plus fa-2x"></i></div>
|
||||
<div ng-click="social.viadeo = !social.viadeo"><i class="fa fa-viadeo fa-2x"></i></div>
|
||||
<div ng-click="social.linkedin = !social.linkedin"><i class="fa fa-linkedin fa-2x"></i></div>
|
||||
<div ng-click="social.instagram = !social.instagram"><i class="fa fa-instagram fa-2x"></i></div>
|
||||
<div ng-click="social.youtube = !social.youtube"><i class="fa fa-youtube fa-2x"></i></div>
|
||||
<div ng-click="social.vimeo = !social.vimeo"><i class="fa fa-vimeo fa-2x"></i></div>
|
||||
<div ng-click="social.dailymotion = !social.dailymotion"><img src="<%= asset_path('social/dailymotion.png') %>" alt="d" class="fa-img contrast-250 fa-2x"/></div>
|
||||
<div ng-click="social.github = !social.github"><i class="fa fa-github fa-2x"></i></div>
|
||||
<div ng-click="social.echosciences = !social.echosciences"><img src="<%= asset_path('social/echosciences.png') %>" alt="d" class="fa-img contrast-250 fa-2x"/></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -140,12 +140,14 @@ class API::MembersController < API::ApiController
|
||||
if current_user.id == params[:id].to_i
|
||||
params.require(:user).permit(:username, :email, :password, :password_confirmation, :group_id, :is_allow_contact,
|
||||
profile_attributes: [:id, :first_name, :last_name, :gender, :birthday, :phone, :interest, :software_mastered,
|
||||
:facebook, :twitter, :google_plus, :viadeo, :linkedin, :instagram, :youtube, :vimeo, :dailymotion, :github, :echosciences,
|
||||
:user_avatar_attributes => [:id, :attachment, :_destroy], :address_attributes => [:id, :address]])
|
||||
|
||||
elsif current_user.is_admin?
|
||||
params.require(:user).permit(:username, :email, :password, :password_confirmation, :invoicing_disabled,
|
||||
:group_id, training_ids: [], tag_ids: [],
|
||||
profile_attributes: [:id, :first_name, :last_name, :gender, :birthday, :phone, :interest, :software_mastered,
|
||||
:facebook, :twitter, :google_plus, :viadeo, :linkedin, :instagram, :youtube, :vimeo, :dailymotion, :github, :echosciences,
|
||||
user_avatar_attributes: [:id, :attachment, :_destroy], address_attributes: [:id, :address]])
|
||||
|
||||
end
|
||||
|
@ -19,6 +19,7 @@ json.profile do
|
||||
json.address @member.profile.address.address
|
||||
end if @member.profile.address
|
||||
json.phone @member.profile.phone
|
||||
json.extract! @member.profile, :facebook, :twitter, :google_plus, :viadeo, :linkedin, :instagram, :youtube, :vimeo, :dailymotion, :github, :echosciences
|
||||
end
|
||||
json.subscribed_plan do
|
||||
json.partial! 'api/shared/plan', plan: @member.subscribed_plan
|
||||
|
15
db/migrate/20160516090121_add_social_fields_to_profile.rb
Normal file
15
db/migrate/20160516090121_add_social_fields_to_profile.rb
Normal file
@ -0,0 +1,15 @@
|
||||
class AddSocialFieldsToProfile < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :profiles, :facebook, :string
|
||||
add_column :profiles, :twitter, :string
|
||||
add_column :profiles, :google_plus, :string
|
||||
add_column :profiles, :viadeo, :string
|
||||
add_column :profiles, :linkedin, :string
|
||||
add_column :profiles, :instagram, :string
|
||||
add_column :profiles, :youtube, :string
|
||||
add_column :profiles, :vimeo, :string
|
||||
add_column :profiles, :dailymotion, :string
|
||||
add_column :profiles, :github, :string
|
||||
add_column :profiles, :echosciences, :string
|
||||
end
|
||||
end
|
191
db/schema.rb
191
db/schema.rb
@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
ActiveRecord::Schema.define(version: 20160516090121) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@ -30,23 +30,23 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
add_index "abuses", ["signaled_type", "signaled_id"], name: "index_abuses_on_signaled_type_and_signaled_id", using: :btree
|
||||
|
||||
create_table "addresses", force: :cascade do |t|
|
||||
t.string "address"
|
||||
t.string "street_number"
|
||||
t.string "route"
|
||||
t.string "locality"
|
||||
t.string "country"
|
||||
t.string "postal_code"
|
||||
t.string "address", limit: 255
|
||||
t.string "street_number", limit: 255
|
||||
t.string "route", limit: 255
|
||||
t.string "locality", limit: 255
|
||||
t.string "country", limit: 255
|
||||
t.string "postal_code", limit: 255
|
||||
t.integer "placeable_id"
|
||||
t.string "placeable_type"
|
||||
t.string "placeable_type", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "assets", force: :cascade do |t|
|
||||
t.integer "viewable_id"
|
||||
t.string "viewable_type"
|
||||
t.string "attachment"
|
||||
t.string "type"
|
||||
t.string "viewable_type", limit: 255
|
||||
t.string "attachment", limit: 255
|
||||
t.string "type", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
@ -63,11 +63,11 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
create_table "availabilities", force: :cascade do |t|
|
||||
t.datetime "start_at"
|
||||
t.datetime "end_at"
|
||||
t.string "available_type"
|
||||
t.string "available_type", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "nb_total_places"
|
||||
t.boolean "destroying", default: false
|
||||
t.boolean "destroying", default: false
|
||||
end
|
||||
|
||||
create_table "availability_tags", force: :cascade do |t|
|
||||
@ -81,18 +81,18 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
add_index "availability_tags", ["tag_id"], name: "index_availability_tags_on_tag_id", using: :btree
|
||||
|
||||
create_table "categories", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "name", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "components", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "name", limit: 255, null: false
|
||||
end
|
||||
|
||||
create_table "credits", force: :cascade do |t|
|
||||
t.integer "creditable_id"
|
||||
t.string "creditable_type"
|
||||
t.string "creditable_type", limit: 255
|
||||
t.integer "plan_id"
|
||||
t.integer "hours"
|
||||
t.datetime "created_at"
|
||||
@ -113,7 +113,7 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
end
|
||||
|
||||
create_table "events", force: :cascade do |t|
|
||||
t.string "title"
|
||||
t.string "title", limit: 255
|
||||
t.text "description"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
@ -139,10 +139,10 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
add_index "events_categories", ["event_id"], name: "index_events_categories_on_event_id", using: :btree
|
||||
|
||||
create_table "friendly_id_slugs", force: :cascade do |t|
|
||||
t.string "slug", null: false
|
||||
t.integer "sluggable_id", null: false
|
||||
t.string "slug", limit: 255, null: false
|
||||
t.integer "sluggable_id", null: false
|
||||
t.string "sluggable_type", limit: 50
|
||||
t.string "scope"
|
||||
t.string "scope", limit: 255
|
||||
t.datetime "created_at"
|
||||
end
|
||||
|
||||
@ -152,17 +152,17 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
add_index "friendly_id_slugs", ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type", using: :btree
|
||||
|
||||
create_table "groups", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "name", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "slug"
|
||||
t.string "slug", limit: 255
|
||||
end
|
||||
|
||||
add_index "groups", ["slug"], name: "index_groups_on_slug", unique: true, using: :btree
|
||||
|
||||
create_table "invoice_items", force: :cascade do |t|
|
||||
t.integer "invoice_id"
|
||||
t.string "stp_invoice_item_id"
|
||||
t.string "stp_invoice_item_id", limit: 255
|
||||
t.integer "amount"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
@ -175,17 +175,17 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
|
||||
create_table "invoices", force: :cascade do |t|
|
||||
t.integer "invoiced_id"
|
||||
t.string "invoiced_type"
|
||||
t.string "stp_invoice_id"
|
||||
t.string "invoiced_type", limit: 255
|
||||
t.string "stp_invoice_id", limit: 255
|
||||
t.integer "total"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "user_id"
|
||||
t.string "reference"
|
||||
t.string "avoir_mode"
|
||||
t.string "reference", limit: 255
|
||||
t.string "avoir_mode", limit: 255
|
||||
t.datetime "avoir_date"
|
||||
t.integer "invoice_id"
|
||||
t.string "type"
|
||||
t.string "type", limit: 255
|
||||
t.boolean "subscription_to_expire"
|
||||
t.text "description"
|
||||
end
|
||||
@ -194,17 +194,17 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
add_index "invoices", ["user_id"], name: "index_invoices_on_user_id", using: :btree
|
||||
|
||||
create_table "licences", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "name", limit: 255, null: false
|
||||
t.text "description"
|
||||
end
|
||||
|
||||
create_table "machines", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "name", limit: 255, null: false
|
||||
t.text "description"
|
||||
t.text "spec"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "slug"
|
||||
t.string "slug", limit: 255
|
||||
end
|
||||
|
||||
add_index "machines", ["slug"], name: "index_machines_on_slug", unique: true, using: :btree
|
||||
@ -220,14 +220,14 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
create_table "notifications", force: :cascade do |t|
|
||||
t.integer "receiver_id"
|
||||
t.integer "attached_object_id"
|
||||
t.string "attached_object_type"
|
||||
t.string "attached_object_type", limit: 255
|
||||
t.integer "notification_type_id"
|
||||
t.boolean "is_read", default: false
|
||||
t.boolean "is_read", default: false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "receiver_type"
|
||||
t.boolean "is_send", default: false
|
||||
t.jsonb "meta_data", default: {}
|
||||
t.string "receiver_type", limit: 255
|
||||
t.boolean "is_send", default: false
|
||||
t.jsonb "meta_data", default: {}
|
||||
end
|
||||
|
||||
add_index "notifications", ["notification_type_id"], name: "index_notifications_on_notification_type_id", using: :btree
|
||||
@ -268,20 +268,20 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
add_index "offer_days", ["subscription_id"], name: "index_offer_days_on_subscription_id", using: :btree
|
||||
|
||||
create_table "plans", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "name", limit: 255
|
||||
t.integer "amount"
|
||||
t.string "interval"
|
||||
t.string "interval", limit: 255
|
||||
t.integer "group_id"
|
||||
t.string "stp_plan_id"
|
||||
t.string "stp_plan_id", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "training_credit_nb", default: 0
|
||||
t.boolean "is_rolling", default: true
|
||||
t.integer "training_credit_nb", default: 0
|
||||
t.boolean "is_rolling", default: true
|
||||
t.text "description"
|
||||
t.string "type"
|
||||
t.string "base_name"
|
||||
t.integer "ui_weight", default: 0
|
||||
t.integer "interval_count", default: 1
|
||||
t.integer "ui_weight", default: 0
|
||||
t.integer "interval_count", default: 1
|
||||
end
|
||||
|
||||
add_index "plans", ["group_id"], name: "index_plans_on_group_id", using: :btree
|
||||
@ -302,15 +302,26 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
|
||||
create_table "profiles", force: :cascade do |t|
|
||||
t.integer "user_id"
|
||||
t.string "first_name"
|
||||
t.string "last_name"
|
||||
t.string "first_name", limit: 255
|
||||
t.string "last_name", limit: 255
|
||||
t.boolean "gender"
|
||||
t.date "birthday"
|
||||
t.string "phone"
|
||||
t.string "phone", limit: 255
|
||||
t.text "interest"
|
||||
t.text "software_mastered"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "facebook"
|
||||
t.string "twitter"
|
||||
t.string "google_plus"
|
||||
t.string "viadeo"
|
||||
t.string "linkedin"
|
||||
t.string "instagram"
|
||||
t.string "youtube"
|
||||
t.string "vimeo"
|
||||
t.string "dailymotion"
|
||||
t.string "github"
|
||||
t.string "echosciences"
|
||||
end
|
||||
|
||||
add_index "profiles", ["user_id"], name: "index_profiles_on_user_id", using: :btree
|
||||
@ -320,7 +331,7 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
t.integer "project_id"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "title"
|
||||
t.string "title", limit: 255
|
||||
end
|
||||
|
||||
add_index "project_steps", ["project_id"], name: "index_project_steps_on_project_id", using: :btree
|
||||
@ -330,23 +341,23 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
t.integer "user_id"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "is_valid", default: false
|
||||
t.string "valid_token"
|
||||
t.boolean "is_valid", default: false
|
||||
t.string "valid_token", limit: 255
|
||||
end
|
||||
|
||||
add_index "project_users", ["project_id"], name: "index_project_users_on_project_id", using: :btree
|
||||
add_index "project_users", ["user_id"], name: "index_project_users_on_user_id", using: :btree
|
||||
|
||||
create_table "projects", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "name", limit: 255
|
||||
t.text "description"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "author_id"
|
||||
t.text "tags"
|
||||
t.integer "licence_id"
|
||||
t.string "state"
|
||||
t.string "slug"
|
||||
t.string "state", limit: 255
|
||||
t.string "slug", limit: 255
|
||||
t.datetime "published_at"
|
||||
end
|
||||
|
||||
@ -382,20 +393,20 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "reservable_id"
|
||||
t.string "reservable_type"
|
||||
t.string "stp_invoice_id"
|
||||
t.string "reservable_type", limit: 255
|
||||
t.string "stp_invoice_id", limit: 255
|
||||
t.integer "nb_reserve_places"
|
||||
t.integer "nb_reserve_reduced_places"
|
||||
end
|
||||
|
||||
add_index "reservations", ["reservable_type", "reservable_id"], name: "index_reservations_on_reservable_type_and_reservable_id", using: :btree
|
||||
add_index "reservations", ["reservable_id", "reservable_type"], name: "index_reservations_on_reservable_id_and_reservable_type", using: :btree
|
||||
add_index "reservations", ["stp_invoice_id"], name: "index_reservations_on_stp_invoice_id", using: :btree
|
||||
add_index "reservations", ["user_id"], name: "index_reservations_on_user_id", using: :btree
|
||||
|
||||
create_table "roles", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "name", limit: 255
|
||||
t.integer "resource_id"
|
||||
t.string "resource_type"
|
||||
t.string "resource_type", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
@ -420,8 +431,8 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
t.datetime "updated_at"
|
||||
t.integer "availability_id"
|
||||
t.datetime "ex_start_at"
|
||||
t.datetime "ex_end_at"
|
||||
t.datetime "canceled_at"
|
||||
t.datetime "ex_end_at"
|
||||
t.boolean "offered", default: false
|
||||
end
|
||||
|
||||
@ -430,18 +441,18 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
|
||||
create_table "statistic_fields", force: :cascade do |t|
|
||||
t.integer "statistic_index_id"
|
||||
t.string "key"
|
||||
t.string "label"
|
||||
t.string "key", limit: 255
|
||||
t.string "label", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "data_type"
|
||||
t.string "data_type", limit: 255
|
||||
end
|
||||
|
||||
add_index "statistic_fields", ["statistic_index_id"], name: "index_statistic_fields_on_statistic_index_id", using: :btree
|
||||
|
||||
create_table "statistic_graphs", force: :cascade do |t|
|
||||
t.integer "statistic_index_id"
|
||||
t.string "chart_type"
|
||||
t.string "chart_type", limit: 255
|
||||
t.integer "limit"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
@ -450,17 +461,17 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
add_index "statistic_graphs", ["statistic_index_id"], name: "index_statistic_graphs_on_statistic_index_id", using: :btree
|
||||
|
||||
create_table "statistic_indices", force: :cascade do |t|
|
||||
t.string "es_type_key"
|
||||
t.string "label"
|
||||
t.string "es_type_key", limit: 255
|
||||
t.string "label", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "table", default: true
|
||||
t.boolean "ca", default: true
|
||||
t.boolean "table", default: true
|
||||
t.boolean "ca", default: true
|
||||
end
|
||||
|
||||
create_table "statistic_sub_types", force: :cascade do |t|
|
||||
t.string "key"
|
||||
t.string "label"
|
||||
t.string "key", limit: 255
|
||||
t.string "label", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
@ -477,8 +488,8 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
|
||||
create_table "statistic_types", force: :cascade do |t|
|
||||
t.integer "statistic_index_id"
|
||||
t.string "key"
|
||||
t.string "label"
|
||||
t.string "key", limit: 255
|
||||
t.string "label", limit: 255
|
||||
t.boolean "graph"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
@ -496,7 +507,7 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
create_table "subscriptions", force: :cascade do |t|
|
||||
t.integer "plan_id"
|
||||
t.integer "user_id"
|
||||
t.string "stp_subscription_id"
|
||||
t.string "stp_subscription_id", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.datetime "expired_at"
|
||||
@ -515,15 +526,15 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree
|
||||
|
||||
create_table "themes", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "name", limit: 255, null: false
|
||||
end
|
||||
|
||||
create_table "trainings", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "name", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "nb_total_places"
|
||||
t.string "slug"
|
||||
t.string "slug", limit: 255
|
||||
t.text "description"
|
||||
end
|
||||
|
||||
@ -579,32 +590,32 @@ ActiveRecord::Schema.define(version: 20160119131623) do
|
||||
add_index "user_trainings", ["user_id"], name: "index_user_trainings_on_user_id", using: :btree
|
||||
|
||||
create_table "users", force: :cascade do |t|
|
||||
t.string "email", default: "", null: false
|
||||
t.string "encrypted_password", default: "", null: false
|
||||
t.string "reset_password_token"
|
||||
t.string "username", limit: 255
|
||||
t.string "email", limit: 255, default: "", null: false
|
||||
t.string "encrypted_password", limit: 255, default: "", null: false
|
||||
t.string "reset_password_token", limit: 255
|
||||
t.datetime "reset_password_sent_at"
|
||||
t.datetime "remember_created_at"
|
||||
t.integer "sign_in_count", default: 0, null: false
|
||||
t.integer "sign_in_count", default: 0, null: false
|
||||
t.datetime "current_sign_in_at"
|
||||
t.datetime "last_sign_in_at"
|
||||
t.string "current_sign_in_ip"
|
||||
t.string "last_sign_in_ip"
|
||||
t.string "confirmation_token"
|
||||
t.string "current_sign_in_ip", limit: 255
|
||||
t.string "last_sign_in_ip", limit: 255
|
||||
t.string "confirmation_token", limit: 255
|
||||
t.datetime "confirmed_at"
|
||||
t.datetime "confirmation_sent_at"
|
||||
t.string "unconfirmed_email"
|
||||
t.integer "failed_attempts", default: 0, null: false
|
||||
t.string "unlock_token"
|
||||
t.string "unconfirmed_email", limit: 255
|
||||
t.integer "failed_attempts", default: 0, null: false
|
||||
t.string "unlock_token", limit: 255
|
||||
t.datetime "locked_at"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "is_allow_contact", default: true
|
||||
t.boolean "is_allow_contact", default: true
|
||||
t.integer "group_id"
|
||||
t.string "stp_customer_id"
|
||||
t.string "username"
|
||||
t.string "slug"
|
||||
t.boolean "is_active", default: true
|
||||
t.boolean "invoicing_disabled", default: false
|
||||
t.string "stp_customer_id", limit: 255
|
||||
t.string "slug", limit: 255
|
||||
t.boolean "is_active", default: true
|
||||
t.boolean "invoicing_disabled", default: false
|
||||
t.string "provider"
|
||||
t.string "uid"
|
||||
t.string "auth_token"
|
||||
|
Loading…
Reference in New Issue
Block a user