thredded 0.10.1 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -10
  3. data/app/assets/images/favicons/README.md +3 -0
  4. data/app/assets/images/favicons/amazon.png +0 -0
  5. data/app/assets/images/favicons/github.png +0 -0
  6. data/app/assets/images/favicons/google_branding/logo_calendar_128px.png +0 -0
  7. data/app/assets/images/favicons/google_branding/logo_docs_48px.png +0 -0
  8. data/app/assets/images/favicons/google_branding/logo_drive_48px.png +0 -0
  9. data/app/assets/images/favicons/google_branding/logo_forms_48px.png +0 -0
  10. data/app/assets/images/favicons/google_branding/logo_sheets_48px.png +0 -0
  11. data/app/assets/images/favicons/google_branding/logo_slides_48px.png +0 -0
  12. data/app/assets/images/favicons/stackexchange.png +0 -0
  13. data/app/assets/images/favicons/twitter.png +0 -0
  14. data/app/assets/images/favicons/wikipedia.png +0 -0
  15. data/app/assets/javascripts/thredded/components/user_preferences_form.es6 +16 -1
  16. data/app/assets/stylesheets/thredded/_email.scss +52 -0
  17. data/app/assets/stylesheets/thredded/_thredded.scss +1 -0
  18. data/app/assets/stylesheets/thredded/base/_grid.scss +14 -1
  19. data/app/assets/stylesheets/thredded/base/_typography.scss +4 -0
  20. data/app/assets/stylesheets/thredded/base/_variables.scss +24 -1
  21. data/app/assets/stylesheets/thredded/components/_main-section.scss +6 -0
  22. data/app/assets/stylesheets/thredded/components/_messageboard.scss +4 -1
  23. data/app/assets/stylesheets/thredded/components/_onebox.scss +284 -0
  24. data/app/assets/stylesheets/thredded/components/_post.scss +10 -6
  25. data/app/assets/stylesheets/thredded/components/_topic-header.scss +1 -1
  26. data/app/assets/stylesheets/thredded/components/_topics.scss +5 -5
  27. data/app/assets/stylesheets/thredded/layout/_main-navigation.scss +0 -6
  28. data/app/assets/stylesheets/thredded/layout/_moderation.scss +1 -1
  29. data/app/commands/thredded/autofollow_users.rb +56 -0
  30. data/app/controllers/thredded/preferences_controller.rb +2 -0
  31. data/app/forms/thredded/user_preferences_form.rb +18 -0
  32. data/app/helpers/thredded/application_helper.rb +3 -3
  33. data/app/jobs/thredded/auto_follow_and_notify_job.rb +1 -1
  34. data/app/mailer_previews/thredded/base_mailer_preview.rb +19 -8
  35. data/app/mailers/thredded/base_mailer.rb +1 -1
  36. data/app/models/concerns/thredded/post_common.rb +2 -4
  37. data/app/models/thredded/category.rb +4 -0
  38. data/app/models/thredded/messageboard.rb +12 -6
  39. data/app/models/thredded/private_topic.rb +4 -0
  40. data/app/models/thredded/topic.rb +9 -5
  41. data/app/models/thredded/user_messageboard_preference.rb +24 -0
  42. data/app/models/thredded/user_preference.rb +2 -0
  43. data/app/models/thredded/user_topic_follow.rb +1 -1
  44. data/app/notifiers/thredded/email_notifier.rb +1 -15
  45. data/app/views/thredded/messageboard_groups/new.html.erb +15 -13
  46. data/app/views/thredded/messageboards/_form.html.erb +22 -22
  47. data/app/views/thredded/messageboards/edit.html.erb +3 -1
  48. data/app/views/thredded/messageboards/new.html.erb +3 -1
  49. data/app/views/thredded/moderation/_post.html.erb +1 -1
  50. data/app/views/thredded/moderation/_user_post.html.erb +1 -1
  51. data/app/views/thredded/moderation/activity.html.erb +3 -3
  52. data/app/views/thredded/moderation/history.html.erb +2 -2
  53. data/app/views/thredded/moderation/pending.html.erb +2 -2
  54. data/app/views/thredded/moderation/user.html.erb +43 -41
  55. data/app/views/thredded/moderation/users.html.erb +32 -30
  56. data/app/views/thredded/post_mailer/post_notification.html.erb +21 -12
  57. data/app/views/thredded/posts/_content.html.erb +1 -1
  58. data/app/views/thredded/posts_common/_content.html.erb +1 -3
  59. data/app/views/thredded/preferences/_form.html.erb +25 -8
  60. data/app/views/thredded/private_posts/_content.html.erb +1 -1
  61. data/app/views/thredded/private_topic_mailer/message_notification.html.erb +17 -14
  62. data/app/views/thredded/private_topics/edit.html.erb +21 -19
  63. data/app/views/thredded/topics/edit.html.erb +32 -30
  64. data/app/views/thredded/topics/new.html.erb +8 -6
  65. data/app/views/thredded/topics/show.html.erb +1 -1
  66. data/app/views/thredded/users/_post.html.erb +1 -1
  67. data/bin/rubocop +17 -0
  68. data/config/locales/en.yml +13 -1
  69. data/config/locales/es.yml +14 -0
  70. data/config/locales/pl.yml +13 -0
  71. data/config/locales/pt-BR.yml +12 -0
  72. data/config/locales/ru.yml +197 -0
  73. data/db/migrate/20160329231848_create_thredded.rb +2 -8
  74. data/db/upgrade_migrations/20161113161801_upgrade_v0_8_to_v0_9.rb +6 -5
  75. data/db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb +20 -0
  76. data/lib/generators/thredded/install/templates/initializer.rb +12 -0
  77. data/lib/thredded.rb +12 -3
  78. data/lib/thredded/content_formatter.rb +16 -25
  79. data/lib/thredded/email_transformer.rb +21 -0
  80. data/lib/thredded/email_transformer/base.rb +47 -0
  81. data/lib/thredded/email_transformer/onebox.rb +20 -0
  82. data/lib/thredded/formatting_demo_content.rb +29 -0
  83. data/lib/thredded/html_pipeline/kramdown_filter.rb +5 -1
  84. data/lib/thredded/html_pipeline/onebox_filter.rb +136 -0
  85. data/lib/thredded/version.rb +1 -1
  86. metadata +62 -22
  87. data/app/commands/thredded/autofollow_mentioned_users.rb +0 -31
  88. data/app/commands/thredded/members_marked_notified.rb +0 -19
  89. data/app/models/thredded/post_notification.rb +0 -18
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
- module Thredded
3
- # Keeps track of post notifications that have been sent already.
4
- class PostNotification < ActiveRecord::Base
5
- belongs_to :post, polymorphic: true
6
- # Specific post type associations for joins
7
- belongs_to :non_private_post,
8
- foreign_key: 'post_id',
9
- foreign_type: 'Thredded::Post',
10
- class_name: 'Thredded::Post'
11
- belongs_to :private_post,
12
- foreign_key: 'post_id',
13
- foreign_type: 'Thredded::PrivatePost',
14
- class_name: 'Thredded::PrivatePost'
15
- validates :email, presence: true
16
- validates :post, presence: true
17
- end
18
- end