innetra-easy_contacts 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. data/Rakefile +14 -0
  2. data/easy_contacts.gemspec +31 -0
  3. data/generators/easy_contacts/easy_contacts_generator.rb +160 -0
  4. data/generators/easy_contacts/templates/controllers/addresses_controller.rb +12 -0
  5. data/generators/easy_contacts/templates/controllers/cities_controller.rb +7 -0
  6. data/generators/easy_contacts/templates/controllers/companies_controller.rb +75 -0
  7. data/generators/easy_contacts/templates/controllers/contacts_controller.rb +10 -0
  8. data/generators/easy_contacts/templates/controllers/countries_controller.rb +7 -0
  9. data/generators/easy_contacts/templates/controllers/emails_controller.rb +12 -0
  10. data/generators/easy_contacts/templates/controllers/instant_messengers_controller.rb +12 -0
  11. data/generators/easy_contacts/templates/controllers/people_controller.rb +89 -0
  12. data/generators/easy_contacts/templates/controllers/phones_controller.rb +12 -0
  13. data/generators/easy_contacts/templates/controllers/provinces_controller.rb +7 -0
  14. data/generators/easy_contacts/templates/controllers/web_sites_controller.rb +12 -0
  15. data/generators/easy_contacts/templates/helpers/addresses_helper.rb +5 -0
  16. data/generators/easy_contacts/templates/helpers/emails_helper.rb +5 -0
  17. data/generators/easy_contacts/templates/helpers/form_helper.rb +5 -0
  18. data/generators/easy_contacts/templates/helpers/instant_messengers_helper.rb +6 -0
  19. data/generators/easy_contacts/templates/helpers/phones_helper.rb +5 -0
  20. data/generators/easy_contacts/templates/helpers/shadowbox_helper.rb +23 -0
  21. data/generators/easy_contacts/templates/helpers/web_sites_helper.rb +5 -0
  22. data/generators/easy_contacts/templates/locales/en.easy_contacts.yml +59 -0
  23. data/generators/easy_contacts/templates/locales/es-MX.easy_contacts.yml +92 -0
  24. data/generators/easy_contacts/templates/migrations/easy_contacts.rb +123 -0
  25. data/generators/easy_contacts/templates/models/address.rb +33 -0
  26. data/generators/easy_contacts/templates/models/address_type.rb +2 -0
  27. data/generators/easy_contacts/templates/models/city.rb +2 -0
  28. data/generators/easy_contacts/templates/models/company.rb +5 -0
  29. data/generators/easy_contacts/templates/models/contact.rb +121 -0
  30. data/generators/easy_contacts/templates/models/country.rb +2 -0
  31. data/generators/easy_contacts/templates/models/email.rb +14 -0
  32. data/generators/easy_contacts/templates/models/email_type.rb +2 -0
  33. data/generators/easy_contacts/templates/models/instant_messenger.rb +5 -0
  34. data/generators/easy_contacts/templates/models/instant_messenger_protocol.rb +2 -0
  35. data/generators/easy_contacts/templates/models/instant_messenger_type.rb +2 -0
  36. data/generators/easy_contacts/templates/models/person.rb +38 -0
  37. data/generators/easy_contacts/templates/models/phone.rb +4 -0
  38. data/generators/easy_contacts/templates/models/phone_type.rb +2 -0
  39. data/generators/easy_contacts/templates/models/province.rb +2 -0
  40. data/generators/easy_contacts/templates/models/web_site.rb +4 -0
  41. data/generators/easy_contacts/templates/models/web_site_type.rb +2 -0
  42. data/generators/easy_contacts/templates/stylesheets/companies.css +4 -0
  43. data/generators/easy_contacts/templates/stylesheets/default.css +46 -0
  44. data/generators/easy_contacts/templates/stylesheets/people.css +13 -0
  45. data/generators/easy_contacts/templates/views/addresses/_address.html.erb +65 -0
  46. data/generators/easy_contacts/templates/views/addresses/_addresses.html.erb +5 -0
  47. data/generators/easy_contacts/templates/views/addresses/destroy.js.rjs +1 -0
  48. data/generators/easy_contacts/templates/views/cities/index.js.erb +1 -0
  49. data/generators/easy_contacts/templates/views/companies/_company.html.erb +17 -0
  50. data/generators/easy_contacts/templates/views/companies/edit.html.erb +13 -0
  51. data/generators/easy_contacts/templates/views/companies/index.html.erb +21 -0
  52. data/generators/easy_contacts/templates/views/companies/index.js.erb +1 -0
  53. data/generators/easy_contacts/templates/views/companies/new.html.erb +13 -0
  54. data/generators/easy_contacts/templates/views/companies/show.html.erb +19 -0
  55. data/generators/easy_contacts/templates/views/contacts/_contact.html.erb +14 -0
  56. data/generators/easy_contacts/templates/views/contacts/_contact_info.html.erb +61 -0
  57. data/generators/easy_contacts/templates/views/contacts/index.html.erb +21 -0
  58. data/generators/easy_contacts/templates/views/countries/index.js.erb +1 -0
  59. data/generators/easy_contacts/templates/views/emails/_email.html.erb +20 -0
  60. data/generators/easy_contacts/templates/views/emails/_emails.html.erb +13 -0
  61. data/generators/easy_contacts/templates/views/emails/destroy.js.rjs +1 -0
  62. data/generators/easy_contacts/templates/views/instant_messengers/_instant_messenger.html.erb +21 -0
  63. data/generators/easy_contacts/templates/views/instant_messengers/_instant_messengers.html.erb +14 -0
  64. data/generators/easy_contacts/templates/views/instant_messengers/destroy.js.rjs +1 -0
  65. data/generators/easy_contacts/templates/views/people/_person.html.erb +44 -0
  66. data/generators/easy_contacts/templates/views/people/edit.html.erb +13 -0
  67. data/generators/easy_contacts/templates/views/people/index.html.erb +21 -0
  68. data/generators/easy_contacts/templates/views/people/new.html.erb +13 -0
  69. data/generators/easy_contacts/templates/views/people/show.html.erb +13 -0
  70. data/generators/easy_contacts/templates/views/phones/_phone.html.erb +17 -0
  71. data/generators/easy_contacts/templates/views/phones/_phones.html.erb +14 -0
  72. data/generators/easy_contacts/templates/views/phones/destroy.js.rjs +1 -0
  73. data/generators/easy_contacts/templates/views/provinces/index.js.erb +1 -0
  74. data/generators/easy_contacts/templates/views/web_sites/_web_site.html.erb +19 -0
  75. data/generators/easy_contacts/templates/views/web_sites/_web_sites.html.erb +14 -0
  76. data/generators/easy_contacts/templates/views/web_sites/destroy.js.rjs +1 -0
  77. data/tasks/init.rake +43 -0
  78. metadata +133 -0
