Newer
Older
dmpopidor / app / views / org_admin / templates / _row.html.erb
<tr id="<%= dom_id(template) %>">
  <td>
    <%= "#{template.is_default? ? '* ' : ''}#{template.title}" %>
  </td>
  <td>
    <%= template.org.name %>
  </td>
  <td>
    <% if template.published? %>
      <%= _('Published') %>
    <% elsif template.draft? %>
      <% tooltip = _('This template is published changes but has unpublished changes!') %>
      <%= _('Published') %> <em class="sr-only"><%= tooltip %></em>
    &nbsp;&nbsp;<i class="fa fa-pencil-square-o" aria-hidden="true" data-toggle="tooltip" title="<%= tooltip %>"></i>
    <% else %>
      <%= _('Unpublished') %>
    <% end %>
  </td>
  <td>
    <% last_temp_updated = template.updated_at %>
    <%= l last_temp_updated.to_date, formats: :short %>
  </td>
</tr>