<% content_for :main do %>

Edit Mapping

<%= form_for [:admin, @mapping] do |f| %> Source URL:
<%= f.text_field :source_url %>
The URL that the user requests. Wildcards can be used in the form of a '%' character (without the quotes).

Target URL:
<%= f.text_field :target_url %>
The URL for the page the user ends up seeing. For internal pages, begin the URL with a slash ("/"). For external links, use the full URL, e.g. "http://www.dsc.net"

Parameter URL:
<%= f.text_field :params_url %>
Optional: a pattern for the URL to determine parameter values. Only used when "Target is a Page" is checked. For example, specify "/calendar/:id/:year" to insert an "id" parameter and a "year" parameter.

Status Code:
<%= f.text_field :status_code %>
Unless you have reason to change it, leave this as the default value of 301. This is ignored if "Target is a Page" is checked below.

Active?
<%= f.check_box :is_active %> If this box is not checked the mapping will not be activated

Target is a Page
<%= f.check_box :is_page %> If this box is checked the user will not be redirected, they'll just be shown the page referenced in the Target URL

Target is an Asset
<%= f.check_box :is_asset %> If this box is checked the user will not be redirected, they'll be sent the asset to which the Target URL refers

<%= kit_submit "Save" %> <%= icon_to "Cancel", "/admin/mapping" %> <% end %>
<% end %>