<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%Links::Config::load_vars%>
<html>

<head>
  <title>Gossamer Links Setup: Review Options</title>
  <%include include_style.html%>
</head>

<body>

<form method="post" action="setup.cgi">
<input type="hidden" name="do" value="setup_review" />

<%set header_title = 'Review Options'%>
<%set header_details = 'These options control how your review system behaves.
When your review.cgi script is called, these are the defaults it will use
unless you arguments are specifically passed in.'%>
<%include include_header.html%>

<table>
  <tr>
    <th class="heading" colspan="2">Review Options:</th>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Users must be logged in to make a review:
    </td>
  </tr>
  <tr>
    <td class="option">user_review_required</td>
    <td class="value">
        <input type="radio" value="1" name="user_review_required" id="urr1" <%if cfg_user_review_required%>checked="checked" <%endif%>/><label for="urr1">Yes</label>
        <input type="radio" value="0" name="user_review_required" id="urr0" <%ifnot cfg_user_review_required%>checked="checked" <%endif%>/><label for="urr0">No</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Review validation policy.  Note that no validation e-mail will be sent to
      the user for auto-validated reviews and that modifications to reviews will
      also be auto-validated.
    </td>
  </tr>
  <tr>
    <td class="option">review_auto_validate</td>
    <td class="value">
        <input type="radio" name="review_auto_validate" id="rav0" value="0" <%if cfg_review_auto_validate == 0%>checked="checked" <%endif%>/>
        <label for="rav0">All reviews require admin/editor approval (recommended).</label><br />
        <input type="radio" name="review_auto_validate" id="rav1" value="1" <%if cfg_review_auto_validate == 1%>checked="checked" <%endif%>/>
        <label for="rav1">Reviews submitted by authenticated users are auto-validated.</label><br />
        <input type="radio" name="review_auto_validate" id="rav2" value="2" <%if cfg_review_auto_validate == 2%>checked="checked" <%endif%>/>
        <label for="rav2">All reviews are auto-validated (not recommended).</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Allow users to modify their reviews?
    </td>
  </tr>
  <tr>
    <td class="option">review_allow_modify</td>
    <td class="value">
        <input type="radio" value="1" name="review_allow_modify" id="ram1" <%if cfg_review_allow_modify%>checked="checked" <%endif%>/><label for="ram1">Yes</label>
        <input type="radio" value="0" name="review_allow_modify" id="ram0" <%ifnot cfg_review_allow_modify%>checked="checked" <%endif%>/><label for="ram0">No</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      If users are allowed to modify their reviews, then how long do they have
      (in minutes) to modify their review before the review cannot be modified?
      Set this to 0 if you do not want a time restriction.
    </td>
  </tr>
  <tr>
    <td class="option">review_modify_timeout</td>
    <td class="value">
      <input type="text" value="<%cfg_review_modify_timeout%>" name="review_modify_timeout" size="4" /> minutes
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      The maximum number of reviews a user can write per link.  There is no
      limit if this is set to 0.
    </td>
  </tr>
  <tr>
    <td class="option">review_max_reviews</td>
    <td class="value"><input type="text" value="<%cfg_review_max_reviews%>" name="review_max_reviews" size="4" /></td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      How many reviews per page would you like to display:
    </td>
  </tr>
  <tr>
    <td class="option">reviews_per_page</td>
    <td class="value"><input type="text" value="<%cfg_reviews_per_page%>" name="reviews_per_page" size="4" /></td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      How would you like the reviews sorted:
    </td>
  </tr>
  <tr>
    <td class="option">review_sort_by</td>
    <td class="value">
      <select name="review_sort_by">
        <option value="Review_Date"<%if cfg_review_sort_by eq 'Review_Date'%> selected="selected"<%endif%>>By Review Date</option>
        <option value="Review_Rating"<%if cfg_review_sort_by eq 'Review_Rating'%> selected="selected"<%endif%>>By Rating</option>
        <option value="Review_WasHelpful"<%if cfg_review_sort_by eq 'Review_WasHelpful'%> selected="selected"<%endif%>>By Helpfulness</option>
      </select>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      The order to sort reviews
    </td>
  </tr>
  <tr>
    <td class="option">review_sort_order</td>
    <td class="value">
      <input type="radio" value="asc" name="review_sort_order" id="rsoa"<%if cfg_review_sort_order eq 'asc'%> checked="checked"<%endif%> /><label for="rsoa">Ascending</label>
      <input type="radio" value="desc" name="review_sort_order" id="rsod"<%if cfg_review_sort_order eq 'desc'%> checked="checked"<%endif%> /><label for="rsod">Descending</label>
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Number of days old a review should be considered new:
    </td>
  </tr>
  <tr>
    <td class="option">review_days_old</td>
    <td class="value">
      <input type="text" value="<%cfg_review_days_old%>" name="review_days_old" size="4" /> days
    </td>
  </tr>
  <tr>
    <td class="description" colspan="2">
      Convert line breaks in reviews to &lt;br /&gt; tags:
    </td>
  </tr>
  <tr>
    <td class="option">convert_br_tags</td>
    <td class="value">
      <input type="radio" value="1" name="review_convert_br_tags" id="rcbrt1"<%if cfg_review_convert_br_tags%> checked="checked"<%endif%> /><label for="rcbrt1">Yes</label>
      <input type="radio" value="0" name="review_convert_br_tags" id="rcbrt0"<%ifnot cfg_review_convert_br_tags%> checked="checked"<%endif%> /><label for="rcbrt0">No</label>
    </td>
  </tr>
</table>

<div class="submit">
  <input type="submit" value="Submit Changes" />
  <input type="submit" name="reset_defaults" value="Restore System Defaults" />
</div>

</form>
</body>
</html>
