Sha256: 5857d0fd5690e2c344f918b56cde5a46805180c6234b323352c51ad3350fc097

Contents?: true

Size: 1.92 KB

Versions: 6

Compression:

Stored size: 1.92 KB

Contents

  <% if @site.errors.any? %>
    <div id="error_explanation">
      <h2>Please correct the following errors::</h2>
      <% @site.errors.to_a.in_groups(2, false).each do |group| %>
      <ul>
        <% group.each do |msg| %>
        <li><%= msg %></li>
        <% end %>
      </ul>
      <br style="clear: both;" />
      <% end %>
      <br style="clear: both;" />
    </div>
    <br style="clear: both;" />
  <% end %>

  <fieldset class="form_container">
    <%= legend_tag 'About This Site' -%>

    <div class="form_column">
      <%= f.text_field :name -%>
      <%= f.text_field :domain -%>
      <%= f.select :layout, Site.layouts, :selected => @site.layout -%>
      <%= f.select :state, Site::STATES.map{|s| s.capitalize}, :selected => @site.state.capitalize, :label => 'Status' -%>
      <div id="redirect_field" style="<%= @site.inactive? ? "display: block;" : "display: none;" -%>"><%= f.text_field :redirect_to -%></div>
    </div>
    <div class="form_column">
      <%= f.text_field :google_profile_id, :label => 'Google Analytics Profile ID' -%>
      <%= f.text_field :google_webmaster_code -%>
      <%= f.text_field :yahoo_webmaster_code -%>
      <%= f.text_field :bing_webmaster_code -%>
      <%= f.text_field :netinsert_code -%>
    </div>
    <br style="clear: both;" />
    <div class="link_block">
      <%= f.submit 'Save', :class => 'link_button' -%>
      <%- if Site.count == 1 -%>
        <%= link_to 'Cancel', admin_site_path(@site), :class => 'link_button' -%>
      <%- else -%>
        <%= link_to 'Cancel', admin_sites_path, :class => 'link_button' -%>
      <%- end -%>
    </div>
  </fieldset>

  <br style="clear: both;" />

  <script type="text/javascript">
    Event.observe($('site_state'), 'change', function (){
      if ($('site_state').value == 'Active') {
        $('redirect_field').hide();
        $('site_redirect_to').value = "";
      } else {
        $('redirect_field').show();
      }
    });
  </script>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
site_logic-1.7.0 app/views/admin/sites/_form.html.erb
site_logic-1.6.10 app/views/admin/sites/_form.html.erb
site_logic-1.6.9 app/views/admin/sites/_form.html.erb
site_logic-1.6.8 app/views/admin/sites/_form.html.erb
site_logic-1.6.7 app/views/admin/sites/_form.html.erb
site_logic-1.6.6 app/views/admin/sites/_form.html.erb