elabs 3.0.0 → 4.0.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/CHANGELOG.md +89 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +7 -2
- data/README.md +24 -17
- data/ROADMAP.md +8 -7
- data/app/assets/javascripts/elabs/application.js.erb +42 -0
- data/app/assets/javascripts/elabs/forms.js +10 -0
- data/app/assets/javascripts/elabs/helpers-markdown.js +11 -33
- data/app/assets/javascripts/elabs/helpers.js +28 -0
- data/app/assets/javascripts/elabs/hljs.js +4 -0
- data/app/assets/stylesheets/elabs/_colors.scss +5 -0
- data/app/assets/stylesheets/elabs/_fixes.scss +6 -0
- data/app/assets/stylesheets/elabs/_icons.scss +4 -0
- data/app/assets/stylesheets/elabs/app/_acts.scss +11 -0
- data/app/assets/stylesheets/elabs/app/_buttons.scss +8 -0
- data/app/assets/stylesheets/elabs/app/_comments.scss +10 -1
- data/app/assets/stylesheets/elabs/app/_content.scss +15 -0
- data/app/assets/stylesheets/elabs/app/_content_statuses.scss +32 -0
- data/app/assets/stylesheets/elabs/app/_forms.scss +5 -0
- data/app/assets/stylesheets/elabs/app/_helpers.scss +10 -0
- data/app/assets/stylesheets/elabs/app/_layout.scss +4 -0
- data/app/assets/stylesheets/elabs/app/_modals.scss +4 -0
- data/app/assets/stylesheets/elabs/app/_tables.scss +31 -0
- data/app/assets/stylesheets/elabs/app/_typo.scss +14 -0
- data/app/assets/stylesheets/elabs/app/_users.scss +14 -6
- data/app/assets/stylesheets/elabs/app/admin-members/_forms.scss +8 -1
- data/app/assets/stylesheets/elabs/app/admin-members/_indexes.scss +1 -26
- data/app/assets/stylesheets/elabs/app/mixins/_content-card.scss +11 -1
- data/app/assets/stylesheets/elabs/app/mixins/_content-full.scss +26 -0
- data/app/assets/stylesheets/elabs/app/mixins/_content-inline.scss +7 -0
- data/app/assets/stylesheets/elabs/app/widgets/_git-cards.scss +88 -0
- data/app/assets/stylesheets/elabs/lib/_hljs.scss +5 -0
- data/app/assets/stylesheets/elabs/lib/fontawesome/_icons.scss +11 -11
- data/app/assets/stylesheets/elabs/lib/knacss/_knacss-variables.scss +10 -2
- data/app/assets/stylesheets/elabs/style.scss +11 -1
- data/app/controllers/elabs/admin/admin_application_controller.rb +1 -1
- data/app/controllers/elabs/admin/admin_content_application_controller.rb +2 -2
- data/app/controllers/elabs/admin/languages_controller.rb +1 -1
- data/app/controllers/elabs/admin/licenses_controller.rb +1 -1
- data/app/controllers/elabs/admin/tags_controller.rb +1 -1
- data/app/controllers/elabs/admin/users_controller.rb +1 -1
- data/app/controllers/elabs/albums_controller.rb +1 -1
- data/app/controllers/elabs/articles_controller.rb +1 -1
- data/app/controllers/elabs/content_application_controller.rb +2 -1
- data/app/controllers/elabs/elabs_public_controller.rb +28 -8
- data/app/controllers/elabs/languages_controller.rb +1 -1
- data/app/controllers/elabs/licenses_controller.rb +1 -1
- data/app/controllers/elabs/member/albums_controller.rb +1 -1
- data/app/controllers/elabs/member/articles_controller.rb +1 -1
- data/app/controllers/elabs/member/markdown_previewer_controller.rb +11 -0
- data/app/controllers/elabs/member/member_content_application_controller.rb +2 -2
- data/app/controllers/elabs/member/notes_controller.rb +1 -1
- data/app/controllers/elabs/member/projects_controller.rb +1 -1
- data/app/controllers/elabs/member/uploads_controller.rb +1 -1
- data/app/controllers/elabs/notes_controller.rb +1 -1
- data/app/controllers/elabs/projects_controller.rb +1 -1
- data/app/controllers/elabs/tags_controller.rb +1 -6
- data/app/controllers/elabs/uploads_controller.rb +1 -1
- data/app/controllers/elabs/users_controller.rb +1 -1
- data/app/helpers/elabs/acts_helper.rb +2 -2
- data/app/helpers/elabs/application_helper.rb +30 -3
- data/app/helpers/elabs/content_helper.rb +9 -3
- data/app/helpers/elabs/content_renderer_helper.rb +118 -8
- data/app/helpers/elabs/rss_helper.rb +9 -0
- data/app/helpers/elabs/thumbnails_helper.rb +24 -19
- data/app/helpers/elabs/time_helper.rb +7 -1
- data/app/models/elabs/album.rb +2 -0
- data/app/models/elabs/application_content_record.rb +3 -0
- data/app/models/elabs/article.rb +2 -0
- data/app/models/elabs/concerns/actable_entity.rb +17 -2
- data/app/models/elabs/concerns/content_entity.rb +2 -2
- data/app/models/elabs/concerns/sluggable.rb +40 -0
- data/app/models/elabs/language.rb +8 -0
- data/app/models/elabs/license.rb +5 -0
- data/app/models/elabs/note.rb +2 -0
- data/app/models/elabs/project.rb +3 -0
- data/app/models/elabs/tag.rb +5 -0
- data/app/models/elabs/upload.rb +2 -0
- data/app/models/elabs/user.rb +10 -2
- data/app/views/elabs/acts/_act.rss.builder +22 -0
- data/app/views/elabs/acts/index.html.haml +5 -1
- data/app/views/elabs/acts/index.rss.builder +15 -0
- data/app/views/elabs/admin/albums/index.html.haml +4 -4
- data/app/views/elabs/admin/articles/index.html.haml +4 -4
- data/app/views/elabs/admin/languages/_form.html.haml +2 -1
- data/app/views/elabs/admin/licenses/_form.html.haml +2 -1
- data/app/views/elabs/admin/notes/index.html.haml +5 -5
- data/app/views/elabs/admin/projects/index.html.haml +4 -4
- data/app/views/elabs/admin/reports/index.html.haml +2 -2
- data/app/views/elabs/admin/tags/_form.html.haml +2 -1
- data/app/views/elabs/admin/uploads/index.html.haml +4 -4
- data/app/views/elabs/admin/users/index.html.haml +3 -3
- data/app/views/elabs/admin/users/show.html.haml +2 -2
- data/app/views/elabs/albums/_album.html.haml +1 -1
- data/app/views/elabs/albums/_album.rss.builder +7 -0
- data/app/views/elabs/albums/_album_inline.html.haml +8 -0
- data/app/views/elabs/albums/index.rss.builder +14 -0
- data/app/views/elabs/albums/show.html.haml +3 -3
- data/app/views/elabs/articles/_article.html.haml +1 -1
- data/app/views/elabs/articles/_article.rss.builder +7 -0
- data/app/views/elabs/articles/_article_inline.html.haml +8 -0
- data/app/views/elabs/articles/index.rss.builder +14 -0
- data/app/views/elabs/articles/show.html.haml +4 -4
- data/app/views/elabs/comments/_comments.html.haml +4 -3
- data/app/views/elabs/comments/_form.html.haml +18 -6
- data/app/views/elabs/languages/_associations.html.haml +15 -5
- data/app/views/elabs/layouts/_footer.html.haml +8 -1
- data/app/views/elabs/layouts/_hidden_entry.html.haml +4 -4
- data/app/views/elabs/layouts/_hidden_entry_full.html.haml +4 -4
- data/app/views/elabs/layouts/_hidden_entry_inline.html.haml +6 -0
- data/app/views/elabs/layouts/_shortcode_infinite_loop.html.haml +2 -0
- data/app/views/elabs/layouts/_shortcode_infinite_loop_inline.html.haml +2 -0
- data/app/views/elabs/layouts/_shortcode_missing_content.html.haml +2 -0
- data/app/views/elabs/layouts/_shortcode_missing_content_inline.html.haml +2 -0
- data/app/views/elabs/layouts/_shortcode_open_to_see.html.haml +2 -0
- data/app/views/elabs/layouts/admin_application.html.haml +2 -2
- data/app/views/elabs/layouts/application.html.haml +11 -3
- data/app/views/elabs/layouts/member_application.html.haml +5 -2
- data/app/views/elabs/layouts/widgets/_github_repo_card.html.haml +12 -0
- data/app/views/elabs/layouts/widgets/_github_repo_inline.html.haml +8 -0
- data/app/views/elabs/layouts/widgets/_github_user_card.html.haml +7 -0
- data/app/views/elabs/layouts/widgets/_gitlab_group_card.html.haml +11 -0
- data/app/views/elabs/layouts/widgets/_gitlab_repo_card.html.haml +12 -0
- data/app/views/elabs/layouts/widgets/_gitlab_repo_inline.html.haml +8 -0
- data/app/views/elabs/layouts/widgets/_gitlab_user_card.html.haml +11 -0
- data/app/views/elabs/layouts/widgets/vue/_all_widgets.html.haml +5 -0
- data/app/views/elabs/layouts/widgets/vue/_github_repo_card_vue.html.haml +72 -0
- data/app/views/elabs/layouts/widgets/vue/_github_user_card_vue.html.haml +64 -0
- data/app/views/elabs/layouts/widgets/vue/_gitlab_group_card_vue.html.haml +64 -0
- data/app/views/elabs/layouts/widgets/vue/_gitlab_repo_card_vue.html.haml +69 -0
- data/app/views/elabs/layouts/widgets/vue/_gitlab_user_card_vue.html.haml +99 -0
- data/app/views/elabs/licenses/_associations.html.haml +15 -5
- data/app/views/elabs/licenses/show.json.jbuilder +1 -1
- data/app/views/elabs/member/albums/_form.html.haml +12 -1
- data/app/views/elabs/member/albums/index.html.haml +4 -4
- data/app/views/elabs/member/articles/_form.html.haml +12 -1
- data/app/views/elabs/member/articles/index.html.haml +4 -4
- data/app/views/elabs/member/markdown_previewer/preview.json.jbuilder +2 -0
- data/app/views/elabs/member/notes/_form.html.haml +12 -1
- data/app/views/elabs/member/notes/index.html.haml +4 -4
- data/app/views/elabs/member/notifications/index.html.haml +1 -1
- data/app/views/elabs/member/preferences/_form.html.haml +2 -1
- data/app/views/elabs/member/projects/_form.html.haml +18 -2
- data/app/views/elabs/member/projects/_project.json.jbuilder +2 -0
- data/app/views/elabs/member/projects/index.html.haml +4 -4
- data/app/views/elabs/member/uploads/_form.html.haml +12 -1
- data/app/views/elabs/member/uploads/index.html.haml +6 -9
- data/app/views/elabs/member/users/_form.html.haml +2 -1
- data/app/views/elabs/notes/_note.html.haml +2 -2
- data/app/views/elabs/notes/_note.rss.builder +7 -0
- data/app/views/elabs/notes/_note_inline.haml +8 -0
- data/app/views/elabs/notes/index.rss.builder +14 -0
- data/app/views/elabs/notes/show.html.haml +3 -3
- data/app/views/elabs/projects/_associations.html.haml +12 -4
- data/app/views/elabs/projects/_project.html.haml +1 -1
- data/app/views/elabs/projects/_project.json.jbuilder +2 -0
- data/app/views/elabs/projects/_project.rss.builder +7 -0
- data/app/views/elabs/projects/_project_inline.html.haml +9 -0
- data/app/views/elabs/projects/index.rss.builder +14 -0
- data/app/views/elabs/projects/show.html.haml +20 -9
- data/app/views/elabs/reports/_form.html.haml +2 -1
- data/app/views/elabs/tags/_associations.html.haml +15 -5
- data/app/views/elabs/tags/index.html.haml +2 -0
- data/app/views/elabs/uploads/_preview.html.haml +1 -6
- data/app/views/elabs/uploads/_upload.rss.builder +7 -0
- data/app/views/elabs/uploads/_upload_inline.html.haml +8 -0
- data/app/views/elabs/uploads/index.rss.builder +14 -0
- data/app/views/elabs/uploads/show.html.haml +7 -8
- data/app/views/elabs/users/_associations.html.haml +15 -5
- data/app/views/elabs/users/_user.html.haml +24 -18
- data/app/views/elabs/users/_user_inline.html.haml +7 -0
- data/app/views/elabs/users/show.html.haml +2 -2
- data/config/brakeman.ignore +13 -111
- data/config/locales/en.yml +6 -0
- data/config/locales/fr.yml +6 -0
- data/config/routes.rb +30 -28
- data/db/migrate/20180917133442_add_urls_to_projects.rb +6 -0
- data/db/migrate/20181005105642_add_reason_to_acts.rb +5 -0
- data/db/migrate/20181006073541_add_slugs.rb +39 -0
- data/docs/migrating.md +51 -0
- data/docs/setup.md +1 -0
- data/lib/elabs.rb +5 -0
- data/lib/elabs/version.rb +1 -1
- data/lib/generators/elabs/install_generator.rb +1 -0
- data/lib/generators/elabs/views_generator.rb +0 -1
- data/lib/generators/templates/elabs.rb +4 -0
- data/lib/generators/templates/user_model.rb +6 -0
- data/locale/app.pot +129 -9
- data/locale/en/app.edit.po +127 -7
- data/locale/en/app.po +127 -7
- data/locale/fr/app.edit.po +130 -10
- data/locale/fr/app.po +129 -9
- metadata +59 -5
- data/app/assets/javascripts/elabs/application.js +0 -27
- data/app/assets/stylesheets/elabs/app/_nsfw.scss +0 -5
- data/lib/assets/javascripts/markdown-it-8.4.2.min.js +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 75bab8c8f62a2628529aab8f110eacd5fc1408bc94a7f595e7174f20028e715b
|
|
4
|
+
data.tar.gz: 1ba31dd537c39379523ae34aa4ed95b0557469d712af34b2d8ce422a75b51e32
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3eb92ccbf84c2a6c94c58cf7edc5c431fa46a6108233d60dd989771a5818a8a4ac1f3fda7d94960302861e9ebf21ddd03a848b1cc201516b0a3fd8ed7d5d396e
|
|
7
|
+
data.tar.gz: 04e89c6f2a90bef67578927f80087438f48f903e2263bdeadc43bceaf8bcdf9e7faaf5346f8803ae01572838fbb6c31cd1129304542a35e38c9b2ffc89f5e07b
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,90 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
+
## [4.0.0] - 2018-10-11 - RSS, slugs ans shortcodes
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- RSS feeds for content and activity
|
|
8
|
+
- Added `sources_url` and `docs_url` fields in projects
|
|
9
|
+
- Support for shortcodes:
|
|
10
|
+
- In Elabs:
|
|
11
|
+
- `[<content>:<id>]` displays a link with an icon to the specified
|
|
12
|
+
content,
|
|
13
|
+
- `[<content>-card:<id>]` displays a card of the specified content
|
|
14
|
+
- `[user:<id>]`, `[user-card:<id>]` displays link with icon or a card
|
|
15
|
+
for the specified user
|
|
16
|
+
- Gitlab instances (_Only https, public data are handled for now.)_:
|
|
17
|
+
- `[gitlab-repo:<url>]`, will display a link with an icon to the
|
|
18
|
+
repository
|
|
19
|
+
- `[gitlab-repo-card:<url>]` displays a card for a repository
|
|
20
|
+
- `[gitlab-user-card:<url>]` displays a card for a gitlab user
|
|
21
|
+
- `[gitlab-group-card:<url>]` displays a card for a gitlab user
|
|
22
|
+
- Github:
|
|
23
|
+
- `[github-repo:<username/repo>]`, displays a link with an icon
|
|
24
|
+
to the repository
|
|
25
|
+
- `[github-repo-card:<username/repo>]` displays a card for a
|
|
26
|
+
repository
|
|
27
|
+
- `[github-user-card:<username>]` displays a card for a github user
|
|
28
|
+
- Added a `with_format` helper method to render a partial of a different
|
|
29
|
+
format in a view (i.e.: `with_format(:html){ markdown 'content' }` in
|
|
30
|
+
a json view.
|
|
31
|
+
- Added a `colored_good_or_bad_icon_tag` that colors the icon depending on
|
|
32
|
+
its value.
|
|
33
|
+
- Added classes for text based on the list of color variant.
|
|
34
|
+
`is-<variant>` colors the text with the background-color defined in
|
|
35
|
+
`$variants-list`
|
|
36
|
+
- Added ability to save content specifying a reason for the edition.
|
|
37
|
+
This reason will be saved in the corresponding act.
|
|
38
|
+
- Added ability to save content specifying the modification as "minor".
|
|
39
|
+
No act will be created in this case.
|
|
40
|
+
- Slug support added. This **is a breaking change** as it will change all
|
|
41
|
+
the links in the site. The following entities are now slugged:
|
|
42
|
+
- languages/licenses/tags/users classifiers and their nested
|
|
43
|
+
resources (i.e: `/languages/en/projects`)
|
|
44
|
+
- albums/articles/notes/projects/uploads and projects nested resources
|
|
45
|
+
- Customized datetime formats were added. Sadly, it' in yml files
|
|
46
|
+
located in `config/locales/<lng>.yml` until we can export this to
|
|
47
|
+
gettext.
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
- Markdown is now rendered with gem `commonmarker`. Markdown-it has
|
|
52
|
+
been removed, so content previews are done with an ajax request
|
|
53
|
+
- `boolean_icon_tag()` now takes two additional parameters:
|
|
54
|
+
- `false_class`: additional CSS class when value is `false`. Default is `nil`
|
|
55
|
+
- `true_class`: additional CSS class when value is `true`. Default is `nil`
|
|
56
|
+
|
|
57
|
+
### Improved
|
|
58
|
+
|
|
59
|
+
- `Elabs::ActsHelper.act_notice_string` now have a second parameter,
|
|
60
|
+
`include_link`. Default is `true`; set it to false to generate
|
|
61
|
+
activity notice strings without link in it.
|
|
62
|
+
- Admin/member indexes: disabled "Show online" links when content is
|
|
63
|
+
not publicly visible.
|
|
64
|
+
- Improved thumbnails generation methods with a new
|
|
65
|
+
`thumbnail_center_crop(document, size)` which will return
|
|
66
|
+
the URL for processed document.
|
|
67
|
+
- Avatar and thumbnails possible dimensions are now
|
|
68
|
+
`THUMBNAILS_DIMENSIONS` and `AVATAR_DIMENSIONS` module constants.
|
|
69
|
+
- User cards are now larger and content is condensed on one line.
|
|
70
|
+
- Member and admin indexes now have colored status icons
|
|
71
|
+
- Visual enhancements:
|
|
72
|
+
- rendered content have more space between sections; titles are more
|
|
73
|
+
contrasted
|
|
74
|
+
- cards are more contrasted
|
|
75
|
+
- actions zones in forms are now standing out
|
|
76
|
+
- tabs for related content now have the count of related items in them
|
|
77
|
+
- `.field` classes now have a top margin, resulting in more airy forms
|
|
78
|
+
- `short_date` helper method now displays a ... date.
|
|
79
|
+
- `medium_datetime` helper method has been created to display a short
|
|
80
|
+
datetime with the year in it.
|
|
81
|
+
|
|
82
|
+
### Removed
|
|
83
|
+
|
|
84
|
+
### Fixed
|
|
85
|
+
|
|
86
|
+
- The permalink icon was missing on notes cards
|
|
87
|
+
|
|
4
88
|
## [3.0.0] - 2018-09-17 - Notifications and avatars
|
|
5
89
|
### Added
|
|
6
90
|
|
|
@@ -24,6 +108,9 @@ All notable changes to this project will be documented in this file.
|
|
|
24
108
|
|
|
25
109
|
- Misc:
|
|
26
110
|
- Date helper: new `short_date(date)` method
|
|
111
|
+
- Registrations can be closed by changing the `Elabs::users_can_register`
|
|
112
|
+
variable. All it does is to basically prevent `:registerable` in the
|
|
113
|
+
user model.
|
|
27
114
|
|
|
28
115
|
### Changed
|
|
29
116
|
|
|
@@ -38,6 +125,8 @@ All notable changes to this project will be documented in this file.
|
|
|
38
125
|
`current_lock_action` and `current_update_action` to the
|
|
39
126
|
`ContentEntity` concern, as they are now shared between "actable"
|
|
40
127
|
and "notifiable" concerns
|
|
128
|
+
- `rails g elabs:install` now creates an user model template with devise
|
|
129
|
+
configured with conditional behavior.
|
|
41
130
|
|
|
42
131
|
### Improved
|
|
43
132
|
|
data/Gemfile
CHANGED
|
@@ -24,10 +24,10 @@ group :development, :test do
|
|
|
24
24
|
gem 'pg'
|
|
25
25
|
# Rails and plugins:
|
|
26
26
|
gem 'active_link_to'
|
|
27
|
+
gem 'commonmarker'
|
|
27
28
|
gem 'devise'
|
|
28
29
|
gem 'haml-rails'
|
|
29
30
|
gem 'kaminari'
|
|
30
|
-
# gem 'rails', '~> 5.2.1'
|
|
31
31
|
gem 'sass-rails', '~> 5.0'
|
|
32
32
|
# Translations
|
|
33
33
|
gem 'gettext_i18n_rails'
|
data/Gemfile.lock
CHANGED
|
@@ -9,7 +9,7 @@ GIT
|
|
|
9
9
|
PATH
|
|
10
10
|
remote: .
|
|
11
11
|
specs:
|
|
12
|
-
elabs (
|
|
12
|
+
elabs (4.0.0)
|
|
13
13
|
rails (~> 5.2.1)
|
|
14
14
|
|
|
15
15
|
GEM
|
|
@@ -86,6 +86,8 @@ GEM
|
|
|
86
86
|
chromedriver-helper (1.2.0)
|
|
87
87
|
archive-zip (~> 0.10)
|
|
88
88
|
nokogiri (~> 1.8)
|
|
89
|
+
commonmarker (0.17.13)
|
|
90
|
+
ruby-enum (~> 0.5)
|
|
89
91
|
concurrent-ruby (1.0.5)
|
|
90
92
|
crass (1.0.4)
|
|
91
93
|
cucumber (3.1.2)
|
|
@@ -189,7 +191,7 @@ GEM
|
|
|
189
191
|
nokogiri (>= 1.5.9)
|
|
190
192
|
mail (2.7.0)
|
|
191
193
|
mini_mime (>= 0.1.1)
|
|
192
|
-
marcel (0.3.
|
|
194
|
+
marcel (0.3.3)
|
|
193
195
|
mimemagic (~> 0.3.2)
|
|
194
196
|
method_source (0.9.0)
|
|
195
197
|
mime-types (3.2.2)
|
|
@@ -281,6 +283,8 @@ GEM
|
|
|
281
283
|
rainbow (>= 2.2.2, < 4.0)
|
|
282
284
|
ruby-progressbar (~> 1.7)
|
|
283
285
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
|
286
|
+
ruby-enum (0.7.2)
|
|
287
|
+
i18n
|
|
284
288
|
ruby-progressbar (1.10.0)
|
|
285
289
|
ruby_dep (1.5.0)
|
|
286
290
|
ruby_parser (3.11.0)
|
|
@@ -350,6 +354,7 @@ DEPENDENCIES
|
|
|
350
354
|
capybara (>= 2.15, < 4.0)
|
|
351
355
|
capybara-screenshot
|
|
352
356
|
chromedriver-helper
|
|
357
|
+
commonmarker
|
|
353
358
|
cucumber-rails
|
|
354
359
|
database_cleaner
|
|
355
360
|
devise
|
data/README.md
CHANGED
|
@@ -1,34 +1,41 @@
|
|
|
1
1
|
# README
|
|
2
|
+
|
|
2
3
|
Rails engine adding CMS features to publish content related to projects.
|
|
3
4
|
An online version can be tested on http://next.experimentslabs.com
|
|
5
|
+
|
|
4
6
|
## Features
|
|
5
7
|
|
|
6
8
|
Manage various content types:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
|
|
10
|
+
- Articles
|
|
11
|
+
- Notes
|
|
12
|
+
- Files
|
|
13
|
+
- Albums (files collections)
|
|
14
|
+
- Projects (may have everything above attached to them)
|
|
12
15
|
|
|
13
16
|
Classify content:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
|
|
18
|
+
- Tags
|
|
19
|
+
- Language
|
|
20
|
+
- Licenses
|
|
17
21
|
|
|
18
22
|
Generic features:
|
|
19
|
-
- Comments (only visible to author)
|
|
20
|
-
- Safe/not safe for work content flags
|
|
21
|
-
- Content reporting
|
|
22
|
-
- Site structure translations
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
- Comments (only visible to author)
|
|
25
|
+
- Safe/not safe for work content flags
|
|
26
|
+
- Content reporting
|
|
27
|
+
- Site structure translations
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
Features wishlist: check the [roadmap](ROADMAP.md#wonderland) to see what's coming.
|
|
30
|
+
|
|
31
|
+
## Status
|
|
32
|
+
|
|
33
|
+
Elabs engine is not production ready. If the core feature are working,
|
|
34
|
+
a lot of changes and improvements are still coming in. Use it in production
|
|
35
|
+
only if you don't mind to update often.
|
|
30
36
|
|
|
31
37
|
## Documentation:
|
|
38
|
+
|
|
32
39
|
- [Setup guide](docs/setup.md)
|
|
33
40
|
- [Sample app](https://gitlab.com/experimentslabs/sample_app)
|
|
34
41
|
- [How to override the app](docs/overriding.md)
|
data/ROADMAP.md
CHANGED
|
@@ -19,11 +19,11 @@ See the [issues](https://gitlab.com/experimentslabs/website/website/issues) for
|
|
|
19
19
|
|
|
20
20
|
Note that the elements in this list may change during development; it' a
|
|
21
21
|
general idea of what will be done next.
|
|
22
|
-
- [
|
|
23
|
-
- [
|
|
24
|
-
- [
|
|
25
|
-
- [
|
|
26
|
-
- [
|
|
22
|
+
- [5.0.0] - Urls table to attach urls to content, share favorites
|
|
23
|
+
- [6.0.0] - Teams to attach user and distant people to projects
|
|
24
|
+
- [7.0.0] - Projects: commits aggregation
|
|
25
|
+
- [8.0.0] - Users: service status aggregation without storage for now
|
|
26
|
+
- [9.0.0] - Raw content for everything
|
|
27
27
|
|
|
28
28
|
## Wonderland
|
|
29
29
|
- ~~Rails engine~~ (since 2.0.0)
|
|
@@ -36,8 +36,9 @@ general idea of what will be done next.
|
|
|
36
36
|
- Projects users
|
|
37
37
|
- Urls management (lists of URLs, favorites, sources,...)
|
|
38
38
|
- Content: code snippets
|
|
39
|
-
- Content references (reference others work in your own work)
|
|
40
|
-
|
|
39
|
+
- ~~Content references (reference others work in your own work)~~
|
|
40
|
+
(since 4.0.0, with shortcodes)
|
|
41
|
+
- Better license support (i.e.: html tags for creative commons licenses)
|
|
41
42
|
- Widgets (to add custom content in created content)
|
|
42
43
|
- Data aggregation from various VCS providers
|
|
43
44
|
- Data aggregation for users profiles from various providers
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
|
3
|
+
// listed below.
|
|
4
|
+
//
|
|
5
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
|
6
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
|
7
|
+
//
|
|
8
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
|
9
|
+
// compiled file. JavaScript code in this file should be added after the last require_* statement.
|
|
10
|
+
//
|
|
11
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
|
12
|
+
// about supported directives.
|
|
13
|
+
//
|
|
14
|
+
<%
|
|
15
|
+
require_asset 'rails-ujs'
|
|
16
|
+
require_asset 'activestorage'
|
|
17
|
+
# Node_modules files
|
|
18
|
+
require_asset 'codemirror-5.39.2/lib/codemirror.js'
|
|
19
|
+
require_asset 'codemirror-5.39.2/addon/mode/overlay.js'
|
|
20
|
+
require_asset 'codemirror-5.39.2/mode/xml/xml.js'
|
|
21
|
+
require_asset 'codemirror-5.39.2/mode/markdown/markdown.js'
|
|
22
|
+
require_asset 'codemirror-5.39.2/mode/javascript/javascript.js'
|
|
23
|
+
require_asset 'codemirror-5.39.2/mode/css/css.js'
|
|
24
|
+
require_asset 'codemirror-5.39.2/mode/htmlmixed/htmlmixed.js'
|
|
25
|
+
require_asset 'codemirror-5.39.2/mode/clike/clike.js'
|
|
26
|
+
require_asset 'codemirror-5.39.2/mode/meta.js'
|
|
27
|
+
require_asset 'codemirror-5.39.2/mode/gfm/gfm.js'
|
|
28
|
+
require_asset 'highlight.js-9.12.0/highlight.pack.js'
|
|
29
|
+
if Rails.env.development?
|
|
30
|
+
require_asset "vue/dist/vue"
|
|
31
|
+
else
|
|
32
|
+
require_asset "vue/dist/vue.min"
|
|
33
|
+
end
|
|
34
|
+
# Current folder files
|
|
35
|
+
require_asset './forms'
|
|
36
|
+
require_asset './helpers'
|
|
37
|
+
require_asset './helpers-codemirror'
|
|
38
|
+
require_asset './helpers-markdown'
|
|
39
|
+
require_asset './hljs'
|
|
40
|
+
require_asset './modals'
|
|
41
|
+
require_asset './tabs'
|
|
42
|
+
%>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// eslint-disable-next-line no-unused-vars
|
|
2
|
+
function toggleUpdateMessageField (event, element) {
|
|
3
|
+
var checked = event.target.checked
|
|
4
|
+
console.log(event, element, checked)
|
|
5
|
+
if (checked) {
|
|
6
|
+
document.getElementById(element).setAttribute('disabled', 'disabled')
|
|
7
|
+
} else {
|
|
8
|
+
document.getElementById(element).removeAttribute('disabled')
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -1,42 +1,20 @@
|
|
|
1
1
|
// eslint-disable-next-line no-unused-vars
|
|
2
2
|
function createMDPreviewer (cmInstance) {
|
|
3
|
-
var md = window.markdownit()
|
|
4
|
-
|
|
5
3
|
return function (event) {
|
|
6
4
|
event.preventDefault()
|
|
5
|
+
var targetElement = document.getElementById('content-description-preview')
|
|
6
|
+
var data = new FormData()
|
|
7
|
+
data.append('text', cmInstance.getValue())
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
// eslint-disable-next-line no-undef
|
|
10
|
+
ajax('POST', '/member/markdown_previewer', data, function (request) {
|
|
11
|
+
targetElement.innerHTML = JSON.parse(request.responseText).html_content
|
|
12
|
+
}, function () {
|
|
13
|
+
targetElement.innerHTML = 'Something bad happened on our side. Sorry for that...'
|
|
14
|
+
}, function () {
|
|
15
|
+
targetElement.innerHTML = 'Something bad happened on our side. Sorry for that...'
|
|
16
|
+
})
|
|
9
17
|
|
|
10
18
|
openModal('content-preview-modal')
|
|
11
19
|
}
|
|
12
20
|
}
|
|
13
|
-
|
|
14
|
-
/*
|
|
15
|
-
* @author Wladimir Palant
|
|
16
|
-
* @source https://stackoverflow.com/questions/1912501/unescape-html-entities-in-javascript/34064434#34064434
|
|
17
|
-
*/
|
|
18
|
-
function htmlDecode (input) {
|
|
19
|
-
if (typeof DOMParser !== 'function') { return input }
|
|
20
|
-
var doc = new DOMParser().parseFromString(input, 'text/html')
|
|
21
|
-
return doc.documentElement.textContent
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// eslint-disable-next-line no-unused-vars
|
|
25
|
-
function renderMdFromId (areaId) {
|
|
26
|
-
var md = window.markdownit({
|
|
27
|
-
highlight: function (str, lang) {
|
|
28
|
-
// Unescape some chars
|
|
29
|
-
str = htmlDecode(str)
|
|
30
|
-
if (lang && hljs.getLanguage(lang)) {
|
|
31
|
-
try {
|
|
32
|
-
return hljs.highlight(lang, str).value
|
|
33
|
-
} catch (__) {}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return '' // use external default escaping
|
|
37
|
-
}
|
|
38
|
-
})
|
|
39
|
-
var value = document.getElementById('raw-' + areaId).innerHTML
|
|
40
|
-
|
|
41
|
-
document.getElementById('markdown-' + areaId).innerHTML = md.render(value)
|
|
42
|
-
}
|
|
@@ -15,3 +15,31 @@ function addClass (element, className) {
|
|
|
15
15
|
element.className += ' ' + className
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line no-unused-vars
|
|
20
|
+
function documentReady (fn) {
|
|
21
|
+
if (document.attachEvent ? document.readyState === 'complete' : document.readyState !== 'loading') {
|
|
22
|
+
fn()
|
|
23
|
+
} else {
|
|
24
|
+
document.addEventListener('DOMContentLoaded', fn)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// eslint-disable-next-line no-unused-vars
|
|
29
|
+
function ajax (method, url, data, success, failure, error) {
|
|
30
|
+
var request = new XMLHttpRequest()
|
|
31
|
+
request.open(method, url, true)
|
|
32
|
+
request.setRequestHeader('Accept', 'application/json')
|
|
33
|
+
|
|
34
|
+
request.onload = function () {
|
|
35
|
+
if (request.status >= 200 && request.status < 400) {
|
|
36
|
+
if (typeof success === 'function') success(request)
|
|
37
|
+
} else {
|
|
38
|
+
if (typeof failure === 'function') failure(request)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
request.onerror = function () {
|
|
42
|
+
if (typeof error === 'function') error(request)
|
|
43
|
+
}
|
|
44
|
+
request.send(data)
|
|
45
|
+
}
|
|
@@ -313,6 +313,11 @@ $color-background-base: $color-grey-200;
|
|
|
313
313
|
$color-inverse: $color-grey-100;
|
|
314
314
|
$color-background-inverse: $color-orange-300;
|
|
315
315
|
|
|
316
|
+
// Cards
|
|
317
|
+
$color-card-title: $color-grey-600;
|
|
318
|
+
$color-card-content: $color-grey-500;
|
|
319
|
+
$color-card-infos: $color-grey-400;
|
|
320
|
+
|
|
316
321
|
// Information messages
|
|
317
322
|
$color-error-background: $color-red-500;
|
|
318
323
|
$color-error: $color-white;
|
|
@@ -11,3 +11,7 @@
|
|
|
11
11
|
.#{$fa-css-prefix}-experience:before { content: fa-content($fa-var-flask); }
|
|
12
12
|
|
|
13
13
|
.#{$fa-css-prefix}-mime-type:before { content: fa-content($fa-var-wrench); }
|
|
14
|
+
|
|
15
|
+
.#{$fa-css-prefix}-group:before { content: fa-content($fa-var-box); }
|
|
16
|
+
|
|
17
|
+
.#{$fa-css-prefix}-permalink:before { content: fa-content($fa-var-link); }
|