thredded 0.11.0 → 0.12.0
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 +4 -4
- data/README.md +69 -23
- data/app/assets/javascripts/thredded/components/post_form.es6 +4 -4
- data/app/assets/javascripts/thredded/components/quote_post.es6 +45 -0
- data/app/assets/javascripts/thredded/components/topic_form.es6 +4 -4
- data/app/assets/javascripts/thredded/core/on_page_load.es6 +8 -0
- data/app/assets/javascripts/thredded/dependencies.js +1 -1
- data/app/assets/stylesheets/thredded/_base.scss +1 -0
- data/app/assets/stylesheets/thredded/_email.scss +2 -3
- data/app/assets/stylesheets/thredded/base/_dropdown-menu.scss +83 -0
- data/app/assets/stylesheets/thredded/components/_post.scss +5 -60
- data/app/assets/stylesheets/thredded/components/_preferences.scss +17 -4
- data/app/assets/stylesheets/thredded/layout/_main-navigation.scss +4 -1
- data/app/assets/stylesheets/thredded/layout/_search-navigation.scss +31 -6
- data/app/assets/stylesheets/thredded/layout/_user-navigation.scss +1 -0
- data/app/controllers/concerns/thredded/new_post_params.rb +20 -0
- data/app/controllers/concerns/thredded/new_private_post_params.rb +20 -0
- data/app/controllers/thredded/application_controller.rb +6 -0
- data/app/controllers/thredded/posts_controller.rb +28 -13
- data/app/controllers/thredded/preferences_controller.rb +1 -0
- data/app/controllers/thredded/private_posts_controller.rb +30 -12
- data/app/controllers/thredded/private_topics_controller.rb +11 -1
- data/app/controllers/thredded/theme_previews_controller.rb +4 -2
- data/app/controllers/thredded/topics_controller.rb +36 -3
- data/app/forms/thredded/post_form.rb +52 -0
- data/app/forms/thredded/private_post_form.rb +48 -0
- data/app/forms/thredded/private_topic_form.rb +8 -0
- data/app/forms/thredded/topic_form.rb +8 -0
- data/app/forms/thredded/user_preferences_form.rb +7 -1
- data/app/helpers/thredded/urls_helper.rb +18 -0
- data/app/models/thredded/topic.rb +3 -3
- data/app/policies/thredded/post_policy.rb +1 -1
- data/app/policies/thredded/private_topic_policy.rb +1 -1
- data/app/view_hooks/thredded/all_view_hooks.rb +3 -0
- data/app/view_models/thredded/messageboard_group_view.rb +1 -1
- data/app/view_models/thredded/post_view.rb +19 -3
- data/app/view_models/thredded/private_topic_view.rb +0 -4
- data/app/view_models/thredded/topic_view.rb +0 -4
- data/app/views/thredded/moderation/_users_search_form.html.erb +1 -1
- data/app/views/thredded/moderation/user.html.erb +13 -11
- data/app/views/thredded/moderation/users.html.erb +1 -0
- data/app/views/thredded/posts/_form.html.erb +0 -2
- data/app/views/thredded/posts/edit.html.erb +2 -5
- data/app/views/thredded/posts/new.html.erb +15 -0
- data/app/views/thredded/posts_common/_actions.html.erb +3 -0
- data/app/views/thredded/posts_common/_form.html.erb +5 -3
- data/app/views/thredded/posts_common/_header.html.erb +3 -1
- data/app/views/thredded/posts_common/actions/_quote.html.erb +4 -0
- data/app/views/thredded/preferences/_form.html.erb +3 -5
- data/app/views/thredded/preferences/_messageboards_nav.html.erb +8 -0
- data/app/views/thredded/preferences/_messageboards_nav_item.html.erb +2 -0
- data/app/views/thredded/preferences/edit.html.erb +13 -3
- data/app/views/thredded/private_posts/_form.html.erb +0 -2
- data/app/views/thredded/private_posts/edit.html.erb +2 -4
- data/app/views/thredded/private_posts/new.html.erb +11 -0
- data/app/views/thredded/private_topics/_form.html.erb +2 -2
- data/app/views/thredded/private_topics/index.html.erb +1 -2
- data/app/views/thredded/private_topics/new.html.erb +0 -1
- data/app/views/thredded/private_topics/show.html.erb +5 -3
- data/app/views/thredded/shared/_nav.html.erb +1 -7
- data/app/views/thredded/shared/nav/_notification_preferences.html.erb +1 -1
- data/app/views/thredded/shared/nav/_standalone.html.erb +4 -4
- data/app/views/thredded/shared/nav/_standalone_profile.html.erb +3 -0
- data/app/views/thredded/theme_previews/show.html.erb +3 -17
- data/app/views/thredded/topics/_form.html.erb +3 -2
- data/app/views/thredded/topics/index.html.erb +0 -2
- data/app/views/thredded/topics/new.html.erb +0 -2
- data/app/views/thredded/topics/search.html.erb +20 -2
- data/app/views/thredded/topics/show.html.erb +1 -3
- data/config/locales/en.yml +9 -5
- data/config/locales/es.yml +10 -6
- data/config/locales/pl.yml +9 -5
- data/config/locales/pt-BR.yml +9 -5
- data/config/locales/ru.yml +18 -10
- data/config/routes.rb +2 -0
- data/db/migrate/20160329231848_create_thredded.rb +1 -1
- data/db/upgrade_migrations/20170420163138_upgrade_thredded_v0_11_to_v0_12.rb +25 -0
- data/lib/generators/thredded/install/templates/initializer.rb +4 -4
- data/lib/thredded/content_formatter.rb +17 -3
- data/lib/thredded/html_pipeline/kramdown_filter.rb +1 -1
- data/lib/thredded/version.rb +1 -1
- data/lib/thredded.rb +13 -10
- data/vendor/assets/javascripts/autosize.js +290 -0
- metadata +31 -18
- data/app/views/thredded/preferences/_header.html.erb +0 -1
|
@@ -14,17 +14,19 @@
|
|
|
14
14
|
<% end %>
|
|
15
15
|
<%= view_hooks.moderation_user_page.user_info.render self, user: user do %>
|
|
16
16
|
<ul class="thredded--moderation--user--info">
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
<%= view_hooks.moderation_user_page.user_info_list_items.render self, user: user do %>
|
|
18
|
+
<li><%= t 'thredded.users.user_since_html', time_ago: time_ago(user.created_at) %></li>
|
|
19
|
+
<% if user_detail.last_seen_at %>
|
|
20
|
+
<li><%= t 'thredded.users.last_active_html', time_ago: time_ago(user_detail.last_seen_at) %></li>
|
|
21
|
+
<% end %>
|
|
22
|
+
<% if user_detail.topics_count > 0 %>
|
|
23
|
+
<li><%= t 'thredded.users.started_topics_count', count: user_detail.topics_count %></li>
|
|
24
|
+
<% end %>
|
|
25
|
+
<% if user_detail.posts_count > 0 %>
|
|
26
|
+
<li><%= t 'thredded.users.posts_count', count: user_detail.posts_count %></li>
|
|
27
|
+
<% end %>
|
|
28
|
+
<li><%= render 'user_moderation_state', user: @user %></li>
|
|
29
|
+
<% end %>
|
|
28
30
|
</ul>
|
|
29
31
|
<% end %>
|
|
30
32
|
<%= view_hooks.moderation_user_page.user_moderation_actions.render self, user: user do %>
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
<%= render 'thredded/posts_common/form',
|
|
2
|
-
topic: topic,
|
|
3
2
|
post: post,
|
|
4
|
-
preview_url: preview_url,
|
|
5
3
|
content_label: t('thredded.posts.form.content_label'),
|
|
6
4
|
button_text: button_text,
|
|
7
5
|
button_submitting_text: local_assigns.key?(:button_submitting_text) ? button_submitting_text : nil %>
|
|
@@ -2,17 +2,14 @@
|
|
|
2
2
|
<% content_for :thredded_page_id, 'thredded--edit-post' %>
|
|
3
3
|
<% content_for :thredded_breadcrumbs do %>
|
|
4
4
|
<ul class="thredded--navigation-breadcrumbs">
|
|
5
|
-
<li><%= link_to t('thredded.nav.edit_post'), edit_post_path(@post) %></li>
|
|
5
|
+
<li><%= link_to t('thredded.nav.edit_post'), edit_post_path(@post_form.post) %></li>
|
|
6
6
|
</ul>
|
|
7
7
|
<% end %>
|
|
8
8
|
|
|
9
9
|
<%= thredded_page do %>
|
|
10
10
|
<section class="thredded--main-section">
|
|
11
11
|
<%= render 'thredded/posts/form',
|
|
12
|
-
|
|
13
|
-
topic: topic,
|
|
14
|
-
post: @post,
|
|
15
|
-
preview_url: messageboard_topic_post_preview_path(messageboard, @post.postable, @post),
|
|
12
|
+
post: @post_form,
|
|
16
13
|
button_text: t('thredded.posts.form.update_btn'),
|
|
17
14
|
button_submitting_text: t('thredded.posts.form.update_btn_submitting')%>
|
|
18
15
|
</section>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<% content_for :thredded_page_title, @post_form.topic.title %>
|
|
2
|
+
<% content_for :thredded_page_id, 'thredded--topic--new-post' %>
|
|
3
|
+
<% content_for :thredded_breadcrumbs, render('thredded/shared/breadcrumbs') %>
|
|
4
|
+
|
|
5
|
+
<%= thredded_page do %>
|
|
6
|
+
<section class="thredded--main-section">
|
|
7
|
+
<div class="thredded--post-form--wrapper">
|
|
8
|
+
<h3 class="thredded--post-form--title"><%= t('thredded.posts.form.title_label') %></h3>
|
|
9
|
+
<%= render 'thredded/posts/form',
|
|
10
|
+
post: @post_form,
|
|
11
|
+
button_text: t('thredded.posts.form.create_btn'),
|
|
12
|
+
button_submitting_text: t('thredded.posts.form.create_btn_submitting') %>
|
|
13
|
+
</div>
|
|
14
|
+
</section>
|
|
15
|
+
<% end %>
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<% actions = capture do %>
|
|
2
2
|
<%= view_hooks.post_common.actions.render self, post: post do %>
|
|
3
|
+
<% if post.can_reply? %>
|
|
4
|
+
<%= render 'thredded/posts_common/actions/quote', post: post %>
|
|
5
|
+
<% end %>
|
|
3
6
|
<% if post.can_update? %>
|
|
4
7
|
<%= render 'thredded/posts_common/actions/edit', post: post %>
|
|
5
8
|
<% end %>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
<%# locals:
|
|
2
|
-
<%= form_for
|
|
1
|
+
<%# locals: post, content_label, button_text, button_submitting_text. %>
|
|
2
|
+
<%= form_for post,
|
|
3
|
+
url: post.submit_path,
|
|
4
|
+
as: :post,
|
|
3
5
|
html: {
|
|
4
6
|
class: 'thredded--form thredded--post-form',
|
|
5
7
|
'data-thredded-post-form' => true,
|
|
@@ -8,7 +10,7 @@
|
|
|
8
10
|
} do |form| %>
|
|
9
11
|
<ul class="thredded--form-list">
|
|
10
12
|
<%= render 'thredded/posts_common/form/content',
|
|
11
|
-
form: form, content_label: content_label, preview_url:
|
|
13
|
+
form: form, content_label: content_label, preview_url: post.preview_path %>
|
|
12
14
|
<li>
|
|
13
15
|
<% button_submitting_text ||=
|
|
14
16
|
post.persisted? ? t('thredded.form.update_btn_submitting') : t('thredded.form.create_btn_submitting') %>
|
|
@@ -2,5 +2,7 @@
|
|
|
2
2
|
<header>
|
|
3
3
|
<%= image_tag post.avatar_url, class: 'thredded--post--avatar' if post.user %>
|
|
4
4
|
<h2 class="thredded--post--user"><%= user_link post.user %></h2>
|
|
5
|
-
<
|
|
5
|
+
<a href="<%= post.permalink_path %>" rel="nofollow" class="thredded--link thredded--post--created-at">
|
|
6
|
+
<%= time_ago post.created_at %>
|
|
7
|
+
</a>
|
|
6
8
|
</header>
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
class: 'thredded--form thredded--notification-preferences-form',
|
|
4
4
|
'data-thredded-user-preferences-form' => true
|
|
5
5
|
}) do |f| %>
|
|
6
|
-
|
|
7
|
-
<h3><%= t 'thredded.preferences.form.global_preferences_label' %></h3>
|
|
8
6
|
<ul class="thredded--form-list">
|
|
9
7
|
<li>
|
|
10
8
|
<%= f.label :auto_follow_topics do %>
|
|
@@ -52,9 +50,9 @@
|
|
|
52
50
|
<% end %>
|
|
53
51
|
</ul>
|
|
54
52
|
<% if preferences.messageboard %>
|
|
55
|
-
<
|
|
56
|
-
<%= t 'thredded.preferences.
|
|
57
|
-
</
|
|
53
|
+
<h2 class="thredded--preferences--title">
|
|
54
|
+
<%= t 'thredded.preferences.messageboard_preferences_title_html', messageboard: messageboard.name %>
|
|
55
|
+
</h2>
|
|
58
56
|
<ul class="thredded--form-list" data-thredded-user-preferences-form-messageboard-fields>
|
|
59
57
|
<li>
|
|
60
58
|
<%= f.label :messageboard_auto_follow_topics do %>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<% preferences.messageboard_groups.each do |group| %>
|
|
2
|
+
<h3 class="thredded--messageboards-group--title"><%= group.name %></h3>
|
|
3
|
+
<div class="thredded--messageboards-group">
|
|
4
|
+
<%= render partial: 'thredded/preferences/messageboards_nav_item',
|
|
5
|
+
collection: group.messageboards,
|
|
6
|
+
as: :messageboard %>
|
|
7
|
+
</div>
|
|
8
|
+
<% end %>
|
|
@@ -3,8 +3,18 @@
|
|
|
3
3
|
<% content_for :thredded_breadcrumbs, render('thredded/shared/breadcrumbs') %>
|
|
4
4
|
|
|
5
5
|
<%= thredded_page do %>
|
|
6
|
-
<section class="thredded--main-section preferences">
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
<section class="thredded--main-section thredded--preferences">
|
|
7
|
+
<section class="thredded--preferences--form">
|
|
8
|
+
<h2 class="thredded--preferences--title"><%= t 'thredded.preferences.global_preferences_title' %></h2>
|
|
9
|
+
<%= render 'thredded/preferences/form', preferences: @preferences %>
|
|
10
|
+
</section>
|
|
11
|
+
<% unless preferences.messageboard %>
|
|
12
|
+
<section class="thredded--preferences--messageboards-nav">
|
|
13
|
+
<h2 class="thredded--preferences--title">
|
|
14
|
+
<%= t 'thredded.preferences.messageboard_preferences_nav_title' %>
|
|
15
|
+
</h2>
|
|
16
|
+
<%= render 'thredded/preferences/messageboards_nav', preferences: @preferences %>
|
|
17
|
+
</section>
|
|
18
|
+
<% end %>
|
|
9
19
|
</section>
|
|
10
20
|
<% end %>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<%# TODO: For private topics, only autocomplete users in this private topic %>
|
|
2
2
|
<%= render 'thredded/posts_common/form',
|
|
3
|
-
topic: topic,
|
|
4
3
|
post: post,
|
|
5
|
-
preview_url: preview_url,
|
|
6
4
|
button_text: t('thredded.private_posts.form.create_btn'),
|
|
7
5
|
button_submitting_text: t('thredded.private_posts.form.create_btn_submitting'),
|
|
8
6
|
content_label: t('thredded.private_posts.form.content_label') %>
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
<% content_for :thredded_page_id, 'thredded--edit-post' %>
|
|
3
3
|
<% content_for :thredded_breadcrumbs do %>
|
|
4
4
|
<ul class="thredded--navigation-breadcrumbs">
|
|
5
|
-
<li><%= link_to t('thredded.nav.edit_post'), edit_post_path(@post) %></li>
|
|
5
|
+
<li><%= link_to t('thredded.nav.edit_post'), edit_post_path(@post_form.post) %></li>
|
|
6
6
|
</ul>
|
|
7
7
|
<% end %>
|
|
8
8
|
|
|
9
9
|
<%= thredded_page do %>
|
|
10
10
|
<section class="thredded--main-section">
|
|
11
11
|
<%= render 'thredded/posts/form',
|
|
12
|
-
|
|
13
|
-
post: @post,
|
|
14
|
-
preview_url: private_topic_private_post_preview_path(@post.postable, @post),
|
|
12
|
+
post: @post_form,
|
|
15
13
|
button_text: t('thredded.posts.form.update_btn'),
|
|
16
14
|
button_submitting_text: t('thredded.posts.form.update_btn_submitting')%>
|
|
17
15
|
</section>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<% private_topic = @post_form.topic %>
|
|
2
|
+
<% content_for :thredded_page_title, private_topic.title %>
|
|
3
|
+
<% content_for :thredded_page_id, 'thredded--private-topic--new_post' %>
|
|
4
|
+
<% content_for :thredded_breadcrumbs, render('thredded/private_topics/breadcrumbs') %>
|
|
5
|
+
|
|
6
|
+
<%= thredded_page do %>
|
|
7
|
+
<section class="thredded--main-section">
|
|
8
|
+
<%= render 'thredded/private_posts/form',
|
|
9
|
+
post: @post_form %>
|
|
10
|
+
</section>
|
|
11
|
+
<% end %>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%= form_for private_topic,
|
|
2
|
-
url:
|
|
2
|
+
url: private_topic.submit_path,
|
|
3
3
|
html: {
|
|
4
4
|
class: "thredded--form thredded--new-private-topic-form #{local_assigns[:css_class]}",
|
|
5
5
|
'data-thredded-topic-form' => true,
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<%= render 'thredded/posts_common/form/content',
|
|
26
26
|
form: form,
|
|
27
27
|
content_label: t('thredded.private_topics.form.content_label'),
|
|
28
|
-
preview_url:
|
|
28
|
+
preview_url: private_topic.preview_path %>
|
|
29
29
|
|
|
30
30
|
<li>
|
|
31
31
|
<button type="submit" class="thredded--form--submit"
|
|
@@ -12,9 +12,8 @@
|
|
|
12
12
|
<% else -%>
|
|
13
13
|
<%= render 'thredded/private_topics/form',
|
|
14
14
|
private_topic: @new_private_topic,
|
|
15
|
-
preview_url: preview_new_private_topic_path,
|
|
16
15
|
css_class: 'thredded--is-compact',
|
|
17
|
-
placeholder: t('thredded.private_topics.form.title_placeholder_start') %>
|
|
16
|
+
placeholder: t('thredded.private_topics.form.title_placeholder_start') if @new_private_topic %>
|
|
18
17
|
|
|
19
18
|
<%= render @private_topics %>
|
|
20
19
|
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
<section class="thredded--main-section">
|
|
7
7
|
<%= render 'thredded/private_topics/form',
|
|
8
8
|
private_topic: @private_topic,
|
|
9
|
-
preview_url: preview_new_private_topic_path,
|
|
10
9
|
placeholder: t('thredded.private_topics.form.title_placeholder_new') if @private_topic %>
|
|
11
10
|
</section>
|
|
12
11
|
<% end %>
|
|
@@ -17,9 +17,11 @@
|
|
|
17
17
|
<%= view_hooks.posts_common.pagination_bottom.render(self, posts: @posts) do %>
|
|
18
18
|
<footer class="thredded--pagination-bottom"><%= paginate @posts %></footer>
|
|
19
19
|
<% end %>
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
<% if policy(@new_post.post).create? %>
|
|
22
|
+
<%= render 'thredded/private_posts/form',
|
|
21
23
|
topic: private_topic,
|
|
22
|
-
post: @
|
|
23
|
-
|
|
24
|
+
post: @new_post %>
|
|
25
|
+
<% end %>
|
|
24
26
|
<% end %>
|
|
25
27
|
<% end %>
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
<nav class="thredded--navigation">
|
|
2
2
|
<ul class="thredded--user-navigation<%= ' thredded--user-navigation-standalone' if Thredded.standalone_layout? %>">
|
|
3
|
-
<% if thredded_signed_in? && Thredded.standalone_layout? %>
|
|
4
|
-
<li class="thredded--user-navigation--profile thredded--user-navigation--item">
|
|
5
|
-
<%= link_to thredded_current_user.thredded_display_name, user_path(thredded_current_user) %>
|
|
6
|
-
</li>
|
|
7
|
-
<% end %>
|
|
8
|
-
|
|
9
3
|
<%= render 'thredded/shared/nav/moderation' %>
|
|
10
4
|
<%= render 'thredded/shared/nav/notification_preferences', messageboard: messageboard_or_nil %>
|
|
11
5
|
<%= render 'thredded/shared/nav/private_topics' %>
|
|
12
|
-
|
|
13
6
|
<% if Thredded.standalone_layout? %>
|
|
7
|
+
<%= render 'thredded/shared/nav/standalone_profile' if thredded_signed_in? %>
|
|
14
8
|
<%= render 'thredded/shared/nav/standalone' %>
|
|
15
9
|
<% end %>
|
|
16
10
|
</ul>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<% current = current_page_preferences? %>
|
|
2
2
|
<li class="thredded--user-navigation--settings thredded--user-navigation--item<%= ' thredded--is-current' if current %>">
|
|
3
3
|
<%= link_to current ? (messageboard ? messageboard_topics_path(messageboard) : messageboards_path)
|
|
4
|
-
: edit_preferences_path(messageboard) do %>
|
|
4
|
+
: edit_preferences_path(messageboard), rel: 'nofollow' do %>
|
|
5
5
|
<%= inline_svg 'thredded/settings.svg', class: 'thredded--icon', title: t('thredded.nav.settings') %>
|
|
6
6
|
<span class="thredded--nav-text"><%= t('thredded.nav.settings') %></span>
|
|
7
7
|
<% end %>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<li class="thredded--user-navigation--standalone thredded--user-navigation--item">
|
|
2
|
-
<% resource_name = Thredded.
|
|
1
|
+
<li class="thredded--user-navigation--standalone--session thredded--user-navigation--item">
|
|
2
|
+
<% resource_name = Thredded.user_class_name.underscore %>
|
|
3
3
|
<% if thredded_signed_in? %>
|
|
4
4
|
<%= link_to main_app.send(:"destroy_#{resource_name}_session_path"), method: :delete do %>
|
|
5
|
-
|
|
5
|
+
Sign Out
|
|
6
6
|
<% end %>
|
|
7
7
|
<% else %>
|
|
8
8
|
<%= link_to main_app.send(:"new_#{resource_name}_session_path") do %>
|
|
9
|
-
|
|
9
|
+
Sign In / Register
|
|
10
10
|
<% end %>
|
|
11
11
|
<% end %>
|
|
12
12
|
</li>
|
|
@@ -19,9 +19,7 @@
|
|
|
19
19
|
<%= render 'section_title', label: 'topics#index', href: messageboard_topics_path(@messageboard) %>
|
|
20
20
|
<%= content_tag :section, class: 'thredded--thredded--main-section topics' do %>
|
|
21
21
|
<%= render 'thredded/topics/form',
|
|
22
|
-
messageboard: @messageboard,
|
|
23
22
|
topic: @new_topic,
|
|
24
|
-
preview_url: preview_new_messageboard_topic_path(@messageboard),
|
|
25
23
|
css_class: 'thredded--is-compact',
|
|
26
24
|
placeholder: 'Start a New Topic' %>
|
|
27
25
|
<%= render @topics %>
|
|
@@ -37,19 +35,14 @@
|
|
|
37
35
|
<%= render 'thredded/topics/header', topic: @topic %>
|
|
38
36
|
<%= render @posts %>
|
|
39
37
|
<%= render 'thredded/posts/form',
|
|
40
|
-
messageboard: @messageboard,
|
|
41
|
-
topic: @topic,
|
|
42
38
|
post: @new_post,
|
|
43
|
-
preview_url: @topic.new_post_preview_path,
|
|
44
39
|
button_text: t('thredded.posts.form.create_btn')
|
|
45
40
|
%>
|
|
46
41
|
<% end %>
|
|
47
42
|
|
|
48
43
|
<%= render 'section_title', label: 'topics#new', href: new_messageboard_topic_path(@messageboard) %>
|
|
49
44
|
<%= render 'thredded/topics/form',
|
|
50
|
-
messageboard: @messageboard,
|
|
51
45
|
topic: @new_topic,
|
|
52
|
-
preview_url: preview_new_messageboard_topic_path(@messageboard),
|
|
53
46
|
placeholder: 'Start a New Topic' %>
|
|
54
47
|
|
|
55
48
|
<%= render 'section_title', label: 'posts#edit', href: edit_messageboard_topic_post_path(@messageboard, @post.postable, @post) %>
|
|
@@ -57,10 +50,7 @@
|
|
|
57
50
|
<h3 class="thredded--post-form--title">Edit Post</h3>
|
|
58
51
|
|
|
59
52
|
<%= render 'thredded/posts/form',
|
|
60
|
-
|
|
61
|
-
topic: @topic,
|
|
62
|
-
post: @post,
|
|
63
|
-
preview_url: @topic.new_post_preview_path,
|
|
53
|
+
post: @post_form,
|
|
64
54
|
button_text: t('thredded.posts.form.update_btn')
|
|
65
55
|
%>
|
|
66
56
|
<% end %>
|
|
@@ -76,7 +66,6 @@
|
|
|
76
66
|
<%= render 'thredded/private_topics/form',
|
|
77
67
|
private_topic: @new_private_topic,
|
|
78
68
|
css_class: 'thredded--is-compact',
|
|
79
|
-
preview_url: preview_new_private_topic_path,
|
|
80
69
|
placeholder: t('thredded.private_topics.form.title_placeholder_start') %>
|
|
81
70
|
<%= render @private_topics %>
|
|
82
71
|
<% end %>
|
|
@@ -85,7 +74,6 @@
|
|
|
85
74
|
<section class="thredded--thredded--main-section">
|
|
86
75
|
<%= render 'thredded/private_topics/form',
|
|
87
76
|
private_topic: @new_private_topic,
|
|
88
|
-
preview_url: preview_new_private_topic_path,
|
|
89
77
|
placeholder: t('thredded.private_topics.form.title_placeholder_new') %>
|
|
90
78
|
</section>
|
|
91
79
|
|
|
@@ -94,16 +82,14 @@
|
|
|
94
82
|
<%= render 'thredded/private_topics/header', topic: @private_topic %>
|
|
95
83
|
<%= render @private_posts %>
|
|
96
84
|
<%= render 'thredded/private_posts/form',
|
|
97
|
-
|
|
98
|
-
post: @private_post,
|
|
99
|
-
preview_url: @private_topic.new_post_preview_path,
|
|
85
|
+
post: @private_post_form,
|
|
100
86
|
button_text: t('thredded.private_posts.form.create_btn')
|
|
101
87
|
%>
|
|
102
88
|
</section>
|
|
103
89
|
|
|
104
90
|
<%= render 'section_title', label: 'preferences#edit', href: edit_messageboard_preferences_path(@messageboard) %>
|
|
105
91
|
<%= content_tag :section, class: 'thredded--thredded--main-section preferences' do %>
|
|
106
|
-
|
|
92
|
+
<h2 class="thredded--preferences-header--title"><%= t 'thredded.preferences.global_preferences_title' %></h2>
|
|
107
93
|
<%= render 'thredded/preferences/form', preferences: @preferences %>
|
|
108
94
|
<% end %>
|
|
109
95
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<%= form_for
|
|
1
|
+
<%= form_for topic,
|
|
2
|
+
url: topic.submit_path,
|
|
2
3
|
html: {
|
|
3
4
|
class: "thredded--form thredded--new-topic-form #{local_assigns[:css_class]}",
|
|
4
5
|
'data-thredded-topic-form' => true,
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
<%= render 'thredded/posts_common/form/content',
|
|
24
25
|
form: form,
|
|
25
26
|
content_label: t('thredded.topics.form.content_label'),
|
|
26
|
-
preview_url:
|
|
27
|
+
preview_url: topic.preview_path %>
|
|
27
28
|
<%= render 'thredded/topics/topic_form_admin_options', form: form %>
|
|
28
29
|
|
|
29
30
|
<li><%= form.submit t('thredded.topics.form.create_btn'), class: 'thredded--form--submit' %></li>
|
|
@@ -10,10 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
<%= content_tag :section, class: 'thredded--main-section thredded--topics', 'data-thredded-topics' => true do %>
|
|
12
12
|
<%= render 'thredded/topics/form',
|
|
13
|
-
messageboard: messageboard,
|
|
14
13
|
topic: @new_topic,
|
|
15
14
|
css_class: 'thredded--is-compact',
|
|
16
|
-
preview_url: preview_new_messageboard_topic_path(messageboard),
|
|
17
15
|
placeholder: t('thredded.topics.form.title_placeholder_start') if @new_topic %>
|
|
18
16
|
<%= render partial: 'thredded/topics/topic', collection: @topics, locals: {topics: @topics} %>
|
|
19
17
|
<% end %>
|
|
@@ -5,10 +5,8 @@
|
|
|
5
5
|
<%= thredded_page do %>
|
|
6
6
|
<section class="thredded--main-section">
|
|
7
7
|
<%= render 'thredded/topics/form',
|
|
8
|
-
messageboard: messageboard,
|
|
9
8
|
topic: @new_topic,
|
|
10
9
|
css_class: 'thredded--is-expanded',
|
|
11
|
-
preview_url: preview_new_messageboard_topic_path(messageboard),
|
|
12
10
|
placeholder: t('thredded.topics.form.title_placeholder_start') %>
|
|
13
11
|
</section>
|
|
14
12
|
<% end %>
|
|
@@ -5,7 +5,16 @@
|
|
|
5
5
|
<%= thredded_page do %>
|
|
6
6
|
<% if @topics.present? %>
|
|
7
7
|
<p class="thredded--alert thredded--alert-success">
|
|
8
|
-
|
|
8
|
+
<% if messageboard_or_nil %>
|
|
9
|
+
<%= t 'thredded.topics.search.results_in_messageboard_message_html',
|
|
10
|
+
query: @query, messageboard: messageboard.name %>
|
|
11
|
+
<br>
|
|
12
|
+
<a href="<%= messageboards_search_path(q: @query) %>">
|
|
13
|
+
<%= t('thredded.topics.search.search_in_all_messageboards_btn') -%>
|
|
14
|
+
</a>
|
|
15
|
+
<% else %>
|
|
16
|
+
<%= t 'thredded.topics.search.results_message_html', query: @query %>
|
|
17
|
+
<% end %>
|
|
9
18
|
</p>
|
|
10
19
|
<section class="thredded--main-section thredded--topics">
|
|
11
20
|
<%= render @topics %>
|
|
@@ -15,7 +24,16 @@
|
|
|
15
24
|
</footer>
|
|
16
25
|
<% else %>
|
|
17
26
|
<p class="thredded--alert thredded--alert-danger">
|
|
18
|
-
|
|
27
|
+
<% if messageboard_or_nil %>
|
|
28
|
+
<%= t 'thredded.topics.search.no_results_in_messageboard_message_html',
|
|
29
|
+
query: @query, messageboard: messageboard.name -%>
|
|
30
|
+
<br>
|
|
31
|
+
<a href="<%= messageboards_search_path(q: @query) %>">
|
|
32
|
+
<%= t('thredded.topics.search.search_in_all_messageboards_btn') -%>
|
|
33
|
+
</a>
|
|
34
|
+
<% else %>
|
|
35
|
+
<%= t 'thredded.topics.search.no_results_message_html', query: @query %>
|
|
36
|
+
<% end %>
|
|
19
37
|
</p>
|
|
20
38
|
<% end %>
|
|
21
39
|
<% end %>
|
|
@@ -17,13 +17,11 @@
|
|
|
17
17
|
<footer class="thredded--pagination-bottom"><%= paginate @posts %></footer>
|
|
18
18
|
<% end %>
|
|
19
19
|
|
|
20
|
-
<% if policy(@new_post).create? %>
|
|
20
|
+
<% if policy(@new_post.post).create? %>
|
|
21
21
|
<div class="thredded--post-form--wrapper">
|
|
22
22
|
<h3 class="thredded--post-form--title"><%= t('thredded.posts.form.title_label') %></h3>
|
|
23
23
|
<%= render 'thredded/posts/form',
|
|
24
|
-
topic: topic,
|
|
25
24
|
post: @new_post,
|
|
26
|
-
preview_url: topic.new_post_preview_path,
|
|
27
25
|
button_text: t('thredded.posts.form.create_btn'),
|
|
28
26
|
button_submitting_text: t('thredded.posts.form.create_btn_submitting') %>
|
|
29
27
|
</div>
|
data/config/locales/en.yml
CHANGED
|
@@ -82,6 +82,7 @@ en:
|
|
|
82
82
|
update_btn: Update Post
|
|
83
83
|
update_btn_submitting: :thredded.form.update_btn_submitting
|
|
84
84
|
pending_moderation_notice: Your post will be published when it has been reviewed by a moderator.
|
|
85
|
+
quote_btn: Quote
|
|
85
86
|
preferences:
|
|
86
87
|
edit:
|
|
87
88
|
page_title: :thredded.nav.settings
|
|
@@ -92,7 +93,6 @@ en:
|
|
|
92
93
|
follow_topics_on_mention:
|
|
93
94
|
hint: 'When someone mentions you by your username (eg: @sam) you will follow the topic.'
|
|
94
95
|
label: Follow topics you are mentioned in
|
|
95
|
-
global_preferences_label: Global Settings
|
|
96
96
|
messageboard_auto_follow_topics:
|
|
97
97
|
hint: Automatically follow all new topics in this messageboard. This overrides the respective setting
|
|
98
98
|
above.
|
|
@@ -103,14 +103,15 @@ en:
|
|
|
103
103
|
label: :thredded.preferences.form.follow_topics_on_mention.label
|
|
104
104
|
messageboard_notifications_for_followed_topics:
|
|
105
105
|
label: :thredded.preferences.form.notifications_for_followed_topics.label
|
|
106
|
-
messageboard_preferences_label_html: Notification Settings for <em>%{messageboard}</em>
|
|
107
106
|
notifications_for_followed_topics:
|
|
108
107
|
label: Notifications for followed topics
|
|
109
108
|
notifications_for_private_topics:
|
|
110
109
|
label: Notifications for private messages
|
|
111
110
|
submit_btn: Update Settings
|
|
112
|
-
title: Settings
|
|
113
111
|
update_btn_submitting: :thredded.form.update_btn_submitting
|
|
112
|
+
global_preferences_title: Global Settings
|
|
113
|
+
messageboard_preferences_nav_title: Messageboard Settings
|
|
114
|
+
messageboard_preferences_title_html: Settings for <em>%{messageboard}</em>
|
|
114
115
|
updated_notice: Your settings have been updated.
|
|
115
116
|
private_posts:
|
|
116
117
|
form:
|
|
@@ -172,9 +173,12 @@ en:
|
|
|
172
173
|
mark_as_unread: Mark unread from here
|
|
173
174
|
not_following: You are not following this topic.
|
|
174
175
|
search:
|
|
175
|
-
|
|
176
|
+
no_results_in_messageboard_message_html: There are no results for your search <q>%{query}</q> in %{messageboard}
|
|
177
|
+
no_results_message_html: There are no results for your search <q>%{query}</q>
|
|
176
178
|
page_title: Topics Search Results
|
|
177
|
-
|
|
179
|
+
results_in_messageboard_message_html: Search results for <q>%{query}</q> in %{messageboard}
|
|
180
|
+
results_message_html: Search results for <q>%{query}</q>
|
|
181
|
+
search_in_all_messageboards_btn: Search everywhere
|
|
178
182
|
started_by_html: Started %{time_ago} by %{user}
|
|
179
183
|
sticky:
|
|
180
184
|
label: Sticky
|
data/config/locales/es.yml
CHANGED
|
@@ -27,7 +27,7 @@ es:
|
|
|
27
27
|
update_btn_submitting: :thredded.form.update_btn_submitting
|
|
28
28
|
index:
|
|
29
29
|
page_title: Foros
|
|
30
|
-
last_updated_by_html: Actualizado
|
|
30
|
+
last_updated_by_html: Actualizado %{time_ago} <cite>por %{user}</cite>
|
|
31
31
|
topics_and_posts_counts: "%{topics_count} temas / %{posts_count} mensajes"
|
|
32
32
|
update: :thredded.form.update
|
|
33
33
|
updated_notice: Foro actualizado
|
|
@@ -82,6 +82,7 @@ es:
|
|
|
82
82
|
update_btn: Actualizar Mensaje
|
|
83
83
|
update_btn_submitting: :thredded.form.update_btn_submitting
|
|
84
84
|
pending_moderation_notice: Tu post será publicado cuando haya sido revisado por un moderador.
|
|
85
|
+
quote_btn: Citar
|
|
85
86
|
preferences:
|
|
86
87
|
edit:
|
|
87
88
|
page_title: :thredded.nav.settings
|
|
@@ -93,7 +94,6 @@ es:
|
|
|
93
94
|
follow_topics_on_mention:
|
|
94
95
|
hint: 'Cuando alguien te menciona usando tu nombre de usuario (por ejemplo: @sam), seguirás el tema.'
|
|
95
96
|
label: Sigue temas en los que seas mencionado
|
|
96
|
-
global_preferences_label: Ajustes Generales
|
|
97
97
|
messageboard_auto_follow_topics:
|
|
98
98
|
hint: >-
|
|
99
99
|
Sigue automáticamente todos los nuevos temas en este tablero de mensajes. Esto anula la configuración
|
|
@@ -105,14 +105,15 @@ es:
|
|
|
105
105
|
label: :thredded.preferences.form.follow_topics_on_mention.label
|
|
106
106
|
messageboard_notifications_for_followed_topics:
|
|
107
107
|
label: :thredded.preferences.form.notifications_for_followed_topics.label
|
|
108
|
-
messageboard_preferences_label_html: Ajustes de Notificaciones para <em>%{messageboard}</em>
|
|
109
108
|
notifications_for_followed_topics:
|
|
110
109
|
label: Notificaciones de temas seguidos
|
|
111
110
|
notifications_for_private_topics:
|
|
112
111
|
label: Notificaciones de mensajes privados
|
|
113
112
|
submit_btn: Actualizar Ajustes
|
|
114
|
-
title: Ajustes
|
|
115
113
|
update_btn_submitting: :thredded.form.update_btn_submitting
|
|
114
|
+
global_preferences_title: Ajustes Generales
|
|
115
|
+
messageboard_preferences_nav_title: Ajustes por foro
|
|
116
|
+
messageboard_preferences_title_html: Ajustes de Notificaciones para <em>%{messageboard}</em>
|
|
116
117
|
updated_notice: Tus ajustes han sido actualizados.
|
|
117
118
|
private_posts:
|
|
118
119
|
form:
|
|
@@ -174,9 +175,12 @@ es:
|
|
|
174
175
|
mark_as_unread: Marcar sin leer desde aquí
|
|
175
176
|
not_following: No estás siguiendo este tema.
|
|
176
177
|
search:
|
|
177
|
-
|
|
178
|
+
no_results_in_messageboard_message_html: No hay resultados para tu búsqueda <q>%{query}</q> en %{messageboard}
|
|
179
|
+
no_results_message_html: No hay resultados para tu búsqueda - <q>%{query}</q>
|
|
178
180
|
page_title: Temas encontrados
|
|
179
|
-
|
|
181
|
+
results_in_messageboard_message_html: Resultados de la búsqueda para <q>%{query}</q> en %{messageboard}
|
|
182
|
+
results_message_html: Resultados de búsqueda para <q>%{query}</q>
|
|
183
|
+
search_in_all_messageboards_btn: Buscar en todas partes
|
|
180
184
|
started_by_html: Empezado hace %{time_ago} por %{user}
|
|
181
185
|
sticky:
|
|
182
186
|
label: Fijado
|