magic_addresses 0.0.25 → 0.0.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ce2eb110f0c01b4eb5343fe36e2ac86232ed426
4
- data.tar.gz: 301f699f7f353b76b4c47ba465707f668654b5f1
3
+ metadata.gz: 96cbace4f22e2c6af48625308bc5d8dcd850433c
4
+ data.tar.gz: cf8f268714b6719c596be611981b1a490300952e
5
5
  SHA512:
6
- metadata.gz: fcaf5f9066b5f40c99c606e27afd73cfb92260eaa2e72e420f7c83c635fa6c2f9fd2fa4c6ae2d5d18a891ef23e2912a130156fbf86b6669131ea3d4eb99b85e5
7
- data.tar.gz: 2b659fca4d16849d8a4ed0fdfb612e4493967429938e3cd01da3239f666d620fdd611aaea3613b7819f858ab503cb6a0040c2fdb07d50002c13ed4b475bc8b5c
6
+ metadata.gz: c54bf3e7adbfd4665a90f10ea4dced8f02053590a872024082dd169125607fdefcd9308bcb85cd75e72a3a0a9923a33ff4cb57a9fe46aded0735e702293de684
7
+ data.tar.gz: f857a6d2b3838f1f17b288ee4d7814314df4ecc4f9d6a88599cdba44bd8f212f3a427cc7cebf68f28bbdef5c1d5b165315941c1c04c740dcf3e2663de7ba72f4
@@ -11,7 +11,7 @@
11
11
  <div class="body flat-top">
12
12
  <ul class="nav_list flat">
13
13
 
14
- <% %w(country state city district subdistrict).each do |l| %>
14
+ <% %w(address country state city district subdistrict).each do |l| %>
15
15
 
16
16
  <li class="<%= 'active current' if current_page?(url_for(controller: "magic_addresses/#{l.tableize}", action: "index")) %>">
17
17
  <%= link_to url_for(controller: "magic_addresses/#{l.tableize}", action: "index") do %>
@@ -0,0 +1,76 @@
1
+ <%= block_to_partial "magic_addresses/admin_tmpl" do %>
2
+
3
+ <%= content_for :headline do %>
4
+ <%= t("activerecord.attributes.magic_addresses_address.other") %>
5
+ <% end %>
6
+
7
+ <table class="table table-striped table-left">
8
+ <thead>
9
+ <tr>
10
+ <th> </th>
11
+ <th><%= t("activerecord.attributes.magic_addresses_city.one") %></th>
12
+
13
+ <th><%= t("helpers.label.magic_addresses_address.postalcode") %></th>
14
+ <th><%= t("helpers.label.magic_addresses_address.street") %></th>
15
+ <th><%= t("helpers.label.magic_addresses_address.street_number") %></th>
16
+
17
+ <th><%= t("activerecord.attributes.magic_addresses_state.one") %></th>
18
+ <th><%= t("activerecord.attributes.magic_addresses_country.one") %></th>
19
+ <th><%= t("activerecord.attributes.magic_addresses_district.one") %></th>
20
+ <th><%= t("activerecord.attributes.magic_addresses_subdistrict.one") %></th>
21
+
22
+ <th>Uses</th>
23
+ </tr>
24
+ </thead>
25
+ <tbody>
26
+ <% @addresses.each do |address| %>
27
+ <tr>
28
+
29
+ <td>
30
+ <%= country_flag( address.country.iso_code, "smasll" ) if address.country %>
31
+ </td>
32
+
33
+ <td>
34
+ <strong><%= address.city ? address.city.name : "- - -" %></strong>
35
+ </td>
36
+
37
+ <td>
38
+ <strong><%= address.postal_code %></strong>
39
+ </td>
40
+
41
+ <td>
42
+ <strong><%= address.street %></strong>
43
+ </td>
44
+
45
+ <td>
46
+ <strong><%= address.street_number %></strong>
47
+ </td>
48
+
49
+
50
+ <td>
51
+ <strong><%= address.state ? address.state.name : "-" %></strong>
52
+ </td>
53
+
54
+ <td>
55
+ <strong><%= address.country ? address.country.name : "-" %></strong>
56
+ </td>
57
+
58
+ <td>
59
+ <small><%= address.district ? address.district.name : "-" %></small>
60
+ </td>
61
+
62
+ <td>
63
+ <small><%= address.subdistrict ? address.subdistrict.name : "-" %></small>
64
+ </td>
65
+
66
+ <td>
67
+ <strong><%= address.addressibles.count %></strong>
68
+ </td>
69
+
70
+ </tr>
71
+ <% end %>
72
+ </tbody>
73
+ </table>
74
+
75
+
76
+ <% end %>
@@ -6,6 +6,7 @@ de:
6
6
  street: "Straße"
