forked from publify/publify
/
new.html.erb
39 lines (38 loc) · 1.24 KB
/
new.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<% @page_heading = _("Redirects") %>
<% @page_heading_class = 'icon-redirect'%>
<div>
<div class='span4'>
<%= form_tag :action=>"edit", :id => @redirect.id do %>
<%= error_messages_for 'redirect' %>
<label for="redirect_from_path"><%= _("From")%></label>
<%= text_field :redirect, :from_path, :class => 'span12', :placeholder => "#{this_blog.base_url}/" %>
<span class='help-block'><%= _("Leave empty to shorten a link") %></span>
<label for="redirect_to_path"><%= _("To") %></label>
<%= text_field :redirect, :to_path, :class => 'span12' %>
<div class='form-actions'>
<%= cancel_or_save %>
</div>
<% end %>
</div>
<div class='span8'>
<table class="table table-striped">
<thead>
<tr class='noborder'>
<th><%= _("From") %></th>
<th><%= _("To") %></th>
</tr>
</thead>
<%= render_void_table(@redirects.size, 2) %>
<% for redirect in @redirects %>
<tr <%= alternate_class %>>
<td>
<%= link_to("#{redirect.to_url}", "#{redirect.to_url}") %>
<%= show_redirect_actions redirect %>
</td>
<td><%= link_to(redirect.to_path, redirect.to_path) %></td>
</tr>
<% end %>
<%= display_pagination(@redirects, 2)%>
</table>
</div>
</div>