From 6b2b30274e4c26b45ca6da91a0303677962d736f Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Thu, 26 Apr 2018 15:13:11 -0400 Subject: [PATCH] Add tag_line to org admin and add conditional on hiring post (#250) --- app/dashboards/organization_dashboard.rb | 2 ++ app/views/articles/show.html.erb | 16 ++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/dashboards/organization_dashboard.rb b/app/dashboards/organization_dashboard.rb index dc6a36e1c..53f50b775 100644 --- a/app/dashboards/organization_dashboard.rb +++ b/app/dashboards/organization_dashboard.rb @@ -12,6 +12,7 @@ class OrganizationDashboard < Administrate::BaseDashboard name: Field::String, slug: Field::String, summary: Field::Text, + tag_line: Field::String, profile_image: CarrierwaveField, nav_image: CarrierwaveField, url: Field::String, @@ -56,6 +57,7 @@ class OrganizationDashboard < Administrate::BaseDashboard :name, :slug, :summary, + :tag_line, :profile_image, :nav_image, :url, diff --git a/app/views/articles/show.html.erb b/app/views/articles/show.html.erb index 4d3cbb880..ff72e547c 100644 --- a/app/views/articles/show.html.erb +++ b/app/views/articles/show.html.erb @@ -131,12 +131,16 @@ <% if @article.job_opportunity.present? %>
- - <%= @article.job_opportunity.location_city %> - - - <%= @article.job_opportunity.remoteness_in_words %> - + <% if @article.job_opportunity.location_city.present? %> + + <%= @article.job_opportunity.location_city %> + + <% end %> + <% if @article.job_opportunity.remoteness_in_words.present? %> + + <%= @article.job_opportunity.remoteness_in_words %> + + <% end %>
<% end %>