cmor_files_backend 0.0.51.pre → 0.0.56.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: 7d4ce151b7547cbdf5bcc3c4b3d0db884c146284b9f3a6d2bf40a4c9cf591f10
4
- data.tar.gz: ca49c4566fc28e9acee868994f7138417da01c87b862525a99e27662979a3edf
3
+ metadata.gz: 7a96d9b6b206e33d8e126782f3b30e1631c3381fbd23a55ec2eea0c0e76bff02
4
+ data.tar.gz: 3330a2d0c444bd548616cd0ee7842136e604da4aef181f83e26bdc819789b2b6
5
5
  SHA512:
6
- metadata.gz: dc05c9673efbd7743d0c4911f3382787898603c34e256f99d4bfe06e870393350d77ea50713e0b692271d99c9f3b98dba6f17ebed006452b209908dbad8d16c3
7
- data.tar.gz: 0daea104af0fb34ec13adf077ab90f97cf2595eac899961dcfcf885b72d9a7113a5e292b69806cb304bf0694c83b483c6c9b4ce948c306bc74b2eddc224b1bdf
6
+ metadata.gz: 5d9020fb037e63c3433a37cb32cfda8fdeac620517b64c3ce2971c2d72f191a8d3f5c62e8aa93d14adb814bb8a8f08270eea55040308cc44891bc889b1052631
7
+ data.tar.gz: b39b58e5840549cbe710edd31b1204750f9ea3a5dddfb134a03183ed7cc3c5db3604e851ef17c7b243ed1b63e9027d2f297a01727190e87cecd0b6a90b409965
@@ -10,8 +10,16 @@ module Cmor
10
10
  Cmor::Files::FileDetail
11
11
  end
12
12
 
13
+ def self.available_rest_actions
14
+ super - [:new, :create]
15
+ end
16
+
13
17
  private
14
18
 
19
+ def load_collection_scope
20
+ super.joins(:folder)
21
+ end
22
+
15
23
  def permitted_params
16
24
  params.require(:file_detail).permit(:title, :description)
17
25
  end
@@ -1,14 +1,14 @@
1
1
  = table.batch_actions( actions: { destroy: destroy_many_attachments_path })
2
2
  = table.acts_as_list_actions
3
+ = table.association :folder, label_method: :human, link_to: ->(r) { url_for(r.folder) }
4
+ = table.column :identifier, sort: true
5
+ = table.column :title, sort: true
3
6
  = table.column :filename do |resource|
4
- - resource.asset.blob.filename
5
- = table.column :blob_content_type do |resource|
6
- - resource.asset.blob.content_type
7
- = table.column :blob_byte_size do |resource|
8
- - resource.asset.blob.byte_size
9
- = table.column :blob_checksum do |resource|
10
- - resource.asset.blob.checksum
11
- = table.column :blob_created_at do |resource|
12
- - I18n.l(resource.asset.blob.created_at, format: :short)
13
- = table.timestamp :created_at
7
+ - truncate(resource.asset.blob.filename.to_s)
8
+ = table.timestamp :created_at, sort: true
9
+ = table.column :asset do |resource|
10
+ - capture_haml do
11
+ = link_to(main_app.url_for(resource.asset), class: 'btn btn-primary btn-responsive btn-xs') do
12
+ %i.fas.fa-download
13
+ %span.btn-text= "#{t('.download')} (#{resource.asset.blob.content_type.split('/').last}, #{number_to_human_size(resource.asset.blob.byte_size)})"
14
14
  = table.acts_as_published_actions
@@ -1,2 +1,3 @@
1
- = form.input :title_cont
2
1
  = form.input :name_cont, association: :folder
