refinerycms-resources 1.0.11 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. data/app/controllers/refinery/admin/resources_controller.rb +87 -0
  2. data/app/models/refinery/resource.rb +49 -0
  3. data/app/views/refinery/admin/resources/_actions.html.erb +8 -0
  4. data/app/views/{admin → refinery/admin}/resources/_existing_resource.html.erb +7 -13
  5. data/app/views/{admin → refinery/admin}/resources/_form.html.erb +14 -18
  6. data/app/views/refinery/admin/resources/_records.html.erb +16 -0
  7. data/app/views/refinery/admin/resources/_resource.html.erb +20 -0
  8. data/app/views/{admin → refinery/admin}/resources/_resources.html.erb +2 -2
  9. data/app/views/refinery/admin/resources/edit.html.erb +1 -0
  10. data/app/views/refinery/admin/resources/index.html.erb +6 -0
  11. data/app/views/{admin → refinery/admin}/resources/insert.html.erb +10 -13
  12. data/app/views/refinery/admin/resources/new.html.erb +1 -0
  13. data/config/locales/bg.yml +30 -29
  14. data/config/locales/cs.yml +32 -30
  15. data/config/locales/da.yml +30 -29
  16. data/config/locales/de.yml +30 -29
  17. data/config/locales/el.yml +30 -29
  18. data/config/locales/en.yml +30 -29
  19. data/config/locales/es.yml +31 -30
  20. data/config/locales/fi.yml +30 -29
  21. data/config/locales/fr.yml +30 -29
  22. data/config/locales/it.yml +41 -39
  23. data/config/locales/ja.yml +36 -0
  24. data/config/locales/ko.yml +36 -0
  25. data/config/locales/lt.yml +30 -29
  26. data/config/locales/lv.yml +30 -29
  27. data/config/locales/nb.yml +30 -29
  28. data/config/locales/nl.yml +29 -28
  29. data/config/locales/pl.yml +31 -30
  30. data/config/locales/pt-BR.yml +30 -29
  31. data/config/locales/rs.yml +30 -30
  32. data/config/locales/ru.yml +30 -29
  33. data/config/locales/sk.yml +30 -29
  34. data/config/locales/sl.yml +29 -28
  35. data/config/locales/sv.yml +30 -29
  36. data/config/locales/vi.yml +30 -29
  37. data/config/locales/zh-CN.yml +30 -29
  38. data/config/locales/zh-TW.yml +30 -29
  39. data/config/routes.rb +4 -8
  40. data/db/migrate/20100913234709_create_refinerycms_resources_schema.rb +8 -16
  41. data/lib/generators/refinery/resources/resources_generator.rb +10 -0
  42. data/lib/generators/refinery/resources/templates/config/initializers/refinery/resources.rb.erb +26 -0
  43. data/lib/refinery/resources/configuration.rb +43 -0
  44. data/lib/refinery/resources/dragonfly.rb +52 -0
  45. data/lib/refinery/resources/engine.rb +38 -0
  46. data/lib/refinery/resources/validators/file_size_validator.rb +19 -0
  47. data/lib/refinery/resources/validators.rb +7 -0
  48. data/lib/refinery/resources.rb +25 -0
  49. data/lib/refinerycms-resources.rb +1 -75
  50. data/refinerycms-resources.gemspec +14 -83
  51. data/spec/factories/resource.rb +5 -0
  52. data/{features/uploads → spec/fixtures}/refinery_is_awesome.txt +0 -0
  53. data/spec/fixtures/refinery_is_awesome2.txt +1 -0
  54. data/spec/lib/generators/refinery/resources/resources_generator_spec.rb +29 -0
  55. data/spec/models/refinery/resource_spec.rb +118 -0
  56. data/spec/requests/refinery/admin/resources_spec.rb +148 -0
  57. metadata +111 -101
  58. data/app/controllers/admin/resources_controller.rb +0 -87
  59. data/app/models/resource.rb +0 -54
  60. data/app/views/admin/resources/_actions.html.erb +0 -11
  61. data/app/views/admin/resources/_records.html.erb +0 -16
  62. data/app/views/admin/resources/_resource.html.erb +0 -17
  63. data/app/views/admin/resources/edit.html.erb +0 -1
  64. data/app/views/admin/resources/index.html.erb +0 -6
  65. data/app/views/admin/resources/new.html.erb +0 -1
  66. data/config/locales/jp.yml +0 -35
  67. data/config/locales/lolcat.yml +0 -35
  68. data/features/manage_files.feature +0 -43
  69. data/features/step_definitions/file_steps.rb +0 -21
  70. data/features/support/paths.rb +0 -17
  71. data/features/uploads/beach.jpeg +0 -0
  72. data/lib/gemspec.rb +0 -38
  73. data/lib/generators/refinerycms_resources_generator.rb +0 -8
  74. data/spec/models/resource_spec.rb +0 -78
  75. data/spec/uploads/refinery_is_awesome.txt +0 -1
