<!-- show template details A template is passed as an argument-->
<dl class="dl-horizontal">
<dt><%= _('Title') %></dt>
<dd><%= template.title %></dd>
<dt><%= _('Description') %></dt>
<dd>
<%= (!template.description.nil? && template.description != "" ? raw( template.description) : '-') %>
</dd>
<dt><%= _('Status') %></dt>
<dd>
<% if template_hash[:live].nil? %>
<%= _('Unpublished') %>
<% elsif template_hash[:current].dirty? %>
<%= _('You have un-published changes') %>
<% else %>
<%= _('Published') %>
<% end %>
</dd>
<% if template.org.funder? %>
<dt><%= _('Visibility') %></dt>
<dd><%= (template.visibility == 'organisationally_visible' ? _('for internal %{org_name} use only') % {org_name: @template.org.name} : _('available to the public') + (template_hash[:live].nil? ? ' (once published)' : '')) %></dd>
<% end %>
<dt><%= _('Created at') %></dt>
<dd><%= l template.created_at.to_date, formats: :short %></dd>
<dt><%= _('Last updated') %></dt>
<dd><%= l template.updated_at.to_date, formats: :short %></dd>
</dl>
<% if template == current && template.customization_of.nil? %>
<div class="pull-right">
<%= link_to(_('Edit template details'), '#', { class: "btn btn-default template_edit_link", role: "button" }) %>
</div>
<% end %>