<div class="offer">
  <div class="title">
    <%= if @title_link do %>
    <%= link(@offer.title, to: offer_path(@conn, :show, @offer.slug)) %>
    <% else %>
    <%= @offer.title%>
    <% end %>
    <span class="company">
      <%= @offer.company %>
    </span>
  </div>
  <div class="meta">
    <div class="group">
      <span class="published">
        <%= if @offer.published_at do %>
        <%= human_readable_date(@offer.published_at) %>
        <% else %>
        <%= human_readable_date(@offer.inserted_at) %>
        <% end %>
      </span>
      <span class="location"><%= @offer.location %></span>
    </div>
    <div class="group">
      <span>
        <a class="badge badge-success"><%= human_get_place(@offer.job_place, gettext("Unknown")) %></a>
      </span>
      <span>
        <a class="badge badge-primary"><%= human_get_type(@offer.job_type, gettext("Unknown")) %></a>
      </span>
    </div>
  </div>
  <div class="description">
    <%= sanitized_markdown(@offer.description) %>
  </div>
</div>

<div class="offer">
  <div class="title">
    <%= if @title_link do %>
    <%= link(@offer.title, to: offer_path(@conn, :show, @offer.slug)) %>
    <% else %>
    <%= @offer.title%>
    <% end %>
    <span class="company">
      <%= @offer.company %>
    </span>
  </div>
  <div class="meta">
    <div class="group">
      <span class="published">
        <%= if @offer.published_at do %>
        <%= human_readable_date(@offer.published_at) %>
        <% else %>
        <%= human_readable_date(@offer.inserted_at) %>
        <% end %>
      </span>
      <span class="location"><%= @offer.location %></span>
    </div>
    <div class="group">
      <span>
        <%= link(human_get_place(@offer.job_place, gettext("Unknown")),
              to: offer_path(@conn, :search, filters: [job_place: @offer.job_place]),
              class: "badge badge-success") %>
      </span>
      <span>
        <%= link(human_get_type(@offer.job_type, gettext("Unknown")),
              to: offer_path(@conn, :search, filters: [job_type: @offer.job_type]),
              class: "badge badge-primary") %>
      </span>
    </div>
  </div>
  <div class="description">
    <%= sanitized_markdown(@offer.description) %>
  </div>
</div>

Use generators and link badges
Use generators and link badges
