cmor_files_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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ff187041f9fe53ca001a4d3837532ae7b4053be2176a96855d691838c656d1a
4
- data.tar.gz: 9856b931828dfe567e31d93ea7f7315a888bf7a425b9890a0f8a666511208122
3
+ metadata.gz: 5f96fc8b37edd39501a004185a27f02cef88b0c8cc3bf5e36d3bf7a847a8fcb6
4
+ data.tar.gz: fe85345bd7e2142d59350d111a7f11b0c3fe463912969f2cc485dde84e198c50
5
5
  SHA512:
6
- metadata.gz: d93c478558312a47451b3ed81cbf0333ec98f280097982f2ad9ee1a41df026eaee247baeeb14554a9a843772b1103da0f12c58b0b190f94b1a8aa510f7f2fc1a
7
- data.tar.gz: 46a39325c3eb9e37d19b5a48277a888f5f6ca62c0e54e7af2f617aff67aaf0e74a3da61de51b5d26777ddc4c3e720010080c1ac07ef5d684b79a36d6924730ea
6
+ metadata.gz: 06a49a7ec4eb888f7909ad2e2e8bdcdea4199444e782c48533bf49a911746d6653804eca470592a372b5e5f7cac81cc4e05dc94130d322a7388e9e792cd00c51
7
+ data.tar.gz: dad4e8e59f2cf854275abe9a52ca22a13a82c5534c6b34ec769d8d3bade70089c1fe6a2a75de2fdf20ba4d50146c0ff11d99ebebc2c2baf7d04fcac0d4800dad
@@ -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.53.pre
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-03-26 00:00:00.000000000 Z
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.53.pre
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.53.pre
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.53.pre
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.53.pre
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.53.pre
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.53.pre
334
+ version: 0.0.58.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.