<% photo_url = if item.picture_file_name && item.picture.exists?
                 item.picture.url(:medium)
               elsif item.media_content
                 item.media_content.photo_sizes.where(label: PhotoSize::MEDIUM).first.try(:url)
               else
                 nil
               end %>

<% status = if item.status.present?
              if item.status == "Completed" && item.content_date.present?
                time_ago_in_words(item.content_date)
              else
                item.status
              end
            elsif item.content_date.present?
              time_ago_in_words(item.content_date)
            else
              nil
            end %>

<div class="item js_slide slide">
  <%= link_to item do %>
    <%= item.status %>
    <article class="c-card" data-card-type="<%= item.type.downcase %>">
      <% if photo_url.present? %>
        <div class="card-pic" style="background-image: url('<%= photo_url %>')"></div>
      <% end %>
      <div class="card-description">
        <h3 class="text -title-card"><%= item.title %></h3>
        <p class="text -summary"><%= item.short_description %></p>
        <% if item.is_a?(Publication) %>
          <p class="card-meta">
            <% if status %>
              <span class="text -meta"><%= status %></span>
            <% end %>
            <% if item.content_type.present? %>
              <span class="text -meta"><%= item.content_type.title %></span>
            <% end %>
          </p>
        <% end %>
      </div>
    </article>
  <% end %>
</div>

<% photo_url = if item.picture_file_name && item.picture.exists?
                 item.picture.url(:medium)
               elsif item.media_content
                 item.media_content.photo_sizes.where(label: PhotoSize::MEDIUM).first.try(:url)
               else
                 nil
               end %>

<% status = if item.status == "Complete" && item.content_date.present?
              time_ago_in_words(item.content_date)
            else
              item.status
            end %>

<div class="item js_slide slide">
  <%= link_to item do %>
    <article class="c-card" data-card-type="<%= item.type.downcase %>">
      <% if photo_url.present? %>
        <div class="card-pic" style="background-image: url('<%= photo_url %>')"></div>
      <% end %>
      <div class="card-description">
        <h3 class="text -title-card"><%= item.title %></h3>
        <p class="text -summary"><%= item.short_description %></p>
        <% if item.is_a?(Publication) %>
          <p class="card-meta">
            <% if status %>
              <span class="text -meta"><%= status %></span>
            <% end %>
            <% if item.content_type.present? %>
              <span class="text -meta"><%= item.content_type.title %></span>
            <% end %>
          </p>
        <% end %>
      </div>
    </article>
  <% end %>
</div>

Update publications if statement. status is mandatory field in the database so we dont need to check presence
Update publications if statement. status is mandatory field in the database so we dont need to check presence
