refinerycms-resources 2.0.8 → 2.0.9

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.
@@ -1,11 +1,11 @@
1
- <div id='existing_resource_area' class='dialog_area' <%= "style='display:none;'" if @resource.errors.any? %>>
2
- <input type='hidden' name='linked_resource' id='linked_resource' />
3
- <div id='existing_resource_area_content' class='clearfix'>
4
- <div id='pages_list' class='pages_list'>
5
- <ul class='link_list'>
1
+ <div id="existing_resource_area" class="dialog_area" <%= 'style="display:none;"'.html_safe if @resource.errors.any? %>>
2
+ <input type="hidden" name="linked_resource" id="linked_resource" />
3
+ <div id="existing_resource_area_content" class="clearfix">
4
+ <div id="pages_list" class="pages_list">
5
+ <ul class="link_list">
6
6
  <% @resources.each do |resource| -%>
7
- <% resource_linked = (resource.url == params[:current_link]) if params[:current_link].present? %>
8
- <li<%= " class='linked'" if resource_linked %>>
7
+ <% resource_linked = ((@resource_id.present? && @resource_id == resource.id) || (params[:current_link].present? && resource.url == params[:current_link])) %>
8
+ <li<%= ' class="linked"'.html_safe if resource_linked %>>
9
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,
@@ -17,7 +17,7 @@
17
17
  </div>
18
18
  </div>
19
19
 
20
- <%= will_paginate @resources, :params => params.dup %>
20
+ <%= will_paginate @resources, :params => params.dup.merge(:action => "insert") %>
21
21
 
22
22
  <%= render '/refinery/admin/form_actions', :f => nil,
23
23
  :submit_button_text => t('.button_text'),
@@ -1,12 +1,12 @@
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| -%>
1
+ <%= form_for @resource, :url => (@url_override || (@resource.persisted? ? refinery.admin_resource_path(@resource) : refinery.admin_resources_path)),
2
+ :html => { :multipart => true },
3
+ :as => 'resource' do |f| %>
4
4
 
5
5
  <%= render '/refinery/admin/error_messages',
6
6
  :object => @resource,
7
7
  :include_object_name => false %>
8
8
 
9
- <div class='field'>
9
+ <div class="field">
10
10
  <% if action_name =~ /(edit)|(update)/ %>
11
11
  <%= link_to t('.download_current'), @resource.url,
12
12
  :title => @resource.title %>
@@ -18,7 +18,7 @@
18
18
  <% end %>
19
19
  </div>
20
20
 
21
- <div class='field' id='maximum_file_size'>
21
+ <div class="field" id="maximum_file_size">
22
22
  <label>
23
23
  <%= t('.maximum_file_size', :bytes => number_to_human_size(Refinery::Resources.max_file_size)) %>
24
24
  </label>
@@ -26,20 +26,20 @@
26
26
 
27
27
  <%= render '/refinery/admin/form_actions', :f => f,
28
28
  :continue_editing => false,
29
- :hide_cancel => (@app_dialog or action_name == "insert" or from_dialog?),
29
+ :hide_cancel => (@app_dialog or action_name == 'insert' or from_dialog?),
30
30
  :delete_title => t('delete', :scope => 'refinery.admin.resources'),
31
31
  :delete_confirmation => (t('message', :scope => 'refinery.admin.delete',
32
32
  :title => @resource.title) if @resource.persisted?) %>
33
33
 
34
34
  <% if @app_dialog -%>
35
- <input type='hidden' name='app_dialog' value='<%= @app_dialog %>' />
36
- <input type='hidden' name='field' value='<%= @field %>' />
37
- <input type='hidden' name='update_resource' value='<%= @update_resource %>' />
38
- <input type='hidden' name='update_text' value='<%= @update_text %>' />
39
- <input type='hidden' name='thumbnail' value='<%= @thumbnail %>' />
40
- <input type='hidden' name='callback' value='<%= @callback %>' />
41
- <input type='hidden' name='conditions' value='<%= @conditions %>' />
42
- <input type='hidden' name='current_link' value='<%= @current_link %>' />
35
+ <input type="hidden" name="app_dialog" value="<%= @app_dialog %>" />
36
+ <input type="hidden" name="field" value="<%= @field %>" />
37
+ <input type="hidden" name="update_resource" value="<%= @update_resource %>" />
38
+ <input type="hidden" name="update_text" value="<%= @update_text %>" />
39
+ <input type="hidden" name="thumbnail" value="<%= @thumbnail %>" />
40
+ <input type="hidden" name="callback" value="<%= @callback %>" />
41
+ <input type="hidden" name="conditions" value="<%= @conditions %>" />
42
+ <input type="hidden" name="current_link" value="<%= @current_link %>" />
43
43
  <% end -%>
