cmor_galleries 0.0.44.pre → 0.0.45.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ffa77ffc1c05f231d7a0aee00d04046080229fce084a947429a557bc30bba6a5
4
- data.tar.gz: 79dc0c88f171c77bf69332219fffe95c2eee0584c78c613f5e22dbba5531f45a
3
+ metadata.gz: ecf4d3f2e0e19baa01e90bc4fde032320358b300ae782bbbc3d88837c459b9ad
4
+ data.tar.gz: fcd010ac6bc7ef206c7623458eef27d9109df22fd6a05d3f1ef9d7a519c14b86
5
5
  SHA512:
6
- metadata.gz: b499055bc67cd3809fc55fb0d677a5cd4f661dab9cfcb179e02ab475797696697ca7ccb6463e3dd003ecd3dc06dde082d6e709b9e47f038144c3695647396c48
7
- data.tar.gz: e70f11ec25bc55bc4395c705fe3abbb9795750281465b2b0560d32097257ee923b34aac2b7e9ce71e90971724a905d76d9e1dcc12324ca27a83a03f808378352
6
+ metadata.gz: a9fb8f4cea0490e06b6fca0be9a383ce53b06295c2eb8c32f190761de8605e5c487a1510c5a7f2d223fcf88f7146da2864f5bd38f084f7f9332f227b3ca3cd9b
7
+ data.tar.gz: ccb77c0f5ad8f2b4b991cc280c29198c3b91a119c1106faa56a18e3b2e5e7824343f52d4897aa532cd6fcca2536d794be22816cf8a746877451f01f3a14ef40e
@@ -1,17 +1,21 @@
1
- module Cmor::Galleries
2
- class PictureGalleriesController < ApplicationResourcesController
3
- def self.resource_class
4
- Cmor::Galleries::PictureGallery
5
- end
1
+ module Cmor
2
+ module Galleries
3
+ class PictureGalleriesController < ApplicationResourcesController
4
+ include Rao::ResourcesController::FriendlyIdConcern
6
5
 
7
- private
6
+ def self.resource_class
7
+ Cmor::Galleries::PictureGallery
8
+ end
8
9
 
9
- def load_collection_scope
10
- super.published
11
- end
10
+ private
11
+
12
+ def load_collection_scope
13
+ super.published
14
+ end
12
15
 
13
- def load_resource_scope
14
- super.published
16
+ def load_resource_scope
17
+ super.published
18
+ end
15
19
  end
16
20
  end
17
21
  end
@@ -1,14 +1,10 @@
1
1
  module Cmor
2
2
  module Galleries
3
3
  class PictureGallery < ApplicationRecord
4
- include ActsAsPublished::ActiveRecord
4
+ include Cmor::Core::Model::CollectionConcern
5
5
 
6
6
  has_many_attached :assets
7
7
 
8
- acts_as_published
9
-
10
- validates :name, presence: true, uniqueness: true
11
-
12
8
  module PictureDetails
13
9
  extend ActiveSupport::Concern
14
10
 
@@ -18,12 +18,16 @@ de:
18
18
  append_assets: Bilder hinzufügen
19
19
  description: Beschreibung
20
20
  display_code_for_erb: Anzeigecode (erb)
21
+ identifier: Bezeichner
22
+ locale: Sprache
21
23
  name: Name
22
24
  overwrite_assets: Bilder ersetzen
23
25
  picture_details_count: Bilder
26
+ position: Position
24
27
  preview: Vorschau
25
- published_at: Veröffentlicht am
26
28
  published: Veröffentlicht
29
+ published_at: Veröffentlicht am
30
+ slug: Freundliche ID
27
31
  created_at: Erstellt am
28
32
  updated_at: Aktualisiert am
29
33
  cmor/galleries/picture_detail:
@@ -15,13 +15,19 @@ en:
15
15
  attributes:
16
16
  cmor/galleries/picture_gallery:
17
17
  id: ID
18
- name: Name
18
+ append_assets: Append pictures
19
19
  description: Description
20
20
  display_code_for_erb: Display code (erb)
21
+ identifier: Identifier
22
+ locale: Locale
23
+ name: Name
24
+ overwrite_assets: Overwrite pictures
21
25
  picture_details_count: Pictures
