ecm_downloads2 1.0.0 → 1.1.0

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
  SHA1:
3
- metadata.gz: 679cbb740157b92df72064aa79adfa74b3750679
4
- data.tar.gz: ef3acd817ff332569689fe6dd6e3b25b8b139a05
3
+ metadata.gz: 2686ef3583e0d0e5e86e716d9b196b3e55d1abdf
4
+ data.tar.gz: 5c2510f057fea98156706db7de6a6aa007dcdf2b
5
5
  SHA512:
6
- metadata.gz: 8c89e224605825bbb313c5e5f21e0476622ea524fa2a20f03347ddac168d247cc810e924342ebefb1f80223a8980d726e8bf77be4432720613a09cd8c52fcc8c
7
- data.tar.gz: 255205ee7b15d6e6f35ad3c8bcede935fb5aaf25a8e4cfb201ae6d713c7365d092cc7e32b57a98a2eec9803b0a33ecd457c1e28c827f188d2bfdfd2aa8699fc3
6
+ metadata.gz: 2bed6fd14d17e4164ee857d1f092adf0f5e5d762833956a4a5b3b536040cbd3e2ac512a14d91d10a0aef04112dd2bf61d9384c867b1f665bc152f4f36b9a4282
7
+ data.tar.gz: 1c31c3d99bb6ff4b802bc2a90798173f703d36dedb54eeade77f6ad9f26044b199030faf5fd982bd008c2070eda79b56d4ca4cced518b5c4e0870339308d146a
@@ -8,7 +8,7 @@ module Ecm::Downloads
8
8
  end
9
9
 
10
10
  def locale_label
11
- h.content_tag(:span, locale, class: 'label label-info')
11
+ h.content_tag(:span, locale, class: 'label label-default')
12
12
  end
13
13
 
14
14
  def tree_name
@@ -7,9 +7,7 @@
7
7
  </div>
8
8
  <% end %>
9
9
 
10
- <div class="list-group">
11
- <%= render partial: 'download_category_in_index', collection: Ecm::Downloads::DownloadCategoryDecorator.decorate_collection(download_category.descendants), as: :download_category %>
12
- </div>
10
+ <%= render partial: 'table', locals: { download_categories: Ecm::Downloads::DownloadCategoryDecorator.decorate_collection(download_category.descendants) } %>
13
11
 
14
12
  <div class="download_category-downloads item_list">
15
13
  <h2><%= Ecm::Downloads::DownloadCategory.human_attribute_name(:ecm_downloads_downloads) %></h2>
@@ -0,0 +1,9 @@
1
+ <tr class="<%= download_category.class.name.underscore.gsub('/', ' ') %>" id="<%= "#{download_category.class.name.underscore.gsub('/', '-')}-#{download_category.to_param}" %>">
2
+ <td>
3
+ <%= link_to(download_category.tree_name, download_category, class: "left-padding-#{download_category.depth * 3}", title: download_category.description) %>
4
+ <%= download_category.locale_label %>
5
+ </td>
6
+ <td class="text-right">
7
+ <%= download_category.ecm_downloads_downloads_count_label %>
8
+ </td>
9
+ </tr>
@@ -0,0 +1,7 @@
1
+ <div class="table-responsive">
2
+ <table class="<%= Ecm::Downloads::Configuration.download_categories_table_classes %>">
3
+ <tbody>
4
+ <%= render partial: 'download_category_in_table', collection: download_categories, as: :download_category %>
5
+ </tbody>
6
+ </table>
7
+ </div>
@@ -1,5 +1,7 @@
1
1
  <h1><%= Ecm::Downloads::DownloadCategory.model_name.human(:count => :other) %></h1>
2
2
 
3
- <div class="list-group">
4
- <%= render partial: 'download_category_in_index', collection: @download_categories, as: :download_category %>
3
+ <%= render partial: 'table', locals: { download_categories: @download_categories } %>
4
+
5
+ <div class="well page-actions">
6
+ <%= link_to(t('ecm.downloads.views.actions.back'), root_path, class: 'btn btn-default') %>
5
7
  </div>
@@ -1,6 +1,6 @@
1
1
  <%= render @download_category %>
2
2
 
3
- <div class="well">
3
+ <div class="well page-actions">
4
4
  <% if @download_category.root? %>
5
5
  <%= link_to(t('ecm.downloads.download_category.actions.back_to_index'), ecm_downloads_download_categories_path, class: 'btn btn-default') if respond_to?(:ecm_downloads_download_categories_path) %>
6
6
  <% else %>
@@ -3,8 +3,8 @@
3
3
  <td><%= link_to download.ecm_downloads_download_category.human, download.ecm_downloads_download_category %></td>
4
4
  <td><%= number_to_human_size(download.asset_file_size) %></td>
5
5
  <td>
6
- <%= link_to([:download, download], { :class => 'btn btn-primary btn-xs pull-right' }) do %>
7
- <span class="glyphicon glyphicon-save" aria-hidden="true"></span> <%= t('ecm.downloads.download.actions.start_download') %>
8
- <% end %>
6
+ <%= link_to([:download, download], { :class => 'btn btn-primary btn-xs pull-right' }) do %>
7
+ <span class="glyphicon glyphicon-save" aria-hidden="true"></span> <%= t('ecm.downloads.download.actions.start_download') %>
8
+ <% end %>
9
9
  </td>
