manage_templates.rhtml 1.35 KB
<h1><%= _('Set Templates') %></h1>

<% labelled_form_for(:environment, @environment, :url => {:action => 'set_template'}) do |f| %>
  <p>
    <label for='environment_person_template'><%= _('Person Template') %></label><br/>
    <%= f.select :person_template, @person_templates.map {|item| [ item.identifier, item.id]}, :selected => (environment.person_template.nil? ? nil : environment.person_template.id) %>
  </p>

  <p>
    <label for='environment_community_template'><%= _('Community Template') %></label><br/>
    <%= f.select :community_template, @community_templates.map {|item| [ item.identifier, item.id]}, :selected => (environment.community_template.nil? ? nil : environment.community_template.id) %>
  </p>

  <p>
    <label for='environment_enterprise_template'><%= _('Enterprise Template') %></label><br/>
    <%= f.select :enterprise_template, @enterprise_templates.map {|item| [ item.identifier, item.id]}, :selected => (environment.enterprise_template.nil? ? nil : environment.enterprise_template.id) %>
  </p>

  <% button_bar do %>
    <%= submit_button(:save, _('Save')) %>
    <%= button(:cancel, _('Cancel'), :action => 'index') %>
  <% end %>

<% end %>

<h1><%= _('Edit Templates') %></h1>

<ul>
<% @templates.each do |template| %>
  <li><%= link_to template.identifier, :controller => 'profile_editor', :profile => template.identifier %></li>
<% end %>
</ul>