2
+ = form.input :identifier_cont
3
+ = form.input :title_cont
@@ -0,0 +1,29 @@
1
+ = table.association :folder, label_method: :human, link_to: ->(r) { url_for(r.folder) }
2
+ = table.row :identifier
3
+ = table.row :title
4
+ = table.row :filename do |resource|
5
+ - resource.asset.blob.filename
6
+ = table.row :blob_content_type do |resource|
7
+ - resource.asset.blob.content_type
8
+ = table.row :blob_byte_size do |resource|
9
+ - resource.asset.blob.byte_size
10
+ = table.row :blob_checksum do |resource|
11
+ - resource.asset.blob.checksum
12
+ = table.row :blob_created_at do |resource|
13
+ - I18n.l(resource.asset.blob.created_at, format: :short)
14
+ = table.row :asset do |resource|
15
+ - capture_haml do
16
+ = link_to(main_app.url_for(resource.asset), class: 'btn btn-primary btn-responsive btn-xs') do
17
+ %i.fas.fa-download
18
+ %span.btn-text= "#{t('.download')} (#{resource.asset.blob.content_type.split('/').last}, #{number_to_human_size(resource.asset.blob.byte_size)})"
19
+ = table.row :title
20
+ = table.row :description
21
+ = table.row :asset_permanent_path do |resource|
22
+ - main_app.rails_blob_path(resource.asset)
23
+ = table.row :asset_permanent_url do |resource|
24
+ - main_app.rails_blob_url(resource.asset)
25
+ = table.row :published_at
26
+ = table.timestamps
27
+
28
+
29
+
@@ -11,6 +11,6 @@
11
11
  - resource.asset.blob.checksum
12
12
  = t.timestamps format: :short
13
13
  = t.column :actions do |resource|
14
- - link_to([resource], id: "#{dom_id(resource)}-destroy", class: 'btn btn-xs btn-responsive btn-danger', method: :delete, data: { confirm: I18n.t('.confirmations.delete') }) do
14
+ - link_to([resource], id: "#{dom_id(resource)}-destroy", class: 'btn btn-xs btn-responsive btn-danger', method: :delete, data: { confirm: t('rao.component.collection_table.destroy_confirmation') }) do
15
15
  %span.glyphicon.glyphicon-fire
16
16
  %span.btn-text= t('.destroy')
@@ -1,6 +1,7 @@
1
1
  = table.batch_actions( actions: { destroy: destroy_many_folders_path, publish: publish_many_folders_path, unpublish: unpublish_many_folders_path })
2
2
  = table.acts_as_list_actions
3
3
  = table.id sort: true
4
+ = table.column :identifier, sort: true
4
5
  = table.column :name, sort: true
5
6
  = table.column :assets_count
6
7
  = table.timestamps sort: true
@@ -0,0 +1,2 @@
1
+ = form.input :identifier_cont
2
+ = form.input :name_cont
@@ -1,4 +1,5 @@
1
1
  = table.id
2
+ = table.row :identifier
2
3
  = table.row :name
3
4
  = table.row :description
4
5
  = table.row :assets_count
@@ -11,7 +11,7 @@ Cmor::Files::Backend::Engine.routes.draw do
11
11
  post :publish_many, on: :collection
12
12
  end
13
13
 
14
- resources :file_details do
14
+ resources :file_details, except: [:new, :create] do
15
15
  acts_as_list
16
16
  acts_as_published
17
17
  post :destroy_many, on: :collection
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmor_files_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.51.pre
4
+ version: 0.0.56.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-03-23 00:00:00.000000000 Z
11
+ date: 2020-07-14 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.51.pre
33
+ version: 0.0.56.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.51.pre
40
+ version: 0.0.56.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.51.pre
47
+ version: 0.0.56.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.51.pre
54
+ version: 0.0.56.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.51.pre
327
+ version: 0.0.56.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.51.pre
334
+ version: 0.0.56.pre
335
335
  description:
336
336
  email:
337
337
  - roberto@vasquez-angel.de
@@ -359,9 +359,11 @@ files:
359
359
  - app/models/cmor/files/backend/application_record.rb
360
360
  - app/views/cmor/files/backend/file_details/_index_table.html.haml
361
361
  - app/views/cmor/files/backend/file_details/_query_form.html.haml
362
+ - app/views/cmor/files/backend/file_details/_show_table.html.haml
362
363
  - app/views/cmor/files/backend/folders/_after_show_table.html.haml
363
364
  - app/views/cmor/files/backend/folders/_form.html.haml
364
365
  - app/views/cmor/files/backend/folders/_index_table.html.haml
366
+ - app/views/cmor/files/backend/folders/_query_form.html.haml
365
367
  - app/views/cmor/files/backend/folders/_show_table.html.haml
366
368
  - app/views/layouts/cmor/files/backend/application.html.erb
367
369
  - config/initializers/assets.rb
@@ -397,7 +399,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
397
399
  - !ruby/object:Gem::Version
398
400
  version: 1.3.1
399
401
  requirements: []
400
- rubygems_version: 3.1.2
402
+ rubygems_version: 3.1.4
401
403
  signing_key:
402
404
  specification_version: 4
403
405
  summary: Cmor Files Backend Module.