leads_to_highrise 0.3.17 → 0.3.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTVlZTExY2VlYzA1ZDMwYjk1YjMyYzRkYWViODNiNWM0MThhYTA2ZA==
4
+ NGZiNzBjZWJmYTIxOGNiN2Q1ZDFiZjQ3YTg0M2MxNzU5YWRjYmUxOA==
5
5
  data.tar.gz: !binary |-
6
- MTEwMjFmNWZmNjVmZjdiNDU3OTkwNWEzZTM1ZmE2MzYzNTE3ZDBkMQ==
6
+ OGUyMzkxNTcxNTJhOTFlOGUwNTY0NDA0MzcxYzliYWI3YjU1NmRiYQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NGVkYzZlNTAwZmQwMmIzMzJiNWM5OTA0YmY0MWI2ZTM5YWQ0Y2FmMWI2NmIz
10
- ZGJhMWFmMzhiODk5ODczY2M5MzQzY2QyZmZjZmM1YTQ3ZjFlNGQ0YzYyMjY5
11
- N2VmMjg5MDIzYzU0YTEwYzZlNTY4ZjYzNjRlYzU2N2FlMjc5NGM=
9
+ MjYwYjE5YjJkYWJhNjZlM2QyN2FmMTY1MTA4ZTRiMjgzOWM1ZDZjYmU3NDkw
10
+ MWZiZmRiOWJkZWEwZGM4YjgyNjg3OGY5MzAxNDExN2M0MWRkOGQ4YjdlOTFk
11
+ YzYyYWM1ZDkzZDgzZmI5OThiZjU0NzQwMGM4OTI3NjI3ZTRlNDc=
12
12
  data.tar.gz: !binary |-
13
- NTFhYjY1ZjMxZDU3YjVjMjNkNDBmY2M3YTBkODY1MjgxNjRhZjQ2ZGY0N2Zk
14
- MzRhNmEyNDZhZGUwODI0MTA5NjIxN2I5ZDM5N2YwOTliYWNlMWEyNDJhNDQz
15
- MDMzZmFjZmI5NjI0ZjU3NGQyOWI1ZmMyNjFiMTI3YzhiNzg2ZjI=
13
+ YWMyNjljZjVhYjhkOGE5NzQ2ZmRlMjY2MzMxMWVkZDYyNjg1NWMwOTlmODI1
14
+ NWExMTgyNzg2ZjkwMmIyMzEyMjI2YTE1NGNjNjkxYTI3ZDNkYzE1OGRiOWQ2
15
+ ZDRlYjU5YWY5NmFiMDI2NTE5MTcxYjI4M2M5YmY1NDBhMTBlOTc=
@@ -4,8 +4,8 @@ module LeadsToHighrise
4
4
  class InstallGenerator < ::Rails::Generators::Base
5
5
  source_root File.expand_path('../templates', __FILE__)
6
6
  def copy_migration
7
- copy_file "20140417073703_create_leads.rb", "db/migrate/#{time}_create_leads.rb"
8
- copy_file "20140417074432_add_highrise_site_and_highrise_user_to_user.rb", "db/migrate/#{time}_add_highrise_site_and_highrise_user_to_user.rb"
7
+ copy_file "migrations/create_leads.rb", "db/migrate/#{time}_create_leads.rb"
8
+ copy_file "migrations/add_highrise_site_and_highrise_user_to_user.rb", "db/migrate/#{time}_add_highrise_site_and_highrise_user_to_user.rb"
9
9
  end
10
10
 
11
11
  def time
