<% if job %>
  <div class="btn-group">
    <button type="button" class="btn btn-xs btn-<%= job.last_error ? 'danger' : 'default' %> dropdown-toggle" data-toggle="dropdown" aria-expanded="false" title="<%= job.last_error || nil %>">
      <% if job.last_error %>
        <i class="fa fa-exclamation-triangle"></i>
      <% end %>
      <%= job.handler || job.handler.split(' ')[1].split(':')[1] %>#<%= job.id %>
      <% if job.attempts > 0 %>
        ×<%= job.attempts %>
      <% end %>
      <span class="caret"></span>
    </button>
    <ul class="dropdown-menu" role="menu">
      <li><%= link_to "/api/0.1/customers/"+customer.id.to_s+"/job/"+job.id.to_s do %><i class="fa fa-search fa-fw"></i> <%= t 'all.verb.show' %><% end %></li>
      <li><%= link_to "/api/0.1/customers/"+customer.id.to_s+"/job/"+job.id.to_s, method: :delete do %><i class="fa fa-trash-o fa-fw"></i> <%= t 'all.verb.destroy' %><% end %></li>
    </ul>
  </div>
<% end %>

<% if job %>
  <div class="btn-group">
    <button type="button" class="btn btn-xs btn-<%= job.last_error ? 'danger' : 'default' %> dropdown-toggle" data-toggle="dropdown" aria-expanded="false" title="<%= job.last_error || nil %>">
      <% if job.last_error %>
        <i class="fa fa-exclamation-triangle"></i>
      <% end %>
      <%= job.handler && job.handler.split(' ')[1].split(':')[1] %>#<%= job.id %>
      <% if job.attempts > 0 %>
        ×<%= job.attempts %>
      <% end %>
      <span class="caret"></span>
    </button>
    <ul class="dropdown-menu" role="menu">
      <li><%= link_to "/api/0.1/customers/"+customer.id.to_s+"/job/"+job.id.to_s do %><i class="fa fa-search fa-fw"></i> <%= t 'all.verb.show' %><% end %></li>
      <li><%= link_to "/api/0.1/customers/"+customer.id.to_s+"/job/"+job.id.to_s, method: :delete do %><i class="fa fa-trash-o fa-fw"></i> <%= t 'all.verb.destroy' %><% end %></li>
    </ul>
  </div>
<% end %>

Fix running job display in admin
Fix running job display in admin
