Sha256: 1ae2a244520ab64d9f1254aeaa95e0aba467077097842ffd29d876003acdb22e

Contents?: true

Size: 775 Bytes

Versions: 10

Compression:

Stored size: 775 Bytes

Contents

class @AntsRedirects
  constructor: (title='Redirects', apiPath='/admin') ->
    config =
      title: title
      showWithParent: true

      onViewShow: (view) ->
        if view.object
          view.$linkBtn =$ "<a href='#{ view.object.path_from }' class='link open' target='_blank'>Open</a>"
          view.$header.append view.$linkBtn

      arrayStore: new RailsArrayStore({
        resource:    'redirect'
        path:        "#{ apiPath }/redirects"
        sortBy:      'path_from'
        searchable:  true
      })

      formSchema:
        path_from: { type: 'string', label: 'From', placeholder: '/redirect-from-path', required: true }
        path_to:   { type: 'url',    label: 'To',   placeholder: '/redirect-to-path',   required: true }

    return config

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ants-0.3.3 app/assets/javascripts/ants/redirects.coffee
ants-0.3.2 app/assets/javascripts/ants/redirects.coffee
ants-0.3.1 app/assets/javascripts/ants/redirects.coffee
ants-0.3.0 app/assets/javascripts/ants/redirects.coffee
ants-0.2.8 app/assets/javascripts/ants/redirects.coffee
ants-0.2.7 app/assets/javascripts/ants/redirects.coffee
ants-0.2.6 app/assets/javascripts/ants/redirects.coffee
ants-0.2.5 app/assets/javascripts/ants/redirects.coffee
ants-0.2.4 app/assets/javascripts/ants/redirects.coffee
ants-0.2.3 app/assets/javascripts/ants/redirects.coffee