cmor_files 0.0.58.pre → 0.0.59.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: 8904ee3f437b85d8f3570c038bc98a8ed8e593ad06da00ed9667524148c29128
4
- data.tar.gz: 9584cfafb37feff7829860f6cab15ecb8ddbca79f329f23c50bf0908734fd810
3
+ metadata.gz: acee5a135cac1afacc3116fe809c1da48ee1a63c2ddb3486789368a7d91ac1ed
4
+ data.tar.gz: e80877f393ad8fe48ca230641d7f8b28e3a20548367f1dff9cf9b48fee4ef109
5
5
  SHA512:
6
- metadata.gz: ee0a78e36951915a9bfbd2df07117d8a34de8168f155132b3f1e43d95f93a0ec13b58149cc218aa7ded8412c6cf5a00adcfebca85ddded219dc9a7f7c2c60396
7
- data.tar.gz: 0e6cebd1e07f928fd2be94a6967cf47bae29285d3521210062112bcb9d0b723c65877be3fe43e148c4bcff9f51daa4be50a425b99ea602def33c10092ee602fb
6
+ metadata.gz: 173df29e329d9d0188cec32a07b8a1c88573340d5385c06fe79fca414bc43e73c664b0fec0fab2da5f31416754529561903f224129a720413c17aa842d92f828
7
+ data.tar.gz: c39555e64ad3757424fda55e9ed915f94f26ce77da20e511495afe7a23ea273ab20b48dca23c2f5d73da09a54fbac15ca290e2a643126479e185982f1868af7c
@@ -16,5 +16,9 @@ module Cmor::Files
16
16
  friendly_id :title, use: :slugged
17
17
 
18
18
  validates :identifier, uniqueness: { scope: [ :folder_id ] }, allow_blank: true, allow_nil: true
19
+
20
+ def label
21
+ title.presence || asset&.blob&.filename&.to_s&.truncate(64).presence
22
+ end
19
23
  end
20
24
  end
@@ -6,8 +6,7 @@
6
6
  .col-12
7
7
  .table-responsive
8
8
  = collection_table(collection: resource.file_details, resource_class: Cmor::Files::FileDetail, header: false) do |table|
9
- = table.column :filename do |resource|
10
- - resource.asset.blob.filename.to_s.truncate(64)
9
+ = table.column :label
11
10
  = table.column :actions, html: "text-right" do |resource|
12
11
  - capture_haml do
13
12
  .text-right
@@ -6,8 +6,7 @@
6
6
  .col-12
7
7
  .table-responsive
8
8
  = collection_table(collection: @resource.file_details, resource_class: Cmor::Files::FileDetail, header: false) do |table|
9
- = table.column :filename do |resource|
10
- - resource.asset.blob.filename.to_s.truncate(64)
9
+ = table.column :label
11
10
  = table.column :blob_byte_size do |resource|
12
11
  - number_to_human_size(resource.asset.blob.byte_size)
13
12
  = table.column :actions do |resource|
@@ -30,6 +30,7 @@ de:
30
30
  folder: Ordner
31
31
  folder_id: Ordner
32
32
  identifier: Bezeichner
33
+ label: Label
33
34
  position: Position
34
35
  published: Veröffentlicht
35
36
  published_at: Veröffentlicht am
@@ -30,6 +30,7 @@ en:
30
30
  folder: Folder
31
31
  folder_id: Folder
32
32
  identifier: Identifier
33
+ label: Label
33
34
  position: Position
34
35
  published: Published
35
36
  published_at: Published at
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmor_files
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.58.pre
4
+ version: 0.0.59.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-07-17 00:00:00.000000000 Z
11
+ date: 2020-08-18 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.58.pre
33
+ version: 0.0.59.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.58.pre
40
+ version: 0.0.59.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.58.pre
47
+ version: 0.0.59.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.58.pre
54
+ version: 0.0.59.pre
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sqlite3
57
57
  requirement: !ruby/object:Gem::Requirement