10
10
  </tr>
@@ -1,5 +1,5 @@
1
1
  <div class="table-responsive">
2
- <table class="table table-striped table-hover">
2
+ <table class="<%= Ecm::Downloads::Configuration.downloads_table_classes %>">
3
3
  <tbody>
4
4
  <%= render partial: 'ecm/downloads/downloads/download_in_table', collection: downloads, as: :download %>
5
5
  </tbody>
@@ -1,3 +1,7 @@
1
1
  <h1><%= Ecm::Downloads::Download.model_name.human(:count => :other).humanize %></h1>
2
2
 
3
3
  <%= render partial: 'table', locals: { downloads: @downloads } %>
4
+
5
+ <div class="well page-actions">
6
+ <%= link_to(t('ecm.downloads.views.actions.back'), root_path, class: 'btn btn-default') %>
7
+ </div>
@@ -5,7 +5,7 @@ de:
5
5
  menu: "Downloads"
6
6
  download:
7
7
  actions:
8
- start_download: "Jetzt herunterladen"
8
+ start_download: "Jetzt herunterladen"
9
9
  messages:
10
10
  not_found: "Download \"%{name}\" nicht gefunden."
11
11
  download_category:
@@ -13,4 +13,7 @@ de:
13
13
  back_to_index: "Zurück zur Übersicht"
14
14
  messages:
15
15
  not_found: "Download Kategorie \"%{name}\" nicht gefunden."
16
- no_downloads_available: "Keine Downloads in dieser Kategorie vorhanden."
16
+ no_downloads_available: "Keine Downloads in dieser Kategorie vorhanden."
17
+ views:
18
+ actions:
19
+ back: 'Zurück'
@@ -5,7 +5,7 @@ en:
5
5
  menu: "Downloads"
6
6
  download:
7
7
  actions:
8
- start_download: "Download now"
8
+ start_download: "Download now"
9
9
  messages:
10
10
  not_found: "Download \"%{name}\" not found."
11
11
  download_category:
@@ -13,4 +13,7 @@ en:
13
13
  back_to_index: "Back to the index"
14
14
  messages:
15
15
  not_found: "Download category \"%{name}\" not found."
16
- no_downloads_available: "There are now downloads in this category."
16
+ no_downloads_available: "There are now downloads in this category."
17
+ views:
18
+ actions:
19
+ back: 'Back'
@@ -13,10 +13,17 @@ module Ecm
13
13
  {}
14
14
  end
15
15
 
16
-
17
16
  mattr_accessor :base_controller do
18
17
  'ApplicationController'
19
18
  end
19
+
20
+ mattr_accessor :downloads_table_classes do
21
+ 'table table-striped table-hover'
22
+ end
23
+
24
+ mattr_accessor :download_categories_table_classes do
25
+ 'table table-striped table-hover'
26
+ end
20
27
  end
21
28
  end
22
29
  end
@@ -1,6 +1,6 @@
1
1
  module Ecm
2
2
  module Downloads
3
- VERSION = "1.0.0"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
6
6
 
@@ -1,8 +1,8 @@
1
1
  Ecm::Downloads.configure do |config|
2
2
  # Paperclip options
3
3
  #
4
- # default: config.paperclip_options = {
5
- # }
4
+ # default: config.paperclip_options = {
5
+ # }
6
6
  config.paperclip_options = {
7
7
  }
8
8
 
@@ -11,5 +11,16 @@ Ecm::Downloads.configure do |config|
11
11
  # Default: config.base_controller = 'ApplicationController'
12
12
  #
13
13
  config.base_controller = 'ApplicationController'
14
- end
15
14
 
15
+ # Set the css classes for the download categories table
16
+ #
17
+ # Default: config.download_categories_table_classes = 'table table-striped table-hover'
18
+ #
19
+ config.download_categories_table_classes = 'table table-striped table-hover'
20
+
21
+ # Set the css classes for the downloads table
22
+ #
23
+ # Default: config.downloads_table_classes = 'table table-striped table-hover'
24
+ #
25
+ config.downloads_table_classes = 'table table-striped table-hover'
26
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_downloads2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.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: 2015-10-25 00:00:00.000000000 Z
11
+ date: 2015-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -432,7 +432,8 @@ files:
432
432
  - app/models/ecm/downloads/download.rb
433
433
  - app/models/ecm/downloads/download_category.rb
434
434
  - app/views/ecm/downloads/download_categories/_download_category.html.erb
435
- - app/views/ecm/downloads/download_categories/_download_category_in_index.html.erb
435
+ - app/views/ecm/downloads/download_categories/_download_category_in_table.html.erb
436
+ - app/views/ecm/downloads/download_categories/_table.html.erb
436
437
  - app/views/ecm/downloads/download_categories/index.html.erb
437
438
  - app/views/ecm/downloads/download_categories/show.html.erb
438
439
  - app/views/ecm/downloads/downloads/_download.html.erb
@@ -1,5 +0,0 @@
1
- <%= link_to(download_category, class: "list-group-item left-padding-#{download_category.depth * 3}", title: download_category.description) do %>
2
- <%= download_category.tree_name %>
3
- <%= download_category.locale_label %>
4
- <%= download_category.ecm_downloads_downloads_count_label %>
5
- <% end %>