<!-- 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 unpublished changes') %> <% else %> <%= _('Published') %> <% end %> </dd> <% if current_user.org.funder? && !current_user.org.funder_only? %> <!-- If the Org is a funder and another org type then allow then to set the visibility --> <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 %>