Skip to content

Commit

Permalink
Template logic for showing executive positions on term_table cards
Browse files Browse the repository at this point in the history
Part of #13297.
  • Loading branch information
zarino committed Jul 25, 2016
1 parent 063e088 commit 14ad2cd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,5 @@ DEPENDENCIES
sinatra!
yajl-ruby

RUBY VERSION
ruby 2.0.0p648

BUNDLED WITH
1.12.5
16 changes: 16 additions & 0 deletions views/term_table.erb
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,22 @@
<% end %>
</p>
<% end %>

<% # TODO: populate :positions with executive branch positions, eg: "President" %>
<% person[:positions].each do |pos| %>
<p class="person-card__politics">
<%= pos[:position] %>
<% if !pos[:start_date].to_s.empty? and !pos[:end_date].to_s.empty? %>
<span class="person-card__politics__date">(<%= pos[:start_date].to_s %> to <%= pos[:end_date].to_s %>)</span>
<% elsif !pos[:start_date].to_s.empty? %>
<span class="person-card__politics__date">(from <%= pos[:start_date].to_s %>)</span>
<% elsif !pos[:end_date].to_s.empty? %>
<span class="person-card__politics__date">(until <%= pos[:end_date].to_s %>)</span>
<% end %>
</p>
<% end %>
</div>
<% if person[:bio].any? %>
Expand Down

0 comments on commit 14ad2cd

Please sign in to comment.