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,6 +1,10 @@
|
|
1
1
|
&--topic-header {
|
2
2
|
margin-bottom: $thredded-large-spacing;
|
3
3
|
margin-top: $thredded-base-spacing;
|
4
|
+
@include thredded-media-mobile {
|
5
|
+
margin-bottom: $thredded-small-spacing;
|
6
|
+
margin-top: 0;
|
7
|
+
}
|
4
8
|
}
|
5
9
|
|
6
10
|
&--topic-header--title {
|
@@ -12,9 +16,15 @@
|
|
12
16
|
|
13
17
|
&--topic-header--started-by {
|
14
18
|
font-size: $thredded-font-size-small;
|
15
|
-
color:
|
19
|
+
color: $thredded-secondary-text-color;
|
16
20
|
font-style: normal;
|
17
21
|
a {
|
18
22
|
@extend %thredded--link;
|
19
23
|
}
|
20
24
|
}
|
25
|
+
|
26
|
+
&--topic-header--edit-topic {
|
27
|
+
@extend %thredded--link;
|
28
|
+
font-size: $thredded-font-size-small;
|
29
|
+
margin-left: 0.4rem;
|
30
|
+
}
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
a {
|
17
17
|
@extend %thredded--link;
|
18
|
-
color: $thredded-
|
18
|
+
color: $thredded-text-color;
|
19
19
|
display: inline;
|
20
20
|
|
21
21
|
&:hover {
|
@@ -34,9 +34,9 @@
|
|
34
34
|
li {
|
35
35
|
font-size: .5rem;
|
36
36
|
display: inline-block;
|
37
|
-
color: $thredded-
|
38
|
-
background-color: lighten($thredded-
|
39
|
-
box-shadow: inset 0 -1px 0 lighten($thredded-
|
37
|
+
color: $thredded-text-color;
|
38
|
+
background-color: lighten($thredded-text-color, 55%);
|
39
|
+
box-shadow: inset 0 -1px 0 lighten($thredded-text-color, 40%);
|
40
40
|
padding: 1px 6px;
|
41
41
|
border-radius: 2px;
|
42
42
|
text-transform: lowercase;
|
@@ -47,13 +47,13 @@
|
|
47
47
|
|
48
48
|
&--topics--started-by,
|
49
49
|
&--topics--updated-by {
|
50
|
-
color:
|
50
|
+
color: $thredded-secondary-text-color;
|
51
51
|
font-size: $thredded-font-size-small;
|
52
52
|
font-style: normal;
|
53
53
|
|
54
54
|
a {
|
55
55
|
@extend %thredded--link;
|
56
|
-
color: lighten($thredded-
|
56
|
+
color: lighten($thredded-text-color, 20%);
|
57
57
|
|
58
58
|
&:hover {
|
59
59
|
|
@@ -90,7 +90,6 @@
|
|
90
90
|
|
91
91
|
&--topics--posts-count {
|
92
92
|
border-radius: 50%;
|
93
|
-
color: white;
|
94
93
|
display: inline-block;
|
95
94
|
font-weight: 900;
|
96
95
|
font-size: 0.8rem;
|
@@ -102,12 +101,15 @@
|
|
102
101
|
text-align: center;
|
103
102
|
top: 0;
|
104
103
|
width: 2rem;
|
104
|
+
transition: background 0.1s linear, color 0.1s linear;
|
105
105
|
}
|
106
106
|
|
107
|
-
&--topic
|
108
|
-
background: $thredded-
|
107
|
+
&--topic-unread > &--topics--posts-count {
|
108
|
+
background: $thredded-badge-active-background;
|
109
|
+
color: $thredded-badge-active-color;
|
109
110
|
}
|
110
111
|
|
111
|
-
&--topic
|
112
|
-
background:
|
112
|
+
&--topic-read > &--topics--posts-count {
|
113
|
+
background: $thredded-badge-inactive-background;
|
114
|
+
color: $thredded-badge-inactive-color;
|
113
115
|
}
|
@@ -1,15 +1,15 @@
|
|
1
1
|
&--main-container {
|
2
2
|
@include thredded--clearfix;
|
3
3
|
-webkit-font-smoothing: antialiased;
|
4
|
-
color: $thredded-
|
4
|
+
color: $thredded-text-color;
|
5
5
|
font-family: $thredded-base-font-family;
|
6
6
|
font-size: $thredded-base-font-size;
|
7
7
|
line-height: $thredded-base-line-height;
|
8
8
|
margin: 0 auto;
|
9
9
|
max-width: $thredded-grid-container-max-width;
|
10
|
-
padding:
|
10
|
+
padding: 0;
|
11
11
|
|
12
12
|
@include thredded-media-tablet-and-up {
|
13
|
-
padding: 2rem;
|
13
|
+
padding: 0 2rem $thredded-small-spacing 2rem;
|
14
14
|
}
|
15
15
|
}
|
@@ -1,30 +1,30 @@
|
|
1
1
|
&--main-navigation {
|
2
2
|
@extend %thredded--list-unstyled;
|
3
3
|
@include thredded--clearfix;
|
4
|
-
border-bottom: $thredded-base-border;
|
5
4
|
display: block;
|
6
|
-
|
5
|
+
@include thredded-media-tablet-and-up {
|
6
|
+
margin-top: $thredded-small-spacing;
|
7
|
+
}
|
7
8
|
}
|
8
9
|
|
9
10
|
&--navigation-breadcrumbs {
|
10
11
|
@extend %thredded--list-unstyled;
|
11
|
-
margin-bottom: $thredded-small-spacing;
|
12
|
-
|
13
|
-
@include thredded-media-tablet-and-up {
|
14
|
-
float: left;
|
15
|
-
margin-bottom: 0;
|
16
|
-
padding-bottom: $thredded-small-spacing;
|
17
|
-
}
|
18
12
|
|
19
13
|
li {
|
20
14
|
display: inline-block;
|
15
|
+
font-weight: bold;
|
16
|
+
|
17
|
+
a {
|
18
|
+
display: inline-block;
|
19
|
+
padding: $thredded-small-spacing 0;
|
20
|
+
}
|
21
21
|
|
22
22
|
&:after {
|
23
23
|
background: image-url("thredded/breadcrumb-chevron.svg") no-repeat center center;
|
24
24
|
content: "";
|
25
25
|
display: inline-block;
|
26
26
|
height: 10px;
|
27
|
-
margin: 0 $thredded-small-spacing;
|
27
|
+
margin: 0 ($thredded-small-spacing - 0.3rem) 0 $thredded-small-spacing;
|
28
28
|
width: 6px;
|
29
29
|
}
|
30
30
|
|
@@ -34,12 +34,6 @@
|
|
34
34
|
}
|
35
35
|
|
36
36
|
a {
|
37
|
-
@extend %thredded--link;
|
38
|
-
color: $thredded-base-font-color;
|
39
|
-
font-weight: bold;
|
40
|
-
|
41
|
-
&:hover {
|
42
|
-
color: $thredded-action-color;
|
43
|
-
}
|
37
|
+
@extend %thredded--nav-link;
|
44
38
|
}
|
45
39
|
}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
&--navigation {
|
2
|
+
margin-bottom: $thredded-small-spacing;
|
3
|
+
position: relative;
|
4
|
+
.thredded--icon {
|
5
|
+
display: none;
|
6
|
+
}
|
7
|
+
}
|
8
|
+
|
9
|
+
@include thredded-media-mobile {
|
10
|
+
&--navigation {
|
11
|
+
display: table;
|
12
|
+
position: relative;
|
13
|
+
width: 100%;
|
14
|
+
}
|
15
|
+
&--main-navigation {
|
16
|
+
position: relative;
|
17
|
+
border: none;
|
18
|
+
}
|
19
|
+
&--navigation-breadcrumbs {
|
20
|
+
font-size: $thredded-font-size-small;
|
21
|
+
padding-right: 5rem;
|
22
|
+
}
|
23
|
+
&--navigation--search {
|
24
|
+
display: none;
|
25
|
+
.thredded--messageboards-index &,
|
26
|
+
.thredded--topics-index &,
|
27
|
+
.thredded--topic-search-results & {
|
28
|
+
display: block;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
&--user-navigation {
|
32
|
+
display: table-footer-group;
|
33
|
+
&-standalone {
|
34
|
+
display: block;
|
35
|
+
margin-bottom: 0;
|
36
|
+
}
|
37
|
+
%icon-nav-item {
|
38
|
+
margin-right: 0;
|
39
|
+
padding: 0;
|
40
|
+
position: absolute;
|
41
|
+
top: (0.8rem - $thredded-small-spacing);
|
42
|
+
z-index: 2;
|
43
|
+
a {
|
44
|
+
display: block;
|
45
|
+
padding: ($thredded-small-spacing / 2) 0 ($thredded-small-spacing / 2) 0;
|
46
|
+
font-size: 0;
|
47
|
+
}
|
48
|
+
.thredded--icon {
|
49
|
+
display: block;
|
50
|
+
width: 2rem;
|
51
|
+
height: 2rem;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
&--settings {
|
55
|
+
@extend %icon-nav-item;
|
56
|
+
right: 2.6rem;
|
57
|
+
}
|
58
|
+
&--private-topics {
|
59
|
+
@extend %icon-nav-item;
|
60
|
+
right: 0;
|
61
|
+
top: 1px;
|
62
|
+
a {
|
63
|
+
position: relative;
|
64
|
+
}
|
65
|
+
&--unread {
|
66
|
+
bottom: 0.3rem;
|
67
|
+
position: absolute;
|
68
|
+
right: -0.2rem;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
&--navigation--search {
|
2
|
+
margin-right: 0;
|
3
|
+
padding: 0;
|
4
|
+
position: absolute;
|
5
|
+
top: 0;
|
6
|
+
right: 0;
|
7
|
+
|
8
|
+
@include thredded-media-mobile {
|
9
|
+
position: initial;
|
10
|
+
}
|
11
|
+
|
12
|
+
label {
|
13
|
+
display: none;
|
14
|
+
}
|
15
|
+
|
16
|
+
input[type="search"] {
|
17
|
+
box-shadow: none;
|
18
|
+
transition: all 0.15s ease-out 0s;
|
19
|
+
width: 100%;
|
20
|
+
|
21
|
+
@include thredded-media-tablet-and-up {
|
22
|
+
background: transparent;
|
23
|
+
border-color: transparent;
|
24
|
+
font-size: $thredded-font-size-small;
|
25
|
+
min-width: 12.8125rem;
|
26
|
+
margin-right: -$thredded-base-spacing;
|
27
|
+
text-align: right;
|
28
|
+
width: auto;
|
29
|
+
padding: 0.90625rem 0.75rem 0.8125rem 0.75rem;
|
30
|
+
|
31
|
+
&:focus {
|
32
|
+
background: $thredded-background-color;
|
33
|
+
box-shadow: none;
|
34
|
+
min-width: 290px;
|
35
|
+
text-align: left;
|
36
|
+
transition: all 0.15s ease-out 0s;
|
37
|
+
margin-right: 0;
|
38
|
+
}
|
39
|
+
|
40
|
+
&:hover {
|
41
|
+
border-color: transparent;
|
42
|
+
box-shadow: none;
|
43
|
+
}
|
44
|
+
|
45
|
+
&::placeholder {
|
46
|
+
color: $thredded-secondary-nav-color;
|
47
|
+
}
|
48
|
+
|
49
|
+
&:hover:not(:focus) {
|
50
|
+
cursor: pointer;
|
51
|
+
&::placeholder {
|
52
|
+
color: $thredded-nav-hover-color;
|
53
|
+
transition: color 0.1s linear;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
&:focus {
|
58
|
+
border-color: $thredded-base-border-color;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
[type="submit"] {
|
64
|
+
display: none;
|
65
|
+
}
|
66
|
+
}
|
@@ -1,87 +1,61 @@
|
|
1
1
|
&--user-navigation {
|
2
2
|
@extend %thredded--list-unstyled;
|
3
3
|
@include thredded--clearfix;
|
4
|
-
|
4
|
+
border-bottom: $thredded-base-border;
|
5
5
|
margin-bottom: 1rem;
|
6
|
-
text-align:
|
6
|
+
text-align: left;
|
7
7
|
|
8
8
|
@include thredded-media-tablet-and-up {
|
9
|
+
font-size: $thredded-font-size-small;
|
9
10
|
margin-bottom: 0;
|
10
11
|
margin-top: $thredded-large-spacing;
|
11
|
-
text-align: left;
|
12
12
|
}
|
13
13
|
|
14
14
|
a {
|
15
|
-
@extend %thredded--link;
|
16
|
-
color:
|
15
|
+
@extend %thredded--nav-link;
|
16
|
+
color: $thredded-secondary-nav-color;
|
17
17
|
}
|
18
|
-
}
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
padding: $thredded-small-spacing 0;
|
23
|
-
|
24
|
-
@include thredded-media-tablet-and-up {
|
25
|
-
float: left;
|
19
|
+
> ul {
|
20
|
+
@extend %thredded--list-unstyled;
|
26
21
|
}
|
22
|
+
}
|
27
23
|
|
28
|
-
|
29
|
-
|
30
|
-
|
24
|
+
&--user-navigation--item {
|
25
|
+
display: inline-block;
|
26
|
+
margin-right: 1rem;
|
31
27
|
|
32
|
-
|
33
|
-
|
34
|
-
}
|
28
|
+
a {
|
29
|
+
padding: $thredded-small-spacing 0;
|
35
30
|
}
|
36
|
-
}
|
37
31
|
|
38
|
-
|
39
|
-
|
40
|
-
margin-bottom: 0.5rem;
|
32
|
+
&:last-child {
|
33
|
+
margin-right: 0;
|
41
34
|
}
|
42
35
|
|
43
|
-
|
44
|
-
|
36
|
+
@include thredded-media-tablet-and-up {
|
37
|
+
padding: $thredded-small-spacing 0;
|
45
38
|
}
|
39
|
+
}
|
46
40
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
@include thredded-media-tablet-and-up {
|
54
|
-
border-color: transparent;
|
55
|
-
float: right;
|
56
|
-
min-width: 200px;
|
57
|
-
margin-right: -$thredded-base-spacing;
|
58
|
-
text-align: right;
|
59
|
-
width: auto;
|
60
|
-
|
61
|
-
&:focus {
|
62
|
-
box-shadow: none;
|
63
|
-
min-width: 290px;
|
64
|
-
text-align: left;
|
65
|
-
transition: all 0.15s ease-out 0s;
|
66
|
-
margin-right: 0;
|
67
|
-
}
|
68
|
-
|
69
|
-
&:hover {
|
70
|
-
border-color: transparent;
|
71
|
-
box-shadow: none;
|
72
|
-
}
|
73
|
-
}
|
74
|
-
|
75
|
-
&:hover::placeholder {
|
76
|
-
color: $thredded-action-color;
|
77
|
-
}
|
41
|
+
.thredded--preferences &--user-navigation--settings,
|
42
|
+
.thredded--new-private-topic &--user-navigation--private-topics,
|
43
|
+
.thredded--private-topics-index &--user-navigation--private-topics,
|
44
|
+
.thredded--private-topic-show &--user-navigation--private-topics {
|
45
|
+
border-bottom: 1px solid $thredded-action-color;
|
46
|
+
margin-bottom: -1px;
|
78
47
|
|
79
|
-
|
80
|
-
|
81
|
-
}
|
48
|
+
a {
|
49
|
+
@extend %thredded--nav-link-current;
|
82
50
|
}
|
51
|
+
}
|
83
52
|
|
84
|
-
|
85
|
-
|
86
|
-
|
53
|
+
&--user-navigation--private-topics--unread {
|
54
|
+
background: $thredded-badge-active-background;
|
55
|
+
border-radius: 10px;
|
56
|
+
color: $thredded-badge-active-color;
|
57
|
+
font-size: 0.75rem; // 12px
|
58
|
+
line-height: 1;
|
59
|
+
margin-left: 0.4rem;
|
60
|
+
padding: 2px 6px;
|
87
61
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module Thredded
|
2
3
|
class MessageboardDestroyer
|
3
4
|
def initialize(messageboard_name)
|
@@ -24,9 +25,13 @@ module Thredded
|
|
24
25
|
|
25
26
|
def destroy_all_lower_dependencies
|
26
27
|
say 'Destroying lower level dependencies ...'
|
27
|
-
[PostNotification.joins(:
|
28
|
-
child_t.merge(
|
28
|
+
[PostNotification.joins(non_private_post: :postable), UserTopicReadState.joins(:postable)].each do |child_t|
|
29
|
+
child_t.merge(Topic.where(messageboard_id: messageboard.id)).delete_all
|
29
30
|
end
|
31
|
+
|
32
|
+
Thredded::MessageboardUser
|
33
|
+
.where(thredded_messageboard_id: messageboard.id)
|
34
|
+
.delete_all
|
30
35
|
end
|
31
36
|
|
32
37
|
def destroy_all_posts
|