Sha256: a5207a500193b0326b9853ccd57af45d092133c7d05da3cb5ab0add5e49fec20

Contents?: true

Size: 1.51 KB

Versions: 52

Compression:

Stored size: 1.51 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 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

52 entries across 52 versions & 1 rubygems

Version Path
tenon-1.0.74 app/views/tenon/redirects/_form.html.haml
tenon-1.0.73 app/views/tenon/redirects/_form.html.haml
tenon-1.0.72 app/views/tenon/redirects/_form.html.haml
tenon-1.0.71 app/views/tenon/redirects/_form.html.haml
tenon-1.0.70 app/views/tenon/redirects/_form.html.haml
tenon-1.0.69 app/views/tenon/redirects/_form.html.haml
tenon-1.0.68 app/views/tenon/redirects/_form.html.haml
tenon-1.0.67 app/views/tenon/redirects/_form.html.haml
tenon-1.0.66 app/views/tenon/redirects/_form.html.haml
tenon-1.0.65 app/views/tenon/redirects/_form.html.haml
tenon-1.0.64 app/views/tenon/redirects/_form.html.haml
tenon-1.0.63 app/views/tenon/redirects/_form.html.haml
tenon-1.0.62 app/views/tenon/redirects/_form.html.haml
tenon-1.0.61 app/views/tenon/redirects/_form.html.haml
tenon-1.0.60 app/views/tenon/redirects/_form.html.haml
tenon-1.0.59 app/views/tenon/redirects/_form.html.haml
tenon-1.0.57 app/views/tenon/redirects/_form.html.haml
tenon-1.0.56 app/views/tenon/redirects/_form.html.haml
tenon-1.0.55 app/views/tenon/redirects/_form.html.haml
tenon-1.0.54 app/views/tenon/redirects/_form.html.haml