customer_vault 0.0.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +2 -2
- data/app/assets/images/customer_vault/icons/group-128.png +0 -0
- data/app/assets/images/customer_vault/icons/group-16.png +0 -0
- data/app/assets/images/customer_vault/icons/group-20.png +0 -0
- data/app/assets/images/customer_vault/icons/group-24.png +0 -0
- data/app/assets/images/customer_vault/icons/group-256.png +0 -0
- data/app/assets/images/customer_vault/icons/group-32.png +0 -0
- data/app/assets/images/customer_vault/icons/group-48.png +0 -0
- data/app/assets/images/customer_vault/icons/group-512.png +0 -0
- data/app/assets/images/customer_vault/icons/group-64.png +0 -0
- data/app/assets/stylesheets/customer_vault/{application.css → application.css.scss} +54 -5
- data/app/assets/stylesheets/customer_vault/{people.css → individuals.css} +1 -0
- data/app/assets/stylesheets/customer_vault/links.css +3 -0
- data/app/controllers/customer_vault/corporations_controller.rb +5 -7
- data/app/controllers/customer_vault/individuals_controller.rb +61 -0
- data/app/controllers/customer_vault/links_controller.rb +53 -0
- data/app/controllers/customer_vault/people_controller.rb +5 -54
- data/app/helpers/customer_vault/individuals_helper.rb +4 -0
- data/app/models/customer_vault/corporation.rb +5 -1
- data/app/models/customer_vault/individual.rb +15 -0
- data/app/models/customer_vault/link.rb +6 -0
- data/app/models/customer_vault/person.rb +13 -2
- data/app/views/customer_vault/corporations/_form.html.slim +28 -21
- data/app/views/customer_vault/corporations/_list_details.html.slim +29 -0
- data/app/views/customer_vault/corporations/_show_details.html.slim +36 -0
- data/app/views/customer_vault/corporations/edit.html.slim +22 -7
- data/app/views/customer_vault/corporations/new.html.slim +22 -5
- data/app/views/customer_vault/corporations/show.html.slim +41 -16
- data/app/views/customer_vault/{people → individuals}/_form.html.slim +16 -13
- data/app/views/customer_vault/individuals/_list_details.html.slim +39 -0
- data/app/views/customer_vault/individuals/_show_details.html.slim +52 -0
- data/app/views/customer_vault/individuals/edit.html.slim +23 -0
- data/app/views/customer_vault/individuals/new.html.slim +25 -0
- data/app/views/customer_vault/individuals/show.html.slim +42 -0
- data/app/views/customer_vault/layout/_form_error.html.slim +5 -0
- data/app/views/customer_vault/links/_aside.html.slim +4 -0
- data/app/views/customer_vault/links/_title.html.slim +3 -0
- data/app/views/customer_vault/links/edit.html.slim +30 -0
- data/app/views/customer_vault/links/new.html.slim +32 -0
- data/app/views/customer_vault/people/_select.html.slim +1 -0
- data/app/views/customer_vault/people/index.html.slim +29 -58
- data/config/cucumber.yml +8 -0
- data/config/routes.rb +7 -3
- data/db/migrate/20141016151955_change_people_to_individuals.rb +5 -0
- data/db/migrate/20141017085621_add_link.rb +12 -0
- data/lib/customer_vault/engine.rb +1 -0
- data/lib/customer_vault/version.rb +1 -1
- data/lib/tasks/cucumber.rake +65 -0
- data/spec/controllers/customer_vault/corporations_controller_spec.rb +3 -9
- data/spec/controllers/customer_vault/individuals_controller_spec.rb +156 -0
- data/spec/dummy/config/initializers/inflections.rb +1 -1
- data/spec/dummy/config/routes.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20141013153526_create_dorsale_addresses.dorsale.rb +14 -0
- data/spec/dummy/db/migrate/20141014073225_add_polymorphic_fields_to_addresses.dorsale.rb +7 -0
- data/spec/dummy/db/schema.rb +24 -2
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +22059 -0
- data/spec/dummy/log/test.log +35561 -0
- data/spec/dummy/tmp/cache/assets/development/sass/8f425af8af5194cec6da5008411d913407b2b024/application.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/03c4e7aa08d7d8a9e984a1e4eea01566 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/190ff82deecfbbe385c03ee8f8f3d2bf +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/201cb9b3ce55f2f4dea6232ab8220cc3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2de61d7dd16d9e661790bc2973cc609a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/34d14962fde7e4fd6e2671844bcfaa78 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/39c67f2e186cde8355bb4533f16da267 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/47170c4182a8457e8d53507ea76fa76b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/471d75c3acc9522efc857f3be05b8375 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/49ff98533b89b4c09d5d1ecb9d45f207 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4b15ccd40e1d9deecfe3f523edb32a25 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4cd6d71a32c5da916328bfcfa972bd6c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5d0e775359a27eb80c837eee1bdd52cb +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6355dea7c574d08602bd4e7e16a4c0d2 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6847fabb2f2a2ff6011d957adb14a11e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/78ef508640527d1bb135c1077223fb7c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8e1929049a5ed5974d9bbb22b2c1bbc4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/92220e9fcf5e0717b9dc27169bf512e9 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a774486cb0f2787691a7e585e008caea +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/aa60fba48cd1c25f138255570918b3db +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ac788eb47a519e5f2837cf9504d74f53 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ac8cf41eb80a554f4f15e80fa6e1ea58 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/df9e45a4bc905f29f8544c37dc9e9a18 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e5782a71fc01b88e6ac0c1c963bf7e3e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f516186931f15a3e5c86af1b1632d256 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/faca8abcf70e21e966cebb74604b729f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8f425af8af5194cec6da5008411d913407b2b024/application.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/03c4e7aa08d7d8a9e984a1e4eea01566 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0e2a9601926844c961e7e97d32e775be +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/183bdc6b3ba504dc16e7b94a0f38fe06 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/190ff82deecfbbe385c03ee8f8f3d2bf +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1dc5cb7209fcdb172bfcde9c841c19e3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/201cb9b3ce55f2f4dea6232ab8220cc3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2b9d45522b3d1f3105e1c33e325dc6de +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2df425d43fef5663aadfc1bcc3087066 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2e7625733abd8050be92fe0ca1487fad +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/31876fc299b61887fae3e657773d7b15 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/338e8df8f4119a2a48b920613a8026a9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/34d14962fde7e4fd6e2671844bcfaa78 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/36adb34aba0d7825a4c9a4cf09c33572 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/39c67f2e186cde8355bb4533f16da267 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/40dbaa1db791d7be2279ddd67d33a1c4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/47170c4182a8457e8d53507ea76fa76b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/471d75c3acc9522efc857f3be05b8375 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/49ff98533b89b4c09d5d1ecb9d45f207 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4b15ccd40e1d9deecfe3f523edb32a25 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4cd6d71a32c5da916328bfcfa972bd6c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4d0235c7b6e465a89ad270537681be7f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/52f82b29641b7e97fabca983410c944d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5b95ef84d5ea3822d0364f3a6f5fa9ff +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5bc4ad6e6b955197190847aeff8df8bd +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5d0e775359a27eb80c837eee1bdd52cb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6355dea7c574d08602bd4e7e16a4c0d2 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/67a7734fae2f02d979ee498add75d3eb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6847fabb2f2a2ff6011d957adb14a11e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/78ef508640527d1bb135c1077223fb7c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/86a049860d05103d78ab689003d6ccb3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8e1929049a5ed5974d9bbb22b2c1bbc4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/92220e9fcf5e0717b9dc27169bf512e9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a5c73696137ab9dbdda376c8d7ffa3b9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a8e30d24c0bb5789981c4751cd2cdd76 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ac788eb47a519e5f2837cf9504d74f53 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ac8cf41eb80a554f4f15e80fa6e1ea58 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b10f86698e41bfdaafc9fb6bbf5bfbd9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c08aad292c2ca4aee63f927a45ba90ef +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c9db74506cdab0aec9f855c956f47726 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d04aeffd159aa29e71a9770dc8630259 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/db5f1ec4fd27d454a95b2824fff064d1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/df9e45a4bc905f29f8544c37dc9e9a18 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e5782a71fc01b88e6ac0c1c963bf7e3e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f516186931f15a3e5c86af1b1632d256 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/faca8abcf70e21e966cebb74604b729f +0 -0
- data/spec/dummy/tmp/capybara/capybara-201410171416122395182759.html +13 -0
- data/spec/factories/customer_vault_corporations.rb +4 -4
- data/spec/factories/{customer_vault_people.rb → customer_vault_individuals.rb} +1 -1
- data/spec/factories/customer_vault_links.rb +9 -0
- data/spec/helpers/customer_vault/{people_helper_spec.rb → individuals_helper_spec.rb} +3 -3
- data/spec/models/customer_vault/corporation_spec.rb +1 -0
- data/spec/models/customer_vault/individual_spec.rb +15 -0
- data/spec/models/customer_vault/link_spec.rb +13 -0
- data/spec/models/customer_vault/person_spec.rb +28 -6
- data/spec/routing/customer_vault/corporations_routing_spec.rb +22 -4
- data/spec/routing/customer_vault/individual_routing_spec.rb +54 -0
- data/spec/routing/customer_vault/people_routing_spec.rb +1 -26
- data/spec/spec_helper.rb +1 -0
- data/spec/views/customer_vault/individuals/edit.html.slim_spec.rb +47 -0
- data/spec/views/customer_vault/individuals/new.html.slim_spec.rb +47 -0
- data/spec/views/customer_vault/{people → individuals}/show.html.slim_spec.rb +2 -3
- metadata +226 -49
- data/app/assets/images/customer_vault/icons/add_person-128.png +0 -0
- data/app/assets/images/customer_vault/icons/add_person-20.png +0 -0
- data/app/assets/images/customer_vault/icons/add_person-24.png +0 -0
- data/app/assets/images/customer_vault/icons/add_person-256.png +0 -0
- data/app/assets/images/customer_vault/icons/add_person-32.png +0 -0
- data/app/assets/images/customer_vault/icons/add_person-48.png +0 -0
- data/app/assets/images/customer_vault/icons/add_person-512.png +0 -0
- data/app/assets/images/customer_vault/icons/add_person-64.png +0 -0
- data/app/helpers/customer_vault/people_helper.rb +0 -12
- data/app/views/customer_vault/corporations/index.html.slim +0 -27
- data/app/views/customer_vault/people/edit.html.slim +0 -21
- data/app/views/customer_vault/people/new.html.slim +0 -21
- data/app/views/customer_vault/people/show.html.slim +0 -57
- data/spec/controllers/customer_vault/people_controller_spec.rb +0 -163
- data/spec/views/customer_vault/corporations/index.html.slim_spec.rb +0 -29
- data/spec/views/customer_vault/people/edit.html.slim_spec.rb +0 -47
- data/spec/views/customer_vault/people/index.html.slim_spec.rb +0 -43
- data/spec/views/customer_vault/people/new.html.slim_spec.rb +0 -47
- /data/app/assets/images/customer_vault/icons/{people-128.png → individual-128.png} +0 -0
- /data/app/assets/images/customer_vault/icons/{people-16.png → individual-16.png} +0 -0
- /data/app/assets/images/customer_vault/icons/{people-20.png → individual-20.png} +0 -0
- /data/app/assets/images/customer_vault/icons/{people-24.png → individual-24.png} +0 -0
- /data/app/assets/images/customer_vault/icons/{people-256.png → individual-256.png} +0 -0
- /data/app/assets/images/customer_vault/icons/{people-32.png → individual-32.png} +0 -0
- /data/app/assets/images/customer_vault/icons/{people-48.png → individual-48.png} +0 -0
- /data/app/assets/images/customer_vault/icons/{people-512.png → individual-512.png} +0 -0
- /data/app/assets/images/customer_vault/icons/{people-64.png → individual-64.png} +0 -0
- /data/app/assets/javascripts/customer_vault/{people.js → individuals.js} +0 -0
@@ -1,55 +1,58 @@
|
|
1
|
-
= form_for [customer_vault, @
|
2
|
-
|
1
|
+
= form_for [customer_vault, @individual], html: { class: "form-horizontal"} do |f|
|
2
|
+
.form-group
|
3
3
|
=f.label "First name" , class:"control-label col-lg-2"
|
4
4
|
div class="col-lg-10"
|
5
5
|
=f.text_field :first_name, class:"form-control"
|
6
6
|
|
7
|
-
|
7
|
+
.form-group
|
8
8
|
=f.label "Last name", class:"control-label col-lg-2"
|
9
9
|
div class="col-lg-10"
|
10
10
|
=f.text_field :last_name, class:"form-control"
|
11
11
|
|
12
|
-
|
12
|
+
.form-group
|
13
13
|
=f.label "Email", class:"control-label col-lg-2"
|
14
14
|
div class="col-lg-10"
|
15
15
|
=f.text_field :email, class:"form-control"
|
16
16
|
|
17
|
-
|
17
|
+
.form-group
|
18
18
|
=f.label "Title", class:"control-label col-lg-2"
|
19
19
|
div class="col-lg-10"
|
20
20
|
=f.text_field :title, class:"form-control"
|
21
21
|
|
22
|
-
|
22
|
+
.form-group
|
23
23
|
=f.label "Twitter",class:"control-label col-lg-2"
|
24
24
|
div class="col-lg-10"
|
25
25
|
=f.text_field :twitter, class:"form-control"
|
26
26
|
|
27
|
-
|
27
|
+
.form-group
|
28
28
|
=f.label "Context", class:"control-label col-lg-2"
|
29
29
|
div class="col-lg-10"
|
30
30
|
=f.text_area :context, class:"form-control"
|
31
31
|
|
32
|
-
|
32
|
+
.form-group
|
33
33
|
=f.label "Phone", class:"control-label col-lg-2"
|
34
34
|
div class="col-lg-10"
|
35
35
|
=f.text_field :phone, class:"form-control"
|
36
36
|
|
37
|
-
|
37
|
+
.form-group
|
38
38
|
=f.label "Fax", class:"control-label col-lg-2"
|
39
39
|
div class="col-lg-10"
|
40
40
|
=f.text_field :fax, class:"form-control"
|
41
41
|
|
42
|
-
|
42
|
+
.form-group
|
43
43
|
=f.label "Mobile", class:"control-label col-lg-2"
|
44
44
|
div class="col-lg-10"
|
45
45
|
=f.text_field :mobile, class:"form-control"
|
46
46
|
|
47
|
-
|
47
|
+
.form-group
|
48
48
|
=f.label "Web Site", class:"control-label col-lg-2"
|
49
49
|
div class="col-lg-10"
|
50
50
|
=f.text_field :www, class:"form-control"
|
51
|
-
|
51
|
+
|
52
|
+
= f.fields_for :address do |address_form|
|
53
|
+
= render partial: 'dorsale/addresses/nested_form', :locals => {:f => address_form}
|
54
|
+
|
52
55
|
.actions
|
53
56
|
div class= "cdiv"
|
54
|
-
= f.submit 'Valider', :class=>"btn btn-success btn-sm"
|
57
|
+
= f.submit 'Valider', :class=>"btn btn-success btn-sm", id: 'submit-individual'
|
55
58
|
= link_to 'Retour', customer_vault.people_path, :class=>"btn btn-primary btn-sm"
|
@@ -0,0 +1,39 @@
|
|
1
|
+
.row.individual
|
2
|
+
.col-lg-1
|
3
|
+
=image_tag ('customer_vault/icons/individual-48.png')
|
4
|
+
=link_to 'Details', [customer_vault, i] , :class=>"btn btn-success btn-xs"
|
5
|
+
.col-lg-11
|
6
|
+
.row.top-buffer
|
7
|
+
.col-lg-12 id='name'
|
8
|
+
span.bold.first_name #{i.first_name}
|
9
|
+
span.bold.last_name #{i.last_name}
|
10
|
+
- if defined? link
|
11
|
+
= render partial: 'customer_vault/links/title', locals: {link: link, person: person}
|
12
|
+
.row
|
13
|
+
.col-lg-4 id='email'
|
14
|
+
- if i.email?
|
15
|
+
span class= 'bold text-muted' Email:
|
16
|
+
span class = 'text-muted bold' #{i.email}
|
17
|
+
- else
|
18
|
+
span class = 'bold invisible' CACHEE
|
19
|
+
.col-lg-4 id='phone'
|
20
|
+
- if i.phone?
|
21
|
+
span class= 'bold text-muted' Phone:
|
22
|
+
span #{i.phone}
|
23
|
+
- else
|
24
|
+
span class= 'bold invisible' CACHEE
|
25
|
+
.col-lg-4 id='mobile'
|
26
|
+
- if i.mobile?
|
27
|
+
span class= 'bold text-muted' Mobile:
|
28
|
+
span #{i.mobile}
|
29
|
+
- else
|
30
|
+
span class= 'bold invisible' CACHEE
|
31
|
+
.row
|
32
|
+
.col-lg-12 id='www'
|
33
|
+
- if i.www?
|
34
|
+
- if i.www.include?("http://")
|
35
|
+
=link_to i.www , i.www
|
36
|
+
- else
|
37
|
+
=link_to "http://#{i.www}" , "http://#{i.www}"
|
38
|
+
- else
|
39
|
+
span class= 'bold invisible' CACHEE
|
@@ -0,0 +1,52 @@
|
|
1
|
+
aside.col-lg-12.individual
|
2
|
+
.row
|
3
|
+
header
|
4
|
+
.col-lg-12.cdiv
|
5
|
+
=image_tag ('customer_vault/icons/individual-64.png')
|
6
|
+
.col-lg-12.cdiv
|
7
|
+
span class= "text-muted titre bold" #{individual.first_name} #{individual.last_name}
|
8
|
+
.row
|
9
|
+
.col-lg-12.top-buffer
|
10
|
+
- if individual.email?
|
11
|
+
.col-lg-12.cdiv
|
12
|
+
.bold.text-muted.cdiv Email
|
13
|
+
span #{individual.email}
|
14
|
+
.col-lg-12.cdiv
|
15
|
+
- if individual.twitter?
|
16
|
+
.bold.text-muted.cdiv Twitter
|
17
|
+
span #{individual.twitter}
|
18
|
+
.col-lg-12.cdiv
|
19
|
+
- if individual.phone?
|
20
|
+
.bold.text-muted.cdiv Phone
|
21
|
+
span #{individual.phone}
|
22
|
+
.col-lg-12.cdiv
|
23
|
+
- if individual.mobile?
|
24
|
+
.bold.text-muted.cdiv Mobile
|
25
|
+
span #{individual.mobile}
|
26
|
+
.col-lg-12.cdiv
|
27
|
+
- if individual.fax?
|
28
|
+
.bold.text-muted.cdiv Fax
|
29
|
+
span #{individual.fax}
|
30
|
+
.col-lg-12.cdiv
|
31
|
+
- if individual.context?
|
32
|
+
.bold.text-muted.cdiv Context
|
33
|
+
span #{individual.context}
|
34
|
+
.col-lg-12.cdiv
|
35
|
+
- if individual.www?
|
36
|
+
.bold.text-muted.cdiv Internet Site
|
37
|
+
- if individual.www.include?("http://")
|
38
|
+
=link_to individual.www , individual.www
|
39
|
+
- else
|
40
|
+
=link_to "http://#{individual.www}" , "http://#{individual.www}"
|
41
|
+
.col-lg-12.cdiv
|
42
|
+
- if individual.address && !individual.address.one_line.blank?
|
43
|
+
.bold.text-muted.cdiv Address
|
44
|
+
span.address #{individual.address.one_line}
|
45
|
+
|
46
|
+
.row.mega-top-buffer.bottom-buffer
|
47
|
+
.col-lg-4.cdiv
|
48
|
+
=link_to 'Editer', customer_vault.edit_individual_path(individual), :class=>"btn btn-success btn-sm"
|
49
|
+
.col-lg-4.cdiv
|
50
|
+
=link_to 'Effacer', [customer_vault, individual], data: {:confirm => 'Are you sure?'}, :method => :delete, :class=>"btn btn-danger btn-sm"
|
51
|
+
.col-lg-4.cdiv
|
52
|
+
= link_to 'Retour', customer_vault.people_path, :class=>"btn btn-primary btn-sm"
|
@@ -0,0 +1,23 @@
|
|
1
|
+
.container-fluid
|
2
|
+
.div.col-lg-12
|
3
|
+
ol class= "breadcrumb"
|
4
|
+
li
|
5
|
+
= link_to 'Home', '/'
|
6
|
+
li
|
7
|
+
= link_to 'People', customer_vault.people_path
|
8
|
+
li.active Edit #{@individual.first_name} #{@individual.last_name}
|
9
|
+
.col-lg-12
|
10
|
+
.col-lg-4
|
11
|
+
.aside.col-lg-12
|
12
|
+
.row
|
13
|
+
.col-lg-12.cdiv
|
14
|
+
=image_tag ('customer_vault/icons/individual-64.png')
|
15
|
+
.row
|
16
|
+
.col-lg-12.cdiv
|
17
|
+
h3 class = "text-muted" #{@individual.first_name} #{@individual.last_name}
|
18
|
+
- if @individual.errors.any?
|
19
|
+
= render partial: 'customer_vault/layout/form_error', :locals => {:p => @individual}
|
20
|
+
.col-lg-8
|
21
|
+
.col-lg-12.cadre
|
22
|
+
== render 'form'
|
23
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
.container-fluid
|
2
|
+
.col-lg-12
|
3
|
+
ol.breadcrumb
|
4
|
+
li
|
5
|
+
= link_to 'Home', '/'
|
6
|
+
li
|
7
|
+
= link_to 'People', customer_vault.people_path
|
8
|
+
li.active New Individual
|
9
|
+
|
10
|
+
.col-lg-12
|
11
|
+
.col-lg-4
|
12
|
+
aside.col-lg-12.cadre
|
13
|
+
.row
|
14
|
+
.col-lg-12.cdiv
|
15
|
+
=image_tag ('customer_vault/icons/individual-64.png')
|
16
|
+
.row
|
17
|
+
.col-lg-12.cdiv
|
18
|
+
h3.text-muted New Individual
|
19
|
+
|
20
|
+
- if @individual.errors.any?
|
21
|
+
= render partial: 'customer_vault/layout/form_error', :locals => {:p => @individual}
|
22
|
+
.col-lg-8
|
23
|
+
.col-lg-12.cadre
|
24
|
+
== render 'form'
|
25
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
.container-fluid
|
2
|
+
.col-lg-12
|
3
|
+
ol class="breadcrumb"
|
4
|
+
li
|
5
|
+
= link_to 'Home', '/'
|
6
|
+
li
|
7
|
+
= link_to 'People', customer_vault.people_path
|
8
|
+
li.active #{@individual.first_name} #{@individual.last_name}
|
9
|
+
.col-lg-12
|
10
|
+
.col-lg-4
|
11
|
+
= render partial: 'show_details', locals: {individual: @individual}
|
12
|
+
.col-lg-8
|
13
|
+
.col-lg-12
|
14
|
+
ul.nav.nav-tabs role="tablist"
|
15
|
+
li.active
|
16
|
+
a data-toggle="tab" href="#linkable" role="tab" Links
|
17
|
+
li
|
18
|
+
a data-toggle="tab" href="#history" role="tab" History
|
19
|
+
li
|
20
|
+
a data-toggle="tab" href="#todos" role="tab" Todos
|
21
|
+
|
22
|
+
.tab-content
|
23
|
+
#linkable.tab-pane.active
|
24
|
+
ul.linkable
|
25
|
+
- @individual.links.each do |link|
|
26
|
+
li.person
|
27
|
+
- target = link[:person]
|
28
|
+
- if target.instance_of? CustomerVault::Individual
|
29
|
+
= render partial: 'customer_vault/individuals/list_details', :locals => {:i => target, person: @individual, link: link[:origin]}
|
30
|
+
- if target.instance_of? CustomerVault::Corporation
|
31
|
+
= render partial: 'customer_vault/corporations/list_details', :locals => {:c => target, person: @individual, link: link[:origin]}
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
= link_to 'New link', customer_vault.new_individual_link_path(@individual.id), :class=>"btn btn-success", id: 'new-link'
|
36
|
+
#history.tab-pane
|
37
|
+
p
|
38
|
+
' History is soon to come
|
39
|
+
#todos.tab-pane
|
40
|
+
p
|
41
|
+
' Todos are soon to come
|
42
|
+
|
@@ -0,0 +1,4 @@
|
|
1
|
+
- if @person.instance_of? CustomerVault::Individual
|
2
|
+
= render partial: 'customer_vault/individuals/show_details', :locals => {:individual => @person}
|
3
|
+
- if @person.instance_of? CustomerVault::Corporation
|
4
|
+
= render partial: 'customer_vault/corporations/show_details', :locals => {:corporation => @person}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
.container-fluid
|
2
|
+
.div class = "col-lg-12"
|
3
|
+
ol class= "breadcrumb"
|
4
|
+
li
|
5
|
+
= link_to 'Home', '/'
|
6
|
+
li
|
7
|
+
= link_to 'People', customer_vault.people_path
|
8
|
+
li
|
9
|
+
= link_to "#{@person.name}", [customer_vault, @person]
|
10
|
+
li
|
11
|
+
= @link.title
|
12
|
+
li.active Edit
|
13
|
+
|
14
|
+
.col-lg-12
|
15
|
+
aside.col-lg-4
|
16
|
+
= render partial: 'aside'
|
17
|
+
|
18
|
+
.col-lg-8
|
19
|
+
.col-lg-12
|
20
|
+
h1= (@link.alice_id == @person.id) && (@link.alice_type == @person.class.to_s)? @link.bob.name : @link.alice.name
|
21
|
+
= form_for [customer_vault, @person, @link], html: { class: "form-horizontal"} do |f|
|
22
|
+
.form-group
|
23
|
+
=f.label "Title" , class:"control-label col-lg-2"
|
24
|
+
.col-lg-10
|
25
|
+
=f.text_field :title, class:"form-control"
|
26
|
+
|
27
|
+
.actions
|
28
|
+
div class= "cdiv"
|
29
|
+
= f.submit 'Save', :class=>"btn btn-success btn-sm", id: 'submit-link'
|
30
|
+
= link_to 'Back', [customer_vault, @person], :class=>"btn btn-primary btn-sm"
|
@@ -0,0 +1,32 @@
|
|
1
|
+
.container-fluid
|
2
|
+
.div class = "col-lg-12"
|
3
|
+
ol class= "breadcrumb"
|
4
|
+
li
|
5
|
+
= link_to 'Home', '/'
|
6
|
+
li
|
7
|
+
= link_to 'People', customer_vault.people_path
|
8
|
+
li
|
9
|
+
= link_to "#{@person.name}", [customer_vault, @person]
|
10
|
+
li.active New Link
|
11
|
+
|
12
|
+
.col-lg-12
|
13
|
+
aside.col-lg-4
|
14
|
+
= render partial: 'aside'
|
15
|
+
|
16
|
+
.col-lg-8
|
17
|
+
.col-lg-12
|
18
|
+
= form_for [customer_vault, @person, @link], html: { class: "form-horizontal"} do |f|
|
19
|
+
.form-group
|
20
|
+
=f.label "Target", class:"control-label col-lg-2"
|
21
|
+
.col-lg-10
|
22
|
+
= render partial: 'customer_vault/people/select', :locals => {:f => f, object: :link, field: :bob}
|
23
|
+
|
24
|
+
.form-group
|
25
|
+
=f.label "Title" , class:"control-label col-lg-2"
|
26
|
+
.col-lg-10
|
27
|
+
=f.text_field :title, class:"form-control"
|
28
|
+
|
29
|
+
.actions
|
30
|
+
div class= "cdiv"
|
31
|
+
= f.submit 'Save', :class=>"btn btn-success btn-sm", id: 'submit-link'
|
32
|
+
= link_to 'Back', [customer_vault, @person], :class=>"btn btn-primary btn-sm"
|
@@ -0,0 +1 @@
|
|
1
|
+
= select(object, field, CustomerVault::Person.list.collect {|p| [ p.name, "#{p.class}-#{p.id}" ]}, {include_blank: 'None'})
|
@@ -1,65 +1,36 @@
|
|
1
1
|
.container-fluid
|
2
|
-
.
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
.row
|
3
|
+
.col-lg-12
|
4
|
+
ol class="breadcrumb"
|
5
|
+
li
|
6
|
+
= link_to 'Home', '/'
|
7
|
+
li.active People
|
8
|
+
.row
|
8
9
|
.col-lg-4
|
9
|
-
aside
|
10
|
-
.row
|
10
|
+
aside.col-lg-12
|
11
|
+
.row.action
|
11
12
|
.col-lg-12.cdiv
|
12
|
-
= image_tag ('customer_vault/icons/
|
13
|
-
.row
|
13
|
+
= image_tag ('customer_vault/icons/individual-64.png')
|
14
14
|
.col-lg-12.cdiv
|
15
|
-
= link_to 'New
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
= link_to 'New Individual', customer_vault.new_individual_path, :class=>"btn btn-warning btn-lg"
|
16
|
+
aside.col-lg-12
|
17
|
+
.row.action
|
18
|
+
.col-lg-12.cdiv
|
19
|
+
= image_tag ('customer_vault/icons/group-64.png')
|
20
|
+
.col-lg-12.cdiv
|
21
|
+
= link_to 'New Corporation', customer_vault.new_corporation_path, :class=>"btn btn-warning btn-lg"
|
22
22
|
.col-lg-8
|
23
23
|
- if @people.empty?
|
24
|
-
h1 class="text-muted center" There isn't any
|
24
|
+
h1 class="text-muted center" There isn't any people
|
25
25
|
- else
|
26
|
-
|
27
|
-
|
28
|
-
.
|
29
|
-
.
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
span class = 'bold' #{person.last_name}
|
38
|
-
.row
|
39
|
-
.col-lg-4 id='email'
|
40
|
-
- if person.email?
|
41
|
-
span class= 'bold text-muted' Email:
|
42
|
-
span class = 'text-muted bold' #{person.email}
|
43
|
-
- else
|
44
|
-
span class = 'bold invisible' CACHEE
|
45
|
-
.col-lg-4 id='phone'
|
46
|
-
- if person.phone?
|
47
|
-
span class= 'bold text-muted' Phone:
|
48
|
-
span #{person.phone}
|
49
|
-
- else
|
50
|
-
span class= 'bold invisible' CACHEE
|
51
|
-
.col-lg-4 id='mobile'
|
52
|
-
- if person.mobile?
|
53
|
-
span class= 'bold text-muted' Mobile:
|
54
|
-
span #{person.mobile}
|
55
|
-
- else
|
56
|
-
span class= 'bold invisible' CACHEE
|
57
|
-
.row
|
58
|
-
.col-lg-12 id='www'
|
59
|
-
- if person.www?
|
60
|
-
=link_to person.www , extlink(person.www)
|
61
|
-
- else
|
62
|
-
span class= 'bold invisible' CACHEE
|
63
|
-
|
64
|
-
|
65
|
-
|
26
|
+
ul.people
|
27
|
+
- @people.each do |person|
|
28
|
+
li.person
|
29
|
+
- if person.instance_of? CustomerVault::Individual
|
30
|
+
= render partial: 'customer_vault/individuals/list_details', :locals => {:i => person}
|
31
|
+
- if person.instance_of? CustomerVault::Corporation
|
32
|
+
= render partial: 'customer_vault/corporations/list_details', :locals => {:c => person}
|
33
|
+
.row
|
34
|
+
.cdiv
|
35
|
+
= paginate @people
|
36
|
+
|
data/config/cucumber.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
<%
|
2
|
+
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
|
3
|
+
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
|
4
|
+
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
|
5
|
+
%>
|
6
|
+
default: <%= std_opts %> features
|
7
|
+
wip: --tags @wip:3 --wip features
|
8
|
+
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
|
data/config/routes.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
CustomerVault::Engine.routes.draw do
|
2
|
-
resources :corporations
|
3
|
-
|
4
|
-
|
2
|
+
resources :corporations, :except => [:index] do
|
3
|
+
resources :links, :except => [:index]
|
4
|
+
end
|
5
|
+
resources :individuals, :except => [:index] do
|
6
|
+
resources :links, :except => [:index]
|
7
|
+
end
|
8
|
+
resources :people, :only => [:index]
|
5
9
|
|
6
10
|
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
|
2
|
+
# It is recommended to regenerate this file in the future when you upgrade to a
|
3
|
+
# newer version of cucumber-rails. Consider adding your own code to a new file
|
4
|
+
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
|
5
|
+
# files.
|
6
|
+
|
7
|
+
|
8
|
+
unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:* tasks
|
9
|
+
|
10
|
+
vendored_cucumber_bin = Dir["#{Rails.root}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
|
11
|
+
$LOAD_PATH.unshift(File.dirname(vendored_cucumber_bin) + '/../lib') unless vendored_cucumber_bin.nil?
|
12
|
+
|
13
|
+
begin
|
14
|
+
require 'cucumber/rake/task'
|
15
|
+
|
16
|
+
namespace :cucumber do
|
17
|
+
Cucumber::Rake::Task.new({:ok => 'test:prepare'}, 'Run features that should pass') do |t|
|
18
|
+
t.binary = vendored_cucumber_bin # If nil, the gem's binary is used.
|
19
|
+
t.fork = true # You may get faster startup if you set this to false
|
20
|
+
t.profile = 'default'
|
21
|
+
end
|
22
|
+
|
23
|
+
Cucumber::Rake::Task.new({:wip => 'test:prepare'}, 'Run features that are being worked on') do |t|
|
24
|
+
t.binary = vendored_cucumber_bin
|
25
|
+
t.fork = true # You may get faster startup if you set this to false
|
26
|
+
t.profile = 'wip'
|
27
|
+
end
|
28
|
+
|
29
|
+
Cucumber::Rake::Task.new({:rerun => 'test:prepare'}, 'Record failing features and run only them if any exist') do |t|
|
30
|
+
t.binary = vendored_cucumber_bin
|
31
|
+
t.fork = true # You may get faster startup if you set this to false
|
32
|
+
t.profile = 'rerun'
|
33
|
+
end
|
34
|
+
|
35
|
+
desc 'Run all features'
|
36
|
+
task :all => [:ok, :wip]
|
37
|
+
|
38
|
+
task :statsetup do
|
39
|
+
require 'rails/code_statistics'
|
40
|
+
::STATS_DIRECTORIES << %w(Cucumber\ features features) if File.exist?('features')
|
41
|
+
::CodeStatistics::TEST_TYPES << "Cucumber features" if File.exist?('features')
|
42
|
+
end
|
43
|
+
end
|
44
|
+
desc 'Alias for cucumber:ok'
|
45
|
+
task :cucumber => 'cucumber:ok'
|
46
|
+
|
47
|
+
task :default => :cucumber
|
48
|
+
|
49
|
+
task :features => :cucumber do
|
50
|
+
STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***"
|
51
|
+
end
|
52
|
+
|
53
|
+
# In case we don't have the generic Rails test:prepare hook, append a no-op task that we can depend upon.
|
54
|
+
task 'test:prepare' do
|
55
|
+
end
|
56
|
+
|
57
|
+
task :stats => 'cucumber:statsetup'
|
58
|
+
rescue LoadError
|
59
|
+
desc 'cucumber rake task not available (cucumber not installed)'
|
60
|
+
task :cucumber do
|
61
|
+
abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
@@ -39,14 +39,6 @@ module CustomerVault
|
|
39
39
|
# CorporationsController. Be sure to keep this updated too.
|
40
40
|
let(:valid_session) { {} }
|
41
41
|
|
42
|
-
describe "GET index" do
|
43
|
-
it "assigns all corporations as @corporations" do
|
44
|
-
corporation = Corporation.create! valid_attributes
|
45
|
-
get :index, {}, valid_session
|
46
|
-
expect(assigns(:corporations)).to eq([corporation])
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
42
|
describe "GET show" do
|
51
43
|
it "assigns the requested corporation as @corporation" do
|
52
44
|
corporation = Corporation.create! valid_attributes
|
@@ -59,6 +51,7 @@ module CustomerVault
|
|
59
51
|
it "assigns a new corporation as @corporation" do
|
60
52
|
get :new, {}, valid_session
|
61
53
|
expect(assigns(:corporation)).to be_a_new(Corporation)
|
54
|
+
expect(assigns(:corporation).address).to be_a_new(Dorsale::Address)
|
62
55
|
end
|
63
56
|
end
|
64
57
|
|
@@ -67,6 +60,7 @@ module CustomerVault
|
|
67
60
|
corporation = Corporation.create! valid_attributes
|
68
61
|
get :edit, {:id => corporation.to_param}, valid_session
|
69
62
|
expect(assigns(:corporation)).to eq(corporation)
|
63
|
+
expect(assigns(:corporation).address).to be_a_new(Dorsale::Address)
|
70
64
|
end
|
71
65
|
end
|
72
66
|
|
@@ -155,7 +149,7 @@ module CustomerVault
|
|
155
149
|
it "redirects to the corporations list" do
|
156
150
|
corporation = Corporation.create! valid_attributes
|
157
151
|
delete :destroy, {:id => corporation.to_param}, valid_session
|
158
|
-
expect(response).to redirect_to(
|
152
|
+
expect(response).to redirect_to(people_url)
|
159
153
|
end
|
160
154
|
end
|
161
155
|
|