Sha256: eea3dfb6be415262212c31c9b5ed139ca7687dd470bc6de9cec5ee2f95b17695

Contents?: true

Size: 1.56 KB

Versions: 6

Compression:

Stored size: 1.56 KB

Contents

- content_for :sidebar do
  .sidebar
    .content
      %h2 Redirects
      = link_to "New Redirect", new_redirect_path, class: 'btn btn-block btn-primary'

= autosaving_form_for @redirect do |f|
  .flash.flash-alert{style: 'padding-right: 40px;'}
    %i.fa.fa-exclamation-triangle
    Redirects will be run when a page cannot be found. It will not redirect an existing page.

  = error_messages_for :redirect
  .fields.large.tabs
    .tab-pane.active#details
      .form-group
        = f.text_field :in, label: 'Route to match', explanation: 'String, can be written as a regular expression (without opening and closing /)', placeholder: '\/old-path\/(\d+)-(\.*)'
      .form-group
        = f.text_field :out, label: 'Destination', explanation: 'Zero-indexed captures can be returned in {x}', placeholder: '/new-path/{0}-{1}'

  .fields.small
    %h4.box-label Details
    .box
      .form-group.bordered.inline
        = f.check_box :active, class: 'tn-checkbox-right'
        = f.super_label :active

    %h4.box-label Actions
    .box
      .content
        - if can?(:publish, @redirect)
          %button.btn.btn-block.btn-comp{ data: { disable_with: "Please wait..." } } Save
        - if can?(:create, Tenon::ItemVersion)
          = save_draft_button(@redirect)
          .last-autosave

      %hr
      .content
        = clear_draft_link if params[:version]
        = load_draft_link(@redirect)
        - if @redirect.persisted?
          = link_to "Delete", @redirect, data: {method: :delete, confirm: 'Are you sure you want to delete this?'}, :class => 'delete-link'
    .spacer

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tenon-1.1.4 app/views/tenon/redirects/_form.html.haml
tenon-1.1.3 app/views/tenon/redirects/_form.html.haml
tenon-1.1.2 app/views/tenon/redirects/_form.html.haml
tenon-1.1.1 app/views/tenon/redirects/_form.html.haml
tenon-1.0.76 app/views/tenon/redirects/_form.html.haml
tenon-1.0.75 app/views/tenon/redirects/_form.html.haml