rails_profile 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +20 -0
  3. data/README.md +20 -0
  4. data/Rakefile +32 -0
  5. data/app/controllers/profiled/admin/address_organs_controller.rb +27 -0
  6. data/app/controllers/profiled/admin/addresses_controller.rb +48 -0
  7. data/app/controllers/profiled/admin/base_controller.rb +4 -0
  8. data/app/controllers/profiled/admin/profiles_controller.rb +42 -0
  9. data/app/controllers/profiled/areas_controller.rb +42 -0
  10. data/app/controllers/profiled/base_controller.rb +4 -0
  11. data/app/controllers/profiled/me/base_controller.rb +9 -0
  12. data/app/controllers/profiled/me/profiles_controller.rb +43 -0
  13. data/app/controllers/profiled/my/address_users_controller.rb +27 -0
  14. data/app/controllers/profiled/my/addresses_controller.rb +102 -0
  15. data/app/controllers/profiled/my/base_controller.rb +4 -0
  16. data/app/controllers/profiled/my/profiles_controller.rb +67 -0
  17. data/app/controllers/profiled/panel/areas_controller.rb +27 -0
  18. data/app/controllers/profiled/panel/base_controller.rb +4 -0
  19. data/app/models/concerns/qq_map_helper.rb +80 -0
  20. data/app/models/profiled/address.rb +8 -0
  21. data/app/models/profiled/address_organ.rb +5 -0
  22. data/app/models/profiled/address_user.rb +5 -0
  23. data/app/models/profiled/application_record.rb +5 -0
  24. data/app/models/profiled/area.rb +6 -0
  25. data/app/models/profiled/ext/organ.rb +11 -0
  26. data/app/models/profiled/ext/user.rb +17 -0
  27. data/app/models/profiled/model/account.rb +17 -0
  28. data/app/models/profiled/model/address.rb +33 -0
  29. data/app/models/profiled/model/address_organ.rb +23 -0
  30. data/app/models/profiled/model/address_user.rb +29 -0
  31. data/app/models/profiled/model/area.rb +120 -0
  32. data/app/models/profiled/model/profile.rb +43 -0
  33. data/app/models/profiled/profile.rb +5 -0
  34. data/app/models/profiled.rb +11 -0
  35. data/app/views/admin/_profile_nav.html.erb +10 -0
  36. data/app/views/me/_profile_nav.html.erb +4 -0
  37. data/app/views/my/_profile_nav.html.erb +5 -0
  38. data/app/views/panel/_profile_nav.html.erb +10 -0
  39. data/app/views/profiled/admin/base/_nav.html.erb +4 -0
  40. data/app/views/profiled/admin/profiles/_edit_form.html.erb +5 -0
  41. data/app/views/profiled/admin/profiles/_filter_form.html.erb +9 -0
  42. data/app/views/profiled/admin/profiles/_form.html.erb +6 -0
  43. data/app/views/profiled/admin/profiles/_index_tbody.html.erb +6 -0
  44. data/app/views/profiled/admin/profiles/_index_thead.html.erb +7 -0
  45. data/app/views/profiled/admin/profiles/_new_form.html.erb +5 -0
  46. data/app/views/profiled/admin/profiles/_profile.json.jbuilder +2 -0
  47. data/app/views/profiled/admin/profiles/_show_table.html.erb +24 -0
  48. data/app/views/profiled/admin/profiles/index.html.erb +5 -0
  49. data/app/views/profiled/admin/profiles/qrcode.json.jbuilder +1 -0
  50. data/app/views/profiled/areas/_index.html.erb +26 -0
  51. data/app/views/profiled/areas/follow.turbo_stream.erb +11 -0
  52. data/app/views/profiled/areas/index.json.jbuilder +2 -0
  53. data/app/views/profiled/areas/index.turbo_stream+phone.erb +1 -0
  54. data/app/views/profiled/me/profiles/_edit_form.html.erb +4 -0
  55. data/app/views/profiled/me/profiles/_form.html.erb +5 -0
  56. data/app/views/profiled/me/profiles/_profile.json.jbuilder +14 -0
  57. data/app/views/profiled/me/profiles/_show_table.html.erb +20 -0
  58. data/app/views/profiled/me/profiles/show.json.jbuilder +1 -0
  59. data/app/views/profiled/my/address_users/create.turbo_stream.erb +3 -0
  60. data/app/views/profiled/my/addresses/_filter_form.html.erb +9 -0
  61. data/app/views/profiled/my/addresses/_form.html+phone.erb +15 -0
  62. data/app/views/profiled/my/addresses/_form.html.erb +4 -0
  63. data/app/views/profiled/my/addresses/_index/_address.html.erb +20 -0
  64. data/app/views/profiled/my/addresses/_index_tbody.html.erb +4 -0
  65. data/app/views/profiled/my/addresses/_index_thead.html.erb +5 -0
  66. data/app/views/profiled/my/addresses/_list/_address.html.erb +18 -0
  67. data/app/views/profiled/my/addresses/_new_form.html+phone.erb +12 -0
  68. data/app/views/profiled/my/addresses/_new_form.html.erb +4 -0
  69. data/app/views/profiled/my/addresses/_outer_select.html+phone.erb +14 -0
  70. data/app/views/profiled/my/addresses/_outer_select.html.erb +17 -0
  71. data/app/views/profiled/my/addresses/_select.html.erb +10 -0
  72. data/app/views/profiled/my/addresses/_show_table.html+phone.erb +25 -0
  73. data/app/views/profiled/my/addresses/_show_table.html.erb +12 -0
  74. data/app/views/profiled/my/addresses/_wechat_form.html.erb +36 -0
  75. data/app/views/profiled/my/addresses/create.turbo_stream.erb +5 -0
  76. data/app/views/profiled/my/addresses/fork.turbo_stream.erb +3 -0
  77. data/app/views/profiled/my/addresses/index.html+phone.erb +26 -0
  78. data/app/views/profiled/my/addresses/index.html.erb +7 -0
  79. data/app/views/profiled/my/addresses/list.html+phone.erb +41 -0
  80. data/app/views/profiled/my/addresses/select.turbo_stream.erb +1 -0
  81. data/app/views/profiled/my/addresses/show.html+phone.erb +26 -0
  82. data/app/views/profiled/my/addresses/update.turbo_stream.erb +7 -0
  83. data/app/views/profiled/my/addresses/wechat.turbo_stream.erb +3 -0
  84. data/app/views/profiled/my/profiles/_edit_form.html+phone.erb +15 -0
  85. data/app/views/profiled/my/profiles/_edit_form.html.erb +4 -0
  86. data/app/views/profiled/my/profiles/_form.html.erb +6 -0
  87. data/app/views/profiled/my/profiles/_profile.json.jbuilder +1 -0
  88. data/app/views/profiled/my/profiles/_show_table.html+phone.erb +24 -0
  89. data/app/views/profiled/my/profiles/_show_table.html.erb +20 -0
  90. data/app/views/profiled/my/profiles/index.html+phone.erb +3 -0
  91. data/app/views/profiled/my/profiles/index.html.erb +31 -0
  92. data/app/views/profiled/my/profiles/index.json.jbuilder +1 -0
  93. data/app/views/profiled/my/profiles/show.html+phone.erb +8 -0
  94. data/app/views/profiled/my/profiles/show.html.erb +1 -0
  95. data/app/views/profiled/my/profiles/show.json.jbuilder +1 -0
  96. data/app/views/profiled/panel/addresses/_address.html.erb +24 -0
  97. data/app/views/profiled/panel/addresses/_edit_form.html.erb +4 -0
  98. data/app/views/profiled/panel/addresses/_form.html.erb +22 -0
  99. data/app/views/profiled/panel/addresses/_index_tbody.html.erb +16 -0
  100. data/app/views/profiled/panel/addresses/_index_thead.html.erb +5 -0
  101. data/app/views/profiled/panel/addresses/_new_form.html.erb +4 -0
  102. data/app/views/profiled/panel/addresses/index.html.erb +5 -0
  103. data/app/views/profiled/panel/areas/_filter_form.html.erb +9 -0
  104. data/app/views/profiled/panel/areas/_form.html.erb +5 -0
  105. data/app/views/profiled/panel/areas/_index_tbody.html.erb +17 -0
  106. data/app/views/profiled/panel/areas/_index_thead.html.erb +8 -0
  107. data/app/views/profiled/panel/areas/_show_table.html.erb +8 -0
  108. data/app/views/profiled/panel/areas/index.html.erb +5 -0
  109. data/app/views/profiled/panel/base/_nav.html.erb +3 -0
  110. data/config/locales/en.controller.yml +30 -0
  111. data/config/locales/en.enum.yml +15 -0
  112. data/config/locales/zh.attributes.yml +28 -0
  113. data/config/locales/zh.controller.yml +38 -0
  114. data/config/locales/zh.enum.yml +10 -0
  115. data/config/routes.rb +45 -0
  116. data/lib/rails_profile/config.rb +11 -0
  117. data/lib/rails_profile/engine.rb +21 -0
  118. data/lib/rails_profile.rb +2 -0
  119. metadata +174 -0
