help_center 0.0.2 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +12 -12
- data/.gitignore +10 -10
- data/CHANGELOG.md +35 -1
- data/CODE_OF_CONDUCT.md +74 -74
- data/Gemfile +6 -6
- data/LICENSE.txt +1 -1
- data/README.md +22 -9
- data/app/assets/stylesheets/help_center.scss +39 -18
- data/app/controllers/help_center/application_controller.rb +3 -3
- data/app/controllers/help_center/support_categories_controller.rb +43 -2
- data/app/controllers/help_center/support_threads_controller.rb +17 -7
- data/app/helpers/help_center/support_posts_helper.rb +1 -1
- data/app/helpers/help_center/support_threads_helper.rb +1 -1
- data/app/models/support_category.rb +3 -0
- data/app/views/help_center/support_categories/_form.html.erb +39 -0
- data/app/views/help_center/support_categories/_support_thread.html.erb +25 -0
- data/app/views/help_center/support_categories/edit.html.erb +7 -0
- data/app/views/help_center/support_categories/index.html.erb +19 -0
- data/app/views/help_center/support_categories/new.html.erb +5 -0
- data/app/views/help_center/support_categories/show.html.erb +19 -0
- data/app/views/help_center/support_posts/_form.html.erb +39 -24
- data/app/views/help_center/support_posts/_support_post.html.erb +5 -13
- data/app/views/help_center/support_posts/edit.html.erb +2 -7
- data/app/views/help_center/support_threads/_form.html.erb +11 -18
- data/app/views/help_center/support_threads/_support_thread.html.erb +5 -10
- data/app/views/help_center/support_threads/edit.html.erb +1 -1
- data/app/views/help_center/support_threads/index.html.erb +4 -8
- data/app/views/help_center/support_threads/new.html.erb +1 -1
- data/app/views/help_center/support_threads/show.html.erb +10 -20
- data/app/views/help_center/user_mailer/new_post.html.erb +0 -3
- data/app/views/help_center/user_mailer/new_thread.html.erb +0 -3
- data/app/views/layouts/help_center.html.erb +58 -48
- data/app/views/shared/_category_actions.html.erb +16 -0
- data/app/views/shared/_thread_actions.html.erb +16 -0
- data/config/locales/en.yml +4 -0
- data/config/routes.rb +2 -2
- data/db/migrate/20170417012932_create_support_posts.rb +12 -12
- data/help_center.gemspec +5 -7
- data/lib/help_center.rb +1 -2
- data/lib/help_center/version.rb +1 -1
- metadata +15 -23
- data/.travis.yml +0 -5
- data/help_center-0.0.1.gem +0 -0
- data/lib/help_center/will_paginate.rb +0 -53
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c66702dcdd38d04a609a0f9e873f8c4ba66fca9f4f296bf8d46b293ef26212ee
|
4
|
+
data.tar.gz: aaf2ce14d85b8768e7728626d554ff03b417f08ab1cd0eeacd9f6cc8cbdceae1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b84e8f6b1a5faba5f2b16e00b74a65ed30fdd350fbce20eb0aee8c9fe7186e87077d64a4a15fb2c009bc5b6cd51a5c57895bbac46f3c50632f086c34812e151
|
7
|
+
data.tar.gz: 67b0da14fa50df5a60b850bed54151077cb74d0c27435fdb5b3b7aa83cb9f1b2694c1f4dfc224770419bfae92ca6e8d1115b79359c71625b93e17a1e3ab32be1
|
data/.github/FUNDING.yml
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
# These are supported funding model platforms
|
2
|
-
|
3
|
-
github: [uurcankaya, pasilobus] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
4
|
-
patreon: # Replace with a single Patreon username
|
5
|
-
open_collective: # Replace with a single Open Collective username
|
6
|
-
ko_fi: # Replace with a single Ko-fi username
|
7
|
-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
8
|
-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
9
|
-
liberapay: # Replace with a single Liberapay username
|
10
|
-
issuehunt: # Replace with a single IssueHunt username
|
11
|
-
otechie: # Replace with a single Otechie username
|
12
|
-
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
1
|
+
# These are supported funding model platforms
|
2
|
+
|
3
|
+
github: [uurcankaya, pasilobus] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
4
|
+
patreon: # Replace with a single Patreon username
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
7
|
+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
11
|
+
otechie: # Replace with a single Otechie username
|
12
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
data/.gitignore
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
/.bundle/
|
2
|
-
/.yardoc
|
3
|
-
/Gemfile.lock
|
4
|
-
/_yardoc/
|
5
|
-
/coverage/
|
6
|
-
/doc/
|
7
|
-
/pkg/
|
8
|
-
/spec/reports/
|
9
|
-
/tmp/
|
10
|
-
.DS_Store
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/Gemfile.lock
|
4
|
+
/_yardoc/
|
5
|
+
/coverage/
|
6
|
+
/doc/
|
7
|
+
/pkg/
|
8
|
+
/spec/reports/
|
9
|
+
/tmp/
|
10
|
+
.DS_Store
|
data/CHANGELOG.md
CHANGED
@@ -1 +1,35 @@
|
|
1
|
-
|
1
|
+
### Unreleased
|
2
|
+
|
3
|
+
### 0.0.7
|
4
|
+
|
5
|
+
* Improve default styling
|
6
|
+
|
7
|
+
### 0.0.6
|
8
|
+
|
9
|
+
* Bug fixes
|
10
|
+
* Fix gemspec error
|
11
|
+
* Remove duplicate gem file
|
12
|
+
* Add changelog
|
13
|
+
* Add index page for categories
|
14
|
+
* Add descriptions to categories
|
15
|
+
* Change home page layout
|
16
|
+
|
17
|
+
### 0.0.5
|
18
|
+
|
19
|
+
* [BREAKING] Remove Bootstrap in favor of TailwindCSS
|
20
|
+
|
21
|
+
### 0.0.4
|
22
|
+
|
23
|
+
* Default CSS changes
|
24
|
+
|
25
|
+
### 0.0.3
|
26
|
+
|
27
|
+
* Change article layout
|
28
|
+
|
29
|
+
### 0.0.2
|
30
|
+
|
31
|
+
* Fix mailer errors
|
32
|
+
|
33
|
+
### 0.0.1
|
34
|
+
|
35
|
+
* Initial release
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -1,74 +1,74 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at excid3@gmail.com. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at excid3@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
4
|
-
|
5
|
-
# Specify your gem's dependencies in simple_discussion.gemspec
|
6
|
-
gemspec
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in simple_discussion.gemspec
|
6
|
+
gemspec
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
# HelpCenter
|
2
2
|
|
3
|
-
|
3
|
+
### 📖 Knowledge Base for your Ruby on Rails App
|
4
4
|
|
5
|
-
|
5
|
+
HelpCenter is a Rails wiki gem with Trix editor support for creating a knowledge base for your project. It includes support categories, support articles, simple moderation, the ability to leave comments to support articles and more.
|
6
|
+
|
7
|
+
Out of the box, HelpCenter comes with styling for TailwindCSS 2.0 but you're free to customize the UI as much as you like by installing the views and tweaking the HTML.
|
6
8
|
|
7
9
|
## Requirements
|
8
10
|
|
9
11
|
```
|
10
12
|
Rails >= 6.0.0
|
11
|
-
|
13
|
+
tailwindcss >= 2.0.0
|
12
14
|
```
|
13
15
|
|
14
16
|
## Installation
|
@@ -61,7 +63,16 @@ if current_user.admin? || current_user.moderator?
|
|
61
63
|
Add the following line to your `config/routes.rb` file:
|
62
64
|
|
63
65
|
```ruby
|
64
|
-
mount HelpCenter::Engine => "/
|
66
|
+
mount HelpCenter::Engine => "/docs"
|
67
|
+
```
|
68
|
+
|
69
|
+
Add routes for active storage with your custom prefix
|
70
|
+
|
71
|
+
```ruby
|
72
|
+
get "/support/rails/active_storage/blobs/:signed_id/*filename" =>
|
73
|
+
"active_storage/blobs#show"
|
74
|
+
get "/support/rails/active_storage/representations/:signed_blob_id/:variation_key/*filename" =>
|
75
|
+
"active_storage/representations#show"
|
65
76
|
```
|
66
77
|
|
67
78
|
Lastly, add the CSS to your `application.css` to load some default styles.
|
@@ -131,16 +142,18 @@ Your support is appreciated for this project. Consider backing the project via G
|
|
131
142
|
We plan to release following features:
|
132
143
|
|
133
144
|
- Contact form
|
134
|
-
- Ticket submission
|
135
|
-
- Live chat
|
136
|
-
- Help Center Layout templates
|
137
145
|
- Built-in search
|
146
|
+
- Versioning Support
|
147
|
+
- Themes
|
148
|
+
- Dark Mode Support
|
138
149
|
|
139
150
|
## Acknowledgment
|
140
151
|
|
141
|
-
|
152
|
+
[simple_discussion](https://github.com/excid3/simple_discussion) by [Chris Oliver](https://github.com/excid3)
|
153
|
+
|
154
|
+
[Trix editor](https://github.com/basecamp/trix) by [Basecamp](https://github.com/basecamp)
|
142
155
|
|
143
|
-
|
156
|
+
[TailwindCSS](https://github.com/basecamp/trix) by [Tailwind Labs](https://github.com/tailwindlabs/tailwindcss)
|
144
157
|
|
145
158
|
## Contributing
|
146
159
|
|
@@ -2,24 +2,25 @@
|
|
2
2
|
@import "font-awesome";
|
3
3
|
|
4
4
|
/* Allow pagination to be centered */
|
5
|
-
.support-threads-nav nav {
|
5
|
+
.help_center .support-threads-nav nav {
|
6
6
|
display: inline-block;
|
7
7
|
}
|
8
8
|
|
9
9
|
/* Highlight the active navigation item in the sidebar */
|
10
|
-
.support-thread-filters {
|
10
|
+
.help_center .support-thread-filters {
|
11
11
|
a {
|
12
12
|
color: #555;
|
13
13
|
}
|
14
14
|
|
15
15
|
.active {
|
16
|
-
color: #
|
17
|
-
font-weight:
|
18
|
-
|
16
|
+
color: #2a326d;
|
17
|
+
font-weight: 500;
|
18
|
+
padding: 0.25rem;
|
19
|
+
}
|
19
20
|
}
|
20
21
|
|
21
22
|
/* Formatting for the support threads */
|
22
|
-
.support-thread {
|
23
|
+
.help_center .support-thread {
|
23
24
|
margin-bottom: -20px;
|
24
25
|
|
25
26
|
h4 {
|
@@ -34,18 +35,17 @@
|
|
34
35
|
}
|
35
36
|
}
|
36
37
|
|
37
|
-
.support-thread-filters a {
|
38
|
+
.help_center .support-thread-filters a {
|
38
39
|
color: #555555;
|
39
40
|
display: block;
|
40
41
|
|
41
42
|
&:hover {
|
42
|
-
color: #
|
43
|
-
font-weight: bold;
|
43
|
+
color: #bfbfbf;
|
44
44
|
text-decoration: none
|
45
45
|
}
|
46
46
|
}
|
47
47
|
|
48
|
-
.thread-details {
|
48
|
+
.help_center .thread-details {
|
49
49
|
color: #999;
|
50
50
|
font-size: 12px;
|
51
51
|
text-transform: uppercase;
|
@@ -53,7 +53,7 @@
|
|
53
53
|
flex-direction: column;
|
54
54
|
}
|
55
55
|
|
56
|
-
.thread-reaction {
|
56
|
+
.help_center .thread-reaction {
|
57
57
|
background: #eeeeee;
|
58
58
|
padding: 1rem;
|
59
59
|
text-align: center;
|
@@ -61,13 +61,13 @@
|
|
61
61
|
margin-top: 2rem;
|
62
62
|
}
|
63
63
|
|
64
|
-
.thread-reaction-links {
|
64
|
+
.help_center .thread-reaction-links {
|
65
65
|
font-size: 2rem;
|
66
66
|
margin: 0.25rem;
|
67
67
|
}
|
68
68
|
|
69
69
|
/* Display the support post count above the "posts" text on the index page */
|
70
|
-
.thread-posts-count {
|
70
|
+
.help_center .thread-posts-count {
|
71
71
|
color: #222;
|
72
72
|
text-align: center;
|
73
73
|
|
@@ -88,7 +88,7 @@
|
|
88
88
|
}
|
89
89
|
|
90
90
|
/* Formatting for the support posts themselves */
|
91
|
-
.support-post {
|
91
|
+
.help_center .support-post {
|
92
92
|
position: relative;
|
93
93
|
|
94
94
|
/* When the URL anchor matches a post id, highlight that item */
|
@@ -112,8 +112,29 @@
|
|
112
112
|
margin: 24px -20px;
|
113
113
|
}
|
114
114
|
|
115
|
-
|
116
|
-
|
117
|
-
margin-
|
118
|
-
font-size: 13px;
|
115
|
+
// Forms
|
116
|
+
.help_center label {
|
117
|
+
margin-bottom: 0.5rem;
|
119
118
|
}
|
119
|
+
|
120
|
+
.help_center .form-input, .form-select {
|
121
|
+
display: block;
|
122
|
+
width: 100%;
|
123
|
+
font-size: 0.875rem;
|
124
|
+
line-height: 1.25rem;
|
125
|
+
}
|
126
|
+
|
127
|
+
.help_center input[type="color" i] {
|
128
|
+
appearance: square-button;
|
129
|
+
width: 44px;
|
130
|
+
height: 23px;
|
131
|
+
background-color: -internal-light-dark(rgb(239, 239, 239), rgb(74, 74, 74));
|
132
|
+
cursor: default;
|
133
|
+
border-width: 1px;
|
134
|
+
border-style: solid;
|
135
|
+
border-color: -internal-light-dark(rgb(118, 118, 118), rgb(195, 195, 195));
|
136
|
+
border-image: initial;
|
137
|
+
padding: 1px 2px;
|
138
|
+
}
|
139
|
+
|
140
|
+
|