Sha256: d80769de2a3c023c24160d67c9a1f23a2194f3679c5745377bc31054fede3faa

Contents?: true

Size: 1.89 KB

Versions: 10

Compression:

Stored size: 1.89 KB

Contents

= f.select :category, EffectiveClassifieds.categories, required: true
= f.text_field :title, label: "#{EffectiveClassifieds.classifieds_label} Posting Title"
= f.text_field :location

- if f.object.persisted? || f.object.errors.include?(:slug)
  - current_url = (effective_classifieds.classified_url(f.object) rescue nil)
  = f.text_field :slug, hint: "The slug controls this resource's internet address. Be careful, changing the slug will break links that other websites may have to the old address.<br>#{('This is currently reachable via ' + link_to(current_url.gsub(f.object.slug, '<strong>' + f.object.slug + '</strong>').html_safe, current_url)) if current_url }".html_safe

- minDate = [Time.zone.now, f.object.created_at].compact.min

.row
  .col-lg-6
    - if f.object.new_record?
      = f.date_field :start_on, label: "Start", hint: 'The posting will be displayed starting after this date.', input_js: { minDate: minDate.strftime('%F') }
    - else
      = f.date_field :start_on, label: "Start", hint: 'The posting will be displayed starting after this date.'

  .col-lg-6
    = f.date_field :end_on, label: "Expire", hint: 'The posting will no longer be displayed after this date.'

- if f.object.persisted? && !f.object.draft?
  = f.check_box :archived, label: 'Yes, this posting is archived. It will not be displayed.'

- if defined?(EffectiveArticleEditor)
  = f.article_editor :body, label: 'Description', hint: 'The content of your posting. Be sure to include all relevant information!'
- else
  = f.rich_text_area :body, label: 'Description', hint: 'The content of your posting. Be sure to include all relevant information!'

= f.file_field :file, label: 'Attach PDF'

%h2.mt-5.mb-0 Contact Information
%p
  %small.text-muted Contact information will be displayed on the classified ad.

= f.text_field :organization, label: 'Company or Organization'
= f.url_field :website
= f.email_field :email
= f.tel_field :phone

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
effective_classifieds-0.4.13 app/views/effective/classifieds/_fields.html.haml
effective_classifieds-0.4.12 app/views/effective/classifieds/_fields.html.haml
effective_classifieds-0.4.11 app/views/effective/classifieds/_fields.html.haml
effective_classifieds-0.4.10 app/views/effective/classifieds/_fields.html.haml
effective_classifieds-0.4.9 app/views/effective/classifieds/_fields.html.haml
effective_classifieds-0.4.8 app/views/effective/classifieds/_fields.html.haml
effective_classifieds-0.4.7 app/views/effective/classifieds/_fields.html.haml
effective_classifieds-0.4.6 app/views/effective/classifieds/_fields.html.haml
effective_classifieds-0.4.5 app/views/effective/classifieds/_fields.html.haml
effective_classifieds-0.4.4 app/views/effective/classifieds/_fields.html.haml