-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
act as taggable fonctionne pour filtrer les event par les hobbies du …
…user
- Loading branch information
1 parent
69e5b74
commit 41eedd4
Showing
17 changed files
with
283 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ | |
@import "sweetalert"; | ||
@import "calendar"; | ||
@import "card-user"; | ||
@import "tags"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.title{ | ||
margin-top: 20px; | ||
margin-bottom: 20px; | ||
} | ||
.wrapper-tags{ | ||
-webkit-box-align: center !important; | ||
display: flex !important; | ||
align-items: center !important; | ||
margin-top: 20px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.tags{ | ||
display: inline-block !important; | ||
white-space: nowrap !important; | ||
padding-right: 8px !important; | ||
padding-top: 4px !important; | ||
padding-bottom: 4px !important; | ||
width: 100% !important; | ||
} | ||
|
||
.tags-precision{ | ||
cursor: pointer !important; | ||
text-align: center !important; | ||
border: 1px solid rgb(221, 221, 221) !important; | ||
background-color: rgb(255, 255, 255) !important; | ||
outline: none !important; | ||
margin: 0px !important; | ||
border-radius: 30px !important; | ||
color: rgb(34, 34, 34) !important; | ||
font-family: Circular, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif !important; | ||
position: relative !important; | ||
padding: 10px 16px !important; | ||
font-size: 12px !important; | ||
line-height: 16px !important; | ||
width: 100% !important; | ||
font-size: larger; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
db/migrate/20211126102607_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This migration comes from acts_as_taggable_on_engine (originally 1) | ||
if ActiveRecord.gem_version >= Gem::Version.new('5.0') | ||
class ActsAsTaggableOnMigration < ActiveRecord::Migration[4.2]; end | ||
else | ||
class ActsAsTaggableOnMigration < ActiveRecord::Migration; end | ||
end | ||
ActsAsTaggableOnMigration.class_eval do | ||
def self.up | ||
create_table ActsAsTaggableOn.tags_table do |t| | ||
t.string :name | ||
t.timestamps | ||
end | ||
|
||
create_table ActsAsTaggableOn.taggings_table do |t| | ||
t.references :tag, foreign_key: { to_table: ActsAsTaggableOn.tags_table } | ||
|
||
# You should make sure that the column created is | ||
# long enough to store the required class names. | ||
t.references :taggable, polymorphic: true | ||
t.references :tagger, polymorphic: true | ||
|
||
# Limit is created to prevent MySQL error on index | ||
# length for MyISAM table type: http://bit.ly/vgW2Ql | ||
t.string :context, limit: 128 | ||
|
||
t.datetime :created_at | ||
end | ||
|
||
add_index ActsAsTaggableOn.taggings_table, :tag_id | ||
add_index ActsAsTaggableOn.taggings_table, [:taggable_id, :taggable_type, :context], name: 'taggings_taggable_context_idx' | ||
end | ||
|
||
def self.down | ||
drop_table ActsAsTaggableOn.taggings_table | ||
drop_table ActsAsTaggableOn.tags_table | ||
end | ||
end |
26 changes: 26 additions & 0 deletions
26
db/migrate/20211126102608_add_missing_unique_indices.acts_as_taggable_on_engine.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# This migration comes from acts_as_taggable_on_engine (originally 2) | ||
if ActiveRecord.gem_version >= Gem::Version.new('5.0') | ||
class AddMissingUniqueIndices < ActiveRecord::Migration[4.2]; end | ||
else | ||
class AddMissingUniqueIndices < ActiveRecord::Migration; end | ||
end | ||
AddMissingUniqueIndices.class_eval do | ||
def self.up | ||
add_index ActsAsTaggableOn.tags_table, :name, unique: true | ||
|
||
remove_index ActsAsTaggableOn.taggings_table, :tag_id if index_exists?(ActsAsTaggableOn.taggings_table, :tag_id) | ||
remove_index ActsAsTaggableOn.taggings_table, name: 'taggings_taggable_context_idx' | ||
add_index ActsAsTaggableOn.taggings_table, | ||
[:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type], | ||
unique: true, name: 'taggings_idx' | ||
end | ||
|
||
def self.down | ||
remove_index ActsAsTaggableOn.tags_table, :name | ||
|
||
remove_index ActsAsTaggableOn.taggings_table, name: 'taggings_idx' | ||
|
||
add_index ActsAsTaggableOn.taggings_table, :tag_id unless index_exists?(ActsAsTaggableOn.taggings_table, :tag_id) | ||
add_index ActsAsTaggableOn.taggings_table, [:taggable_id, :taggable_type, :context], name: 'taggings_taggable_context_idx' | ||
end | ||
end |
20 changes: 20 additions & 0 deletions
20
db/migrate/20211126102609_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# This migration comes from acts_as_taggable_on_engine (originally 3) | ||
if ActiveRecord.gem_version >= Gem::Version.new('5.0') | ||
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration[4.2]; end | ||
else | ||
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration; end | ||
end | ||
AddTaggingsCounterCacheToTags.class_eval do | ||
def self.up | ||
add_column ActsAsTaggableOn.tags_table, :taggings_count, :integer, default: 0 | ||
|
||
ActsAsTaggableOn::Tag.reset_column_information | ||
ActsAsTaggableOn::Tag.find_each do |tag| | ||
ActsAsTaggableOn::Tag.reset_counters(tag.id, ActsAsTaggableOn.taggings_table) | ||
end | ||
end | ||
|
||
def self.down | ||
remove_column ActsAsTaggableOn.tags_table, :taggings_count | ||
end | ||
end |
15 changes: 15 additions & 0 deletions
15
db/migrate/20211126102610_add_missing_taggable_index.acts_as_taggable_on_engine.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# This migration comes from acts_as_taggable_on_engine (originally 4) | ||
if ActiveRecord.gem_version >= Gem::Version.new('5.0') | ||
class AddMissingTaggableIndex < ActiveRecord::Migration[4.2]; end | ||
else | ||
class AddMissingTaggableIndex < ActiveRecord::Migration; end | ||
end | ||
AddMissingTaggableIndex.class_eval do | ||
def self.up | ||
add_index ActsAsTaggableOn.taggings_table, [:taggable_id, :taggable_type, :context], name: 'taggings_taggable_context_idx' | ||
end | ||
|
||
def self.down | ||
remove_index ActsAsTaggableOn.taggings_table, name: 'taggings_taggable_context_idx' | ||
end | ||
end |
15 changes: 15 additions & 0 deletions
15
db/migrate/20211126102611_change_collation_for_tag_names.acts_as_taggable_on_engine.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# This migration comes from acts_as_taggable_on_engine (originally 5) | ||
# This migration is added to circumvent issue #623 and have special characters | ||
# work properly | ||
if ActiveRecord.gem_version >= Gem::Version.new('5.0') | ||
class ChangeCollationForTagNames < ActiveRecord::Migration[4.2]; end | ||
else | ||
class ChangeCollationForTagNames < ActiveRecord::Migration; end | ||
end | ||
ChangeCollationForTagNames.class_eval do | ||
def up | ||
if ActsAsTaggableOn::Utils.using_mysql? | ||
execute("ALTER TABLE #{ActsAsTaggableOn.tags_table} MODIFY name varchar(255) CHARACTER SET utf8 COLLATE utf8_bin;") | ||
end | ||
end | ||
end |
23 changes: 23 additions & 0 deletions
23
db/migrate/20211126102612_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This migration comes from acts_as_taggable_on_engine (originally 6) | ||
if ActiveRecord.gem_version >= Gem::Version.new('5.0') | ||
class AddMissingIndexesOnTaggings < ActiveRecord::Migration[4.2]; end | ||
else | ||
class AddMissingIndexesOnTaggings < ActiveRecord::Migration; end | ||
end | ||
AddMissingIndexesOnTaggings.class_eval do | ||
def change | ||
add_index ActsAsTaggableOn.taggings_table, :tag_id unless index_exists? ActsAsTaggableOn.taggings_table, :tag_id | ||
add_index ActsAsTaggableOn.taggings_table, :taggable_id unless index_exists? ActsAsTaggableOn.taggings_table, :taggable_id | ||
add_index ActsAsTaggableOn.taggings_table, :taggable_type unless index_exists? ActsAsTaggableOn.taggings_table, :taggable_type | ||
add_index ActsAsTaggableOn.taggings_table, :tagger_id unless index_exists? ActsAsTaggableOn.taggings_table, :tagger_id | ||
add_index ActsAsTaggableOn.taggings_table, :context unless index_exists? ActsAsTaggableOn.taggings_table, :context | ||
|
||
unless index_exists? ActsAsTaggableOn.taggings_table, [:tagger_id, :tagger_type] | ||
add_index ActsAsTaggableOn.taggings_table, [:tagger_id, :tagger_type] | ||
end | ||
|
||
unless index_exists? ActsAsTaggableOn.taggings_table, [:taggable_id, :taggable_type, :tagger_id, :context], name: 'taggings_idy' | ||
add_index ActsAsTaggableOn.taggings_table, [:taggable_id, :taggable_type, :tagger_id, :context], name: 'taggings_idy' | ||
end | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
db/migrate/20211126102613_add_tenant_to_taggings.acts_as_taggable_on_engine.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This migration comes from acts_as_taggable_on_engine (originally 7) | ||
if ActiveRecord.gem_version >= Gem::Version.new('5.0') | ||
class AddTenantToTaggings < ActiveRecord::Migration[4.2]; end | ||
else | ||
class AddTenantToTaggings < ActiveRecord::Migration; end | ||
end | ||
AddTenantToTaggings.class_eval do | ||
def self.up | ||
add_column :taggings, :tenant, :string, limit: 128 | ||
add_index :taggings, :tenant unless index_exists? :taggings, :tenant | ||
end | ||
|
||
def self.down | ||
remove_index :taggings, :tenant | ||
remove_column :taggings, :tenant | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddCategoryToActivity < ActiveRecord::Migration[6.0] | ||
def change | ||
add_column :activities, :category, :string | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.