refinerycms-copywriting 1.0.8 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,14 +1,16 @@
1
1
  module CopywritingHelper
2
2
 
3
3
  def copywriting(name, options = {}, &block)
4
- options = @copywriting_options.merge(options) if @copywriting_options
4
+ options = @copywriting_options.merge(options) if @copywriting_options
5
5
  options[:default] = block_given? ? capture(&block) : options[:default]
6
- ::CopywritingPhrase.for(name, options)
6
+
7
+ result = ::CopywritingPhrase.for(name, options)
7
8
  end
8
9
 
9
10
  def copywriting_options(options, &block)
10
- @copywriting_options = options
11
+ old_options = @copywriting_options
12
+ @copywriting_options = @copywriting_options ? @copywriting_options.merge(options) : options
11
13
  yield
12
- @copywriting_options = nil
14
+ @copywriting_options = old_options
13
15
  end
14
16
  end
@@ -14,6 +14,7 @@ class CopywritingPhrase < ActiveRecord::Base
14
14
  if (phrase = self.where(:name => name, :page_id => page_id).first).nil?
15
15
  phrase = self.create(:name => name,
16
16
  :scope => options[:scope],
17
+ :value => options[:value],
17
18
  :default => options[:default],
18
19
  :page_id => page_id,
19
20
  :phrase_type => options[:phrase_type])
@@ -7,7 +7,7 @@
7
7
  <span class="preview">- <%= truncate(phrase.default_or_value, :length => 40) %></span>
8
8
  </span>
9
9
  <span class='actions'>
10
- <%= link_to refinery_icon_tag("application_edit.png"), edit_admin_copywriting_phrase_path(phrase, :dialog => true),
10
+ <%= link_to refinery_icon_tag("application_edit.png"), edit_admin_copywriting_phrase_path(phrase, :dialog => true, :switch_locale => @current_locale),
11
11
  :title => t('.edit') %>
12
12
 
13
13
  <%= link_to refinery_icon_tag("delete.png"), admin_copywriting_phrase_path(phrase),
@@ -0,0 +1,21 @@
1
+ bg:
2
+ plugins:
3
+ refinerycms_copywriting:
4
+ title: Копирайтинг
5
+ admin:
6
+ copywriting_phrases:
7
+ locale_filters:
8
+ change_language: Смяна на език
9
+ scope_filters:
10
+ filter_by_scope: Филтриране по обхват
11
+ filtered_by: "Филтрирано по '%{filter_scope}'"
12
+ clear_scope_filter: Изчистване
13
+ records:
14
+ no_items_yet: Все още няма фрази.
15
+ phrase:
16
+ edit: Редактиране на тази фраза
17
+ delete: Изтриване на тази фраза
18
+ pages:
19
+ tabs:
20
+ copywriting:
21
+ no_copywriting_yet: За тази страница няма копирайтинг
@@ -2,7 +2,7 @@ class CreateCopywritingTranslationTable < ActiveRecord::Migration
2
2
 
3
3
  def self.up
4
4
  ::CopywritingPhrase.create_translation_table!({
5
- :value => :string
5
+ :value => :text
6
6
  }, {
7
7
  :migrate_data => true
8
8
  })
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-copywriting
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 8
10
- version: 1.0.8
9
+ - 9
10
+ version: 1.0.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Charles Barbier
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-07-11 00:00:00 Z
19
+ date: 2011-07-20 00:00:00 Z
20
20
  dependencies: []
21
21
 
22
22
  description: Extract all your strings and leave no human word behind, with i18n
@@ -31,6 +31,7 @@ files:
31
31
  - lib/generators/refinerycms_copywriting_generator.rb
32
32
  - lib/refinerycms-copywriting.rb
33
33
  - lib/tasks/copywritings.rake
34
+ - config/locales/bg.yml
34
35
  - config/locales/en.yml
35
36
  - config/routes.rb
36
37
  - app/controllers/admin/copywriting_phrases_controller.rb