44
44
  <% end -%>
45
45
  <% content_for :javascripts do %>
@@ -1,7 +1,7 @@
1
1
  <% if searching? %>
2
2
  <h2><%= t('results_for', :scope => 'refinery.admin.search', :query => params[:search]) %></h2>
3
3
  <% end %>
4
- <div class='pagination_container'>
4
+ <div class="pagination_container">
5
5
  <% if @resources.any? %>
6
6
  <%= render 'resources' %>
7
7
  <% else %>
@@ -1,9 +1,9 @@
1
- <li class='clearfix record <%= cycle("on", "on-hover") %>'>
2
- <span class='title <%= resource.ext.try(:downcase) %>'>
1
+ <li class="clearfix record <%= cycle('on', 'on-hover') %>">
2
+ <span class="title <%= resource.ext.try(:downcase) %>">
3
3
  <%= resource.title %><%= ".#{resource.ext}" if resource.ext %>
4
4
  <span class="preview">- <%= number_to_human_size(resource.size) %></span>
5
5
  </span>
6
- <span class='actions'>
6
+ <span class="actions">
7
7
  <%= link_to refinery_icon_tag('page_white_put.png'),
8
8
  resource.url,
9
9
  :title => t('.download', :size => number_to_human_size(resource.size)) %>
@@ -1,6 +1,6 @@
1
- <div id='records' class='files'>
1
+ <div id="records" class="files">
2
2
  <%= render 'records' %>
3
3
  </div>
4
- <div id='actions'>
4
+ <div id="actions">
5
5
  <%= render 'actions' %>
6
6
  </div>
@@ -1,30 +1,30 @@
1
1
  <% user_can_modify_resources = ::Refinery::Plugins.active.names.include?("refinery_files") %>
2
- <div class='clearfix'>
3
- <div id='dialog_menu_left'>
2
+ <div class="clearfix">
3
+ <div id="dialog_menu_left">
4
4
  <% if (any_resources = @resources.any?) %>
5
- <span id='existing_resource_radio' class='radio<%= " selected_radio" if @resource.errors.empty? %>'>
6
- <input type='radio' name='resource_type' value='existing_resource' id='resource_type_existing' <%= "checked='true'" if @resource.errors.empty? %> />
7
- <label for='resource_type_existing' class='stripped'>
5
+ <span id="existing_resource_radio" class="radio<%= ' selected_radio' if @resource.errors.empty? %>">
6
+ <input type="radio" name="resource_type" value="existing_resource" id="resource_type_existing" <%= 'checked="true"'.html_safe if @resource.errors.empty? %> />
7
+ <label for="resource_type_existing" class="stripped">
8
8
  <%= t('.existing') %>
9
9
  </label>
10
10
  </span>
11
11
  <% end %>
12
12
  <% if user_can_modify_resources %>
13
- <span id='upload_resource_radio' class='radio<%= " selected_radio" if @resource.errors.any? or @resources.empty? %>'>
14
- <input type='radio' name='resource_type' value='upload_resource' id='resource_type_upload' <%= "checked='true'" if @resources.empty? or @resource.errors.any? %> />
15
- <label for='resource_type_upload' class='stripped'>
13
+ <span id="upload_resource_radio" class="radio<%= ' selected_radio' if @resource.errors.any? or @resources.empty? %>">
14
+ <input type="radio" name="resource_type" value="upload_resource" id="resource_type_upload" <%= 'checked="true"'.html_safe if @resources.empty? or @resource.errors.any? %> />
15
+ <label for="resource_type_upload" class="stripped">
16
16
  <%= t('.new') %>
17
17
  </label>
18
18
  </span>
19
19
  <% end %>
20
20
  </div>
21
21
 
22
- <div id='dialog_main'>
22
+ <div id="dialog_main">
23
23
  <% if any_resources or user_can_modify_resources %>
24
24
  <%= render 'existing_resource' if any_resources %>
25
25
 
26
26
  <% if user_can_modify_resources %>
