Sha256: ae7942af1cf28d18051cd83d42696163951ec65652c2d8892f4091f08f6f31f1

Contents?: true

Size: 893 Bytes

Versions: 1

Compression:

Stored size: 893 Bytes

Contents

%div.container-fluid
  %h1 Contacts

  %div.content#viewer

  %table.table
    %thead
      %tr
        %th
          Name
        %th
          Email
        %th
          Created At
        %th
          Message
        %th
          Actions
    - @contacts.each do |contact|
      %tr
        %td
          = contact.name
        %td
          = link_to contact.email, "mailto:#{contact.email}"
        %td
          = contact.created_at.strftime("%B %d %Y")
        %td
          %div.contact-mes{ id: "#{contact.id}" }
            = contact.message
        %td
          %button.btn.btn-xs.btn-default{ onclick: "setViewer('#{contact.id}')" } View
          = link_to 'Delete', admin_contact_path(contact), method: :delete, class: 'btn btn-xs btn-default'

:javascript
  function setViewer(id) {
    document.getElementById('viewer').innerHTML = document.getElementById(id).innerHTML
  };

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pages_cms-1.1.0 app/views/pages_cms/admin/contacts/index.html.haml