@@ -0,0 +1,28 @@
1
+ zh:
2
+ activerecord:
3
+ attributes:
4
+ profiled/profile:
5
+ birthday_type: 生日类型
6
+ birthday: 生日
7
+ age: 年龄
8
+ gender: 性别
9
+ first_name: 姓
10
+ real_name: 名
11
+ nick_name: 昵称
12
+ area_id: 地区
13
+ area_ancestors: 地区
14
+ address: 地址
15
+ identity: 联系方式
16
+ resume: 简历
17
+ major: 专业
18
+ degree: 学历
19
+ profiled/area:
20
+ names: 地区
21
+ popular: 是否热门
22
+ published: 是否显示
23
+ profiled/address:
24
+ contact: 联系人
25
+ tel: 手机号
26
+ detail: 详细地址
27
+ area_id: 地区
28
+ post_code: 邮政编码
@@ -0,0 +1,38 @@
1
+ zh:
2
+ profiled:
3
+ title: 用户资料
4
+ admin:
5
+ title: 企业基本资料
6
+ addresses:
7
+ index:
8
+ title: 企业地址管理
9
+ panel:
10
+ title: 区域管理
11
+ areas:
12
+ index:
13
+ title: 地区
14
+ agencies:
15
+ index:
16
+ title: 会员列表
17
+ my:
18
+ title: 个人中心
19
+ profiles:
20
+ index:
21
+ title: 个人资料
22
+ show:
23
+ title: 个人资料
24
+ new:
25
+ title: 添加个人资料
26
+ addresses:
27
+ index:
28
+ title: 我的地址
29
+ new: 从微信添加
30
+ add: 地图选择
31
+ list:
32
+ title: 我的地址
33
+ new: 从微信添加
34
+ me:
35
+ title: 个人中心
36
+ profiles:
37
+ show:
38
+ title: 个人资料
@@ -0,0 +1,10 @@
1
+ zh:
2
+ activerecord:
3
+ enum:
4
+ profiled/profile:
5
+ birthday_type:
6
+ solar: 阳历
7
+ lunar: 阴历
8
+ gender:
9
+ male: 男
10
+ female: 女
data/config/routes.rb ADDED
@@ -0,0 +1,45 @@
1
+ Rails.application.routes.draw do
2
+
3
+ namespace :profiled, defaults: { business: 'profiled' } do
4
+ resources :areas, only: [:index] do
5
+ collection do
6
+ get :search
7
+ get :list
8
+ post :follow
9
+ end
10
+ end
11
+
12
+ namespace :admin, defaults: { namespace: 'admin' } do
13
+ resources :profiles
14
+ resources :address_organs
15
+ resources :addresses
16
+ end
17
+
18
+ namespace :panel, defaults: { namespace: 'panel' } do
19
+ resources :areas
20
+ resources :profiles do
21
+ member do
22
+ patch :user
23
+ patch :qrcode
24
+ end
25
+ end
26
+ end
27
+
28
+ namespace :my, defaults: { namespace: 'my' } do
29
+ resource :profile
30
+ resources :addresses do
31
+ collection do
32
+ get :select
33
+ get :list
34
+ post :fork
35
+ post :wechat
36
+ post :program
37
+ end
38
+ member do
39
+ get :join
40
+ end
41
+ end
42
+ end
43
+ end
44
+
45
+ end
@@ -0,0 +1,11 @@
1
+ require 'active_support/configurable'
2
+
3
+ module RailsProfile #:nodoc:
4
+ include ActiveSupport::Configurable
5
+
6
+ configure do |config|
7
+ end
8
+
9
+ end
10
+
11
+
@@ -0,0 +1,21 @@
1
+ require 'rails_com'
2
+ module RailsProfile
3
+ class Engine < ::Rails::Engine
4
+
5
+ config.factory_bot.definition_file_paths += Dir["#{config.root}/test/factories"] if defined?(FactoryBotRails)
6
+
7
+ config.generators do |g|
8
+ g.rails = {
9
+ assets: false,
10
+ stylesheets: false,
11
+ helper: false
12
+ }
13
+ g.test_unit = {
14
+ fixture: true,
15
+ fixture_replacement: :factory_girl
16
+ }
17
+ g.templates.unshift File.expand_path('lib/templates', RailsCom::Engine.root)
18
+ end
19
+
20
+ end
21
+ end
@@ -0,0 +1,2 @@
1
+ require 'rails_profile/engine'
2
+ require 'rails_profile/config'
metadata ADDED
@@ -0,0 +1,174 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rails_profile
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - qinmingyuan
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-10-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails_com
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.2'
27
+ description: " Description of "
28
+ email:
29
+ - mingyuan0715@foxmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - LICENSE
35
+ - README.md
36
+ - Rakefile
37
+ - app/controllers/profiled/admin/address_organs_controller.rb
38
+ - app/controllers/profiled/admin/addresses_controller.rb
39
+ - app/controllers/profiled/admin/base_controller.rb
40
+ - app/controllers/profiled/admin/profiles_controller.rb
41
+ - app/controllers/profiled/areas_controller.rb
42
+ - app/controllers/profiled/base_controller.rb
43
+ - app/controllers/profiled/me/base_controller.rb
44
+ - app/controllers/profiled/me/profiles_controller.rb
45
+ - app/controllers/profiled/my/address_users_controller.rb
46
+ - app/controllers/profiled/my/addresses_controller.rb
47
+ - app/controllers/profiled/my/base_controller.rb
48
+ - app/controllers/profiled/my/profiles_controller.rb
49
+ - app/controllers/profiled/panel/areas_controller.rb
50
+ - app/controllers/profiled/panel/base_controller.rb
51
+ - app/models/concerns/qq_map_helper.rb
52
+ - app/models/profiled.rb
53
+ - app/models/profiled/address.rb
54
+ - app/models/profiled/address_organ.rb
55
+ - app/models/profiled/address_user.rb
56
+ - app/models/profiled/application_record.rb
57
+ - app/models/profiled/area.rb
58
+ - app/models/profiled/ext/organ.rb
59
+ - app/models/profiled/ext/user.rb
60
+ - app/models/profiled/model/account.rb
61
+ - app/models/profiled/model/address.rb
62
+ - app/models/profiled/model/address_organ.rb
63
+ - app/models/profiled/model/address_user.rb
64
+ - app/models/profiled/model/area.rb
65
+ - app/models/profiled/model/profile.rb
66
+ - app/models/profiled/profile.rb
67
+ - app/views/admin/_profile_nav.html.erb
68
+ - app/views/me/_profile_nav.html.erb
69
+ - app/views/my/_profile_nav.html.erb
70
+ - app/views/panel/_profile_nav.html.erb
71
+ - app/views/profiled/admin/base/_nav.html.erb
72
+ - app/views/profiled/admin/profiles/_edit_form.html.erb
73
+ - app/views/profiled/admin/profiles/_filter_form.html.erb
74
+ - app/views/profiled/admin/profiles/_form.html.erb
75
+ - app/views/profiled/admin/profiles/_index_tbody.html.erb
76
+ - app/views/profiled/admin/profiles/_index_thead.html.erb
77
+ - app/views/profiled/admin/profiles/_new_form.html.erb
78
+ - app/views/profiled/admin/profiles/_profile.json.jbuilder
79
+ - app/views/profiled/admin/profiles/_show_table.html.erb
80
+ - app/views/profiled/admin/profiles/index.html.erb
81
+ - app/views/profiled/admin/profiles/qrcode.json.jbuilder
82
+ - app/views/profiled/areas/_index.html.erb
83
+ - app/views/profiled/areas/follow.turbo_stream.erb
84
+ - app/views/profiled/areas/index.json.jbuilder
85
+ - app/views/profiled/areas/index.turbo_stream+phone.erb
86
+ - app/views/profiled/me/profiles/_edit_form.html.erb
87
+ - app/views/profiled/me/profiles/_form.html.erb
88
+ - app/views/profiled/me/profiles/_profile.json.jbuilder
89
+ - app/views/profiled/me/profiles/_show_table.html.erb
90
+ - app/views/profiled/me/profiles/show.json.jbuilder
91
+ - app/views/profiled/my/address_users/create.turbo_stream.erb
92
+ - app/views/profiled/my/addresses/_filter_form.html.erb
93
+ - app/views/profiled/my/addresses/_form.html+phone.erb
94
+ - app/views/profiled/my/addresses/_form.html.erb
95
+ - app/views/profiled/my/addresses/_index/_address.html.erb
96
+ - app/views/profiled/my/addresses/_index_tbody.html.erb
97
+ - app/views/profiled/my/addresses/_index_thead.html.erb
98
+ - app/views/profiled/my/addresses/_list/_address.html.erb
99
+ - app/views/profiled/my/addresses/_new_form.html+phone.erb
100
+ - app/views/profiled/my/addresses/_new_form.html.erb
101
+ - app/views/profiled/my/addresses/_outer_select.html+phone.erb
102
+ - app/views/profiled/my/addresses/_outer_select.html.erb
103
+ - app/views/profiled/my/addresses/_select.html.erb
104
+ - app/views/profiled/my/addresses/_show_table.html+phone.erb
105
+ - app/views/profiled/my/addresses/_show_table.html.erb
106
+ - app/views/profiled/my/addresses/_wechat_form.html.erb
107
+ - app/views/profiled/my/addresses/create.turbo_stream.erb
108
+ - app/views/profiled/my/addresses/fork.turbo_stream.erb
109
+ - app/views/profiled/my/addresses/index.html+phone.erb
110
+ - app/views/profiled/my/addresses/index.html.erb
111
+ - app/views/profiled/my/addresses/list.html+phone.erb
112
+ - app/views/profiled/my/addresses/select.turbo_stream.erb
113
+ - app/views/profiled/my/addresses/show.html+phone.erb
114
+ - app/views/profiled/my/addresses/update.turbo_stream.erb
115
+ - app/views/profiled/my/addresses/wechat.turbo_stream.erb
116
+ - app/views/profiled/my/profiles/_edit_form.html+phone.erb
117
+ - app/views/profiled/my/profiles/_edit_form.html.erb
118
+ - app/views/profiled/my/profiles/_form.html.erb
119
+ - app/views/profiled/my/profiles/_profile.json.jbuilder
120
+ - app/views/profiled/my/profiles/_show_table.html+phone.erb
121
+ - app/views/profiled/my/profiles/_show_table.html.erb
122
+ - app/views/profiled/my/profiles/index.html+phone.erb
123
+ - app/views/profiled/my/profiles/index.html.erb
124
+ - app/views/profiled/my/profiles/index.json.jbuilder
125
+ - app/views/profiled/my/profiles/show.html+phone.erb
126
+ - app/views/profiled/my/profiles/show.html.erb
127
+ - app/views/profiled/my/profiles/show.json.jbuilder
128
+ - app/views/profiled/panel/addresses/_address.html.erb
129
+ - app/views/profiled/panel/addresses/_edit_form.html.erb
130
+ - app/views/profiled/panel/addresses/_form.html.erb
131
+ - app/views/profiled/panel/addresses/_index_tbody.html.erb
132
+ - app/views/profiled/panel/addresses/_index_thead.html.erb
133
+ - app/views/profiled/panel/addresses/_new_form.html.erb
134
+ - app/views/profiled/panel/addresses/index.html.erb
135
+ - app/views/profiled/panel/areas/_filter_form.html.erb
136
+ - app/views/profiled/panel/areas/_form.html.erb
137
+ - app/views/profiled/panel/areas/_index_tbody.html.erb
138
+ - app/views/profiled/panel/areas/_index_thead.html.erb
139
+ - app/views/profiled/panel/areas/_show_table.html.erb
140
+ - app/views/profiled/panel/areas/index.html.erb
141
+ - app/views/profiled/panel/base/_nav.html.erb
142
+ - config/locales/en.controller.yml
143
+ - config/locales/en.enum.yml
144
+ - config/locales/zh.attributes.yml
145
+ - config/locales/zh.controller.yml
146
+ - config/locales/zh.enum.yml
147
+ - config/routes.rb
148
+ - lib/rails_profile.rb
149
+ - lib/rails_profile/config.rb
150
+ - lib/rails_profile/engine.rb
151
+ homepage: https://github.com/work-design/rails_profile
152
+ licenses:
153
+ - MIT
154
+ metadata: {}
155
+ post_install_message:
156
+ rdoc_options: []
157
+ require_paths:
158
+ - lib
159
+ required_ruby_version: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ required_rubygems_version: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: '0'
169
+ requirements: []
170
+ rubygems_version: 3.2.22
171
+ signing_key:
172
+ specification_version: 4
173
+ summary: User Profile
174
+ test_files: []