@@ -0,0 +1,87 @@
1
+ module ::Refinery
2
+ module Admin
3
+ class ResourcesController < ::Refinery::AdminController
4
+
5
+ crudify :'refinery/resource',
6
+ :order => "updated_at DESC",
7
+ :xhr_paging => true
8
+
9
+ before_filter :init_dialog
10
+
11
+ def new
12
+ @resource = Resource.new if @resource.nil?
13
+
14
+ @url_override = refinery.admin_resources_path(:dialog => from_dialog?)
15
+ end
16
+
17
+ def create
18
+ @resources = Resource.create_resources(params[:resource])
19
+ @resource = @resources.detect { |r| !r.valid? }
20
+
21
+ unless params[:insert]
22
+ if @resources.all?(&:valid?)
23
+ flash.notice = t('created', :scope => 'refinery.crudify', :what => "'#{@resources.map(&:title).join("', '")}'")
24
+ unless from_dialog?
25
+ redirect_to refinery.admin_resources_path
26
+ else
27
+ @dialog_successful = true
28
+ render :nothing => true, :layout => true
29
+ end
30
+ else
31
+ self.new # important for dialogs
32
+ render :action => 'new'
33
+ end
34
+ else
35
+ if @resources.all?(&:valid?)
36
+ @resource_id = @resources.detect(&:persisted?).id
37
+ @resource = nil
38
+
39
+ self.insert
40
+ end
41
+ end
42
+ end
43
+
44
+ def insert
45
+ self.new if @resource.nil?
46
+
47
+ @url_override = refinery.admin_resources_path(request.query_parameters.merge(:insert => true))
48
+
49
+ if params[:conditions].present?
50
+ extra_condition = params[:conditions].split(',')
51
+
52
+ extra_condition[1] = true if extra_condition[1] == "true"
53
+ extra_condition[1] = false if extra_condition[1] == "false"
54
+ extra_condition[1] = nil if extra_condition[1] == "nil"
55
+ paginate_resources({extra_condition[0].to_sym => extra_condition[1]})
56
+ else
57
+ paginate_resources
58
+ end
59
+ render :action => "insert"
60
+ end
61
+
62
+ protected
63
+
64
+ def init_dialog
65
+ @app_dialog = params[:app_dialog].present?
66
+ @field = params[:field]
67
+ @update_resource = params[:update_resource]
68
+ @update_text = params[:update_text]
69
+ @thumbnail = params[:thumbnail]
70
+ @callback = params[:callback]
71
+ @conditions = params[:conditions]
72
+ @current_link = params[:current_link]
73
+ end
74
+
75
+ def restrict_controller
76
+ super unless action_name == 'insert'
77
+ end
78
+
79
+ def paginate_resources(conditions={})
80
+ @resources = Resource.where(conditions).
81
+ paginate(:page => params[:page], :per_page => Resource.per_page(from_dialog?)).
82
+ order('created_at DESC')
83
+ end
84
+
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,49 @@
1
+ module Refinery
2
+ class Resource < Refinery::Core::BaseModel
3
+ include Resources::Validators
4
+
5
+ attr_accessible :id, :file
6
+
7
+ resource_accessor :file
8
+
9
+ validates :file, :presence => true
10
+ validates_with FileSizeValidator
11
+
12
+ # Docs for acts_as_indexed http://github.com/dougal/acts_as_indexed
13
+ acts_as_indexed :fields => [:file_name, :title, :type_of_content]
14
+
15
+ delegate :ext, :size, :mime_type, :url, :to => :file
16
+
17
+ # used for searching
18
+ def type_of_content
19
+ mime_type.split("/").join(" ")
20
+ end
21
+
22
+ # Returns a titleized version of the filename
23
+ # my_file.pdf returns My File
24
+ def title
25
+ CGI::unescape(file_name.to_s).gsub(/\.\w+$/, '').titleize
26
+ end
27
+
28
+ class << self
29
+ # How many resources per page should be displayed?
30
+ def per_page(dialog = false)
31
+ dialog ? Resources.pages_per_dialog : Resources.pages_per_admin_index
32
+ end
33
+
34
+ def create_resources(params)
35
+ resources = []
36
+
37
+ unless params.present? and params[:file].is_a?(Array)
38
+ resources << create(params)
39
+ else
40
+ params[:file].each do |resource|
41
+ resources << create(:file => resource)
42
+ end
43
+ end
44
+
45
+ resources
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,8 @@
1
+ <ul>
2
+ <li>
3
+ <%= render '/refinery/admin/search', :url => refinery.admin_resources_path %>
4
+ </li>
5
+ <li>
6
+ <%= link_to t('.upload_new'), refinery.new_admin_resource_path(:dialog => true), :class => "add_icon" %>
7
+ </li>
8
+ </ul>
@@ -6,7 +6,7 @@
6
6
  <% @resources.each do |resource| -%>
