Sha256: 134057a1f67c598fb389c0615bfbd2bf9715c6203c90fe3bda81a0521429ba68

Contents?: true

Size: 1.81 KB

Versions: 9

Compression:

Stored size: 1.81 KB

Contents

<% content_for :page_heading do %>
<h2>
  <i class="glyphicon glyphicon-large glyphicon-share-alt"></i>
  <%= t(".redirects") %>
</h2>
<% end %>

<div class='row'>
  <div class='col-md-4'>
    <%= form_for([:admin, @redirect]) do |f| %>

      <% if @redirect.errors.any? %>
        <ul>
          <% @redirect.errors.full_messages.each do |redirect| %>
            <li><%= message %></li>
          <% end %>
        </ul>
      <% end %>

      <div class="form-group">
        <%= f.text_field :from_path, class: 'form-control', placeholder: "From #{this_blog.base_url}/" %>
      </div>
      <p class='help-block'>
        <small><%= t(".leave_empty_to_shorten_a_link") %></small>
      </p>
      <div class="form-group">
        <%= f.text_field :to_path, class: 'form-control', placeholder: "To" %>
      </div>
      <div class="form-group">
        <hr>
        <%= link_to(t(".cancel"), {action: 'index'}) %>
        <%= t(".or") %>
        <%= f.submit t('.save'), class: 'btn btn-success' %>
      </div>
    <% end %>
  </div>

  <div class='col-md-8'>
    <table class="table table-hover">
      <thead>
        <tr class='noborder'>
          <th><%= t(".from") %></th>
          <th><%= t(".to") %></th>
        </tr>
      </thead>
      <% if @redirects.empty? %>
      <tr>
        <td colspan="2">
          <%= t(".no_redirects") %>
        </td>
      </tr>
      <% end %>
      <% for redirect in @redirects %>
      <tr>
        <td>
          <%= link_to("#{redirect.from_url}", "#{redirect.from_url}") %>
          <div class="action">
            <%= button_to_edit redirect %>
            <%= button_to_delete redirect %>
          </div>
        </td>
        <td><%= link_to(redirect.to_path, redirect.to_path) %></td>
      </tr>
      <% end %>
      <%= display_pagination(@redirects, 2) %>
    </table>
  </div>
</div>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
publify_core-9.1.0 app/views/admin/redirects/_index_and_form.html.erb
publify_core-9.0.1 app/views/admin/redirects/_index_and_form.html.erb
publify_core-9.0.0 app/views/admin/redirects/_index_and_form.html.erb
publify_core-9.0.0.pre6 app/views/admin/redirects/_index_and_form.html.erb
publify_core-9.0.0.pre5 app/views/admin/redirects/_index_and_form.html.erb
publify_core-9.0.0.pre4 app/views/admin/redirects/_index_and_form.html.erb
publify_core-9.0.0.pre3 app/views/admin/redirects/_index_and_form.html.erb
publify_core-9.0.0.pre2 app/views/admin/redirects/_index_and_form.html.erb
publify_core-9.0.0.pre1 app/views/admin/redirects/_index_and_form.html.erb