ecm_downloads2_backend 2.0.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/ecm/downloads/backend/download_categories_controller.rb +17 -12
- data/app/controllers/ecm/downloads/backend/downloads_controller.rb +21 -16
- data/app/views/ecm/downloads/backend/download_categories/_table.html.haml +6 -6
- data/app/views/ecm/downloads/backend/downloads/_table.html.haml +5 -5
- data/lib/ecm/downloads/backend/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf02c9d4882c0f8457e0aab7b7b70c869f61d918
|
4
|
+
data.tar.gz: a865dd5267f7cc310cb438ba4a74db9c4a38a564
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c72a132c8ba6d5a597f580478d50fac7ee8e3b0d54aa048eb5bca11e534cbac56605031cdd5f7543a065ae827f346f88fb0935926441b061dc93a20011755f35
|
7
|
+
data.tar.gz: 25f0d5e203643ad301cc252080be6104d24b46098348ec142ac891e4c83f2aadb2081d068e5c732ea2b9ca29fdde6aaaa8be5b3c57921f847e01c316a2b649ae
|
@@ -1,17 +1,22 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
module Ecm
|
2
|
+
module Downloads
|
3
|
+
module Backend
|
4
|
+
class DownloadCategoriesController < Itsf::Backend::Resource::BaseController
|
5
|
+
include ResourcesController::Sorting
|
6
|
+
include ResourcesController::FriendlyIdConcern
|
5
7
|
|
6
|
-
|
8
|
+
def self.resource_class
|
9
|
+
Ecm::Downloads::DownloadCategory
|
10
|
+
end
|
7
11
|
|
8
|
-
|
9
|
-
params
|
10
|
-
.require(:download_category)
|
11
|
-
.permit(:name, :description, :locale)
|
12
|
-
end
|
12
|
+
private
|
13
13
|
|
14
|
-
|
15
|
-
|
14
|
+
def permitted_params
|
15
|
+
params
|
16
|
+
.require(:download_category)
|
17
|
+
.permit(:name, :description, :locale)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
16
21
|
end
|
17
22
|
end
|
@@ -1,22 +1,27 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
module Ecm
|
2
|
+
module Downloads
|
3
|
+
module Backend
|
4
|
+
class DownloadsController < Itsf::Backend::Resource::BaseController
|
5
|
+
include ResourcesController::Sorting
|
6
|
+
include ResourcesController::FriendlyIdConcern
|
5
7
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
end
|
8
|
+
def self.resource_class
|
9
|
+
Ecm::Downloads::Download
|
10
|
+
end
|
10
11
|
|
11
|
-
|
12
|
+
def download
|
13
|
+
@download = load_resource_scope.find(params[:id]).decorate
|
14
|
+
redirect_to @download.asset.expiring_url(100)
|
15
|
+
end
|
12
16
|
|
13
|
-
|
14
|
-
params
|
15
|
-
.require(:download)
|
16
|
-
.permit(:download_category_id, :asset, :name, :description, :published)
|
17
|
-
end
|
17
|
+
private
|
18
18
|
|
19
|
-
|
20
|
-
|
19
|
+
def permitted_params
|
20
|
+
params
|
21
|
+
.require(:download)
|
22
|
+
.permit(:download_category_id, :asset, :name, :description, :published)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
21
26
|
end
|
22
27
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
= table.column :locale,
|
2
|
-
= table.column :name,
|
3
|
-
= table.column :description,
|
4
|
-
= table.column :downloads_count
|
5
|
-
= table.association :parent,
|
6
|
-
= table.timestamps
|
1
|
+
= table.column :locale, sort: true
|
2
|
+
= table.column :name, sort: true, class: 'truncate-chars truncate-chars-30'
|
3
|
+
= table.column :description, sort: true, class: 'truncate-chars truncate-chars-30'
|
4
|
+
= table.column :downloads_count
|
5
|
+
= table.association :parent, sort: true
|
6
|
+
= table.timestamps sort: true
|
@@ -1,7 +1,7 @@
|
|
1
|
-
= table.association :download_category,
|
2
|
-
= table.column :name,
|
3
|
-
= table.column(:asset_file_size,
|
4
|
-
= table.column :asset_content_type,
|
5
|
-
= table.timestamps
|
1
|
+
= table.association :download_category, sort: true, url: ->(category) { download_category_path(category) }
|
2
|
+
= table.column :name, sort: true, class: 'truncate-chars truncate-chars-30'
|
3
|
+
= table.column(:asset_file_size, sort: true) { |download| number_to_human_size(download.asset_file_size) }
|
4
|
+
= table.column :asset_content_type, sort: true
|
5
|
+
= table.timestamps sort: true
|
6
6
|
= table.column(:additional_actions, class: 'table-data-centered') { |download| link_to(t('.download'), download_download_path(download), class: 'btn btn-xs btn-primary') }
|
7
7
|
= table.acts_as_published_actions
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_downloads2_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
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:
|
11
|
+
date: 2018-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|