0
<!-- begin action nav -->
0
<ul id="act-nav" class="clear">
0
- <li><%= link_to "General", :controller => 'settings' %></li>
0
- <li><%= link_to "Publishing", :controller => 'settings' %></li>
0
- <li><%= link_to "Comments", :controller => 'settings' %></li>
0
- <li><%= link_to "Feeds", :controller => 'settings' %></li>
0
- <a class="trigger" id="cog" href="#"> </a>
0
- <div id="optgroup" style="display: none">
0
+ <li><%= link_to "General", '#general' %></li>
0
+ <li><%= link_to "Publishing", '#publish' %></li>
0
+ <li><%= link_to "Comments", '#spam' %></li>
0
<!-- /end action nav -->
0
-<%
= form_tag :action => "update" %>
0
+<%
form_for :site, :url => { :action => "update" } do |f| %>
0
<div id="general" class="setgroup">
0
<h3>General site settings</h3>
0
<dt><label for="site_title">Website title</label></dt>
0
- <dd><%=
text_field 'site', 'title' %></dd>
0
+ <dd><%=
f.text_field :title %></dd>
0
<dt><label for="site_subtitle">Website subtitle</label></dt>
0
- <dd><%=
text_field 'site', 'subtitle' %></dd>
0
+ <dd><%=
f.text_field :subtitle %></dd>
0
<label for="site_email">Administrator email</label>
0
<span class="hint">Shown in emails sent from your site</span>
0
- <dd><%=
text_field 'site', 'email' %></dd>
0
+ <dd><%=
f.text_field :email %></dd>
0
<div id="publish" class="setgroup">
0
<h3>Publishing and reading</h3>
0
<div id="spam" class="setgroup">
0
<h3>Spam prevention</h3>
0
<p>At the moment Mephisto uses <%= link_to 'Akismet', 'http://akismet.com' %> to automatically handle spam.</p>
0
<dt><label>Akismet API Key</label></dt>
0
- <dd><%=
text_field_tag :api_key, Akismet.api_key %></dd>
0
+ <dd><%=
f.text_field :akismet_key %></dd>
0
<dt><label>Blog url</label></dt>
0
- <dd><%= text_field_tag :blog, Akismet.blog %></dd>
0
- <dt><label>Allow comments?</label></dt>
0
- <dd><%= check_box_tag 'allow_comments' %> Yes, I would like to accept comments.</dd>
0
- <dt><label for="moderate_comments">Will you approve comments?</label></dt>
0
- <dd><%= check_box_tag 'moderate_comments' %> Yes, All comments require approval before being published.</dd>
0
- <dt><label for="comment_lifetime">Close comments</label></dt>
0
+ <dd><%= f.text_field :akismet_url %></dd>
0
+ <dt><label for="site_accept_comments">Allow comments?</label></dt>
0
+ <dd><%= f.check_box 'accept_comments' %> Yes, I would like to accept comments.</dd>
0
+ <dt><label for="site_approve_comments">Will you approve comments?</label></dt>
0
+ <dd><%= f.check_box 'approve_comments' %> Yes, All comments require approval before being published.</dd>
0
+ <dt><label for="site_comment_age">Close comments</label></dt>
0
- <select name="comment_lifetime">
0
- <%= options_for_select ['Never', '24 hours after publishing', '1 week after publishing', '2 weeks after publishing', '1 month after publishing', '3 months after publishing', '6 months after publishing', '1 year after publishing'] %>
0
+ <%= f.select :comment_age, [['Never', 0],
0
+ ['24 hours after publishing', 1],
0
+ ['1 week after publishing', 7],
0
+ ['2 weeks after publishing', 14],
0
+ ['1 month after publishing', 30],
0
+ ['3 months after publishing', 90],
0
+ ['6 months after publishing', 180],
0
+ ['1 year after publishing', 365]] %>
0
<p class="btns"><%= submit_tag 'Save and apply settings' %></p>