26
+ position: Position
22
27
  preview: Preview
23
28
  published: Published
24
29
  published_at: Published at
30
+ slug: Friendly ID
25
31
  created_at: Created at
26
32
  updated_at: Updated at
27
33
  cmor/galleries/picture_detail:
@@ -0,0 +1,5 @@
1
+ class AddLocaleToCmorGalleriesPictureGalleries < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :cmor_galleries_picture_galleries, :locale, :string
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddIdentifierToCmorGalleriesPictureGalleries < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :cmor_galleries_picture_galleries, :identifier, :string
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddPositionToCmorGalleriesPictureGalleries < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :cmor_galleries_picture_galleries, :position, :integer
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddSlugToCmorGalleriesPictureGalleries < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :cmor_galleries_picture_galleries, :slug, :string
4
+ end
5
+ end
@@ -1,8 +1,12 @@
1
1
  require 'acts_as_list'
2
2
  require 'acts_as_published'
3
+ require 'friendly_id'
3
4
  require 'cmor_core_frontend'
4
5
  require 'rao-resources_controller'
5
6
  require 'rao-view_helper'
6
7
  require 'haml-rails'
7
8
 
9
+ require 'cmor/core/model/collection_concern'
10
+ require 'cmor/core/model/localization_concern'
11
+ require 'cmor/core/model/identifier_concern'
8
12
  require 'cmor/galleries'
@@ -3,6 +3,6 @@ require 'rails_helper'
3
3
  module Cmor::Galleries
4
4
  RSpec.describe PictureGallery, type: :model do
5
5
  it { expect(subject).to validate_presence_of(:name) }
6
- it { expect(subject).to validate_uniqueness_of(:name) }
6
+ it { expect(subject).to validate_uniqueness_of(:name).scoped_to([:locale]) }
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmor_galleries
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.44.pre
4
+ version: 0.0.45.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-29 00:00:00.000000000 Z
11
+ date: 2020-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.2.0
19
+ version: 5.2.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 5.2.0
26
+ version: 5.2.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: cmor_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.0.44.pre
33
+ version: 0.0.45.pre
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.0.44.pre
40
+ version: 0.0.45.pre
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: cmor_core_frontend
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.0.44.pre
47
+ version: 0.0.45.pre
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.0.44.pre
54
+ version: 0.0.45.pre
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sqlite3
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -332,6 +332,20 @@ dependencies:
332
332
  - - ">="
333
333
  - !ruby/object:Gem::Version
334
334
  version: '0'
335
+ - !ruby/object:Gem::Dependency
336
+ name: friendly_id
337
+ requirement: !ruby/object:Gem::Requirement
338
+ requirements:
339
+ - - ">="
340
+ - !ruby/object:Gem::Version
341
+ version: '0'
342
+ type: :runtime
343
+ prerelease: false
344
+ version_requirements: !ruby/object:Gem::Requirement
345
+ requirements:
346
+ - - ">="
347
+ - !ruby/object:Gem::Version
348
+ version: '0'
335
349
  - !ruby/object:Gem::Dependency
336
350
  name: rao-resources_controller
337
351
  requirement: !ruby/object:Gem::Requirement
@@ -395,6 +409,10 @@ files:
395
409
  - db/migrate/20180301153325_create_cmor_galleries_picture_galleries.rb
396
410
  - db/migrate/20180302082402_create_cmor_galleries_picture_details.rb
397
411
  - db/migrate/20200119181150_add_identifier_to_cmor_galleries_picture_details.rb
412
+ - db/migrate/20200217230501_add_locale_to_cmor_galleries_picture_galleries.rb
413
+ - db/migrate/20200217230546_add_identifier_to_cmor_galleries_picture_galleries.rb
414
+ - db/migrate/20200217230622_add_position_to_cmor_galleries_picture_galleries.rb
415
+ - db/migrate/20200217230709_add_slug_to_cmor_galleries_picture_galleries.rb
398
416
  - lib/cmor/galleries.rb
399
417
  - lib/cmor/galleries/configuration.rb
400
418
  - lib/cmor/galleries/engine.rb