7
7
  <% resource_linked = (resource.url == params[:current_link]) if params[:current_link].present? %>
8
8
  <li<%= " class='linked'" if resource_linked %>>
9
- <%= link_to "#{resource.title} (#{resource.file_name})", resource.url,
9
+ <%= link_to "#{resource.title} (#{resource.file_name})", asset_paths.compute_public_path(resource.url, ''),
10
10
  :title => t('.link_to_file'),
11
11
  :rel => resource.title,
12
12
  :class => 'page_link',
@@ -17,16 +17,10 @@
17
17
  </div>
18
18
  </div>
19
19
 
20
- <%= render :partial => "/shared/admin/form_actions",
21
- :locals => {
22
- :f => nil,
23
- :cancel_url => admin_resources_url,
24
- :submit_button_text => t('.button_text'),
25
- :hide_cancel => true,
26
- :hide_delete => true,
27
- :paginate => {
28
- :collection => @resources,
29
- :url => {:controller => "/admin/resources", :action => "insert", :dialog => from_dialog? }
30
- }
31
- } if @app_dialog or @resources.any? %>
20
+ <%= will_paginate @resources, :params => params.dup %>
21
+
22
+ <%= render '/refinery/admin/form_actions', :f => nil,
23
+ :submit_button_text => t('.button_text'),
24
+ :hide_cancel => true,
25
+ :hide_delete => true if @app_dialog or @resources.any? %>
32
26
  </div>
@@ -1,11 +1,10 @@
1
- <%= form_for [:admin, @resource], :url => @url_override || @url,
2
- :html => {:multipart => true} do |f| -%>
1
+ <%= form_for @resource, :url => (@url_override || @resource.new_record? ? refinery.admin_resources_path : refinery.admin_resource_path(@resource)),
2
+ :html => { :multipart => true },
3
+ :as => "resource" do |f| -%>
3
4
 
4
- <%= render :partial => "/shared/admin/error_messages",
5
- :locals => {
6
- :object => @resource,
7
- :include_object_name => false
8
- } %>
5
+ <%= render '/refinery/admin/error_messages',
6
+ :object => @resource,
7
+ :include_object_name => false %>
9
8
 
10
9
  <div class='field'>
11
10
  <% if action_name =~ /(edit)|(update)/ %>
@@ -19,21 +18,18 @@
19
18
  <% end %>
20
19
  </div>
21
20
 
