cmor_galleries_backend 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: 18185578db110ce8072cb35b71542b86ec2af1c26ac94d7c40fe36156b681028
4
- data.tar.gz: 7fa3583243c1b573d7cb60914015c6644a245dd0acbf573b62a676bcab460b1d
3
+ metadata.gz: 7b31800ed28dd1b4d2c57d27b801433cac37bda4e83675aa89e74fb5430ffe06
4
+ data.tar.gz: 1f89b091bfb9d1d28c11cc6cd00d3ac255c6e0844736bd430db947a375204d39
5
5
  SHA512:
6
- metadata.gz: '03857575daf49c5fc7ed34b1ec0ffd41a6b891971dc04af87ab7f508c58584fed6cd46442243a7e5d0c5cdb82fe1f91678500749a8ed7d778b043cfa3f41bd0e'
7
- data.tar.gz: f60415b5d96a28e027d3ed3a7268b5ecf1133db53eb04c69e40525f352c5bed2d1c6bf63c125ec995e522bc8e380c28d3f0260173212a4c72195ce5ab8cbd4a5
6
+ metadata.gz: 4c9065b2c98f1798e4cb30322783ee5de297cb3d29c819aa0103ac641842b57bb3b2407d619c23e023fd13968bde010a12e6ae338ae070a20dd1336b18f3262e
7
+ data.tar.gz: 49e00c2be77973f01d9c8a2455dcd2f73447058b7f0dd7c11acb569ca9af68c315767fd2067ddc1af79330a22ad7011e6d56f935ca3da96b96a1227a2b39ad06
@@ -2,6 +2,9 @@ module Cmor
2
2
  module Galleries
3
3
  module Backend
4
4
  class PictureDetailsController < Cmor::Core::Backend::ResourcesController::Base
5
+ include Rao::ResourcesController::ActsAsPublishedConcern
6
+ include Rao::ResourcesController::ActsAsListConcern
7
+
5
8
  helper Twitter::Bootstrap::Components::Rails::V4::ComponentsHelper
6
9
 
7
10
  def self.resource_class
@@ -2,7 +2,9 @@ module Cmor
2
2
  module Galleries
3
3
  module Backend
4
4
  class PictureGalleriesController < Cmor::Core::Backend::ResourcesController::Base
5
+ include Rao::ResourcesController::FriendlyIdConcern
5
6
  include Rao::ResourcesController::ActsAsPublishedConcern
7
+ include Rao::ResourcesController::ActsAsListConcern
6
8
 
7
9
  helper Twitter::Bootstrap::Components::Rails::V4::ComponentsHelper
8
10
 
@@ -13,7 +15,7 @@ module Cmor
13
15
  private
14
16
 
15
17
  def permitted_params
16
- params.require(:picture_gallery).permit(:name, :description, :published, { assets: [], overwrite_assets: [], append_assets: [] })
18
+ params.require(:picture_gallery).permit(:locale, :name, :description, :published, { assets: [], overwrite_assets: [], append_assets: [] })
17
19
  end
18
20
  end
19
21
  end
@@ -1,4 +1,7 @@
1
+ = form.input :locale, collection: I18n.available_locales.map(&:to_s)
1
2
  = form.input :name
3
+ = form.input :identifier
4
+
2
5
  - if form.object.assets.empty?
3
6
  = form.input :assets, as: :file, input_html: { multiple: true }
4
7
  - else
@@ -1,3 +1,5 @@
1
+ = table.acts_as_list_actions
2
+ = table.column :locale, sort: true
1
3
  = table.column :preview do |resource|
2
4
  - if resource.picture_details.first.try(:asset).present?
3
5
  - bootstrap_card(image_options: { src: main_app.url_for(resource.picture_details.first.asset.variant(Cmor::Core::Backend::Configuration.image_variant_options_for(:table))) })
@@ -1,6 +1,8 @@
1
+ = table.row :locale
1
2
  = table.row :name
3
+ = table.row :identifier
2
4
  = table.row :description
3
5
  = table.row :picture_details_count
4
- = table.timestamp :published_at
5
6
  = table.row :display_code_for_erb
7
+ = table.timestamp :published_at
6
8
  = table.timestamps
data/config/routes.rb CHANGED
@@ -1,12 +1,13 @@
1
1
  Cmor::Galleries::Backend::Engine.routes.draw do
2
2
  resources :picture_galleries do
3
- post :toggle_published, on: :member
3
+ acts_as_list
4
+ acts_as_published
4
5
  end
5
6
 
6
7
  resources :picture_details, except: [:new] do
7
8
  post :destroy_many, on: :collection
8
- post :reposition, on: :member
9
- post :toggle_published, on: :member
9
+ acts_as_list
10
+ acts_as_published
10
11
  end
11
12
 
12
13
  root to: 'home#index'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmor_galleries_backend
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_backend
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
@@ -324,14 +324,14 @@ dependencies:
324
324
  requirements:
325
325
  - - '='
326
326
  - !ruby/object:Gem::Version
327
- version: 0.0.44.pre
327
+ version: 0.0.45.pre
328
328
  type: :runtime
329
329
  prerelease: false
330
330
  version_requirements: !ruby/object:Gem::Requirement
331
331
  requirements:
332
332
  - - '='
333
333
  - !ruby/object:Gem::Version
334
- version: 0.0.44.pre
334
+ version: 0.0.45.pre
335
335
  description:
336
336
  email:
337
337
  - roberto@vasquez-angel.de