thredded 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.mkdn +63 -0
- data/Procfile +1 -0
- data/README.mkdn +42 -20
- data/app/assets/images/thredded/private-messages.svg +4 -0
- data/app/assets/images/thredded/settings.svg +4 -0
- data/app/assets/javascripts/thredded.es6 +2 -10
- data/app/assets/javascripts/thredded/{currently_online.es6 → components/currently_online.es6} +0 -0
- data/app/assets/javascripts/thredded/{post_form.es6 → components/post_form.es6} +0 -0
- data/app/assets/javascripts/thredded/{time_stamps.es6 → components/time_stamps.es6} +0 -0
- data/app/assets/javascripts/thredded/{topic_form.es6 → components/topic_form.es6} +1 -1
- data/app/assets/javascripts/thredded/components/topics.es6 +37 -0
- data/app/assets/javascripts/thredded/components/user_preferences_form.es6 +45 -0
- data/app/assets/javascripts/thredded/components/users_select.es6 +56 -0
- data/app/assets/javascripts/thredded/dependencies.js +9 -0
- data/app/assets/javascripts/thredded/thredded.es6 +1 -0
- data/app/assets/stylesheets/thredded/_base.scss +3 -2
- data/app/assets/stylesheets/thredded/_thredded.scss +4 -1
- data/app/assets/stylesheets/thredded/base/_buttons.scss +2 -1
- data/app/assets/stylesheets/thredded/base/_forms.scss +23 -18
- data/app/assets/stylesheets/thredded/base/_grid.scss +1 -1
- data/app/assets/stylesheets/thredded/base/_nav.scss +21 -0
- data/app/assets/stylesheets/thredded/base/_tables.scss +5 -14
- data/app/assets/stylesheets/thredded/base/_typography.scss +9 -4
- data/app/assets/stylesheets/thredded/base/_variables.scss +28 -9
- data/app/assets/stylesheets/thredded/components/_alerts.scss +19 -0
- data/app/assets/stylesheets/thredded/components/_currently-online.scss +1 -1
- data/app/assets/stylesheets/thredded/components/_form-list.scss +2 -4
- data/app/assets/stylesheets/thredded/components/_icons.scss +3 -0
- data/app/assets/stylesheets/thredded/components/_messageboard.scss +4 -4
- data/app/assets/stylesheets/thredded/components/_pagination.scss +2 -2
- data/app/assets/stylesheets/thredded/components/_post-form.scss +3 -0
- data/app/assets/stylesheets/thredded/components/_post.scss +14 -4
- data/app/assets/stylesheets/thredded/components/_select2.scss +79 -9
- data/app/assets/stylesheets/thredded/components/_topic-header.scss +11 -1
- data/app/assets/stylesheets/thredded/components/_topics.scss +13 -11
- data/app/assets/stylesheets/thredded/layout/_main-container.scss +3 -3
- data/app/assets/stylesheets/thredded/layout/_main-navigation.scss +11 -17
- data/app/assets/stylesheets/thredded/layout/_navigation.scss +72 -0
- data/app/assets/stylesheets/thredded/layout/_search-navigation.scss +66 -0
- data/app/assets/stylesheets/thredded/layout/_user-navigation.scss +35 -61
- data/app/commands/thredded/at_notification_extractor.rb +1 -0
- data/app/commands/thredded/members_marked_notified.rb +1 -0
- data/app/commands/thredded/messageboard_destroyer.rb +7 -2
- data/app/commands/thredded/notify_mentioned_users.rb +8 -21
- data/app/commands/thredded/notify_private_topic_users.rb +3 -5
- data/app/controllers/thredded/application_controller.rb +76 -41
- data/app/controllers/thredded/autocomplete_users_controller.rb +46 -0
- data/app/controllers/thredded/messageboards_controller.rb +8 -5
- data/app/controllers/thredded/posts_controller.rb +20 -22
- data/app/controllers/thredded/preferences_controller.rb +19 -14
- data/app/controllers/thredded/private_topics_controller.rb +58 -23
- data/app/controllers/thredded/setups_controller.rb +1 -0
- data/app/controllers/thredded/theme_previews_controller.rb +24 -53
- data/app/controllers/thredded/topics_controller.rb +48 -77
- data/app/forms/thredded/private_topic_form.rb +1 -21
- data/app/forms/thredded/topic_form.rb +3 -7
- data/app/forms/thredded/user_preferences_form.rb +62 -0
- data/app/helpers/thredded/application_helper.rb +11 -12
- data/app/helpers/thredded/urls_helper.rb +103 -0
- data/app/jobs/thredded/activity_updater_job.rb +4 -3
- data/app/jobs/thredded/at_notifier_job.rb +1 -0
- data/app/jobs/thredded/notify_private_topic_users_job.rb +1 -0
- data/app/mailer_previews/thredded/base_mailer_preview.rb +101 -0
- data/app/mailer_previews/thredded/post_mailer_preview.rb +11 -0
- data/app/mailer_previews/thredded/private_post_mailer_preview.rb +11 -0
- data/app/mailer_previews/thredded/private_topic_mailer_preview.rb +15 -0
- data/app/mailers/thredded/base_mailer.rb +13 -0
- data/app/mailers/thredded/post_mailer.rb +4 -2
- data/app/mailers/thredded/private_post_mailer.rb +4 -2
- data/app/mailers/thredded/private_topic_mailer.rb +4 -2
- data/app/models/concerns/thredded/friendly_id_reserved_words_and_pagination.rb +16 -0
- data/app/models/concerns/thredded/post_common.rb +68 -63
- data/app/models/concerns/thredded/topic_common.rb +31 -8
- data/app/models/concerns/thredded/user_topic_read_state_common.rb +31 -0
- data/app/models/thredded/category.rb +1 -0
- data/app/models/thredded/messageboard.rb +24 -25
- data/app/models/thredded/messageboard_user.rb +1 -0
- data/app/models/thredded/null_preference.rb +1 -0
- data/app/models/thredded/null_user.rb +1 -6
- data/app/models/thredded/null_user_topic_read_state.rb +12 -0
- data/app/models/thredded/post.rb +6 -9
- data/app/models/thredded/post_notification.rb +1 -0
- data/app/models/thredded/private_post.rb +6 -2
- data/app/models/thredded/private_topic.rb +46 -32
- data/app/models/thredded/private_user.rb +3 -2
- data/app/models/thredded/stats.rb +1 -0
- data/app/models/thredded/topic.rb +40 -64
- data/app/models/thredded/topic_category.rb +1 -0
- data/app/models/thredded/user_detail.rb +2 -15
- data/app/models/thredded/user_extender.rb +29 -14
- data/app/models/thredded/user_messageboard_preference.rb +20 -0
- data/app/models/thredded/user_permissions/admin/if_admin_column_true.rb +1 -0
- data/app/models/thredded/user_permissions/admin/none.rb +1 -0
- data/app/models/thredded/user_permissions/message/readers_of_writeable_boards.rb +1 -0
- data/app/models/thredded/user_permissions/moderate/if_moderator_column_true.rb +1 -0
- data/app/models/thredded/user_permissions/moderate/none.rb +1 -0
- data/app/models/thredded/user_permissions/read/all.rb +1 -0
- data/app/models/thredded/user_permissions/write/all.rb +1 -0
- data/app/models/thredded/user_permissions/write/none.rb +1 -0
- data/app/models/thredded/user_preference.rb +7 -1
- data/app/models/thredded/user_private_topic_read_state.rb +12 -0
- data/app/models/thredded/user_topic_read_state.rb +12 -0
- data/app/policies/thredded/messageboard_policy.rb +27 -0
- data/app/policies/thredded/post_policy.rb +33 -0
- data/app/policies/thredded/private_post_policy.rb +29 -0
- data/app/policies/thredded/private_topic_policy.rb +23 -0
- data/app/policies/thredded/topic_policy.rb +32 -0
- data/app/view_models/thredded/base_topic_view.rb +56 -0
- data/app/view_models/thredded/post_view.rb +44 -0
- data/app/view_models/thredded/posts_page_view.rb +27 -0
- data/app/view_models/thredded/private_topic_view.rb +9 -0
- data/app/{decorators/thredded/topic_email_decorator.rb → view_models/thredded/topic_email_view.rb} +2 -1
- data/app/view_models/thredded/topic_view.rb +23 -0
- data/app/view_models/thredded/topics_page_view.rb +26 -0
- data/app/views/thredded/error_pages/forbidden.html.erb +6 -0
- data/app/views/thredded/error_pages/not_found.html.erb +6 -0
- data/app/views/thredded/messageboards/_messageboard.html.erb +13 -6
- data/app/views/thredded/messageboards/index.html.erb +2 -8
- data/app/views/thredded/messageboards/new.html.erb +8 -2
- data/app/views/thredded/post_mailer/at_notification.html.erb +3 -3
- data/app/views/thredded/post_mailer/at_notification.text.erb +1 -1
- data/app/views/thredded/posts/_content_field.html.erb +1 -1
- data/app/views/thredded/posts/_form.html.erb +5 -1
- data/app/views/thredded/posts/_post.html.erb +3 -1
- data/app/views/thredded/posts/edit.html.erb +7 -3
- data/app/views/thredded/posts_common/_form.html.erb +1 -1
- data/app/views/thredded/posts_common/_post.html.erb +14 -8
- data/app/views/thredded/preferences/_form.html.erb +37 -15
- data/app/views/thredded/preferences/_header.html.erb +1 -1
- data/app/views/thredded/preferences/edit.html.erb +4 -6
- data/app/views/thredded/private_post_mailer/at_notification.html.erb +6 -4
- data/app/views/thredded/private_posts/_form.html.erb +5 -1
- data/app/views/thredded/private_posts/_private_post.html.erb +3 -1
- data/app/views/thredded/private_topic_mailer/message_notification.html.erb +3 -7
- data/app/views/thredded/private_topic_mailer/message_notification.text.erb +1 -3
- data/app/views/thredded/private_topics/_breadcrumbs.html.erb +2 -2
- data/app/views/thredded/private_topics/_form.html.erb +15 -10
- data/app/views/thredded/private_topics/_header.html.erb +12 -0
- data/app/views/thredded/private_topics/_no_private_topics.html.erb +2 -2
- data/app/views/thredded/private_topics/_private_topic.html.erb +4 -6
- data/app/views/thredded/private_topics/edit.html.erb +32 -0
- data/app/views/thredded/private_topics/index.html.erb +5 -5
- data/app/views/thredded/private_topics/new.html.erb +1 -2
- data/app/views/thredded/private_topics/show.html.erb +12 -7
- data/app/views/thredded/search/_form.html.erb +9 -6
- data/app/views/thredded/shared/{_messageboard_topics_breadcrumbs.html.erb → _breadcrumbs.html.erb} +2 -2
- data/app/views/thredded/shared/_header.html.erb +2 -3
- data/app/views/thredded/shared/_nav.html.erb +20 -0
- data/app/views/thredded/shared/nav/_notification_preferences.html.erb +6 -0
- data/app/views/thredded/shared/nav/_private_topics.html.erb +11 -0
- data/app/views/thredded/shared/nav/_standalone.html.erb +12 -0
- data/app/views/thredded/theme_previews/_section_title.html.erb +2 -2
- data/app/views/thredded/theme_previews/show.html.erb +13 -17
- data/app/views/thredded/topics/_form.html.erb +8 -6
- data/app/views/thredded/topics/_header.html.erb +12 -0
- data/app/views/thredded/topics/_topic.html.erb +4 -8
- data/app/views/thredded/topics/_topic_form_admin_options.html.erb +1 -1
- data/app/views/thredded/topics/edit.html.erb +22 -18
- data/app/views/thredded/topics/index.html.erb +3 -3
- data/app/views/thredded/topics/new.html.erb +1 -1
- data/app/views/thredded/topics/search.html.erb +17 -5
- data/app/views/thredded/topics/show.html.erb +14 -11
- data/bin/rails +5 -0
- data/config.ru +3 -0
- data/config/i18n-tasks.yml +16 -0
- data/config/locales/en.yml +90 -0
- data/config/routes.rb +29 -15
- data/db/migrate/20160329231848_create_thredded.rb +29 -33
- data/db/seeds.rb +115 -0
- data/db/upgrade_migrations/20160410111522_upgrade_v0_2_to_v0_3.rb +59 -0
- data/heroku.gemfile +26 -0
- data/heroku.gemfile.lock +282 -0
- data/lib/generators/thredded/install/install_generator.rb +1 -0
- data/lib/generators/thredded/install/templates/initializer.rb +17 -0
- data/lib/html/pipeline/at_mention_filter.rb +2 -1
- data/lib/html/pipeline/bbcode_filter.rb +13 -4
- data/lib/tasks/thredded_tasks.rake +1 -0
- data/lib/thredded.rb +19 -17
- data/lib/thredded/at_users.rb +1 -0
- data/lib/thredded/engine.rb +14 -5
- data/lib/thredded/errors.rb +11 -11
- data/lib/thredded/main_app_route_delegator.rb +1 -0
- data/lib/thredded/search_parser.rb +2 -1
- data/lib/thredded/topics_search.rb +67 -0
- data/lib/thredded/version.rb +2 -1
- data/thredded.gemspec +12 -8
- metadata +146 -82
- data/app/assets/javascripts/thredded/users_select.es6 +0 -5
- data/app/assets/stylesheets/thredded/layout/_topic-navigation.scss +0 -53
- data/app/commands/thredded/user_reads_private_topic.rb +0 -22
- data/app/commands/thredded/user_resets_private_topic_to_unread.rb +0 -23
- data/app/decorators/thredded/base_topic_decorator.rb +0 -14
- data/app/decorators/thredded/base_user_topic_decorator.rb +0 -63
- data/app/decorators/thredded/messageboard_decorator.rb +0 -41
- data/app/decorators/thredded/post_decorator.rb +0 -40
- data/app/decorators/thredded/private_topic_decorator.rb +0 -23
- data/app/decorators/thredded/topic_decorator.rb +0 -25
- data/app/decorators/thredded/user_private_topic_decorator.rb +0 -13
- data/app/decorators/thredded/user_topic_decorator.rb +0 -37
- data/app/models/thredded/ability.rb +0 -60
- data/app/models/thredded/notification_preference.rb +0 -17
- data/app/models/thredded/null_topic.rb +0 -15
- data/app/models/thredded/null_topic_read.rb +0 -19
- data/app/models/thredded/user_topic_read.rb +0 -10
- data/app/views/thredded/shared/_notification_preferences.html.erb +0 -7
- data/app/views/thredded/shared/_top_nav.html.erb +0 -36
- data/app/views/thredded/shared/_topic_nav.html.erb +0 -22
- data/app/views/thredded/topics/_recent_topics_by_user.html.erb +0 -8
- data/app/views/thredded/topics/by_category.html.erb +0 -56
- data/app/views/thredded/topics_common/_header.html.erb +0 -6
- data/lib/thredded/messageboard_user_permissions.rb +0 -22
- data/lib/thredded/post_sql_builder.rb +0 -12
- data/lib/thredded/post_user_permissions.rb +0 -32
- data/lib/thredded/private_topic_user_permissions.rb +0 -26
- data/lib/thredded/search_sql_builder.rb +0 -21
- data/lib/thredded/seed_database.rb +0 -76
- data/lib/thredded/table_sql_builder.rb +0 -41
- data/lib/thredded/topic_sql_builder.rb +0 -11
- data/lib/thredded/topic_user_permissions.rb +0 -32
@@ -1,11 +1,11 @@
|
|
1
|
-
|
1
|
+
<blockquote><%= @post.filtered_content(self) %></blockquote>
|
2
2
|
|
3
3
|
<hr />
|
4
4
|
|
5
5
|
<p>
|
6
6
|
This email was sent to you because <%= @post.user %> mentioned you in
|
7
|
-
"<%= link_to @post.postable.title,
|
8
|
-
<%= link_to 'View the conversation here
|
7
|
+
"<%= link_to @post.postable.title, post_url(@post) %>".
|
8
|
+
<%= link_to 'View the conversation here', topic_url(@post.postable) %>.
|
9
9
|
</p>
|
10
10
|
|
11
11
|
<p>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
This email was sent to you because <%= @post.user %> mentioned you in
|
6
6
|
"<%= @post.postable.title %>". Go here to view the conversation:
|
7
|
-
<%=
|
7
|
+
<%= post_url @post %>
|
8
8
|
|
9
9
|
To unsubscribe from these emails, update your preferences here:
|
10
10
|
<%= edit_messageboard_preferences_url @post.messageboard %>
|
@@ -1,13 +1,17 @@
|
|
1
1
|
<% content_for :thredded_page_title, 'Edit Post' %>
|
2
2
|
<% content_for :thredded_page_id, 'thredded--edit-post' %>
|
3
|
+
<% content_for :thredded_breadcrumbs do %>
|
4
|
+
<ul class="thredded--navigation-breadcrumbs">
|
5
|
+
<li><%= link_to t('thredded.nav.edit_post'), edit_post_path(@post) %></li>
|
6
|
+
</ul>
|
7
|
+
<% end %>
|
8
|
+
|
3
9
|
<%= thredded_page do %>
|
4
10
|
<section class="thredded--main-section">
|
5
|
-
<h3 class="thredded--post-form--title">Edit Post</h3>
|
6
|
-
|
7
11
|
<%= render 'thredded/posts/form',
|
8
12
|
messageboard: messageboard,
|
9
13
|
topic: topic,
|
10
14
|
post: @post,
|
11
|
-
button_text: '
|
15
|
+
button_text: t('thredded.posts.form.update_btn') %>
|
12
16
|
</section>
|
13
17
|
<% end %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<%= form_for (post.private_topic_post? ? [topic, post] : [messageboard, topic, post]), as: :post,
|
2
2
|
html: { class: 'thredded--form thredded--post-form', 'data-thredded-post-form' => true } do |form| %>
|
3
3
|
<ul class="thredded--form-list">
|
4
|
-
<%= render 'thredded/posts/content_field', form: form %>
|
4
|
+
<%= render 'thredded/posts/content_field', form: form, content_label: content_label %>
|
5
5
|
|
6
6
|
<li>
|
7
7
|
<%= form.submit button_text, class: 'thredded--form--submit' %>
|
@@ -1,20 +1,26 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<%= content_tag_for :article, post, class: 'thredded--post' do %>
|
1
|
+
<%# @param post [Thredded::PostView] %>
|
2
|
+
<%= content_tag :article, id: dom_id(post), class: 'thredded--post' do %>
|
4
3
|
<header>
|
5
|
-
<%= image_tag post.avatar_url, class: 'thredded--post--avatar'
|
4
|
+
<%= image_tag post.avatar_url, class: 'thredded--post--avatar' if post.user %>
|
6
5
|
<h2 class="thredded--post--user"><%= user_link post.user %></h2>
|
7
6
|
<p class="thredded--post--created-at"><%= time_ago post.created_at %></p>
|
8
|
-
|
9
7
|
</header>
|
10
8
|
|
11
9
|
<div class="thredded--post--content">
|
12
|
-
<% cache [post, 'content'] do %>
|
10
|
+
<% cache [post, 'content'], expires_in: 1.week do %>
|
13
11
|
<%= post.filtered_content(self) %>
|
14
12
|
<% end %>
|
15
13
|
</div>
|
16
14
|
|
17
|
-
<% if
|
18
|
-
<%= link_to '
|
15
|
+
<% if post.can_update? %>
|
16
|
+
<%= link_to t('thredded.posts.edit'), post.edit_path, class: 'thredded--post--edit' %>
|
17
|
+
<% end %>
|
18
|
+
|
19
|
+
<% if post.can_destroy? %>
|
20
|
+
<%= link_to t('thredded.posts.delete'), post.destroy_path,
|
21
|
+
method: :delete,
|
22
|
+
class: 'thredded--post--delete',
|
23
|
+
data: { confirm: I18n.t('thredded.posts.delete_confirm') }
|
24
|
+
%>
|
19
25
|
<% end %>
|
20
26
|
<% end %>
|
@@ -1,28 +1,50 @@
|
|
1
|
-
<%= form_for
|
2
|
-
|
1
|
+
<%= form_for(
|
2
|
+
preferences,
|
3
|
+
method: :patch,
|
4
|
+
url: (preferences.messageboard ? messageboard_preferences_path(preferences.messageboard) : preferences_path),
|
5
|
+
html: {
|
6
|
+
class: 'thredded--form thredded--notification-preferences-form',
|
7
|
+
'data-thredded-user-preferences-form' => true
|
8
|
+
}) do |f| %>
|
9
|
+
|
10
|
+
<h3><%= t 'thredded.preferences.form.global_preferences_label' %></h3>
|
3
11
|
<ul class="thredded--form-list">
|
4
12
|
<li>
|
5
|
-
<%= f.label :
|
6
|
-
<%= f.check_box :
|
7
|
-
|
13
|
+
<%= f.label :notify_on_message do %>
|
14
|
+
<%= f.check_box :notify_on_message %>
|
15
|
+
<%= t 'thredded.preferences.form.notify_on_message.label' %>
|
8
16
|
<p class="thredded--form-list--hint">
|
9
|
-
|
10
|
-
you will receive an email with the contents of that post.
|
17
|
+
<%= t 'thredded.preferences.form.notify_on_message.hint' %>
|
11
18
|
</p>
|
12
19
|
<% end %>
|
13
20
|
</li>
|
14
21
|
<li>
|
15
|
-
<%= f.label :
|
16
|
-
<%= f.check_box :
|
17
|
-
|
22
|
+
<%= f.label :notify_on_mention do %>
|
23
|
+
<%= f.check_box :notify_on_mention %>
|
24
|
+
<%= t 'thredded.preferences.form.notify_on_mention.label' %>
|
18
25
|
<p class="thredded--form-list--hint">
|
19
|
-
|
20
|
-
you will receive an email with the contents of that initial
|
21
|
-
post.
|
26
|
+
<%= t 'thredded.preferences.form.notify_on_mention.hint' %>
|
22
27
|
</p>
|
23
28
|
<% end %>
|
24
29
|
</li>
|
25
|
-
<li><%= f.submit 'Update Settings', class: 'thredded--form--submit' %></li>
|
26
30
|
</ul>
|
31
|
+
<% if preferences.messageboard %>
|
32
|
+
<h3>
|
33
|
+
<%= t 'thredded.preferences.form.messageboard_preferences_label_html', messageboard: messageboard.name %>
|
34
|
+
</h3>
|
35
|
+
<ul class="thredded--form-list" data-thredded-user-preferences-form-messageboard-fields>
|
36
|
+
<li>
|
37
|
+
<%= f.label :messageboard_notify_on_mention do %>
|
38
|
+
<%= f.check_box :messageboard_notify_on_mention %>
|
39
|
+
<%= t 'thredded.preferences.form.messageboard_notify_on_mention.label' %>
|
40
|
+
<p class="thredded--form-list--hint">
|
41
|
+
<%= t 'thredded.preferences.form.messageboard_notify_on_mention.hint' %>
|
42
|
+
</p>
|
43
|
+
<% end %>
|
44
|
+
</li>
|
45
|
+
</ul>
|
46
|
+
<% end %>
|
47
|
+
<button type="submit" class="thredded--form--submit">
|
48
|
+
<%= t 'thredded.preferences.form.submit_btn' %>
|
49
|
+
</button>
|
27
50
|
<% end %>
|
28
|
-
|
@@ -1 +1 @@
|
|
1
|
-
<h1 class="thredded--preferences-header--title"
|
1
|
+
<h1 class="thredded--preferences-header--title"><%= t 'thredded.preferences.form.title' %></h1>
|
@@ -1,12 +1,10 @@
|
|
1
|
-
<% content_for :thredded_page_title, '
|
2
|
-
<% content_for :thredded_page_id, 'thredded--preferences
|
3
|
-
<% content_for :thredded_breadcrumbs, render('thredded/shared/
|
1
|
+
<% content_for :thredded_page_title, t('thredded.preferences.edit.page_title') %>
|
2
|
+
<% content_for :thredded_page_id, 'thredded--preferences' %>
|
3
|
+
<% content_for :thredded_breadcrumbs, render('thredded/shared/breadcrumbs') %>
|
4
4
|
|
5
5
|
<%= thredded_page do %>
|
6
6
|
<section class="thredded--main-section preferences">
|
7
7
|
<%= render 'thredded/preferences/header' %>
|
8
|
-
<%= render 'thredded/preferences/form',
|
9
|
-
messageboard: messageboard,
|
10
|
-
preference: preference %>
|
8
|
+
<%= render 'thredded/preferences/form', preferences: @preferences %>
|
11
9
|
</section>
|
12
10
|
<% end %>
|
@@ -1,11 +1,13 @@
|
|
1
|
-
|
1
|
+
<blockquote><%= @post.filtered_content(self) %></blockquote>
|
2
2
|
|
3
3
|
<hr />
|
4
4
|
|
5
5
|
<p>
|
6
6
|
This email was sent to you because <%= @post.user %> mentioned you in
|
7
|
-
"<%= link_to @post.postable.title,
|
8
|
-
<%= link_to 'View the conversation here
|
7
|
+
"<%= link_to @post.postable.title, post_url(@post) %>".
|
8
|
+
<%= link_to 'View the conversation here', topic_url(@post.postable) %>.
|
9
9
|
</p>
|
10
10
|
|
11
|
-
|
11
|
+
<p>
|
12
|
+
To unsubscribe from these emails, update your <%= link_to 'preferences', edit_preferences_url %>.
|
13
|
+
</p>
|
@@ -1 +1,5 @@
|
|
1
|
-
<%= render 'thredded/posts_common/form',
|
1
|
+
<%= render 'thredded/posts_common/form',
|
2
|
+
topic: topic,
|
3
|
+
post: post,
|
4
|
+
button_text: t('thredded.private_posts.form.create_btn'),
|
5
|
+
content_label: t('thredded.private_posts.form.content_label') %>
|
@@ -1,17 +1,13 @@
|
|
1
|
-
|
1
|
+
<blockquote><%= @topic.posts.first.filtered_content(self) %></blockquote>
|
2
2
|
|
3
3
|
<hr />
|
4
4
|
|
5
5
|
<p>
|
6
6
|
This email was sent to you because <%= @topic.user %> included you in a
|
7
7
|
private topic, "<%= link_to @topic.title, @topic %>".
|
8
|
-
<%= link_to 'Go here', @topic %>
|
9
|
-
to view the conversation.
|
8
|
+
<%= link_to 'Go here', @topic %> to view the conversation.
|
10
9
|
</p>
|
11
10
|
|
12
|
-
<% if false # TODO: implement global notification preferences for private topics. %>
|
13
11
|
<p>
|
14
|
-
To unsubscribe from these emails, update your
|
15
|
-
<%= link_to 'preferences', edit_messageboard_preferences_url(@topic.messageboard) %>.
|
12
|
+
To unsubscribe from these emails, update your <%= link_to 'preferences', edit_preferences_url %>.
|
16
13
|
</p>
|
17
|
-
<% end %>
|
@@ -7,7 +7,5 @@ included you in the private topic "<%= @topic.title %>".
|
|
7
7
|
Go here to view the conversation:
|
8
8
|
<%= url_for @topic %>
|
9
9
|
|
10
|
-
<% if false # TODO: implement global notification preferences for private topics. %>
|
11
10
|
To unsubscribe from these emails, update your preferences here:
|
12
|
-
<%=
|
13
|
-
<% end %>
|
11
|
+
<%= edit_preferences_url %>
|
@@ -1,4 +1,4 @@
|
|
1
1
|
<ul class="thredded--navigation-breadcrumbs">
|
2
|
-
<li><%= link_to '
|
3
|
-
<li><%= link_to '
|
2
|
+
<li><%= link_to t('thredded.nav.all_messageboards'), messageboards_path -%></li>
|
3
|
+
<li><%= link_to t('thredded.nav.private_topics'), private_topics_path -%></li>
|
4
4
|
</ul>
|
@@ -4,21 +4,26 @@
|
|
4
4
|
|
5
5
|
<ul class="thredded--form-list on-top">
|
6
6
|
<li class="title">
|
7
|
-
<%= form.label :title, '
|
8
|
-
<%= form.text_field :title,
|
7
|
+
<%= form.label :title, t('thredded.private_topics.form.title_label') %>
|
8
|
+
<%= form.text_field :title, placeholder: placeholder, required: true %>
|
9
9
|
</li>
|
10
|
-
|
11
10
|
<li>
|
12
|
-
<%= form.label :
|
13
|
-
<%= form.
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
<%= form.label :user_ids, t('thredded.private_topics.form.users_label') %>
|
12
|
+
<%= form.text_field :user_ids,
|
13
|
+
placeholder: t('thredded.private_topics.form.users_placeholder'),
|
14
|
+
'data-thredded-users-select' => true,
|
15
|
+
'data-autocomplete-url' => autocomplete_users_path %>
|
17
16
|
</li>
|
18
17
|
|
19
|
-
<%= render 'thredded/posts/content_field',
|
18
|
+
<%= render 'thredded/posts/content_field',
|
19
|
+
form: form,
|
20
|
+
content_label: t('thredded.private_topics.form.content_label') %>
|
20
21
|
|
21
|
-
<li
|
22
|
+
<li>
|
23
|
+
<button type="submit" class="thredded--form--submit">
|
24
|
+
<%= t('thredded.private_topics.form.create_btn') %>
|
25
|
+
</button>
|
26
|
+
</li>
|
22
27
|
</ul>
|
23
28
|
<% end %>
|
24
29
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<header class="thredded--topic-header">
|
2
|
+
<h1 class="thredded--topic-header--title"><%= topic.title %></h1>
|
3
|
+
<cite class="thredded--topic-header--started-by">
|
4
|
+
<%= t 'thredded.topics.started_by_html',
|
5
|
+
time_ago: time_ago(topic.created_at),
|
6
|
+
user: user_link(topic.user) %>
|
7
|
+
</cite>
|
8
|
+
<% if topic.can_update? %>
|
9
|
+
<%= link_to t('thredded.private_topics.edit'), topic.edit_path,
|
10
|
+
class: 'thredded--topic-header--edit-topic' %>
|
11
|
+
<% end %>
|
12
|
+
</header>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="thredded--empty">
|
2
|
-
<h3 class="thredded--empty--title"
|
2
|
+
<h3 class="thredded--empty--title"><%= t 'thredded.private_topics.no_private_topics.title' %></h3>
|
3
3
|
<a class="thredded--button" href="<%= new_private_topic_path(messageboard) %>">
|
4
|
-
|
4
|
+
<%= t 'thredded.private_topics.no_private_topics.create_btn' %>
|
5
5
|
</a>
|
6
6
|
</div>
|
@@ -1,8 +1,10 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag :article,
|
2
|
+
id: dom_id(private_topic),
|
3
|
+
class: ['thredded--topics--topic', *topic_css_classes(private_topic)] do %>
|
2
4
|
<div class="thredded--topics--posts-count"><%= private_topic.posts_count %></div>
|
3
5
|
|
4
6
|
<h1 class="thredded--topics--title">
|
5
|
-
<%= link_to private_topic.title, private_topic.
|
7
|
+
<%= link_to private_topic.title, private_topic.path %>
|
6
8
|
</h1>
|
7
9
|
|
8
10
|
<cite class="thredded--topics--updated-by">
|
@@ -14,9 +16,5 @@
|
|
14
16
|
<%= time_ago private_topic.created_at %>
|
15
17
|
<%= user_link private_topic.user %>
|
16
18
|
</cite>
|
17
|
-
|
18
|
-
<ul class="thredded--topics--categories">
|
19
|
-
<%= render private_topic.categories %>
|
20
|
-
</ul>
|
21
19
|
<% end %>
|
22
20
|
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<% content_for :thredded_page_title, t('thredded.nav.edit_private_topic') %>
|
2
|
+
<% content_for :thredded_page_id, 'thredded--edit-private-topic' %>
|
3
|
+
<% content_for :thredded_breadcrumbs do %>
|
4
|
+
<ul class="thredded--navigation-breadcrumbs">
|
5
|
+
<li><%= link_to t('thredded.nav.all_messageboards'), messageboards_path %></li>
|
6
|
+
<li><%= link_to t('thredded.nav.private_topics'), private_topics_path %></li>
|
7
|
+
<li><%= link_to @private_topic.title, topic_path(@private_topic) %></li>
|
8
|
+
<li><%= link_to t('thredded.nav.edit_private_topic'), edit_private_topic_path(@private_topic) %></li>
|
9
|
+
</ul>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
|
13
|
+
<%= thredded_page do %>
|
14
|
+
<%= form_for @private_topic,
|
15
|
+
url: private_topic_path(@private_topic),
|
16
|
+
html: { class: 'thredded--form', 'data-thredded-topic-form' => true } do |form| %>
|
17
|
+
<ul class="thredded--form-list on-top">
|
18
|
+
<li class="title">
|
19
|
+
<%= form.label :title, t('thredded.private_topics.form.title_label') %>
|
20
|
+
<%= form.text_field :title,
|
21
|
+
placeholder: t('thredded.private_topics.form.title_placeholder_new'),
|
22
|
+
autofocus: true,
|
23
|
+
required: true %>
|
24
|
+
</li>
|
25
|
+
<li>
|
26
|
+
<button type="submit" class="thredded--form--submit">
|
27
|
+
<%= t('thredded.private_topics.form.update_btn') %>
|
28
|
+
</button>
|
29
|
+
</li>
|
30
|
+
</ul>
|
31
|
+
<% end %>
|
32
|
+
<% end %>
|
@@ -1,9 +1,10 @@
|
|
1
|
-
<% content_for :thredded_page_title, '
|
1
|
+
<% content_for :thredded_page_title, t('thredded.nav.private_topics') %>
|
2
2
|
<% content_for :thredded_page_id, 'thredded--private-topics-index' %>
|
3
3
|
<% content_for :thredded_breadcrumbs, render('thredded/private_topics/breadcrumbs') %>
|
4
4
|
|
5
5
|
<%= thredded_page do %>
|
6
|
-
<%= content_tag :section, class: 'thredded--main-section thredded--private-topics'
|
6
|
+
<%= content_tag :section, class: 'thredded--main-section thredded--private-topics',
|
7
|
+
'data-thredded-topics' => true do %>
|
7
8
|
<% if @private_topics.empty? -%>
|
8
9
|
<%= render 'thredded/private_topics/no_private_topics' %>
|
9
10
|
<% else -%>
|
@@ -11,9 +12,8 @@
|
|
11
12
|
messageboard: messageboard,
|
12
13
|
private_topic: @new_private_topic,
|
13
14
|
css_class: 'thredded--is-compact',
|
14
|
-
placeholder: '
|
15
|
-
|
16
|
-
<%= render @decorated_private_topics %>
|
15
|
+
placeholder: t('thredded.private_topics.form.title_placeholder_start') %>
|
16
|
+
<%= render @private_topics %>
|
17
17
|
<% end -%>
|
18
18
|
<% end %>
|
19
19
|
|
@@ -7,7 +7,6 @@
|
|
7
7
|
<%= render 'thredded/private_topics/form',
|
8
8
|
messageboard: messageboard,
|
9
9
|
private_topic: @private_topic,
|
10
|
-
placeholder: '
|
11
|
-
button_text: 'Create New Private Topic' %>
|
10
|
+
placeholder: t('thredded.private_topics.form.title_placeholder_new') if @private_topic %>
|
12
11
|
</section>
|
13
12
|
<% end %>
|
@@ -1,14 +1,19 @@
|
|
1
|
+
<% private_topic = @posts.topic %>
|
1
2
|
<% content_for :thredded_page_title, private_topic.title %>
|
2
|
-
<% content_for :thredded_page_id, 'thredded--
|
3
|
+
<% content_for :thredded_page_id, 'thredded--private-topic-show' %>
|
3
4
|
<% content_for :thredded_breadcrumbs, render('thredded/private_topics/breadcrumbs') %>
|
4
5
|
|
5
6
|
<%= thredded_page do %>
|
6
|
-
<%=
|
7
|
-
|
8
|
-
|
7
|
+
<%= content_tag :section,
|
8
|
+
id: dom_id(private_topic),
|
9
|
+
class: ['thredded--main-section', 'thredded--topic', *topic_css_classes(private_topic)] do %>
|
10
|
+
<%= render 'thredded/private_topics/header', topic: private_topic %>
|
11
|
+
<%= render partial: 'thredded/private_posts/private_post', collection: @posts, cached: true %>
|
9
12
|
<%= render 'thredded/private_posts/form',
|
10
|
-
topic:
|
11
|
-
post:
|
12
|
-
button_text: 'Submit Reply' %>
|
13
|
+
topic: private_topic,
|
14
|
+
post: @post %>
|
13
15
|
<% end %>
|
16
|
+
<footer>
|
17
|
+
<%= paginate @posts %>
|
18
|
+
</footer>
|
14
19
|
<% end %>
|