Skip to content

Commit

Permalink
Moved the demand, supply and other choices to index.html.erb from dat…
Browse files Browse the repository at this point in the history
…a_from_model.rb
  • Loading branch information
tamc committed May 21, 2014
1 parent 6befe5e commit ea38303
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
12 changes: 0 additions & 12 deletions model/data_from_model.rb
Expand Up @@ -294,18 +294,6 @@ def long_descriptions
@long_descriptions ||= (5..57).to_a.map { |row| [r("control_bo#{row}"), r("control_bp#{row}"),r("control_bq#{row}"),r("control_br#{row}")] }
end

def demand_choices
choices[21..39]
end

def supply_choices
choices[0..20]
end

def other_choices
choices[40..42]
end

def example_pathways
@example_pathways ||= generate_example_pathways
end
Expand Down
6 changes: 3 additions & 3 deletions src/index.html.erb
Expand Up @@ -83,7 +83,7 @@
<div id='demand'>
<table>
<!-- One row per choice -->
<% structure.demand_choices.each do |choice| %>
<% structure.choices[21..39].each do |choice| %>
<tr class='<%= choice.incremental_or_alternative %>' id='r<%= choice.number %>'>
<td class='name'>
<a href='/assets/onepage/<%= choice.doc %>' target='_new' data-choicenumber='<%= choice.number %>'>
Expand All @@ -108,7 +108,7 @@
<!-- The middle column -->
<div id='supply'>
<table>
<% structure.supply_choices.each do |choice| %>
<% structure.choices[0..20].each do |choice| %>
<tr class='<%= choice.incremental_or_alternative %>' id='r<%= choice.number %>'>
<td class='name'>
<a href='/assets/onepage/<%= choice.doc %>' target='_new' data-choicenumber='<%= choice.number %>'>
Expand All @@ -133,7 +133,7 @@
<!-- The right column -->
<div id='other'>
<table>
<% structure.other_choices.each do |choice| %>
<% structure.choices[40..42].each do |choice| %>
<tr class='<%= choice.incremental_or_alternative %>' id='r<%= choice.number %>'>
<td class='name'>
<a href='/assets/onepage/<%= choice.doc %>' target='_new' data-choicenumber='<%= choice.number %>'>
Expand Down

0 comments on commit ea38303

Please sign in to comment.