cmor_blog_backend 0.0.53.pre → 0.0.58.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/cmor/blog/backend/asset_details_controller.rb +5 -1
- data/app/controllers/cmor/blog/backend/posts_controller.rb +2 -0
- data/app/views/cmor/blog/backend/asset_details/_form.html.haml +3 -0
- data/app/views/cmor/blog/backend/posts/_after_show_table.html.haml +13 -12
- data/config/routes.rb +2 -0
- data/lib/generators/cmor/blog/backend/install/templates/initializer.rb +2 -2
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a0f0e2d6b34eb508f9ec9238c9161e7ef1ed17f565b567e8a70fcd9f2e58850
|
4
|
+
data.tar.gz: 242cce03d4585630b5daff8e6c43b73e9d02cb8349d7d3f2e0d06de8bf1baf5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcf250cfe8f87358df1805d99b2b3db9e3839b2434df5679dae8ec633fe0d78f35e28287b7e906196592ee2a91a107b2352eb29a177a76dac239d0113c8fd3e2
|
7
|
+
data.tar.gz: 22f1b28f221fbdf83f5d9c804dbb8d9e42cd67ee41071d248b08b6f1d744e3326ccc8b4453a66520ba80269b929eb2ed385a2bb913e5aa27e4fff8b0ec0fcdd6
|
@@ -12,6 +12,10 @@ module Cmor
|
|
12
12
|
Cmor::Blog::AssetDetail
|
13
13
|
end
|
14
14
|
|
15
|
+
def self.available_rest_actions
|
16
|
+
super - [:new, :create]
|
17
|
+
end
|
18
|
+
|
15
19
|
private
|
16
20
|
|
17
21
|
def after_destroy_location
|
@@ -23,7 +27,7 @@ module Cmor
|
|
23
27
|
end
|
24
28
|
|
25
29
|
def permitted_params
|
26
|
-
params.require(:asset_detail).permit(:title, :description)
|
30
|
+
params.require(:asset_detail).permit(:title, :description, :published)
|
27
31
|
end
|
28
32
|
end
|
29
33
|
end
|
@@ -6,6 +6,8 @@ module Cmor
|
|
6
6
|
include Rao::ResourcesController::ActsAsPublishedConcern
|
7
7
|
include Rao::ResourcesController::FriendlyIdConcern
|
8
8
|
|
9
|
+
include Cmor::Audits::ResourcesController::PaperTrailConcern if Cmor::Core.features?(:cmor_audits)
|
10
|
+
|
9
11
|
helper Cmor::Tags::Backend::ApplicationHelper if Cmor::Core.features?(:cmor_tags)
|
10
12
|
|
11
13
|
include Rao::Query::Controller::QueryConcern
|
@@ -6,18 +6,19 @@
|
|
6
6
|
= t.column :asset_actions do |resource|
|
7
7
|
- if resource.asset.present?
|
8
8
|
- link_to(main_app.url_for(resource.asset), class: 'btn btn-xs btn-primary btn-responsive') do
|
9
|
-
%
|
9
|
+
%i.fas.fa-download
|
10
10
|
%span.btn-text= t('.download')
|
11
|
-
= t.column :actions do |resource|
|
11
|
+
= t.column :actions, title: '' do |resource|
|
12
12
|
- capture_haml do
|
13
13
|
- id_base = "link-to-#{controller.class.name.underscore.gsub('_controller', '').gsub(/[\/_]/, '-')}-#{resource.to_param}"
|
14
|
-
.
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
14
|
+
.text-right.w-100
|
15
|
+
.btn-group
|
16
|
+
= link_to(resource, id: "#{id_base}-show", class: 'btn btn-xs btn-responsive btn-primary') do
|
17
|
+
%i.fas.fa-eye
|
18
|
+
%span.btn-text= t('.show')
|
19
|
+
= link_to([:edit, resource], id: "#{id_base}-edit", class: 'btn btn-xs btn-responsive btn-secondary') do
|
20
|
+
%i.fas.fa-pen
|
21
|
+
%span.btn-text= t('.edit')
|
22
|
+
= link_to(resource, id: "#{id_base}-destroy", class: 'btn btn-xs btn-responsive btn-danger', method: :delete, data: { confirm: t('rao.component.collection_table.destroy_confirmation') }) do
|
23
|
+
%i.fas.fa-fire
|
24
|
+
%span.btn-text= t('.destroy')
|
data/config/routes.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
Cmor::Blog::Backend::Engine.routes.draw do
|
2
2
|
resources :posts do
|
3
|
+
Cmor::Core::Backend::Routing::ResourcesRoutes.inject_routes(self)
|
3
4
|
post :toggle_published, on: :member
|
4
5
|
post :reposition, on: :member
|
5
6
|
end
|
6
7
|
resources :asset_details do
|
8
|
+
Cmor::Core::Backend::Routing::ResourcesRoutes.inject_routes(self)
|
7
9
|
post :reposition, on: :member
|
8
10
|
end
|
9
11
|
|
@@ -22,7 +22,7 @@ Cmor::Blog::Backend.configure do |config|
|
|
22
22
|
# This proc is used in context of the PostsController to retrieve the current
|
23
23
|
# user to userstamp created/updated posts.
|
24
24
|
#
|
25
|
-
# default: config.current_user_proc = ->(controller) { controller.send(:current_user) }
|
25
|
+
# default: config.current_user_proc = ->(controller) { controller.respond_to?(:current_user, true) ? controller.send(:current_user) : nil }
|
26
26
|
#
|
27
|
-
config.current_user_proc = ->(controller) { controller.send(:current_user) }
|
27
|
+
config.current_user_proc = ->(controller) { controller.respond_to?(:current_user, true) ? controller.send(:current_user) : nil }
|
28
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cmor_blog_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.58.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-
|
11
|
+
date: 2020-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.0.
|
33
|
+
version: 0.0.58.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.
|
40
|
+
version: 0.0.58.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.
|
47
|
+
version: 0.0.58.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.
|
54
|
+
version: 0.0.58.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.
|
327
|
+
version: 0.0.58.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.
|
334
|
+
version: 0.0.58.pre
|
335
335
|
description: Cmor::Blog::Backend Module.
|
336
336
|
email:
|
337
337
|
- roberto@vasquez-angel.de
|
@@ -354,6 +354,7 @@ files:
|
|
354
354
|
- app/helpers/cmor/blog/backend/application_helper.rb
|
355
355
|
- app/policies/cmor/blog/backend/engine_policy.rb
|
356
356
|
- app/policies/cmor/blog/post_policy.rb
|
357
|
+
- app/views/cmor/blog/backend/asset_details/_form.html.haml
|
357
358
|
- app/views/cmor/blog/backend/asset_details/_index_table.html.haml
|
358
359
|
- app/views/cmor/blog/backend/posts/_after_show_table.html.haml
|
359
360
|
- app/views/cmor/blog/backend/posts/_form.html.haml
|
@@ -393,7 +394,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
393
394
|
- !ruby/object:Gem::Version
|
394
395
|
version: 1.3.1
|
395
396
|
requirements: []
|
396
|
-
rubygems_version: 3.1.
|
397
|
+
rubygems_version: 3.1.4
|
397
398
|
signing_key:
|
398
399
|
specification_version: 4
|
399
400
|
summary: Cmor::Blog::Backend.
|