@@ -0,0 +1,45 @@
1
+ <%= form_for(@lead) do |f| %>
2
+ <% if @lead.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@lead.errors.count, "error") %> prohibited this lead from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @lead.errors.full_messages.each do |message| %>
8
+ <li><%= message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= f.label :name %><br>
16
+ <%= f.text_field :name %>
17
+ </div>
18
+ <div class="field">
19
+ <%= f.label :last_name %><br>
20
+ <%= f.text_field :last_name %>
21
+ </div>
22
+ <div class="field">
23
+ <%= f.label :email %><br>
24
+ <%= f.text_field :email %>
25
+ </div>
26
+ <div class="field">
27
+ <%= f.label :company %><br>
28
+ <%= f.text_field :company %>
29
+ </div>
30
+ <div class="field">
31
+ <%= f.label :job_title %><br>
32
+ <%= f.text_field :job_title %>
33
+ </div>
34
+ <div class="field">
35
+ <%= f.label :phone %><br>
36
+ <%= f.text_field :phone %>
37
+ </div>
38
+ <div class="field">
39
+ <%= f.label :website %><br>
40
+ <%= f.text_field :website %>
41
+ </div>
42
+ <div class="actions">
43
+ <%= f.submit %>
44
+ </div>
45
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing lead</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @lead %> |
6
+ <%= link_to 'Back', leads_path %>
@@ -0,0 +1,40 @@
1
+ <h1>Listing leads</h1>
2
+
3
+ <table>
4
+ <thead>
5
+ <tr>
6
+ <th>Name</th>
7
+ <th>Last name</th>
8
+ <th>Email</th>
9
+ <th>Company</th>
10
+ <th>Job title</th>
11
+ <th>Phone</th>
12
+ <th>Website</th>
13
+ <th colspan="4"></th>
14
+ </tr>
15
+ </thead>
16
+
17
+ <tbody>
18
+ <% @leads.each do |lead| %>
19
+ <tr>
20
+ <td><%= lead.name %></td>
21
+ <td><%= lead.last_name %></td>
22
+ <td><%= lead.email %></td>
23
+ <td><%= lead.company %></td>
24
+ <td><%= lead.job_title %></td>
25
+ <td><%= lead.phone %></td>
26
+ <td><%= lead.website %></td>
27
+ <td><%= link_to 'Show', lead %></td>
28
+ <td><%= link_to 'Edit', edit_lead_path(lead) %></td>
29
+ <td><%= link_to 'Destroy', lead, method: :delete, data: { confirm: 'Are you sure?' } %></td>
30
+ <td><%= link_to 'Send to Highrise', to_highrise_path(lead) if user_signed_in? %></td>
31
+ </tr>
32
+ <% end %>
33
+ </tbody>
34
+ </table>
35
+
36
+ <br>
37
+
38
+ <%= link_to 'New Lead', new_lead_path %>
39
+
40
+ <%= will_paginate @leads %>
@@ -0,0 +1,5 @@
1
+ <h1>New lead</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', leads_path %>
@@ -0,0 +1,37 @@
1
+ <p>
2
+ <strong>Name:</strong>
3
+ <%= @lead.name %>
4
+ </p>
5
+
6
+ <p>
7
+ <strong>Last name:</strong>
8
+ <%= @lead.last_name %>
9
+ </p>
10
+
11
+ <p>
12
+ <strong>Email:</strong>
13
+ <%= @lead.email %>
14
+ </p>
15
+
16
+ <p>
17
+ <strong>Company:</strong>
18
+ <%= @lead.company %>
19
+ </p>
20
+
21
+ <p>
22
+ <strong>Job title:</strong>
23
+ <%= @lead.job_title %>
24
+ </p>
25
+
26
+ <p>
27
+ <strong>Phone:</strong>
28
+ <%= @lead.phone %>
29
+ </p>
30
+
31
+ <p>
32
+ <strong>Website:</strong>
33
+ <%= @lead.website %>
34
+ </p>
35
+
36
+ <%= link_to 'Edit', edit_lead_path(@lead) %> |
37
+ <%= link_to 'Back', leads_path %>
@@ -0,0 +1,17 @@
1
+ require 'rails/generators'
2
+
3
+ module LeadsToHighrise
4
+ module Generators
5
+ class ViewsGenerator < ::Rails::Generators::Base
6
+ source_root File.expand_path('../templates', __FILE__)
7
+
8
+ def copy_views
9
+ copy_file "views/_form.html.erb", "app/views/leads/_form.html.erb"
10
+ copy_file "views/edit.html.erb", "app/views/leads/edit.html.erb"
11
+ copy_file "views/index.html.erb", "app/views/leads/index.html.erb"
12
+ copy_file "views/new.html.erb", "app/views/leads/new.html.erb"
13
+ copy_file "views/show.html.erb", "app/views/leads/show.html.erb"
14
+ end
15
+ end
16
+ end
17
+ end
@@ -1,3 +1,3 @@
1
1
  module LeadsToHighrise
2
- VERSION = "0.3.17"
2
+ VERSION = "0.3.18"
3
3
  end
