Sha256: 6c50795c75d4a0695fbaf953971a4339ab7fec9d6610ae478ce2d3d02eebefe0

Contents?: true

Size: 1.74 KB

Versions: 22

Compression:

Stored size: 1.74 KB

Contents

<div class="container">
  <% if @error.present? %>
    <h3><%= @error.message %></h3>
  <% else %>
    <%= form_tag("/companies/#{params[:company_id]}/contacts", method: :get, class: 'contacts') do %>
      <%= text_field_tag(:search, @search_q, placeholder: 'Search..', id: 'search') %>
    <% end %>

    <pre>
      <p>Get contacts associated with company</p>
      <p># app/lib/services/hubspot/associations/get_by_id.rb</p>
    </pre>

    <% if @contact_list.present? %>
        <%= form_for :contacts_ids, url: "/companies/#{params[:company_id]}/contacts/manage", method: 'post' do |form| %>
          <table>
            <thead>
              <tr>
                <th>ID</th>
                <th>Name</th>
                <th>Status</th>
                <th>Selected</th>
              </tr>
            </thead>
            <tbody>
            <% @contact_list.each do |contact| %>
              <tr>
                <td><%= contact.id %></td>
                <td><%= [contact.properties['firstname'], contact.properties['lastname']].join(' ') %></td>
                <td><%= @associated_contacts.map(&:id).include?(contact.id) ? 'Associated' : '-'%></td>
                <td><%= check_box(:contacts_ids, contact.id)%>
              </tr>
            <% end %>
            </tbody>
          </table>
          <%= form.submit('Add', class: 'button-primary') %>
          <%= form.submit('Delete', class: 'button-primary') %>
        <% end %>
        <pre>
          <p>Add batch of contacts to company</p>
          <p># app/lib/services/hubspot/associations/create.rb</p>
        </pre>
        <pre>
          <p>Delete batch of contacts from company</p>
          <p># app/lib/services/hubspot/associations/delete.rb</p>
        </pre>
    <% end %>
  <% end %>
</div>

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
hubspot-api-client-9.0.0 sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-8.0.1 sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-8.0.0 sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-7.3.0 sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-7.2.0 sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-7.1.1 sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-7.1.0 sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-7.0.0 sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-6.0.0 sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-5.0.0 sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-4.0.0 sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-3.3.0 sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-3.2.0 sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-3.1.1 sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-3.1.0.pre.beta sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-3.0.0.pre.beta sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-2.3.2 sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-2.3.1 sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-2.2.0 sample-apps/companies-app/app/views/contacts/index.html.erb
hubspot-api-client-2.1.0 sample-apps/companies-app/app/views/contacts/index.html.erb