22
- <div class='field'>
21
+ <div class='field' id='maximum_file_size'>
23
22
  <label>
24
- <%= t('.maximum_file_size', :megabytes => Resource::MAX_SIZE_IN_MB) %>
23
+ <%= t('.maximum_file_size', :bytes => number_to_human_size(Refinery::Resources.max_file_size)) %>
25
24
  </label>
26
25
  </div>
27
26
 
28
- <%= render :partial => "/shared/admin/form_actions",
29
- :locals => {
30
- :f => f,
31
- :continue_editing => false,
32
- :hide_cancel => (@app_dialog or action_name == "insert" or from_dialog?),
33
- :delete_title => t('delete', :scope => 'admin.resources'),
34
- :delete_confirmation => (t('message', :scope => 'shared.admin.delete',
35
- :title => @resource.title) if @resource.persisted?)
36
- } %>
27
+ <%= render '/refinery/admin/form_actions', :f => f,
28
+ :continue_editing => false,
29
+ :hide_cancel => (@app_dialog or action_name == "insert" or from_dialog?),
30
+ :delete_title => t('delete', :scope => 'refinery.admin.resources'),
31
+ :delete_confirmation => (t('message', :scope => 'refinery.admin.delete',
32
+ :title => @resource.title) if @resource.persisted?) %>
37
33
 
38
34
  <% if @app_dialog -%>
39
35
  <input type='hidden' name='app_dialog' value='<%= @app_dialog %>' />
@@ -0,0 +1,16 @@
1
+ <% if searching? %>
2
+ <h2><%= t('results_for', :scope => 'refinery.admin.search', :query => params[:search]) %></h2>
3
+ <% end %>
4
+ <div class='pagination_container'>
5
+ <% if @resources.any? %>
6
+ <%= render 'resources' %>
7
+ <% else %>
8
+ <p>
9
+ <% unless searching? %>
10
+ <strong><%= t('.no_files_yet') %></strong>
11
+ <% else %>
12
+ <%= t('no_results', :scope => 'refinery.admin.search') %>
13
+ <% end %>
14
+ </p>
15
+ <% end %>
16
+ </div>
@@ -0,0 +1,20 @@
1
+ <li class='clearfix record <%= cycle("on", "on-hover") %>'>
2
+ <span class='title <%= resource.ext.try(:downcase) %>'>
3
+ <%= resource.title %><%= ".#{resource.ext}" if resource.ext %>
4
+ <span class="preview">- <%= number_to_human_size(resource.size) %></span>
5
+ </span>
6
+ <span class='actions'>
7
+ <%= link_to refinery_icon_tag('page_white_put.png'),
8
+ resource.url,
9
+ :title => t('.download', :size => number_to_human_size(resource.size)) %>
10
+ <%= link_to refinery_icon_tag('application_edit.png'),
11
+ refinery.edit_admin_resource_path(resource),
12
+ :title => t('edit', :scope => 'refinery.admin.resources') %>
13
+ <%= link_to refinery_icon_tag('delete.png'),
14
+ refinery.admin_resource_path(resource),
15
+ :class => "cancel confirm-delete",
16
+ :title => t('delete', :scope => 'refinery.admin.resources'),
17
+ :confirm => t('message', :scope => 'refinery.admin.delete', :title => resource.title),
18
+ :method => :delete %>
19
+ </span>
20
+ </li>
@@ -1,10 +1,10 @@
1
- <%= will_paginate @resources %>
1
+ <%= will_paginate @resources if Refinery::Admin::ResourcesController.pageable? %>
2
2
  <div class="<%= ['clearfix', 'pagination_frame', pagination_css_class].compact.join(' ') %>">
3
3
  <% group_by_date(@resources).each do |container|
4
4
  date = Date.parse((resource_group = container.last).first.created_at.to_s) %>
5
5
  <h3><%= l(date, :format => :long ) %></h3>
6
6
  <ul>
7
- <%= render :partial => "resource", :collection => resource_group %>
7
+ <%= render :partial => 'resource', :collection => resource_group %>
8
8
  </ul>
9
9
  <% end %>
10
10
  </div>