@@ -0,0 +1,45 @@
1
+ <%= form_for(@lead) do |f| %>
2
+ <% if @lead.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@lead.errors.count, "error") %> prohibited this lead from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @lead.errors.full_messages.each do |message| %>
8
+ <li><%= message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= f.label :name %><br>
16
+ <%= f.text_field :name %>
17
+ </div>
18
+ <div class="field">
19
+ <%= f.label :last_name %><br>
20
+ <%= f.text_field :last_name %>
21
+ </div>
22
+ <div class="field">
23
+ <%= f.label :email %><br>
24
+ <%= f.text_field :email %>
25
+ </div>
26
+ <div class="field">
27
+ <%= f.label :company %><br>
28
+ <%= f.text_field :company %>
29
+ </div>
30
+ <div class="field">
31
+ <%= f.label :job_title %><br>
32
+ <%= f.text_field :job_title %>
33
+ </div>
34
+ <div class="field">
35
+ <%= f.label :phone %><br>
36
+ <%= f.text_field :phone %>
37
+ </div>
38
+ <div class="field">
39
+ <%= f.label :website %><br>
40
+ <%= f.text_field :website %>
41
+ </div>
42
+ <div class="actions">
43
+ <%= f.submit %>
44
+ </div>
45
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing lead</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @lead %> |
6
+ <%= link_to 'Back', leads_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New lead</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', leads_path %>
@@ -0,0 +1,37 @@
1
+ <p>
2
+ <strong>Name:</strong>
3
+ <%= @lead.name %>
4
+ </p>
5
+
6
+ <p>
7
+ <strong>Last name:</strong>
8
+ <%= @lead.last_name %>
9
+ </p>
10
+
11
+ <p>
12
+ <strong>Email:</strong>
13
+ <%= @lead.email %>
14
+ </p>
15
+
16
+ <p>
17
+ <strong>Company:</strong>
18
+ <%= @lead.company %>
19
+ </p>
20
+
21
+ <p>
22
+ <strong>Job title:</strong>
23
+ <%= @lead.job_title %>
24
+ </p>
25
+
26
+ <p>
27
+ <strong>Phone:</strong>
28
+ <%= @lead.phone %>
29
+ </p>
30
+
31
+ <p>
32
+ <strong>Website:</strong>
33
+ <%= @lead.website %>
34
+ </p>
35
+
36
+ <%= link_to 'Edit', edit_lead_path(@lead) %> |
37
+ <%= link_to 'Back', leads_path %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leads_to_highrise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.17
4
+ version: 0.3.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Tripoloni
@@ -105,8 +105,14 @@ files:
105
105
  - db/migrate/20140417074432_add_highrise_site_and_highrise_user_to_user.rb
106
106
  - lib/generators/leads_to_highrise/USAGE
107
107
  - lib/generators/leads_to_highrise/install_generator.rb
108
- - lib/generators/leads_to_highrise/templates/20140417073703_create_leads.rb
109
- - lib/generators/leads_to_highrise/templates/20140417074432_add_highrise_site_and_highrise_user_to_user.rb
108
+ - lib/generators/leads_to_highrise/templates/migrations/add_highrise_site_and_highrise_user_to_user.rb
109
+ - lib/generators/leads_to_highrise/templates/migrations/create_leads.rb
110
+ - lib/generators/leads_to_highrise/templates/views/_form.html.erb
111
+ - lib/generators/leads_to_highrise/templates/views/edit.html.erb
112
+ - lib/generators/leads_to_highrise/templates/views/index.html.erb
113
+ - lib/generators/leads_to_highrise/templates/views/new.html.erb
114
+ - lib/generators/leads_to_highrise/templates/views/show.html.erb
115
+ - lib/generators/leads_to_highrise/views_generator.rb
110
116
  - lib/leads_to_highrise.rb
111
117
  - lib/leads_to_highrise/engine.rb
112
118
  - lib/leads_to_highrise/version.rb
@@ -120,7 +126,11 @@ files:
120
126
  - test/dummy/app/helpers/application_helper.rb
121
127
  - test/dummy/app/models/user.rb
122
128
  - test/dummy/app/views/layouts/application.html.erb
129
+ - test/dummy/app/views/leads/_form.html.erb
130
+ - test/dummy/app/views/leads/edit.html.erb
123
131
  - test/dummy/app/views/leads/index.html.erb
132
+ - test/dummy/app/views/leads/new.html.erb
133
+ - test/dummy/app/views/leads/show.html.erb
124
134
  - test/dummy/bin/bundle
125
135
  - test/dummy/bin/rails
126
136
  - test/dummy/bin/rake
@@ -204,7 +214,11 @@ test_files:
204
214
  - test/dummy/app/helpers/application_helper.rb
205
215
  - test/dummy/app/models/user.rb
206
216
  - test/dummy/app/views/layouts/application.html.erb
217
+ - test/dummy/app/views/leads/edit.html.erb
207
218
  - test/dummy/app/views/leads/index.html.erb
219
+ - test/dummy/app/views/leads/new.html.erb
220
+ - test/dummy/app/views/leads/show.html.erb
221
+ - test/dummy/app/views/leads/_form.html.erb
208
222
  - test/dummy/bin/bundle
209
223
  - test/dummy/bin/rails
210
224
  - test/dummy/bin/rake