27
- <div id='upload_resource_area' class='dialog_area' <%= "style='display:none;'" if any_resources and @resource.errors.empty? %>>
27
+ <div id="upload_resource_area" class="dialog_area" <%= 'style="display:none;"'.html_safe if any_resources and @resource.errors.empty? %>>
28
28
  <%= render 'form', :insert => true %>
29
29
  </div>
30
30
  <% end %>
@@ -47,7 +47,7 @@
47
47
  <% unless user_can_modify_resources %>
48
48
  link_dialog.init();
49
49
  <% end %>
50
- resource_picker.init(<%= @callback.present? ? "self.parent.#{@callback}" : "null" %>);
50
+ resource_picker.init(<%= @callback.present? ? "self.parent.#{@callback}" : 'null' %>);
51
51
  });
52
52
  </script>
53
- <% end %>
53
+ <% end %>
@@ -11,7 +11,7 @@ sk:
11
11
  form:
12
12
  download_current: Stiahnuť vybraný súbor
13
13
  or: alebo
14
- replace: " nahradiť tímto..."
14
+ replace: " nahradiť týmto..."
15
15
  maximum_file_size: Maximálna veľkosť súboru je %{bytes}.
16
16
  resource:
17
17
  download: Stiahnuť súbor (%{size})
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  Refinery::Resources.configure do |config|
2
3
  # Configures the maximum allowed upload size (in bytes) for a file upload
3
4
  # config.max_file_size = <%= Refinery::Resources.max_file_size.inspect %>
@@ -10,11 +10,10 @@ Gem::Specification.new do |s|
10
10
  s.version = version
11
11
  s.summary = %q{Resources extension for Refinery CMS}
12
12
  s.description = %q{Handles all file upload and processing functionality in Refinery CMS.}
13
- s.date = %q{2011-10-12}
14
13
  s.email = %q{info@refinerycms.com}
15
14
  s.homepage = %q{http://refinerycms.com}
16
15
  s.rubyforge_project = %q{refinerycms}
17
- s.authors = ['Philip Arndt', 'Uģis Ozols', 'Rob Yurkowski', 'David Jones', 'Steven Heidel']
16
+ s.authors = ['Philip Arndt', 'Uģis Ozols', 'Rob Yurkowski']
18
17
  s.license = %q{MIT}
19
18
  s.require_paths = %w(lib)
20
19
 
metadata CHANGED
@@ -1,19 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.8
4
+ version: 2.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Philip Arndt
9
9
  - Uģis Ozols
10
10
  - Rob Yurkowski
11
- - David Jones
12
- - Steven Heidel
13
11
  autorequire:
14
12
  bindir: bin
15
13
  cert_chain: []
16
- date: 2011-10-12 00:00:00.000000000 Z
14
+ date: 2012-11-21 00:00:00.000000000 Z
17
15
  dependencies:
18
16
  - !ruby/object:Gem::Dependency
19
17
  name: dragonfly
@@ -54,7 +52,7 @@ dependencies:
54
52
  requirements:
55
53
  - - '='
56
54
  - !ruby/object:Gem::Version
57
- version: 2.0.8
55
+ version: 2.0.9
58
56
  type: :runtime
59
57
  prerelease: false
60
58
  version_requirements: !ruby/object:Gem::Requirement
@@ -62,7 +60,7 @@ dependencies:
62
60
  requirements:
63
61
  - - '='
64
62
  - !ruby/object:Gem::Version
65
- version: 2.0.8
63
+ version: 2.0.9
66
64
  description: Handles all file upload and processing functionality in Refinery CMS.
67
65
  email: info@refinerycms.com
68
66
  executables: []
@@ -142,7 +140,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
140
  version: '0'
143
141
  segments:
144
142
  - 0
145
- hash: 2063289500870661135
143
+ hash: 1213057115828417290
146
144
  required_rubygems_version: !ruby/object:Gem::Requirement
147
145
  none: false
148
146
  requirements:
@@ -151,10 +149,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
149
  version: '0'
152
150
  segments:
153
151
  - 0
154
- hash: 2063289500870661135
152
+ hash: 1213057115828417290
155
153
  requirements: []
156
154
  rubyforge_project: refinerycms
157
- rubygems_version: 1.8.22
155
+ rubygems_version: 1.8.24
158
156
  signing_key:
159
157
  specification_version: 3
160
158
  summary: Resources extension for Refinery CMS