has_vcards 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/phone_numbers_controller.rb +14 -0
- data/app/views/phone_numbers/_form.html.haml +5 -0
- data/app/views/phone_numbers/_list.html.haml +9 -0
- data/app/views/phone_numbers/_nested_form.html.haml +3 -0
- data/app/views/phone_numbers/_phone_number.html.haml +6 -0
- data/config/locales/has_vcards.de.yml +5 -0
- data/config/routes.rb +10 -0
- data/lib/has_vcards/version.rb +1 -1
- metadata +10 -4
@@ -0,0 +1,14 @@
|
|
1
|
+
class PhoneNumbersController < ApplicationController
|
2
|
+
# User inherited resources logic
|
3
|
+
inherit_resources
|
4
|
+
respond_to :html, :js
|
5
|
+
|
6
|
+
# Relations
|
7
|
+
optional_belongs_to :vcard
|
8
|
+
|
9
|
+
# Optionally support in place editing
|
10
|
+
if respond_to? :in_place_edit_for
|
11
|
+
in_place_edit_for :phone_number, :phone_number_type
|
12
|
+
in_place_edit_for :phone_number, :number
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,5 @@
|
|
1
|
+
#phone_number_form
|
2
|
+
= form_for [@vcard, @phone_number], :remote => true do |phone_number|
|
3
|
+
= phone_number.select :phone_number_type, ['Tel. privat', 'Tel. geschäft', 'Handy', 'Fax', 'E-Mail']
|
4
|
+
= phone_number.text_field :number, :size => 12, :autocomplete => 'off'
|
5
|
+
= phone_number.submit "Speichern"
|
@@ -0,0 +1,6 @@
|
|
1
|
+
%tr[phone_number]
|
2
|
+
%td= phone_number.phone_number_type
|
3
|
+
%td= link_to phone_number.number, phone_number, {'data-href-container' => 'tr'}
|
4
|
+
%td.action-links
|
5
|
+
= list_link_for(:edit, phone_number, :remote => true)
|
6
|
+
= list_link_for(:delete, phone_number, :remote => true)
|
data/config/routes.rb
ADDED
data/lib/has_vcards/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_vcards
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 55
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 10
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.10.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Simon H\xC3\xBCrlimann (CyT)"
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-10-13 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -28,14 +28,20 @@ extensions: []
|
|
28
28
|
extra_rdoc_files:
|
29
29
|
- README.markdown
|
30
30
|
files:
|
31
|
+
- app/controllers/phone_numbers_controller.rb
|
31
32
|
- app/helpers/has_vcards_helper.rb
|
32
33
|
- app/models/address.rb
|
33
34
|
- app/models/phone_number.rb
|
34
35
|
- app/models/vcard.rb
|
36
|
+
- app/views/phone_numbers/_form.html.haml
|
37
|
+
- app/views/phone_numbers/_list.html.haml
|
38
|
+
- app/views/phone_numbers/_nested_form.html.haml
|
39
|
+
- app/views/phone_numbers/_phone_number.html.haml
|
35
40
|
- app/views/vcards/_address.html.haml
|
36
41
|
- app/views/vcards/_form.html.haml
|
37
42
|
- app/views/vcards/_show.html.haml
|
38
43
|
- config/locales/has_vcards.de.yml
|
44
|
+
- config/routes.rb
|
39
45
|
- lib/generators/has_vcards/migration_generator.rb
|
40
46
|
- lib/generators/has_vcards/templates/migration.rb
|
41
47
|
- lib/has_vcards.rb
|