<% @page_heading = _('General settings') %>
<% subtabs_for(:settings) %>

<% form_tag :action => 'update' do %>

<div class="admin">
  <fieldset>
    <legend><%= _("Your blog")%></legend>
    <ul>
      <li>
        <label for="blog_name" class="float"><%= _("Blog name")%>:</label>
        <input name="setting[blog_name]" id="blog_name" type="text" value="<%=h this_blog.blog_name %>" size="<%= this_blog.blog_name.length %>" />
      </li>
      <li>
        <label class="float" for="blog_subtitle"><%= _("Blog subtitle")%>:</label>
        <input name="setting[blog_subtitle]" id="blog_subtitle" type="text" value="<%=h this_blog.blog_subtitle %>" size="<%= this_blog.blog_subtitle.length%>" />
      </li>
      <li>
        <label class="float" for="base_url"><%= _("Blog URL")%>:</label>
        <input name="setting[base_url]" id="base_url" type="text" value="<%=h this_blog.base_url %>" size="<%= this_blog.base_url.length %> " />
      </li>
      <li>
        <label class="float" for="lang"><%= _("Language")%>:</label>
        <select name="setting[lang]">
          <%= fetch_langs %>
        </select>
      </li>
      <li><%= _("You can allow users to register to your blog. By default, they will register as contributors, an unpriviledged account level which grant them no rights but own a profile on the site. If you don't want users to register, you can thus add them by yourself in the users part of this admin.") %>.</li>
      <li>
        <label class="float" for="allow_signup"><%= _("Allow users to register")%>:</label>
        <input type="radio" name="setting[allow_signup]" value="0" id="allow_signup_0" <%= 'checked="checked"' if this_blog.allow_signup == 0 %>/>
        <label for="allow_signup_0"><%= _("No")%></label>
        <span class="float">
          <input type="radio" name="setting[allow_signup]" value="1" id="allow_signup_1" <%= 'checked="checked"' if this_blog.allow_signup == 1 %>/>
          <label for="allow_signup_1"><%= _("Yes")%></label>
        </span>
      </li>
    </ul>
  </fieldset>

  <fieldset id="Cache">
    <legend><%= _("Cache")%></legend>
    <ul>
      <li>
        <%= _("By default, Typo generates static HTML pages for your posts. However, if you plan to publish posts in the futur, you may want to use semi dynamic caching") %>.
      </li>
      <li>
        <label class="float" for="caches_page"><%= _("Choose caching methode")%>:</label>
        <input type="radio" name="setting[cache_option]" value="caches_page" id="cache_option_0" <%= 'checked="checked"' if this_blog.cache_option == 'caches_page' %>/>
        <label for="cache_option_0"><%= _("Use static HTML page caching ")%></label>
        <span class="float">
          <input type="radio" name="setting[cache_option]" value="caches_action_with_params" id="cache_option_1" <%= 'checked="checked"' if this_blog.cache_option == 'caches_action_with_params' %>/>
          <label for="cache_option_1"><%= _("Use semi static caching (default)")%></label>
        </span>
      </li>
      <li><%= _("If you experience trouble with caching, you can wipe the cache out manually") %></li>
      <li>
        <label class="float"><%= _("Choose caching methode")%>:</label>
        <%= sweep_cache_link %>
      </li>
    </ul>
  </fieldset>

  <%= hidden_field_tag 'from', 'index' %>  
  <%= render :partial => 'submit' %>
</div>
<% end %>