@@ -0,0 +1 @@
1
+ <%= render 'form' -%>
@@ -0,0 +1,6 @@
1
+ <div id='records' class='files'>
2
+ <%= render 'records' %>
3
+ </div>
4
+ <div id='actions'>
5
+ <%= render 'actions' %>
6
+ </div>
@@ -1,4 +1,4 @@
1
- <% user_can_modify_resources = Refinery::Plugins.active.names.include?("refinery_files") %>
1
+ <% user_can_modify_resources = ::Refinery::Plugins.active.names.include?("refinery_files") %>
2
2
  <div class='clearfix'>
3
3
  <div id='dialog_menu_left'>
4
4
  <% if (any_resources = @resources.any?) %>
@@ -21,25 +21,22 @@
21
21
 
22
22
  <div id='dialog_main'>
23
23
  <% if any_resources or user_can_modify_resources %>
24
- <%= render :partial => 'existing_resource' if any_resources %>
24
+ <%= render 'existing_resource' if any_resources %>
25
25
 
26
26
  <% if user_can_modify_resources %>
27
27
  <div id='upload_resource_area' class='dialog_area' <%= "style='display:none;'" if any_resources and @resource.errors.empty? %>>
28
- <%= render :partial => "form", :locals => {:insert => true} %>
28
+ <%= render 'form', :insert => true %>
29
29
  </div>
30
30
  <% end %>
31
31
  <% else %>
32
32
  <% flash.now[:error] = t('.no_files') %>
33
- <%= render :partial => "/shared/admin/form_actions",
34
- :locals => {
35
- :f => nil,
36
- :cancel_url => '',
37
- :hide_cancel => false,
38
- :hide_delete => true,
39
- :hide_submit => true,
40
- :cancel_button_text => t('close', :scope => 'shared.admin.form_actions'),
41
- :cancel_title => nil
42
- } %>
33
+ <%= render '/refinery/admin/form_actions', :f => nil,
34
+ :cancel_url => '',
35
+ :hide_cancel => false,
36
+ :hide_delete => true,
37
+ :hide_submit => true,
38
+ :cancel_button_text => t('close', :scope => 'refinery.admin.form_actions'),
39
+ :cancel_title => nil %>
43
40
  <% end %>
44
41
  </div>
45
42
  </div>
@@ -0,0 +1 @@
1
+ <%= render 'form' -%>
@@ -1,35 +1,36 @@
1
1
  bg:
2
- plugins:
3
- refinery_files:
4
- title: Файлове
5
- description: Качване на файлове и връзки към тях
6
- admin:
7
- resources:
8
- delete: Изтриване на тази файл завинаги
9
- edit: Редактиране на този файл
10
- form:
11
- download_current: Изтеглете текущия файл
12
- or: или
13
- replace: " го заменете с нов..."
14
- maximum_file_size: Максималната големина на файл е %{megabytes} мегабайта.
15
- resource:
16
- download: Изтегляне на този файл (%{size})
17
- actions:
18
- upload_new: Качване на нов файл
19
- records:
20
- no_files_yet: Все още няма файлове. Натиснете "Качване на нов файл", за да добавите нов.
21
- insert:
22
- existing: Текущ файл
23
- new: Нов файл
24
- no_files: Няма файлове.
25
- existing_resource:
26
- link_to_file: Връзка към този файл
27
- button_text: Вмъкване
2
+ refinery:
3
+ plugins:
4
+ refinery_files:
5
+ title: Файлове
6
+ description: Качване на файлове и връзки към тях
7
+ admin:
8
+ resources:
9
+ delete: Изтриване на тази файл завинаги
10
+ edit: Редактиране на този файл
11
+ form:
12
+ download_current: Изтеглете текущия файл
13
+ or: или
14
+ replace: " го заменете с нов..."
15
+ maximum_file_size: Максималната големина на файл е %{bytes} байта.
16
+ resource:
17
+ download: Изтегляне на този файл (%{size})
18
+ actions:
19
+ upload_new: Качване на нов файл
20
+ records:
21
+ no_files_yet: Все още няма файлове. Натиснете "Качване на нов файл", за да добавите нов.
22
+ insert:
23
+ existing: Текущ файл
24
+ new: Нов файл
25
+ no_files: Няма файлове.
26
+ existing_resource:
27
+ link_to_file: Връзка към този файл
28
+ button_text: Вмъкване
28
29
  activerecord:
29
30
  models:
30
- resource: файл
31
+ refinery/resource: файл
31
32
  errors:
32
33
  models:
33
- resource:
34
+ refinery/resource:
34
35
  blank: Трябва да укажете файл за качване
35
- too_long: Размерът на файла трябва да бъде по-малък от %{count}
36
+ too_big: Размерът на файла трябва да бъде по-малък от %{size} байта
@@ -1,35 +1,37 @@
1
1
  cs:
2
- plugins:
3
- refinery_files:
4
- title: Soubory
5
- description: Správa souborů
6
- admin:
7
- resources:
8
- delete: Smazat tento soubor
9
- edit: Upravit tento soubor
10
- form:
11
- download_current: Stáhnout vybraný soubor
12
- or: nebo
13
- replace: " nahradit tímto..."
14
- maximum_file_size: Maximální velikost souboru je %{megabytes} MB.
15
- resource:
16
- download: Stáhnout soubor (%{size})
17
- actions:
18
- upload_new: Nahrát nový soubor
19
- records:
20
- no_files_yet: Zatím nebyly nahrány žádné soubory.
21
- insert:
22
- existing: Existující soubor
23
- new: Nový soubor
24
- no_files: Nejsou zde žádné soubory.
25
- existing_resource:
26
- link_to_file: Odkaz na tento soubor
27
- button_text: Vložit
2
+ refinery:
3
+ plugins:
4
+ refinery_files:
5
+ title: Soubory
6
+ description: Správa souborů
7
+ admin:
8
+ resources:
9
+ delete: Smazat tento soubor
10
+ edit: Upravit tento soubor
11
+ form:
12
+ download_current: Stáhnout vybraný soubor
13
+ or: nebo
14
+ replace: " nahradit tímto..."
15
+ maximum_file_size: Maximální velikost souboru je %{bytes}.
16
+ resource:
17
+ download: Stáhnout soubor (%{size})
18
+ actions:
19
+ upload_new: Nahrát nový soubor
20
+ records:
21
+ no_files_yet: Zatím nebyly nahrány žádné soubory.
22
+ insert:
23
+ existing: Existující soubor
24
+ new: Nový soubor
25
+ no_files: Nejsou zde žádné soubory.
26
+ existing_resource:
27
+ link_to_file: Odkaz na tento soubor
28
+ button_text: Vložit
28
29
  activerecord:
29
30
  models:
30
- resource: soubor
31
+ refinery/resource: soubor
31
32
  errors:
32
33
  models:
33
- resource:
34
- blank: Musíte vybrat soubor pro nahrání
35
- too_long: Maximální velikost souboru je %{count}
34
+ refinery:
35
+ resource:
36
+ blank: Musíte vybrat soubor pro nahrání
37
+ too_big: Maximální velikost souboru je %{size} MB
@@ -1,35 +1,36 @@
1
1
  da:
2
- plugins:
3
- refinery_files:
4
- title: Filer
5
- description: Upload og link til filer
6
- admin:
7
- resources:
8
- delete: Slet fil
9
- edit: Redigér fil
10
- form:
11
- download_current: Download filen
12
- or: eller
13
- replace: " erstat den med denne fil..."
14
- maximum_file_size: Filen maksimalt fylde %{megabytes} megabytes.
15
- resource:
16
- download: Download fil (%{size})
17
- actions:
18
- upload_new: Tilføj en ny fil
19
- records:
20
- no_files_yet: Der er ingen filer endnu. Klik på "Tilføj en ny fil" for at oprette den første.
21
- insert:
22
- existing: Eksisterende fil
23
- new: Ny fil
24
- no_files: Der er ingen filer endnu. Klik "Upload en ny fil" for at tilføje den første.
25
- existing_resource:
26
- link_to_file: Link til denne fil
27
- button_text: Indsæt
2
+ refinery:
3
+ plugins:
4
+ refinery_files:
5
+ title: Filer
6
+ description: Upload og link til filer
7
+ admin:
8
+ resources:
9
+ delete: Slet fil
10
+ edit: Redigér fil
11
+ form:
12
+ download_current: Download filen
13
+ or: eller
14
+ replace: " erstat den med denne fil..."
15
+ maximum_file_size: Filen må maksimalt fylde %{bytes}.
16
+ resource:
17
+ download: Download fil (%{size})
18
+ actions:
19
+ upload_new: Tilføj en ny fil
20
+ records:
21
+ no_files_yet: Der er ingen filer endnu. Klik på "Tilføj en ny fil" for at oprette den første.
22
+ insert:
23
+ existing: Eksisterende fil
24
+ new: Ny fil
25
+ no_files: Der er ingen filer endnu. Klik "Upload en ny fil" for at tilføje den første.
26
+ existing_resource:
27
+ link_to_file: Link til denne fil
28
+ button_text: Indsæt
28
29
  activerecord:
29
30
  models:
30
- resource: fil
31
+ refinery/resource: fil
31
32
  errors:
32
33
  models:
33
- resource:
34
+ refinery/resource:
34
35
  blank: Du skal vælge en fil, der skal uploades
35
- too_long: Filer må højest være på %{count}
36
+ too_big: Filer må højest være på %{size} bytes
@@ -1,35 +1,36 @@
1
1
  de:
2
- plugins:
3
- refinery_files:
4
- title: Dateien
5
- description: Dateien hochladen und verlinken
6
- admin:
7
- resources:
8
- delete: Diese Datei für immer löschen
9
- edit: Diese Datei bearbeiten
10
- form:
11
- download_current: Download der aktuellen Datei
12
- or: oder
13
- replace: ", mit dieser ersetzen..."
14
- maximum_file_size: "Die maximale Dateigröße beträgt %{megabytes} Megabyte."
15
- resource:
16
- download: Diese Datei herunterladen (%{size})
17
- actions:
18
- upload_new: Neue Datei Hochladen
19
- records:
20
- no_files_yet: Keine Dateien vorhanden. Klicken Sie auf "Neue Datei Hochladen" um Ihre erste Datei hinzuzufügen.
21
- insert:
22
- existing: Vorhandene Datei
23
- new: Neue Datei
24
- no_files: Keine Dateien vorhanden.
25
- existing_resource:
26
- link_to_file: Link zu dieser Datei
27
- button_text: Einfügen
2
+ refinery:
3
+ plugins:
4
+ refinery_files:
5
+ title: Dateien
6
+ description: Dateien hochladen und verlinken
7
+ admin:
8
+ resources:
9
+ delete: Diese Datei für immer löschen
10
+ edit: Diese Datei bearbeiten
11
+ form:
12
+ download_current: Download der aktuellen Datei
13
+ or: oder
14
+ replace: ", mit dieser ersetzen..."
15
+ maximum_file_size: "Die maximale Dateigröße beträgt %{bytes}."
16
+ resource:
17
+ download: Diese Datei herunterladen (%{size})
18
+ actions:
19
+ upload_new: Neue Datei Hochladen
20
+ records:
21
+ no_files_yet: Keine Dateien vorhanden. Klicken Sie auf "Neue Datei Hochladen" um Ihre erste Datei hinzuzufügen.
22
+ insert:
23
+ existing: Vorhandene Datei
24
+ new: Neue Datei
25
+ no_files: Keine Dateien vorhanden.
26
+ existing_resource:
27
+ link_to_file: Link zu dieser Datei
28
+ button_text: Einfügen
28
29
  activerecord:
29
30
  models:
30
- resource: Datei
31
+ refinery/resource: Datei
31
32
  errors:
32
33
  models:
33
- resource:
34
+ refinery/resource:
34
35
  blank: Sie müssen eine Datei zum Hochladen angeben
35
- too_long: Die Dateien sollten kleiner als %{count} sein
36
+ too_big: Die Dateien sollten kleiner als %{size} Megabyte sein