@@ -0,0 +1,21 @@
1
+ <%% content_for :header do -%>
2
+ <%%= stylesheet_link_tag "easy_contacts/default", :media => :all %>
3
+ <%%= stylesheet_link_tag "easy_contacts/companies", :media => :all %>
4
+ <%% end -%>
5
+
6
+ <%% content_for :sidebar do -%>
7
+ <%% shadowbox "options_section", :class => "sidebar_section" do %>
8
+ <%%= link_to t("companies.index.new_company_link"), new_company_url %><br />
9
+ <%% end %>
10
+ <%% end -%>
11
+
12
+ <h1><%%= t("companies.index.title") %></h1>
13
+
14
+ <ul>
15
+ <%% for company in @companies -%>
16
+ <%% content_tag_for(:li, company) do %>
17
+ <%%= link_to company.name, company,
18
+ :class => "name important" %>
19
+ <%% end %>
20
+ <%% end -%>
21
+ </ul>
@@ -0,0 +1 @@
1
+ <%%= auto_complete_result @companies, :name %>
@@ -0,0 +1,13 @@
1
+ <%% content_for :header do -%>
2
+ <%%= stylesheet_link_tag "easy_contacts/default", :media => :all %>
3
+ <%%= stylesheet_link_tag "easy_contacts/companies", :media => :all %>
4
+ <%% end -%>
5
+
6
+ <h1>
7
+ <div class="title_actions">
8
+ <%%= link_to t("companies.new.cancel"), companies_url %>
9
+ </div>
10
+ <%%= t "companies.new.title" %>
11
+ </h1>
12
+
13
+ <%%= render :partial => "/companies/company", :object => @person %>
@@ -0,0 +1,19 @@
1
+ <%% content_for :sidebar do -%>
2
+ <%%= render :partial => "contacts/contact_info", :object => @company %>
3
+
4
+ <%% shadowbox "people_in_this_company", :class => "sidebar_section" do %>
5
+ <h1><%%= t("companies.show.people_in_this_company") %></h1>
6
+ <ul>
7
+ <%% for person in @company.people -%>
8
+ <%% content_tag_for(:li, person) do -%>
9
+ <%%= link_to person.full_name, person %><br />
10
+ <span class="comment"><%%= person.title %></span>
11
+ <%% end -%>
12
+
13
+ <%% end -%>
14
+ </ul>
15
+ <%% end %>
16
+ <%% end -%>
17
+ <h1>
18
+ <%%= @company.name %>
19
+ </h1>
@@ -0,0 +1,14 @@
1
+ <h2><%%= t("phones.title") %></h2>
2
+ <%%= place_phone_form(contact) %>
3
+
4
+ <h2><%%= t("emails.title") %></h2>
5
+ <%%= place_email_form(contact) %>
6
+
7
+ <h2><%%= t("instant_messengers.title") %></h2>
8
+ <%%= place_instant_messenger_form(contact) %>
9
+
10
+ <h2><%%= t("web_sites.title") %></h2>
11
+ <%%= place_web_site_form(contact) %>
12
+
13
+ <h2><%%= t("addresses.title") %></h2>
14
+ <%%= place_address_form(contact) %>
@@ -0,0 +1,61 @@
1
+ <%% shadowbox "contact_details" do %>
2
+ <h1>
3
+ <div class="title_actions">
4
+ <%%= link_to t("actions.edit"), edit_polymorphic_url(contact_info) %>
5
+ </div>
6
+ <%%= t("contacts.info.title", :name => contact_info.name) %>
7
+ </h1>
8
+ <%% unless contact_info.phones.blank? -%>
9
+ <table>
10
+ <tr>
11
+ <td class="label"><%%= t("activerecord.attributes.phone.number") %></td>
12
+ <td>
13
+ <%% for phone in contact_info.phones -%>
14
+ <%%= phone.number %>
15
+ <span class="comment"><%%= phone.phone_type.description %></span><br />
16
+ <%% end -%>
17
+ </td>
18
+ </tr>
19
+ </table>
20
+ <%% end -%>
21
+ <%% unless contact_info.emails.blank? -%>
22
+ <table>
23
+ <tr>
24
+ <td class="label"><%%= t("activerecord.attributes.email.address") %></td>
25
+ <td>
26
+ <%% for email in contact_info.emails -%>
27
+ <%%= auto_link email.address %>
28
+ <span class="comment"><%%= email.email_type.description %></span><br />
29
+ <%% end -%>
30
+ </td>
31
+ </tr>
32
+ </table>
33
+ <%% end -%>
34
+ <%% unless contact_info.web_sites.blank? -%>
35
+ <table>
36
+ <tr>
37
+ <td class="label"><%%= t("activerecord.attributes.web_site.address") %></td>
38
+ <td>
39
+ <%% for web_site in contact_info.web_sites -%>
40
+ <%%= auto_link web_site.address %>
41
+ <span class="comment"><%%= web_site.web_site_type.description %></span><br />
42
+ <%% end -%>
43
+ </td>
44
+ </tr>
45
+ </table>
46
+ <%% end -%>
47
+ <%% unless contact_info.addresses.blank? -%>
48
+ <table>
49
+ <%% for address in contact_info.addresses -%>
50
+ <tr>
51
+ <td class="label"><%%= address.address_type.description %></td>
52
+ <td>
53
+ <%%= address.address.gsub(/\n/,'<br />') %><br />
54
+ <%%= address.city.name %>, <%%= address.province.name %><br />
55
+ <%%= address.country.name %>&nbsp;<%%= address.zip %>
56
+ </td>
57
+ </tr>
58
+ <%% end -%>
59
+ </table>
60
+ <%% end -%>
61
+ <%% end %>
@@ -0,0 +1,21 @@
1
+ <%% content_for :header do -%>
2
+ <%%= stylesheet_link_tag "easy_contacts/contacts", :media => :all %>
3
+ <%% end -%>
4
+
5
+ <%% content_for :sidebar do -%>
6
+ <%% shadowbox "options_section", :class => "sidebar_section" do %>
7
+ <%%= link_to t("contacts.index.new_person_link"), new_person_url %><br />
8
+ <%%= link_to t("contacts.index.new_company_link"), new_company_url %>
9
+ <%% end %>
10
+ <%% end -%>
11
+ <h1><%%= t("contacts.index.title") %></h1>
12
+
13
+ <ul>
14
+ <%% for person in @people -%>
15
+ <%% content_tag_for(:li, person) do %>
16
+ <%%= link_to person.full_name, person,
17
+ :class => "full_name important" %><br />
18
+ <%%= person.title_description %>
19
+ <%% end %>
20
+ <%% end -%>
21
+ </ul>
@@ -0,0 +1 @@
1
+ <%%= auto_complete_result @countries, :name %>
@@ -0,0 +1,20 @@
1
+ <%% content_tag_for(:li, email) do -%>
2
+ <%% fields_for "#{dom_class(owner)}[email_attributes][]", email do |form| -%>
3
+ <%% unless email.new_record? -%>
4
+ <%%= form.hidden_field :id, :index => nil %>
5
+ <%% end -%>
6
+ <%%= form.text_field :address, :index => nil %>
7
+ <%%= form.collection_select :email_type_id, EmailType.all,
8
+ :id, :description, {}, { :index => nil } %>
9
+ <%% if email.new_record? -%>
10
+ <%%= link_to_function t("actions.delete"),
11
+ "$(this).up('li').remove();",
12
+ :class => :red %>
13
+ <%% else -%>
14
+ <%%= link_to_remote t("actions.delete"), :url => email,
15
+ :confirm => t("actions.confirm.delete"),
16
+ :method => :delete,
17
+ :html => { :class => :red } %>
18
+ <%% end -%>
19
+ <%% end -%>
20
+ <%% end -%>
@@ -0,0 +1,13 @@
1
+ <%% content_tag(:ul, :id => "emails") do -%>
2
+ <%% for email in owner.emails -%>
3
+ <%%= render :partial => email, :locals => { :owner => owner } %>
4
+ <%% end -%>
5
+ <%% end -%>
6
+ <p>
7
+ <%%= link_to_function t("emails.add_link") do |page|
8
+ page.insert_html :bottom, :emails,
9
+ :partial => "/emails/email",
10
+ :object => Email.new,
11
+ :locals => { :owner => owner }
12
+ end %>
13
+ </p>
@@ -0,0 +1 @@
1
+ page["email_#{@email.id}"].remove
@@ -0,0 +1,21 @@
1
+ <%% content_tag_for(:li, instant_messenger) do -%>
2
+ <%% fields_for "#{dom_class(owner)}[instant_messenger_attributes][]",
3
+ instant_messenger do |form| -%>
4
+ <%% unless instant_messenger.new_record? -%>
5
+ <%%= form.hidden_field :id, :index => nil %>
6
+ <%% end -%>
7
+ <%%= form.text_field :nick, :index => nil %>
8
+ <%%= form.collection_select :instant_messenger_protocol_id,
9
+ InstantMessengerProtocol.all, :id, :name, {}, { :index => nil } %>
10
+ <%%= form.collection_select :instant_messenger_type_id,
11
+ InstantMessengerType.all, :id, :description, {}, { :index => nil } %>
12
+ <%% if instant_messenger.new_record? -%>
13
+ <%%= link_to_function t("actions.delete"), "$(this).up('li').remove();", :class => :red %>
14
+ <%% else -%>
15
+ <%%= link_to_remote t("actions.delete"), :url => instant_messenger,
16
+ :confirm => t("actions.confirm.delete"),
17
+ :method => :delete,
18
+ :html => { :class => :red } %>
19
+ <%% end -%>
20
+ <%% end -%>
21
+ <%% end -%>
@@ -0,0 +1,14 @@
1
+ <%% content_tag(:ul, :id => "instant_messengers") do -%>
2
+ <%% for instant_messenger in owner.instant_messengers -%>
3
+ <%%= render :partial => "/instant_messengers/instant_messenger",
4
+ :object => instant_messenger, :locals => { :owner => owner } %>
5
+ <%% end -%>
6
+ <%% end -%>
7
+ <p>
8
+ <%%= link_to_function t("instant_messengers.add_link") do |page|
9
+ page.insert_html :bottom, :instant_messengers,
10
+ :partial => "/instant_messengers/instant_messenger",
11
+ :object => InstantMessenger.new,
12
+ :locals => { :owner => owner }
13
+ end %>
14
+ </p>
@@ -0,0 +1 @@
1
+ page["instant_messenger_#{@instant_messenger.id}"].remove
@@ -0,0 +1,44 @@
1
+ <%% form_for person do |form| %>
2
+ <%%= error_messages_for :user %>
3
+ <table>
4
+ <tr>
5
+ <td>
6
+ <%%= form.label :name %>
7
+ <%%= required_field %><br />
8
+ <%%= form.text_field :name %>
9
+ </td>
10
+ <td>
11
+ <%%= form.label :last_name %>
12
+ <%%= required_field %><br />
13
+ <%%= form.text_field :last_name %>
14
+ </td>
15
+ </tr>
16
+ </table>
17
+ <p>
18
+ <%%= form.label :title %><br />
19
+ <%%= form.text_field :title, :size => "40" %>
20
+ </p>
21
+ <%% fields_for "person[company_attributes]", @person.company do |form| -%>
22
+ <p>
23
+ <%%= form.label :name, t("activerecord.attributes.company.name") %><br />
24
+ <%%= form.text_field :name, :size => "40", :autocomplete => :off %>
25
+ </p>
26
+ <div id="person_company_attributes_name_auto_complete" class="auto_complete" style="display: none;"></div>
27
+ <script type="text/javascript">
28
+ //<![CDATA[
29
+ var person_company_attributes_name_auto_completer = new Ajax.Autocompleter('person_company_attributes_name',
30
+ 'person_company_attributes_name_auto_complete',
31
+ '<%%= formatted_companies_url(:js) -%>',
32
+ {callback:function(element, value) { return 'search=' + element.value }, method:'get'})
33
+ //]]>
34
+ </script>
35
+ <%% end -%>
36
+
37
+ <%%= render :partial => "contacts/contact", :object => @person %>
38
+
39
+ <hr />
40
+ <p>
41
+ <%%= submit_tag t("forms.save") %>&nbsp;ó
42
+ <%%= link_to t("forms.cancel"), people_url, :class => :red %>
43
+ </p>
44
+ <%% end %>
@@ -0,0 +1,13 @@
1
+ <%% content_for :header do -%>
2
+ <%%= stylesheet_link_tag "easy_contacts/default", :media => :all %>
3
+ <%%= stylesheet_link_tag "easy_contacts/people", :media => :all %>
4
+ <%% end -%>
5
+
6
+ <h1>
7
+ <div class="title_actions">
8
+ <%%= link_to t("forms.cancel"), @person %>
9
+ </div>
10
+ <%%= t("people.edit.title", :full_name => @person.full_name) %>
11
+ </h1>
12
+
13
+ <%%= render :partial => "/people/person", :object => @person %>
@@ -0,0 +1,21 @@
1
+ <%% content_for :header do -%>
2
+ <%%= stylesheet_link_tag "easy_contacts/default", :media => :all %>
3
+ <%%= stylesheet_link_tag "easy_contacts/people", :media => :all %>
4
+ <%% end -%>
5
+
6
+ <%% content_for :sidebar do -%>
7
+ <%% shadowbox "options_section", :class => "sidebar_section" do %>
8
+ <%%= link_to t("people.index.new_person_link"), new_person_url %><br />
9
+ <%% end %>
10
+ <%% end -%>
11
+ <h1><%%= t("people.index.title") %></h1>
12
+
13
+ <ul>
14
+ <%% for person in @people -%>
15
+ <%% content_tag_for(:li, person) do %>
16
+ <%%= link_to person.full_name, person,
17
+ :class => "full_name important" %><br />
18
+ <%%= person.title_description %>
19
+ <%% end %>
20
+ <%% end -%>
21
+ </ul>
@@ -0,0 +1,13 @@
1
+ <%% content_for :header do -%>
2
+ <%%= stylesheet_link_tag "easy_contacts/default", :media => :all %>
3
+ <%%= stylesheet_link_tag "easy_contacts/people", :media => :all %>
4
+ <%% end -%>
5
+
6
+ <h1>
7
+ <div class="title_actions">
8
+ <%%= link_to t("people.new.cancel"), people_url %>
9
+ </div>
10
+ <%%= t "people.new.title" %>
11
+ </h1>
12
+
13
+ <%%= render :partial => "/people/person", :object => @person %>
@@ -0,0 +1,13 @@
1
+ <%% content_for :header do -%>
2
+ <%%= stylesheet_link_tag "easy_contacts/default", :media => :all %>
3
+ <%%= stylesheet_link_tag "easy_contacts/people", :media => :all %>
4
+ <%% end -%>
5
+
6
+ <%% content_for :sidebar do -%>
7
+ <%%= render :partial => "contacts/contact_info", :object => @person %>
8
+ <%% end -%>
9
+
10
+ <h1>
11
+ <%%= @person.full_name %><br />
12
+ <span class="comment"><%%= @person.title_description %></span>
13
+ </h1>
@@ -0,0 +1,17 @@
1
+ <%% content_tag_for(:li, phone) do -%>
2
+ <%% fields_for "#{dom_class(owner)}[phone_attributes][]", phone do |form| -%>
3
+ <%% unless phone.new_record? -%>
4
+ <%%= form.hidden_field :id, :index => nil %>
5
+ <%% end -%>
6
+ <%%= form.text_field :number, :index => nil %>
7
+ <%%= form.collection_select :phone_type_id, PhoneType.all, :id, :description, {}, { :index => nil } %>
8
+ <%% if phone.new_record? -%>
9
+ <%%= link_to_function t("actions.delete"), "$(this).up('li').remove();", :class => :red %>
10
+ <%% else -%>
11
+ <%%= link_to_remote t("actions.delete"), :url => phone,
12
+ :confirm => "actions.confirm.delete",
13
+ :method => :delete,
14
+ :html => { :class => :red } %>
15
+ <%% end -%>
16
+ <%% end -%>
17
+ <%% end -%>
@@ -0,0 +1,14 @@
1
+ <%% content_tag(:ul, :id => "phones") do -%>
2
+ <%% for phone in owner.phones -%>
3
+ <%%= render :partial => "/phones/phone",
4
+ :object => phone, :locals => { :owner => owner } %>
5
+ <%% end -%>
6
+ <%% end -%>
7
+ <p>
8
+ <%%= link_to_function t("phones.add_link") do |page|
9
+ page.insert_html :bottom, :phones,
10
+ :partial => "/phones/phone",
11
+ :object => Phone.new,
12
+ :locals => { :owner => owner }
13
+ end %>
14
+ </p>
@@ -0,0 +1 @@
1
+ page["phone_#{@phone.id}"].remove
@@ -0,0 +1 @@
1
+ <%%= auto_complete_result @provinces, :name %>
@@ -0,0 +1,19 @@
1
+ <%% content_tag_for(:li, web_site) do -%>
2
+ <%% fields_for "#{dom_class(owner)}[web_site_attributes][]", web_site do |form| -%>
3
+ <%% unless web_site.new_record? -%>
4
+ <%%= form.hidden_field :id, :index => nil %>
5
+ <%% end -%>
6
+ <%%= form.text_field :address, :index => nil %>
7
+ <%%= form.collection_select :web_site_type_id,
8
+ WebSiteType.all, :id, :description, {}, { :index => nil } %>
9
+ <%% if web_site.new_record? -%>
10
+ <%%= link_to_function t("actions.delete"),
11
+ "$(this).up('li').remove();", :class => :red %>
12
+ <%% else -%>
13
+ <%%= link_to_remote t("actions.delete"), :url => web_site,
14
+ :confirm => "actions.confirm.delete",
15
+ :method => :delete,
16
+ :html => { :class => :red } %>
17
+ <%% end -%>
18
+ <%% end -%>
19
+ <%% end -%>
@@ -0,0 +1,14 @@
1
+ <%% content_tag(:ul, :id => "web_sites") do -%>
2
+ <%% for web_site in owner.web_sites -%>
3
+ <%%= render :partial => "/web_sites/web_site",
4
+ :object => web_site, :locals => { :owner => owner } %>
5
+ <%% end -%>
6
+ <%% end -%>
7
+ <p>
8
+ <%%= link_to_function t("web_sites.add_link") do |page|
9
+ page.insert_html :bottom, :web_sites,
10
+ :partial => "/web_sites/web_site",
11
+ :object => WebSite.new,
12
+ :locals => { :owner => owner }
13
+ end %>
14
+ </p>
@@ -0,0 +1 @@
1
+ page["web_site_#{@web_site.id}"].remove
data/tasks/init.rake ADDED
@@ -0,0 +1,43 @@
1
+ namespace :easy_contacts do
2
+ desc "Initial database setup for easy_contacts"
3
+ task :init => :environment do
4
+
5
+ # Create Phone, Email, Instant Messenger, Web Address and Addresses types
6
+ PhoneType.create!(:description => "Oficina")
7
+ PhoneType.create!(:description => "Móvil")
8
+ PhoneType.create!(:description => "Casa")
9
+ PhoneType.create!(:description => "Fax")
10
+ PhoneType.create!(:description => "Pager")
11
+ PhoneType.create!(:description => "Skype")
12
+ PhoneType.create!(:description => "Otro")
13
+
14
+ EmailType.create!(:description => "Trabajo")
15
+ EmailType.create!(:description => "Personal")
16
+ EmailType.create!(:description => "Otro")
17
+
18
+ InstantMessengerProtocol.create!(:name => "AIM")
19
+ InstantMessengerProtocol.create!(:name => "Google Talk")
20
+ InstantMessengerProtocol.create!(:name => "ICQ")
21
+ InstantMessengerProtocol.create!(:name => "Jabber")
22
+ InstantMessengerProtocol.create!(:name => "MSN")
23
+ InstantMessengerProtocol.create!(:name => "Skype")
24
+ InstantMessengerProtocol.create!(:name => "Yahoo")
25
+ InstantMessengerProtocol.create!(:name => "Otro")
26
+
27
+ InstantMessengerType.create!(:description => "Trabajo")
28
+ InstantMessengerType.create!(:description => "Personal")
29
+ InstantMessengerType.create!(:description => "Otro")
30
+
31
+ WebSiteType.create!(:description => "Trabajo")
32
+ WebSiteType.create!(:description => "Personal")
33
+ WebSiteType.create!(:description => "Otro")
34
+
35
+ AddressType.create!(:description => "Trabajo")
36
+ AddressType.create!(:description => "Personal")
37
+ AddressType.create!(:description => "Otro")
38
+
39
+ # Country
40
+ Country.create!(:name => "México")
41
+
42
+ end
43
+ end
metadata ADDED
@@ -0,0 +1,133 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: innetra-easy_contacts
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Ivan Torres
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-01-17 00:00:00 -08:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: Easy Contacts for Ruby on Rails 2.2 (i18n)
17
+ email: mexpolk@gmail.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - tasks/init.rake
24
+ files:
25
+ - Manifest
26
+ - tasks/init.rake
27
+ - generators/easy_contacts/easy_contacts_generator.rb
28
+ - generators/easy_contacts/templates/stylesheets/people.css
29
+ - generators/easy_contacts/templates/stylesheets/companies.css
30
+ - generators/easy_contacts/templates/stylesheets/default.css
31
+ - generators/easy_contacts/templates/helpers/emails_helper.rb
32
+ - generators/easy_contacts/templates/helpers/shadowbox_helper.rb
33
+ - generators/easy_contacts/templates/helpers/phones_helper.rb
34
+ - generators/easy_contacts/templates/helpers/web_sites_helper.rb
35
+ - generators/easy_contacts/templates/helpers/instant_messengers_helper.rb
36
+ - generators/easy_contacts/templates/helpers/addresses_helper.rb
37
+ - generators/easy_contacts/templates/helpers/form_helper.rb
38
+ - generators/easy_contacts/templates/migrations/easy_contacts.rb
39
+ - generators/easy_contacts/templates/views/phones/destroy.js.rjs
40
+ - generators/easy_contacts/templates/views/phones/_phones.html.erb
41
+ - generators/easy_contacts/templates/views/phones/_phone.html.erb
42
+ - generators/easy_contacts/templates/views/companies/index.html.erb
43
+ - generators/easy_contacts/templates/views/companies/show.html.erb
44
+ - generators/easy_contacts/templates/views/companies/edit.html.erb
45
+ - generators/easy_contacts/templates/views/companies/new.html.erb
46
+ - generators/easy_contacts/templates/views/companies/index.js.erb
47
+ - generators/easy_contacts/templates/views/companies/_company.html.erb
48
+ - generators/easy_contacts/templates/views/countries/index.js.erb
49
+ - generators/easy_contacts/templates/views/emails/destroy.js.rjs
50
+ - generators/easy_contacts/templates/views/emails/_email.html.erb
51
+ - generators/easy_contacts/templates/views/emails/_emails.html.erb
52
+ - generators/easy_contacts/templates/views/instant_messengers/destroy.js.rjs
53
+ - generators/easy_contacts/templates/views/instant_messengers/_instant_messengers.html.erb
54
+ - generators/easy_contacts/templates/views/instant_messengers/_instant_messenger.html.erb
55
+ - generators/easy_contacts/templates/views/people/index.html.erb
56
+ - generators/easy_contacts/templates/views/people/show.html.erb
57
+ - generators/easy_contacts/templates/views/people/edit.html.erb
58
+ - generators/easy_contacts/templates/views/people/new.html.erb
59
+ - generators/easy_contacts/templates/views/people/_person.html.erb
60
+ - generators/easy_contacts/templates/views/web_sites/_web_site.html.erb
61
+ - generators/easy_contacts/templates/views/web_sites/destroy.js.rjs
62
+ - generators/easy_contacts/templates/views/web_sites/_web_sites.html.erb
63
+ - generators/easy_contacts/templates/views/provinces/index.js.erb
64
+ - generators/easy_contacts/templates/views/contacts/_contact_info.html.erb
65
+ - generators/easy_contacts/templates/views/contacts/index.html.erb
66
+ - generators/easy_contacts/templates/views/contacts/_contact.html.erb
67
+ - generators/easy_contacts/templates/views/cities/index.js.erb
68
+ - generators/easy_contacts/templates/views/addresses/destroy.js.rjs
69
+ - generators/easy_contacts/templates/views/addresses/_address.html.erb
70
+ - generators/easy_contacts/templates/views/addresses/_addresses.html.erb
71
+ - generators/easy_contacts/templates/models/city.rb
72
+ - generators/easy_contacts/templates/models/web_site.rb
73
+ - generators/easy_contacts/templates/models/web_site_type.rb
74
+ - generators/easy_contacts/templates/models/phone.rb
75
+ - generators/easy_contacts/templates/models/country.rb
76
+ - generators/easy_contacts/templates/models/email.rb
77
+ - generators/easy_contacts/templates/models/address.rb
78
+ - generators/easy_contacts/templates/models/company.rb
79
+ - generators/easy_contacts/templates/models/email_type.rb
80
+ - generators/easy_contacts/templates/models/instant_messenger.rb
81
+ - generators/easy_contacts/templates/models/instant_messenger_protocol.rb
82
+ - generators/easy_contacts/templates/models/province.rb
83
+ - generators/easy_contacts/templates/models/instant_messenger_type.rb
84
+ - generators/easy_contacts/templates/models/phone_type.rb
85
+ - generators/easy_contacts/templates/models/address_type.rb
86
+ - generators/easy_contacts/templates/models/person.rb
87
+ - generators/easy_contacts/templates/models/contact.rb
88
+ - generators/easy_contacts/templates/controllers/web_sites_controller.rb
89
+ - generators/easy_contacts/templates/controllers/phones_controller.rb
90
+ - generators/easy_contacts/templates/controllers/people_controller.rb
91
+ - generators/easy_contacts/templates/controllers/emails_controller.rb
92
+ - generators/easy_contacts/templates/controllers/countries_controller.rb
93
+ - generators/easy_contacts/templates/controllers/cities_controller.rb
94
+ - generators/easy_contacts/templates/controllers/contacts_controller.rb
95
+ - generators/easy_contacts/templates/controllers/addresses_controller.rb
96
+ - generators/easy_contacts/templates/controllers/provinces_controller.rb
97
+ - generators/easy_contacts/templates/controllers/instant_messengers_controller.rb
98
+ - generators/easy_contacts/templates/controllers/companies_controller.rb
99
+ - generators/easy_contacts/templates/locales/en.easy_contacts.yml
100
+ - generators/easy_contacts/templates/locales/es-MX.easy_contacts.yml
101
+ - Rakefile
102
+ - easy_contacts.gemspec
103
+ has_rdoc: true
104
+ homepage: http://github.com/innetra/easy_contacts
105
+ post_install_message:
106
+ rdoc_options:
107
+ - --line-numbers
108
+ - --inline-source
109
+ - --title
110
+ - Easy_contacts
111
+ require_paths:
112
+ - lib
113
+ required_ruby_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: "0"
118
+ version:
119
+ required_rubygems_version: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: "1.2"
124
+ version:
125
+ requirements: []
126
+
127
+ rubyforge_project: easy_contacts
128
+ rubygems_version: 1.2.0
129
+ signing_key:
130
+ specification_version: 2
131
+ summary: Easy Contacts for Ruby on Rails 2.2 (i18n)
132
+ test_files: []
133
+