From 14ad2cdce60b38a2d72f6549a4c6277385c9265f Mon Sep 17 00:00:00 2001 From: Zarino Zappia Date: Mon, 25 Jul 2016 15:03:54 +0100 Subject: [PATCH] Template logic for showing executive positions on term_table cards Part of #13297. --- Gemfile.lock | 3 --- views/term_table.erb | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 756aea72e..27a55b636 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -70,8 +70,5 @@ DEPENDENCIES sinatra! yajl-ruby -RUBY VERSION - ruby 2.0.0p648 - BUNDLED WITH 1.12.5 diff --git a/views/term_table.erb b/views/term_table.erb index 4badb67e2..a602e0a53 100644 --- a/views/term_table.erb +++ b/views/term_table.erb @@ -162,6 +162,22 @@ <% end %>

<% end %> + + <% # TODO: populate :positions with executive branch positions, eg: "President" %> + <% person[:positions].each do |pos| %> +

+ + <%= pos[:position] %> + + <% if !pos[:start_date].to_s.empty? and !pos[:end_date].to_s.empty? %> + (<%= pos[:start_date].to_s %> to <%= pos[:end_date].to_s %>) + <% elsif !pos[:start_date].to_s.empty? %> + (from <%= pos[:start_date].to_s %>) + <% elsif !pos[:end_date].to_s.empty? %> + (until <%= pos[:end_date].to_s %>) + <% end %> +

+ <% end %> <% if person[:bio].any? %>