7
7
  street_number: "Hausnummer"
8
8
  zipcode: "Postleizahl"
9
+ postalcode: "Postleitzahl"
9
10
  city: "Stadt"
10
11
  state: "Bundesland"
11
12
  country: "Land"
@@ -21,6 +22,7 @@ de:
21
22
  street_number: "Hausnummer"
22
23
  street_additional: "Adresszusatz"
23
24
  zipcode: "Postleitzahl"
25
+ postalcode: "Postleitzahl"
24
26
  street: "Straße"
25
27
  city: "Stadt"
26
28
  district: "Stadtteil"
@@ -5,7 +5,8 @@ en:
5
5
  address: "Address"
6
6
  street: "Street"
7
7
  street_number: "Street number"
8
- zip: "Zip"
8
+ zipcode: "Postalcode"
9
+ postalcode: "Postalcode"
9
10
  city: "Town"
10
11
  state: "State"
11
12
  country: "Country"
@@ -17,7 +18,8 @@ en:
17
18
  street_default: "Street (system)"
18
19
  street_number: "Street number"
19
20
  street_additional: "Street additional"
20
- zipcode: "Zipcode"
21
+ zipcode: "Postalcode"
22
+ postalcode: "Postalcode"
21
23
  magic_addresses_city:
22
24
  name: "City-Name"
23
25
  default_name: "City (system)"
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+ class MagicAddresses::AddressesController < MagicAddresses::BaseController
3
+
4
+ def index
5
+ @addresses = ::MagicAddresses::Address.includes( :translations, :magic_country, :magic_state, :magic_city, :magic_district, :magic_subdistrict ).order(created_at: :desc)
6
+ end
7
+
8
+ end
@@ -44,6 +44,7 @@ module MagicAddresses
44
44
  route <<-ROUTE
45
45
 
46
46
  scope :mgca, module: :magic_addresses do
47
+ resources :addresses, only: :index
47
48
  resources :countries, only: :index
48
49
  resources :states, only: :index
49
50
  resources :cities, only: :index
@@ -1,3 +1,3 @@
1
1
  module MagicAddresses
2
- VERSION = "0.0.25"
2
+ VERSION = "0.0.26"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magic_addresses
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.25
4
+ version: 0.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Torsten Wetzel
@@ -124,6 +124,7 @@ files:
124
124
  - app/views/magic_addresses/addresses/_address_fields.html.erb
125
125
  - app/views/magic_addresses/addresses/_addresses_fields.html.erb
126
126
  - app/views/magic_addresses/addresses/fields/_address.html.erb
127
+ - app/views/magic_addresses/addresses/index.html.erb
127
128
  - app/views/magic_addresses/cities/index.html.erb
128
129
  - app/views/magic_addresses/countries/index.html.erb
129
130
  - app/views/magic_addresses/districts/index.html.erb
@@ -131,6 +132,7 @@ files:
131
132
  - app/views/magic_addresses/subdistricts/index.html.erb
132
133
  - config/locales/mgca.de.yml
133
134
  - config/locales/mgca.en.yml
135
+ - lib/app/controllers/magic_addresses/addresses_controller.rb
134
136
  - lib/app/controllers/magic_addresses/base_controller.rb
135
137
  - lib/app/controllers/magic_addresses/cities_controller.rb
136
138
  - lib/app/controllers/magic_addresses/countries_controller.rb