elabs 2.0.0.pre → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -0
- data/Gemfile.lock +1 -1
- data/ROADMAP.md +0 -10
- data/app/helpers/elabs/form_helper.rb +23 -0
- data/app/models/elabs/album.rb +2 -0
- data/app/models/elabs/concerns/actable_entity.rb +1 -1
- data/app/models/elabs/language.rb +1 -0
- data/app/models/elabs/license.rb +2 -0
- data/app/models/elabs/project.rb +2 -0
- data/app/models/elabs/upload.rb +2 -0
- data/app/views/elabs/member/albums/_form.html.haml +4 -6
- data/app/views/elabs/member/articles/_form.html.haml +3 -4
- data/app/views/elabs/member/notes/_form.html.haml +3 -4
- data/app/views/elabs/member/projects/_form.html.haml +2 -2
- data/app/views/elabs/member/uploads/_form.html.haml +4 -5
- data/lib/elabs/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b290d73dc3d912c67d96bb1be6f003e3937379450feeb5d5fb10de85e8c2d152
|
4
|
+
data.tar.gz: 895e5179cadaf4ca0dc9cd616cfcae0df47955d0330cb803cd4d65d6cc3423c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfadce23c0741913e150116ae8388e78e2f39287604036231116163b29174e1510ebf40a62ae067a02012b3041528dfa5531aaf66cf06aa05ba2373d402165af
|
7
|
+
data.tar.gz: 971646fbaee841718146fd8161fc8429ef6fa40fac4b1659034232eee7a997ea0442e579db580e66ea39da38e3108dad35c2686af68a8a1012f1a8229b5edd26
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,37 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## [2.0.0] - 2018-09-08 - Rails engine
|
5
|
+
Everything seems to run fine, it's enough for a major version.
|
6
|
+
|
7
|
+
### Added
|
8
|
+
|
9
|
+
- Added missing ability to set content as "hidden in history":
|
10
|
+
following updates and activity on an "hidden" element will not be
|
11
|
+
logged in activity table.
|
12
|
+
|
13
|
+
## [2.0.0.pre] - 2018-09-07 - Rails engine
|
14
|
+
### Added
|
15
|
+
|
16
|
+
- Generators to make views/assets override easy
|
17
|
+
- Generator to copy needed files and initializer
|
18
|
+
- Two controller concerns to easily extend your custom controllers:
|
19
|
+
- "ElabsController", used to load Elabs layout and some helpers
|
20
|
+
- "Reportable", to prepare an empty report when using elabs layout
|
21
|
+
|
22
|
+
### Changed
|
23
|
+
|
24
|
+
- The app is now an engine.
|
25
|
+
|
26
|
+
### Improved
|
27
|
+
|
28
|
+
- New documentation
|
29
|
+
- Various improvements:
|
30
|
+
- Acts strings for notices are now in the "acts" helper
|
31
|
+
|
32
|
+
### Fixed
|
33
|
+
- Translations of acts notices are now fixed
|
34
|
+
|
4
35
|
## [1.0.0] - 2018-08-09 - First v1 \o/
|
5
36
|
### Added
|
6
37
|
|
data/Gemfile.lock
CHANGED
data/ROADMAP.md
CHANGED
@@ -6,24 +6,14 @@ See the [issues](https://gitlab.com/experimentslabs/website/website/issues) for
|
|
6
6
|
|
7
7
|
## [Next] - Already done
|
8
8
|
### Added
|
9
|
-
- Generators to make views/assets override easy
|
10
|
-
- Generator to copy needed files and initializer
|
11
|
-
- Two controller concerns to easily extend your custom controllers:
|
12
|
-
- "ElabsController", used to load Elabs layout and some helpers
|
13
|
-
- "Reportable", to prepare an empty report when using elabs layout
|
14
9
|
|
15
10
|
### Changed
|
16
|
-
- The app is now an engine.
|
17
11
|
|
18
12
|
### Improved
|
19
|
-
- New documentation
|
20
|
-
- Various improvements:
|
21
|
-
- Acts strings for notices are now in the "acts" helper
|
22
13
|
|
23
14
|
### Removed
|
24
15
|
|
25
16
|
### Fixed
|
26
|
-
- Translations of acts notices are now fixed
|
27
17
|
|
28
18
|
## Planned
|
29
19
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Elabs
|
2
|
+
module FormHelper
|
3
|
+
def album_selector(form)
|
4
|
+
form.select :album_ids, Elabs::Album.by_member(current_user).for_list, {}, multiple: true
|
5
|
+
end
|
6
|
+
|
7
|
+
def language_selector(form)
|
8
|
+
form.select :language_id, Elabs::Language.for_list
|
9
|
+
end
|
10
|
+
|
11
|
+
def license_selector(form)
|
12
|
+
form.select :license_id, Elabs::License.for_list
|
13
|
+
end
|
14
|
+
|
15
|
+
def project_selector(form)
|
16
|
+
form.select :project_ids, Elabs::Project.by_member(current_user).for_list, {}, multiple: true
|
17
|
+
end
|
18
|
+
|
19
|
+
def uploads_selector(form)
|
20
|
+
form.select :upload_ids, Elabs::Upload.by_member(current_user).for_list, {}, multiple: true
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/app/models/elabs/album.rb
CHANGED
@@ -40,7 +40,7 @@ module Elabs
|
|
40
40
|
|
41
41
|
def update_acts
|
42
42
|
acts.destroy_all if %i[lock unpublish].include? @action
|
43
|
-
Act.create content: self, event: @action unless @action == :nothing
|
43
|
+
Act.create content: self, event: @action unless @action == :nothing || hidden_in_history
|
44
44
|
end
|
45
45
|
|
46
46
|
# TODO: check if used ? (dependent: destroy may do the trick.)
|
@@ -13,5 +13,6 @@ module Elabs
|
|
13
13
|
|
14
14
|
scope :with_content_only, -> { where.not(albums_count: 0).or(where.not(articles_count: 0)).or(where.not(notes_count: 0)).or(where.not(projects_count: 0)).or(where.not(uploads_count: 0)) }
|
15
15
|
scope :available_site_translations, -> { select(:id, :name, :iso639_1).where(iso639_1: I18n.available_locales) }
|
16
|
+
scope :for_list, -> { order(:name).pluck(:name, :id) }
|
16
17
|
end
|
17
18
|
end
|
data/app/models/elabs/license.rb
CHANGED
data/app/models/elabs/project.rb
CHANGED
data/app/models/elabs/upload.rb
CHANGED
@@ -35,18 +35,16 @@
|
|
35
35
|
= f.label :hidden_in_history
|
36
36
|
.field
|
37
37
|
= f.label :license
|
38
|
-
.field-input= f
|
38
|
+
.field-input= license_selector f
|
39
39
|
.field
|
40
40
|
= f.label :language
|
41
|
-
.field-input= f
|
41
|
+
.field-input= language_selector f
|
42
42
|
.field
|
43
43
|
= f.label :uploads
|
44
|
-
.field-input= f
|
45
|
-
Elabs::Upload.by_member(current_user), :id, :title, {}, multiple: true
|
44
|
+
.field-input= uploads_selector f
|
46
45
|
.field
|
47
46
|
= f.label :projects
|
48
|
-
.field-input= f
|
49
|
-
Elabs::Project.by_member(current_user), :id, :name, {}, multiple: true
|
47
|
+
.field-input= project_selector f
|
50
48
|
.field
|
51
49
|
= f.label :tags, for: :tags_list
|
52
50
|
.field-input
|
@@ -42,14 +42,13 @@
|
|
42
42
|
= f.label :hidden_in_history
|
43
43
|
.field
|
44
44
|
= f.label :license
|
45
|
-
.field-input= f
|
45
|
+
.field-input= license_selector f
|
46
46
|
.field
|
47
47
|
= f.label :language
|
48
|
-
.field-input= f
|
48
|
+
.field-input= language_selector f
|
49
49
|
.field
|
50
50
|
= f.label :projects
|
51
|
-
.field-input= f
|
52
|
-
Elabs::Project.by_member(current_user), :id, :name, {}, multiple: true
|
51
|
+
.field-input= project_selector f
|
53
52
|
.field
|
54
53
|
= f.label :tags, for: :tags_list
|
55
54
|
.field-input
|
@@ -30,14 +30,13 @@
|
|
30
30
|
= f.label :hidden_in_history
|
31
31
|
.field
|
32
32
|
= f.label :license
|
33
|
-
.field-input= f
|
33
|
+
.field-input= license_selector f
|
34
34
|
.field
|
35
35
|
= f.label :language
|
36
|
-
.field-input= f
|
36
|
+
.field-input= language_selector f
|
37
37
|
.field
|
38
38
|
= f.label :projects
|
39
|
-
.field-input= f
|
40
|
-
Elabs::Project.by_member(current_user), :id, :name, {}, multiple: true
|
39
|
+
.field-input= project_selector f
|
41
40
|
.field
|
42
41
|
= f.label :tags, for: :tags_list
|
43
42
|
.field-input
|
@@ -46,10 +46,10 @@
|
|
46
46
|
= f.label :hidden_in_history
|
47
47
|
.field
|
48
48
|
= f.label :license
|
49
|
-
.field-input= f
|
49
|
+
.field-input= license_selector f
|
50
50
|
.field
|
51
51
|
= f.label :language
|
52
|
-
.field-input= f
|
52
|
+
.field-input= language_selector f
|
53
53
|
.field
|
54
54
|
= f.label :tags, for: :tags_list
|
55
55
|
.field-input
|
@@ -34,10 +34,10 @@
|
|
34
34
|
= f.label :hidden_in_history
|
35
35
|
.field
|
36
36
|
= f.label :license
|
37
|
-
.field-input= f
|
37
|
+
.field-input= license_selector f
|
38
38
|
.field
|
39
39
|
= f.label :language
|
40
|
-
.field-input= f
|
40
|
+
.field-input= language_selector f
|
41
41
|
.field
|
42
42
|
= f.label :file
|
43
43
|
.field-input
|
@@ -46,11 +46,10 @@
|
|
46
46
|
formats: available_formats.join(', '))
|
47
47
|
.field
|
48
48
|
= f.label :albums
|
49
|
-
.field-input= f
|
49
|
+
.field-input= album_selector f
|
50
50
|
.field
|
51
51
|
= f.label :projects
|
52
|
-
.field-input= f
|
53
|
-
Elabs::Project.by_member(current_user), :id, :name, {}, multiple: true
|
52
|
+
.field-input= project_selector f
|
54
53
|
.field
|
55
54
|
= f.label :tags, for: :tags_list
|
56
55
|
.field-input
|
data/lib/elabs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elabs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel Tancoigne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -152,6 +152,7 @@ files:
|
|
152
152
|
- app/helpers/elabs/application_helper.rb
|
153
153
|
- app/helpers/elabs/content_filters_helper.rb
|
154
154
|
- app/helpers/elabs/content_renderer_helper.rb
|
155
|
+
- app/helpers/elabs/form_helper.rb
|
155
156
|
- app/helpers/elabs/member_content_helper.rb
|
156
157
|
- app/helpers/elabs/thumbnails_helper.rb
|
157
158
|
- app/helpers/elabs/time_helper.rb
|
@@ -451,9 +452,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
451
452
|
version: '0'
|
452
453
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
453
454
|
requirements:
|
454
|
-
- - "
|
455
|
+
- - ">="
|
455
456
|
- !ruby/object:Gem::Version
|
456
|
-
version:
|
457
|
+
version: '0'
|
457
458
|
requirements: []
|
458
459
|
rubyforge_project:
|
459
460
|
rubygems_version: 2.7.6
|