<commit_before><%=  stylesheet_link_tag 'use_cases/use_cases' %>
<div class="wrap">
  <section id='useCase'>

    <div style="float:left; margin-right:30px;bottom-margin:10rem;border-style: solid;border-width:2px;">
      <% if @use_case.url.strip.size > 0 %>
        <a target='_blank' href='<%= @use_case.url %>'>
          <span style='padding:20px 20px 20px 20px;'><%= image_tag @use_case.image_url(:thumb) if @use_case.image %></span>
          <h4 style='text-align:center;'>Click for More Info</h4>
        </a>
      <% else %>
        <span style='padding:20px 20px 20px 20px;'><%= image_tag @use_case.image_url(:thumb) if @use_case.image %></span>
      <% end %>
    </div>

    <h1 id='useCaseHeading'>
      <%= @use_case.title %>
    </h1>

    <p>
      <%= @use_case.brief_summary %>
    </p>

    <p>
      Contact: <%= @use_case.submitter_name %> - <%= @use_case.email %>
    </p>

    <div>
      <p>
        Details:
        <%= @use_case.detailed_description %>
      </p>
    </div>
  </section>

  <div style="margin:30px;">
    <p><%= link_to 'Return to Gallery', use_cases_path %></p>
  </div>

</div><commit_msg>Refactor the way a UseCase is shown - so that it provides link to UseCase site only if user provided a url.  And will only try to render the image if it exists<commit_after><%=  stylesheet_link_tag 'use_cases/use_cases' %>
<div class="wrap">
  <section id='useCase'>

    <% if !@use_case.url.blank? %>
      <a target='_blank' href='<%= @use_case.url %>'>
        <% if !@use_case.image.blank? %>
          <div style="float:left; margin-right:30px;bottom-margin:10rem;border-style: solid;border-width:2px;">
            <span style='padding:20px 20px 20px 20px;'><%= image_tag @use_case.image_url(:thumb) %></span>
            <h4 style='text-align:center;'>Click for More Info</h4>
          </div>
        <% end %>
      </a>
    <% else %>
        <% if !@use_case.image.blank? %>
          <div style="float:left; margin-right:30px;bottom-margin:10rem;border-style: solid;border-width:2px;">
            <span style='padding:20px 20px 20px 20px;'><%= image_tag @use_case.image_url(:thumb) %></span>
          </div>
        <% end %>
    <% end %>

    <h1 id='useCaseHeading'>
      <%= @use_case.title %>
    </h1>

    <p>
      <%= @use_case.brief_summary %>
    </p>

    <p>
      Contact: <%= @use_case.submitter_name %> - <%= @use_case.email %>
    </p>

    <div>
      <p>
        Details:
        <%= @use_case.detailed_description %>
      </p>
    </div>
  </section>

  <div style="margin:30px;">
    <p><%= link_to 'Return to Gallery', use_cases_path %></p>
  </div>

</div>
{'fraction_non_alphanumeric': 0.190584662110858, 'fraction_numerical': 0.022779043280182234, 'mean_word_length': 2.6956521739130435, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 0, '>': 92, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7567889', 'n_tokens_mistral': 1059, 'n_tokens_neox': 944, 'n_words': 190}