<% s = @site admin_ids = Caboose::SiteMembership.where(:site_id => s.id, :role => Caboose::SiteMembership::ROLE_ADMIN).pluck(:user_id) user_ids = Caboose::SiteMembership.where(:site_id => s.id, :role => Caboose::SiteMembership::ROLE_USER ).pluck(:user_id) admin_ids = [] if admin_ids.nil? user_ids = [] if user_ids.nil? %> <%= render :partial => 'caboose/sites/admin_header' %>

Name: <%= @site.name %>

<% if @site.theme.nil? %>

<% end %>

Domains

New Domain

<% if @site.domains && @site.domains.count > 0 %> <% @site.domains.reorder(:id).all.each do |d| %> <% end %>
Domain Primary Under Construction Force SSL Forward to Primary Forward to URI Delete
<%= d.domain %> onclick="set_primary_domain(<%= s.id %>, <%= d.id %>);" /> onclick="set_under_construction(<%= s.id %>, <%= d.id %>, $(this).prop('checked'));" /> onclick="set_force_ssl(<%= s.id %>, <%= d.id %>, $(this).prop('checked'));" /> onclick="set_forward_to_primary(<%= s.id %>, <%= d.id %>, $(this).prop('checked'));" />
<% else %>

This site doesn't have any domains yet.

<% end %>

Members

<% Caboose::User.where(:site_id => @site.id).reorder('last_name, first_name').all.each do |u| %> <% end %>
UserNoneUserAdmin
<%= u.first_name %> <%= u.last_name %> (<%= u.email %>) onclick="remove_site_membership(<%= s.id %>, <%= u.id %>);" /> onclick="add_site_membership(<%= s.id %>, <%= u.id %>, 'User');" /> onclick="add_site_membership(<%= s.id %>, <%= u.id %>, 'Admin');" />
<%= render :partial => 'caboose/sites/admin_footer' %> <% content_for :caboose_css do %> <% end %> <% content_for :caboose_js do %> <% end %>