xforum 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +139 -0
- data/Rakefile +31 -0
- data/app/assets/images/xforum/addphoto.jpg +0 -0
- data/app/assets/images/xforum/bg-input-focus.png +0 -0
- data/app/assets/images/xforum/internet.png +0 -0
- data/app/assets/images/xforum/silver_selector.png +0 -0
- data/app/assets/javascripts/xforum/application.js +25 -0
- data/app/assets/javascripts/xforum/forum_admin.js.coffee +477 -0
- data/app/assets/javascripts/xforum/forum_basic.js.coffee +321 -0
- data/app/assets/javascripts/xforum/forum_translator.js.coffee +116 -0
- data/app/assets/javascripts/xforum/forum_user.js.coffee +403 -0
- data/app/assets/javascripts/xforum/global_java.js +141 -0
- data/app/assets/javascripts/xforum/help.js.coffee +10 -0
- data/app/assets/stylesheets/xforum/application.css.scss +15 -0
- data/app/assets/stylesheets/xforum/custom.css.scss +295 -0
- data/app/controllers/xforum/application_controller.rb +25 -0
- data/app/controllers/xforum/forums_controller.rb +123 -0
- data/app/helpers/xforum/application_helper.rb +4 -0
- data/app/mailers/xforum/user_mailer.rb +15 -0
- data/app/models/xforum/category.rb +76 -0
- data/app/models/xforum/forum.rb +217 -0
- data/app/models/xforum/hyperlink.rb +42 -0
- data/app/models/xforum/language.rb +104 -0
- data/app/models/xforum/people_list.rb +189 -0
- data/app/models/xforum/photo.rb +60 -0
- data/app/models/xforum/topic.rb +140 -0
- data/app/models/xforum/translation.rb +92 -0
- data/app/views/layouts/xforum/application.html.erb +14 -0
- data/app/views/user_mailer/xforum/note_to_forum_users.html.erb +32 -0
- data/app/views/xforum/forums/_dummy.html.erb +0 -0
- data/app/views/xforum/forums/_forum.html.erb +18 -0
- data/app/views/xforum/forums/_forum_admin.html.erb +139 -0
- data/app/views/xforum/forums/_forum_comments.html.erb +45 -0
- data/app/views/xforum/forums/_forum_entry.html.erb +44 -0
- data/app/views/xforum/forums/_forum_video.html.erb +7 -0
- data/app/views/xforum/forums/newphoto.js.erb +1 -0
- data/app/views/xforum/forums/the_page.html.erb +3 -0
- data/config/intiializers/xforum.rb +2 -0
- data/config/locales/forum.de.yml +93 -0
- data/config/locales/forum.en.yml +96 -0
- data/config/locales/forum.es.yml +94 -0
- data/config/locales/forum.fr.yml +94 -0
- data/config/routes.rb +10 -0
- data/db/migrate/20140600_add_forum_to_users.rb +20 -0
- data/db/migrate/20140601_create_forum_forums.rb +147 -0
- data/db/migrate/20140602_add_restricted_to_category.rb +6 -0
- data/db/migrate/20140602_change_suggestion_default.rb +7 -0
- data/lib/tasks/xforum_tasks.rake +65 -0
- data/lib/xforum.rb +95 -0
- data/lib/xforum/engine.rb +6 -0
- data/lib/xforum/set.yml +209 -0
- data/lib/xforum/user_include.rb +13 -0
- data/lib/xforum/version.rb +3 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +83 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/log/development.log +0 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- data/test/xforum_test.rb +7 -0
- metadata +327 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
|
3
|
+
# than English, add the necessary files in this directory.
|
|
4
|
+
#
|
|
5
|
+
# To use the locales, use `I18n.t`:
|
|
6
|
+
#
|
|
7
|
+
# I18n.t 'hello'
|
|
8
|
+
#
|
|
9
|
+
# In views, this is aliased to just `t`:
|
|
10
|
+
#
|
|
11
|
+
# <%= t('hello') %>
|
|
12
|
+
#
|
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
|
14
|
+
#
|
|
15
|
+
# I18n.locale = :es
|
|
16
|
+
#
|
|
17
|
+
# This would use the information in config/locales/es.yml.
|
|
18
|
+
#
|
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
|
21
|
+
|
|
22
|
+
en:
|
|
23
|
+
xForum:
|
|
24
|
+
Add_Topic: Add Topic
|
|
25
|
+
Add_Language: Add Language
|
|
26
|
+
Cancel: Cancel
|
|
27
|
+
Close: Close
|
|
28
|
+
open: open
|
|
29
|
+
Save: Save
|
|
30
|
+
Subscribe: Subscribe
|
|
31
|
+
Unsubscribe: Unsubscribe
|
|
32
|
+
Users: Users
|
|
33
|
+
Lists: Lists
|
|
34
|
+
save: save
|
|
35
|
+
translate: translate
|
|
36
|
+
Translate: Translate
|
|
37
|
+
Done: Done
|
|
38
|
+
Localized_Name: Localized Name
|
|
39
|
+
Language_Name: Language Name
|
|
40
|
+
Distribuiton_List_Name: Distribution List Name
|
|
41
|
+
User_Name: User Name
|
|
42
|
+
User_Email: User Email
|
|
43
|
+
Activate: Activate
|
|
44
|
+
Deactivate: Deactivate
|
|
45
|
+
Select_Language: Select Language
|
|
46
|
+
Language_code: Language Code
|
|
47
|
+
Vote: Vote
|
|
48
|
+
Review: Review
|
|
49
|
+
Accept_Rest: Accept Rest
|
|
50
|
+
Reject_Rest: Reject Rest
|
|
51
|
+
Lists: Lists
|
|
52
|
+
Users: Users
|
|
53
|
+
Submit: Submit
|
|
54
|
+
Post: Post
|
|
55
|
+
Edit: Edit
|
|
56
|
+
Restrict: Restrict
|
|
57
|
+
Unrestrict: Unrestrict
|
|
58
|
+
invite: invite
|
|
59
|
+
Accept: Accept
|
|
60
|
+
Reject: Reject
|
|
61
|
+
Add_Voting: Add Voting
|
|
62
|
+
del: del
|
|
63
|
+
Add_Category: Add Category
|
|
64
|
+
edit: edit
|
|
65
|
+
Continue: Continue
|
|
66
|
+
empty_list: empty list
|
|
67
|
+
select_language: select language
|
|
68
|
+
suspend_posting: suspend posting
|
|
69
|
+
suspend_all: suspend all
|
|
70
|
+
email_to: email to
|
|
71
|
+
create_distribution: create distribution
|
|
72
|
+
add_to_distribution: add to distribution
|
|
73
|
+
select_action: select action
|
|
74
|
+
select_none: select none
|
|
75
|
+
select_list: select list
|
|
76
|
+
select_user: select user
|
|
77
|
+
send_email_to: send email to
|
|
78
|
+
subject: subject
|
|
79
|
+
message: message
|
|
80
|
+
Forum: Forum
|
|
81
|
+
from_Forum_Admin: A message from your Forum Admin
|
|
82
|
+
Translation: Translation
|
|
83
|
+
Add_Topic_Monitor: Add Topic Monitor
|
|
84
|
+
Invitation_list: Invitation list
|
|
85
|
+
Create: Create
|
|
86
|
+
Admin_name: Admin
|
|
87
|
+
Hyperlink: Hyperlink
|
|
88
|
+
Text: Text
|
|
89
|
+
Home: Home
|
|
90
|
+
select_translation_language: select translation language
|
|
91
|
+
select_topic: select topic
|
|
92
|
+
select_category: select category
|
|
93
|
+
Replay: Replay
|
|
94
|
+
Back: Back
|
|
95
|
+
Action: Action
|
|
96
|
+
New: New
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
|
3
|
+
# than English, add the necessary files in this directory.
|
|
4
|
+
#
|
|
5
|
+
# To use the locales, use `I18n.t`:
|
|
6
|
+
#
|
|
7
|
+
# I18n.t 'hello'
|
|
8
|
+
#
|
|
9
|
+
# In views, this is aliased to just `t`:
|
|
10
|
+
#
|
|
11
|
+
# <%= t('hello') %>
|
|
12
|
+
#
|
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
|
14
|
+
#
|
|
15
|
+
# I18n.locale = :es
|
|
16
|
+
#
|
|
17
|
+
# This would use the information in config/locales/es.yml.
|
|
18
|
+
#
|
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
|
21
|
+
|
|
22
|
+
es:
|
|
23
|
+
xForum:
|
|
24
|
+
Add_Topic: Agregar tema
|
|
25
|
+
Add_Language: Agregar idioma
|
|
26
|
+
Cancel: cancelar
|
|
27
|
+
Close: cerca
|
|
28
|
+
open: abierto
|
|
29
|
+
Save: guardar
|
|
30
|
+
Subscribe: suscribir
|
|
31
|
+
Unsubscribe: Cancelar la suscripción
|
|
32
|
+
Users: Usuarios
|
|
33
|
+
Lists: Listas
|
|
34
|
+
save: guardar
|
|
35
|
+
translate: traducir
|
|
36
|
+
Translate: traducir
|
|
37
|
+
Done: hecho
|
|
38
|
+
Localized_Name: Nombre localizada
|
|
39
|
+
Language_Name: Nombre de Idioma
|
|
40
|
+
Distribuiton_List_Name: Lista de distribución Nombre
|
|
41
|
+
User_Name: Nombre de usuario
|
|
42
|
+
User_Email: usuario Email
|
|
43
|
+
Activate: activar
|
|
44
|
+
Deactivate: desactivar
|
|
45
|
+
Select_Language: Selecciona Idioma
|
|
46
|
+
Language_code: Código de idioma
|
|
47
|
+
Vote: voto
|
|
48
|
+
Review: revisión
|
|
49
|
+
Accept_Rest: Acepta el Resto
|
|
50
|
+
Reject_Rest: rechazar Rest
|
|
51
|
+
Lists: Listas
|
|
52
|
+
Users: Usuarios
|
|
53
|
+
Submit: presentar
|
|
54
|
+
Post: puesto
|
|
55
|
+
Edit: editar
|
|
56
|
+
Restrict: restringir
|
|
57
|
+
Unrestrict: Unrestrict
|
|
58
|
+
invite: invitar
|
|
59
|
+
Accept: aceptar
|
|
60
|
+
Reject: rechazar
|
|
61
|
+
Add_Voting: Añadir Votación
|
|
62
|
+
del: del
|
|
63
|
+
Add_Category: Añadir categoría
|
|
64
|
+
edit: editar
|
|
65
|
+
Continue: continuar
|
|
66
|
+
empty_list: lista vacía
|
|
67
|
+
select_language: seleccionar el idioma
|
|
68
|
+
suspend_posting: suspender la publicación
|
|
69
|
+
suspend_all: suspender todas las
|
|
70
|
+
email_to: un correo electrónico a
|
|
71
|
+
create_distribution: crear la distribución
|
|
72
|
+
add_to_distribution: añadir a la distribución
|
|
73
|
+
select_action: seleccione la acción
|
|
74
|
+
select_none: seleccionar ninguno
|
|
75
|
+
select_list: seleccione Lista
|
|
76
|
+
select_user: seleccione el usuario
|
|
77
|
+
send_email_to: envíelo a la dirección
|
|
78
|
+
subject: sujeto
|
|
79
|
+
message: mensaje
|
|
80
|
+
Forum: foro
|
|
81
|
+
Admin_name: administración
|
|
82
|
+
from_Forum_Admin: Un mensaje de tu pequeño foro
|
|
83
|
+
Translation: traducción
|
|
84
|
+
Add_Topic_Monitor: Agregar tema del monitor
|
|
85
|
+
Invitation_list: lista de invitados
|
|
86
|
+
Create: crear
|
|
87
|
+
Hyperlink: hiperenlace
|
|
88
|
+
Text: texto
|
|
89
|
+
Home: inicio
|
|
90
|
+
select_translation_language: seleccionar el idioma de traducción
|
|
91
|
+
select_topic: seleccione tema
|
|
92
|
+
select_category: Elije categoría
|
|
93
|
+
Replay: Repetición
|
|
94
|
+
Back: Atrás
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
fr:
|
|
2
|
+
xForum:
|
|
3
|
+
Add_Topic: Ajouter un sujet
|
|
4
|
+
Add_Language: Ajouter une langue
|
|
5
|
+
Cancel: annuler
|
|
6
|
+
Close: proche
|
|
7
|
+
open: ouvert
|
|
8
|
+
Save: sauver
|
|
9
|
+
Subscribe: souscrire
|
|
10
|
+
Unsubscribe: Se désabonner
|
|
11
|
+
Users: utilisateurs
|
|
12
|
+
Lists: Listes
|
|
13
|
+
save: sauver
|
|
14
|
+
translate: traduire
|
|
15
|
+
Translate: traduire
|
|
16
|
+
Done: Terminé
|
|
17
|
+
Localized_Name: Nom localisée
|
|
18
|
+
Language_Name: Nom de la langue
|
|
19
|
+
Distribuiton_List_Name: Liste de distribution Nom
|
|
20
|
+
User_Name: Nom d'utilisateur
|
|
21
|
+
User_Email: E-mail
|
|
22
|
+
Activate: activer
|
|
23
|
+
Deactivate: désactiver
|
|
24
|
+
Select_Language: Sélectionnez la langue
|
|
25
|
+
Language_code: code de langue
|
|
26
|
+
Crop: récolte
|
|
27
|
+
Cut: Cut
|
|
28
|
+
Color_Erase: Effacement de la couleur
|
|
29
|
+
Color_Crop: Récolte de couleur
|
|
30
|
+
Shadow: ombre
|
|
31
|
+
Borders: limites
|
|
32
|
+
unerase: unerase
|
|
33
|
+
Add_Image: Ajouter une image
|
|
34
|
+
Vote: Votez
|
|
35
|
+
Review: examen
|
|
36
|
+
Accept_Rest: accepter repos
|
|
37
|
+
Reject_Rest: rejeter repos
|
|
38
|
+
Lists: Listes
|
|
39
|
+
Users: utilisateurs
|
|
40
|
+
Submit: soumettre
|
|
41
|
+
Post: Poster
|
|
42
|
+
Edit: Modifier
|
|
43
|
+
Restrict: restreindre
|
|
44
|
+
Unrestrict: Unrestrict
|
|
45
|
+
invite: inviter
|
|
46
|
+
Accept: accepter
|
|
47
|
+
Reject: rejeter
|
|
48
|
+
Add_Voting: Ajouter à droit de vote
|
|
49
|
+
del: del
|
|
50
|
+
Add_Category: Ajouter une catégorie
|
|
51
|
+
edit: modifier
|
|
52
|
+
My_Own_Background: Ma propre expérience
|
|
53
|
+
Locate: localiser
|
|
54
|
+
New_Image: nouvelle image
|
|
55
|
+
My_Images: mes Images
|
|
56
|
+
No_Processing: Pas de traitement
|
|
57
|
+
Merge: fusionner
|
|
58
|
+
Sign_in: Connectez-vous
|
|
59
|
+
Undo: annuler
|
|
60
|
+
My_Projects: mes projets
|
|
61
|
+
New_Project: nouveau projet
|
|
62
|
+
Composite: composite
|
|
63
|
+
Select: sélectionner
|
|
64
|
+
Realtime: En temps réel
|
|
65
|
+
Continue: continuer
|
|
66
|
+
empty_list: liste vide
|
|
67
|
+
select_language: sélectionner la langue
|
|
68
|
+
suspend_posting: suspendre annonce
|
|
69
|
+
suspend_all: suspendre tout
|
|
70
|
+
email_to: e-mail à
|
|
71
|
+
create_distribution: créer répartition
|
|
72
|
+
add_to_distribution: ajouter à la distribution
|
|
73
|
+
select_action: sélectionnez l'action
|
|
74
|
+
select_none: sélectionnez Non
|
|
75
|
+
select_list: sélectionnez la liste
|
|
76
|
+
select_user: sélectionnez l'utilisateur
|
|
77
|
+
send_email_to: envoyez un courriel à
|
|
78
|
+
subject: sujet
|
|
79
|
+
message: message
|
|
80
|
+
Forum: forum
|
|
81
|
+
Admin_name: administrateur
|
|
82
|
+
from_Forum_Admin: Un message de votre Forum Admin
|
|
83
|
+
Translation: traduction
|
|
84
|
+
Add_Topic_Monitor: Ajouter un sujet Moniteur
|
|
85
|
+
Invitation_list: Liste d'invitation
|
|
86
|
+
Create: créer
|
|
87
|
+
Hyperlink: lien hypertexte
|
|
88
|
+
Text: texte
|
|
89
|
+
Home: Accueil
|
|
90
|
+
select_translation_language: sélectionner la langue de traduction
|
|
91
|
+
select_topic: sélectionnez le sujet
|
|
92
|
+
select_category: de choisir une catégorie
|
|
93
|
+
Replay: Rejouer
|
|
94
|
+
Back: Arrière
|
data/config/routes.rb
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Xforum::Engine.routes.draw do
|
|
2
|
+
match 'the_page', to: 'forums#the_page', via: [:get,:post]
|
|
3
|
+
match 'forum_ajax', to: 'forums#forum_ajax', via: :post
|
|
4
|
+
match 'photos', to: 'forums#newphoto', via: :post
|
|
5
|
+
# The priority is based upon order of creation: first created -> highest priority.
|
|
6
|
+
# See how all your routes lay out with "rake routes".
|
|
7
|
+
|
|
8
|
+
# You can have the root of your site routed with "root"
|
|
9
|
+
|
|
10
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
class AddForumToUsers < ActiveRecord::Migration
|
|
2
|
+
|
|
3
|
+
def change
|
|
4
|
+
#_____________________________________forum users______________________________________________________#
|
|
5
|
+
|
|
6
|
+
add_column Xforum.user_table.to_sym, :forum_posting_privileges, :boolean, default:true
|
|
7
|
+
add_column Xforum.user_table.to_sym, :forum_reading_privileges, :boolean, default:true
|
|
8
|
+
add_column Xforum.user_table.to_sym, :forum_admin, :boolean, default:false
|
|
9
|
+
add_column Xforum.user_table.to_sym, :forum_translating_privileges, :boolean, default:true
|
|
10
|
+
add_column Xforum.user_table.to_sym, :forum_post_name, :string
|
|
11
|
+
add_index Xforum.user_table.to_sym, :forum_post_name, name: "index_#{Xforum.user_table}_on_forum_post_name".to_sym
|
|
12
|
+
add_index Xforum.user_table.to_sym, :forum_posting_privileges, name: "index_#{Xforum.user_table}_on_forum_posting_privileges".to_sym
|
|
13
|
+
add_index Xforum.user_table.to_sym, :forum_reading_privileges, name: "index_#{Xforum.user_table}_on_forum_reading_privileges".to_sym
|
|
14
|
+
add_index Xforum.user_table.to_sym, :forum_translating_privileges, name: "index_#{Xforum.user_table}_on_forum_translating_privileges".to_sym
|
|
15
|
+
add_index Xforum.user_table.to_sym, :forum_admin, name: "index_#{Xforum.user_table}_on_forum_admin".to_sym
|
|
16
|
+
|
|
17
|
+
#_______________________________________________________________________________________________________#
|
|
18
|
+
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# This migration comes from forum (originally 20140601)
|
|
2
|
+
class CreateForumForums < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
create_table :xforum_forums do |t|
|
|
5
|
+
t.belongs_to :topic
|
|
6
|
+
t.belongs_to :user
|
|
7
|
+
t.string :owner_name, limit:50, default:''
|
|
8
|
+
t.integer :parent, default:0
|
|
9
|
+
t.string :state, limit:50, default:'new'
|
|
10
|
+
t.integer :tag, default:-1
|
|
11
|
+
t.boolean :hold, default:false
|
|
12
|
+
t.text :content
|
|
13
|
+
t.boolean :closed, default:false
|
|
14
|
+
t.string :response, default:'none'
|
|
15
|
+
t.boolean :restricted, default:false
|
|
16
|
+
t.boolean :needs_translating, default:false
|
|
17
|
+
t.boolean :has_photo, default:false
|
|
18
|
+
t.text :resolution
|
|
19
|
+
t.timestamps
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
add_index :xforum_forums, :user_id, name: :index_forums_on_user_id
|
|
23
|
+
add_index :xforum_forums, :topic_id, name: :index_forums_on_topic_id
|
|
24
|
+
add_index :xforum_forums, %W(topic_id state), name: :index_forums_on_topic_and_state
|
|
25
|
+
add_index :xforum_forums, :closed, name: :index_forums_on_closed
|
|
26
|
+
add_index :xforum_forums, :hold, name: :index_forums_on_hold
|
|
27
|
+
add_index :xforum_forums, :parent, name: :index_forums_on_parent
|
|
28
|
+
add_index :xforum_forums, :state, name: :index_forums_on_state
|
|
29
|
+
add_index :xforum_forums, :restricted, name: :index_forums_on_restricted
|
|
30
|
+
add_index :xforum_forums, :has_photo, name: :index_forums_on_has_photo
|
|
31
|
+
|
|
32
|
+
create_table :xforum_hyperlinks do |t|
|
|
33
|
+
t.belongs_to :forum
|
|
34
|
+
t.string :link_address
|
|
35
|
+
t.string :link_text
|
|
36
|
+
t.timestamp
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
add_index :xforum_hyperlinks, :forum_id, name: :index_forum_hyperlinks_on_forum_id
|
|
40
|
+
|
|
41
|
+
create_table :xforum_languages do |t|
|
|
42
|
+
t.belongs_to :user
|
|
43
|
+
t.string :code, limit:5
|
|
44
|
+
t.string :name, limit:50
|
|
45
|
+
t.string :local_name, limit:50
|
|
46
|
+
t.string :region, limit:50
|
|
47
|
+
t.boolean :suggestion
|
|
48
|
+
t.string :state, limit:50, default:'suggesiton'
|
|
49
|
+
t.boolean :active, default:false
|
|
50
|
+
t.timestamps
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
add_index :xforum_languages, :user_id, name: :index_forum_languages_on_user_id
|
|
54
|
+
add_index :xforum_languages, :code, name: :index_forum_languages_on_code
|
|
55
|
+
add_index :xforum_languages, :name, name: :index_forum_languages_on_name
|
|
56
|
+
add_index :xforum_languages, :region, name: :index_forum_languages_on_region
|
|
57
|
+
add_index :xforum_languages, :active, name: :index_forum_languages_on_active
|
|
58
|
+
add_index :xforum_languages, :suggestion, name: :index_forum_languages_on_suggestion
|
|
59
|
+
|
|
60
|
+
create_table :xforum_categories do |t|
|
|
61
|
+
t.belongs_to :user
|
|
62
|
+
t.string :name, limit:50
|
|
63
|
+
t.string :state, limit:50
|
|
64
|
+
t.boolean :suggestion
|
|
65
|
+
t.boolean :closed, default:false
|
|
66
|
+
t.timestamps
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
add_index :xforum_categories, :user_id, name: :index_forum_categories_on_user_id
|
|
70
|
+
add_index :xforum_categories, :closed, name: :index_forum_categories_on_closed
|
|
71
|
+
add_index :xforum_categories, :suggestion, name: :index_forum_categories_on_suggestion
|
|
72
|
+
|
|
73
|
+
create_table :xforum_photos do |t|
|
|
74
|
+
t.belongs_to :user
|
|
75
|
+
t.belongs_to :forum
|
|
76
|
+
t.string :name, limit:50
|
|
77
|
+
t.boolean :resized, default:false
|
|
78
|
+
t.string :key
|
|
79
|
+
t.timestamps
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
add_index :xforum_photos, :user_id, name: :index_forum_photos_on_user_id
|
|
83
|
+
add_index :xforum_photos, :forum_id, name: :index_forum_photos_on_forum_id
|
|
84
|
+
add_index :xforum_photos, :name, name: :index_forum_photos_on_name
|
|
85
|
+
add_index :xforum_photos, :key, name: :index_forum_photos_on_key
|
|
86
|
+
add_index :xforum_photos, :resized, name: :index_forum_photos_on_resized
|
|
87
|
+
|
|
88
|
+
create_table :xforum_topics do |t|
|
|
89
|
+
t.belongs_to :category
|
|
90
|
+
t.belongs_to :user
|
|
91
|
+
t.string :name, limit:50
|
|
92
|
+
t.string :state, limit:20
|
|
93
|
+
t.boolean :closed, default:false
|
|
94
|
+
t.boolean :suggestion
|
|
95
|
+
t.binary :votes, default:[]
|
|
96
|
+
t.boolean :vote, default:false
|
|
97
|
+
t.boolean :restricted, default:false
|
|
98
|
+
t.timestamps
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
add_index :xforum_topics, :user_id, name: :index_forum_topics_on_user_id
|
|
102
|
+
add_index :xforum_topics, :category_id, name: :index_forum_topics_on_category_id
|
|
103
|
+
add_index :xforum_topics, :closed, name: :index_forum_topics_on_closed
|
|
104
|
+
add_index :xforum_topics, :name, name: :index_forum_topics_on_name
|
|
105
|
+
add_index :xforum_topics, :vote, name: :index_forum_topics_on_vote
|
|
106
|
+
add_index :xforum_topics, :restricted, name: :index_forum_topics_on_restricted
|
|
107
|
+
add_index :xforum_topics, :suggestion, name: :index_forum_topics_on_suggestion
|
|
108
|
+
|
|
109
|
+
create_table :xforum_people_lists do |t|
|
|
110
|
+
t.belongs_to :forum
|
|
111
|
+
t.belongs_to :topic
|
|
112
|
+
t.belongs_to :category
|
|
113
|
+
t.string :name, limit:20
|
|
114
|
+
t.string :list, limit:20
|
|
115
|
+
t.binary :people, default:[]
|
|
116
|
+
t.timestamps
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
add_index :xforum_people_lists, :forum_id, name: :index_forum_people_lists_on_forum_id
|
|
120
|
+
add_index :xforum_people_lists, :category_id, name: :index_forum_people_lists_on_category_id
|
|
121
|
+
add_index :xforum_people_lists, :topic_id, name: :index_forum_people_lists_on_topic_id
|
|
122
|
+
add_index :xforum_people_lists, :name, name: :index_forum_people_lists_on_name
|
|
123
|
+
add_index :xforum_people_lists, :list, name: :index_forum_people_lists_on_list
|
|
124
|
+
|
|
125
|
+
create_table :xforum_translations do |t|
|
|
126
|
+
t.belongs_to :forum
|
|
127
|
+
t.belongs_to :user
|
|
128
|
+
t.belongs_to :topic
|
|
129
|
+
t.belongs_to :category
|
|
130
|
+
t.belongs_to :language
|
|
131
|
+
t.belongs_to :hyperlink
|
|
132
|
+
t.boolean :suggestion, default:false
|
|
133
|
+
t.string :state, limit:20, default:'new'
|
|
134
|
+
t.text :content
|
|
135
|
+
t.text :resolution
|
|
136
|
+
t.timestamps
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
add_index :xforum_translations, :user_id, name: :index_forum_translations_on_user_id
|
|
140
|
+
add_index :xforum_translations, :hyperlink_id, name: :index_forum_translations_on_hyperlink_id
|
|
141
|
+
add_index :xforum_translations, :forum_id, name: :index_forum_translations_on_forum_id
|
|
142
|
+
add_index :xforum_translations, :topic_id, name: :index_forum_translations_on_topic_id
|
|
143
|
+
add_index :xforum_translations, :category_id, name: :index_forum_translations_on_category_id
|
|
144
|
+
add_index :xforum_translations, :language_id, name: :index_forum_translations_on_language_id
|
|
145
|
+
add_index :xforum_translations, :state, name: :index_forum_translations_on_state
|
|
146
|
+
end
|
|
147
|
+
end
|