Commit 4297efaa136f7967e3b0b8eba6fcd5126cdea55f
1 parent
edebdf33
Exists in
master
and in
29 other branches
ActionItem862: missed application of person template!
Showing
2 changed files
with
14 additions
and
3 deletions
Show diff stats
script/apply-template
@@ -12,7 +12,7 @@ when 'inactive-enterprise' | @@ -12,7 +12,7 @@ when 'inactive-enterprise' | ||
12 | excluded = [env.inactive_enterprise_template, env.enterprise_template] | 12 | excluded = [env.inactive_enterprise_template, env.enterprise_template] |
13 | template = excluded.first | 13 | template = excluded.first |
14 | 14 | ||
15 | - while enterprise = Enterprise.find(:first, :conditions => {:enabled => false}, :offset => offset) | 15 | + while enterprise = Enterprise.find(:first, :conditions => {:enabled => false}, :order => :id, :offset => offset) |
16 | # do nothing with templates | 16 | # do nothing with templates |
17 | next if excluded.include?(enterprise) | 17 | next if excluded.include?(enterprise) |
18 | 18 | ||
@@ -41,6 +41,14 @@ when 'community' | @@ -41,6 +41,14 @@ when 'community' | ||
41 | end | 41 | end |
42 | } | 42 | } |
43 | } | 43 | } |
44 | +when 'person' | ||
45 | + offset = 0 | ||
46 | + template = env.person_template | ||
47 | + while person = Person.find(:first, :order => :id, :offset => offset) | ||
48 | + if person != template | ||
49 | + person.apply_template(template) | ||
50 | + puts "#{offset} - #{person.identifier}" | ||
51 | + end | ||
52 | + offset = offset + 1 | ||
53 | + end | ||
44 | end | 54 | end |
45 | - | ||
46 | - |
script/release-v0.13.0-ecosol
@@ -96,6 +96,9 @@ script/runner 'env = Environment.default | @@ -96,6 +96,9 @@ script/runner 'env = Environment.default | ||
96 | template.home_page = template.blog | 96 | template.home_page = template.blog |
97 | template.save!' | 97 | template.save!' |
98 | 98 | ||
99 | +echo 'Applying template for person...' | ||
100 | +script/apply-template 'person' | ||
101 | + | ||
99 | echo 'Configurating template for community...' | 102 | echo 'Configurating template for community...' |
100 | script/runner 'env = Environment.default | 103 | script/runner 'env = Environment.default |
101 | template = env.community_template | 104 | template = env.community_template |