rails_growth 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +20 -0
  3. data/README.md +28 -0
  4. data/Rakefile +32 -0
  5. data/app/controllers/growth/admin/aim_entities_controller.rb +30 -0
  6. data/app/controllers/growth/admin/aim_logs_controller.rb +21 -0
  7. data/app/controllers/growth/admin/aim_users_controller.rb +30 -0
  8. data/app/controllers/growth/admin/aims_controller.rb +73 -0
  9. data/app/controllers/growth/admin/base_controller.rb +4 -0
  10. data/app/controllers/growth/admin/praise_incomes_controller.rb +61 -0
  11. data/app/controllers/growth/admin/reward_expenses_controller.rb +63 -0
  12. data/app/controllers/growth/admin/reward_incomes_controller.rb +59 -0
  13. data/app/controllers/growth/admin/rewards_controller.rb +65 -0
  14. data/app/controllers/growth/controller/application.rb +77 -0
  15. data/app/controllers/growth/my/aim_logs_controller.rb +45 -0
  16. data/app/controllers/growth/my/aim_users_controller.rb +25 -0
  17. data/app/controllers/growth/my/aims_controller.rb +44 -0
  18. data/app/controllers/growth/my/base_controller.rb +4 -0
  19. data/app/controllers/growth/my/gifts_controller.rb +27 -0
  20. data/app/controllers/growth/my/rewards_controller.rb +28 -0
  21. data/app/models/growth/aim.rb +5 -0
  22. data/app/models/growth/aim_code.rb +5 -0
  23. data/app/models/growth/aim_entity.rb +5 -0
  24. data/app/models/growth/aim_log.rb +5 -0
  25. data/app/models/growth/aim_user.rb +5 -0
  26. data/app/models/growth/model/aim.rb +52 -0
  27. data/app/models/growth/model/aim_code.rb +40 -0
  28. data/app/models/growth/model/aim_entity.rb +74 -0
  29. data/app/models/growth/model/aim_log.rb +79 -0
  30. data/app/models/growth/model/aim_user.rb +60 -0
  31. data/app/models/growth/model/card.rb +25 -0
  32. data/app/models/growth/model/cash.rb +17 -0
  33. data/app/models/growth/model/entity.rb +74 -0
  34. data/app/models/growth/model/praise_compute.rb +70 -0
  35. data/app/models/growth/model/praise_income.rb +82 -0
  36. data/app/models/growth/model/praise_user.rb +47 -0
  37. data/app/models/growth/model/promote.rb +30 -0
  38. data/app/models/growth/model/reward.rb +67 -0
  39. data/app/models/growth/model/reward_expense.rb +98 -0
  40. data/app/models/growth/model/reward_income.rb +35 -0
  41. data/app/models/growth/model/royalty_compute.rb +72 -0
  42. data/app/models/growth/model/user.rb +21 -0
  43. data/app/models/growth/praise_income.rb +7 -0
  44. data/app/models/growth/praise_user.rb +5 -0
  45. data/app/models/growth/reward.rb +5 -0
  46. data/app/models/growth/reward_expense.rb +5 -0
  47. data/app/models/growth/reward_income.rb +5 -0
  48. data/app/models/growth.rb +11 -0
  49. data/app/views/application/_growth_nav.html.erb +12 -0
  50. data/app/views/growth/admin/aim_entities/_filter.html.erb +10 -0
  51. data/app/views/growth/admin/aim_entities/index.html.erb +68 -0
  52. data/app/views/growth/admin/aim_entities/show.html.erb +22 -0
  53. data/app/views/growth/admin/aim_logs/_filter.html.erb +9 -0
  54. data/app/views/growth/admin/aim_logs/index.html.erb +62 -0
  55. data/app/views/growth/admin/aim_logs/show.html.erb +14 -0
  56. data/app/views/growth/admin/aim_users/_filter.html.erb +7 -0
  57. data/app/views/growth/admin/aim_users/index.html.erb +63 -0
  58. data/app/views/growth/admin/aim_users/show.html.erb +30 -0
  59. data/app/views/growth/admin/aims/_filter.html.erb +8 -0
  60. data/app/views/growth/admin/aims/_form.html.erb +14 -0
  61. data/app/views/growth/admin/aims/_item_field.html.erb +3 -0
  62. data/app/views/growth/admin/aims/_item_form.html.erb +24 -0
  63. data/app/views/growth/admin/aims/add_item.js.erb +9 -0
  64. data/app/views/growth/admin/aims/index.html.erb +54 -0
  65. data/app/views/growth/admin/aims/remove_item.js.erb +1 -0
  66. data/app/views/growth/admin/aims/show.html.erb +38 -0
  67. data/app/views/growth/admin/managers/_edit.html.erb +13 -0
  68. data/app/views/growth/admin/managers/_form.html.erb +34 -0
  69. data/app/views/growth/admin/managers/_new.html.erb +13 -0
  70. data/app/views/growth/admin/managers/_search_form.html.erb +8 -0
  71. data/app/views/growth/admin/managers/edit.js.erb +8 -0
  72. data/app/views/growth/admin/managers/index.html.erb +68 -0
  73. data/app/views/growth/admin/managers/new.js.erb +8 -0
  74. data/app/views/growth/admin/managers/show.html.erb +0 -0
  75. data/app/views/growth/admin/managers/update.js.erb +1 -0
  76. data/app/views/growth/admin/praise_incomes/_filter.html.erb +5 -0
  77. data/app/views/growth/admin/praise_incomes/_form.html.erb +3 -0
  78. data/app/views/growth/admin/praise_incomes/edit.html.erb +11 -0
  79. data/app/views/growth/admin/praise_incomes/index.html.erb +59 -0
  80. data/app/views/growth/admin/praise_incomes/new.html.erb +11 -0
  81. data/app/views/growth/admin/praise_incomes/show.html.erb +18 -0
  82. data/app/views/growth/admin/reward_expenses/_filter.html.erb +5 -0
  83. data/app/views/growth/admin/reward_expenses/_form.html.erb +7 -0
  84. data/app/views/growth/admin/reward_expenses/index.html.erb +49 -0
  85. data/app/views/growth/admin/reward_expenses/show.html.erb +26 -0
  86. data/app/views/growth/admin/reward_incomes/_filter.html.erb +10 -0
  87. data/app/views/growth/admin/reward_incomes/_form.html.erb +3 -0
  88. data/app/views/growth/admin/reward_incomes/edit.html.erb +11 -0
  89. data/app/views/growth/admin/reward_incomes/index.html.erb +49 -0
  90. data/app/views/growth/admin/reward_incomes/new.html.erb +11 -0
  91. data/app/views/growth/admin/reward_incomes/show.html.erb +18 -0
  92. data/app/views/growth/admin/rewards/_filter.html.erb +14 -0
  93. data/app/views/growth/admin/rewards/_form.html.erb +27 -0
  94. data/app/views/growth/admin/rewards/index.html.erb +84 -0
  95. data/app/views/growth/admin/rewards/show.html.erb +26 -0
  96. data/app/views/growth/my/aims/_aim.json.jbuilder +6 -0
  97. data/app/views/growth/my/aims/index.json.jbuilder +3 -0
  98. data/app/views/growth/my/aims/show.json.jbuilder +1 -0
  99. data/app/views/growth/my/gifts/_gift.json.jbuilder +1 -0
  100. data/app/views/growth/my/gifts/_praise_income.json.jbuilder +8 -0
  101. data/app/views/growth/my/gifts/give.json.jbuilder +8 -0
  102. data/app/views/growth/my/gifts/index.json.jbuilder +9 -0
  103. data/app/views/growth/my/rewards/_praise_user.json.jbuilder +2 -0
  104. data/app/views/growth/my/rewards/top.json.jbuilder +6 -0
  105. data/config/locales/en.notify.yml +7 -0
  106. data/config/locales/en.yml +29 -0
  107. data/config/locales/zh.controller.yml +24 -0
  108. data/config/locales/zh.notify.yml +7 -0
  109. data/config/locales/zh.yml +11 -0
  110. data/config/routes.rb +57 -0
  111. data/lib/rails_growth/config.rb +13 -0
  112. data/lib/rails_growth/engine.rb +19 -0
  113. data/lib/rails_growth/serial_number_helper.rb +28 -0
  114. data/lib/rails_growth.rb +4 -0
  115. metadata +170 -0
@@ -0,0 +1,13 @@
1
+ <div class="ui modal">
2
+ <i class="fas fa-times close"></i>
3
+ <div class="ui header blue">
4
+ Edit Manager
5
+ </div>
6
+
7
+ <div class="content">
8
+ <%= form_for model: @manager, scope: :manager, url: admin_manager_path do |f| %>
9
+ <%= render partial: 'form', locals: { f: f } %>
10
+ <% end %>
11
+ </div>
12
+
13
+ </div>
@@ -0,0 +1,34 @@
1
+ <%= f.text_field :title, label: 'Titles' %>
2
+ <%= f.select :type, options_for_select(Manager.options_i18n(:type), @manager.type), { label: 'Type', include_blank: true } %>
3
+ <%= f.text_field :name, label: 'Name' %>
4
+ <div class="inline fields">
5
+ <label class="six wide field">Leader</label>
6
+ <div class="ui search selection dropdown">
7
+ <%= f.hidden_field :leader_id %>
8
+ <i class="dropdown icon"></i>
9
+ <input type="text" class="search" tabindex="0">
10
+ <div class="default text">
11
+ <%= @manager.leader&.name || 'Input Real Name' %>
12
+ </div>
13
+ </div>
14
+ </div>
15
+ <%= f.collection_select :who_id, Who.all, :id, :name, { label: 'Role:' } %>
16
+ <%= f.date_field :join_on, label: 'Join On' %>
17
+ <%= f.check_box :disabled, label: 'Disabled' %>
18
+ <%= f.submit %>
19
+
20
+
21
+ <script>
22
+ $('.ui.dropdown.search').dropdown({
23
+ apiSettings: {
24
+ url: '/admin/managers/search?q={query}'
25
+ },
26
+ fields: {
27
+ name: 'real_name',
28
+ value: 'id'
29
+ },
30
+ minCharacters: 3
31
+ });
32
+
33
+ $('select.ui.dropdown').dropdown();
34
+ </script>
@@ -0,0 +1,13 @@
1
+ <div class="ui modal">
2
+ <i class="fas fa-times close"></i>
3
+ <div class="ui header blue">
4
+ Add New Manager
5
+ </div>
6
+
7
+ <div class="content">
8
+ <%= form_with model: [:admin, @manager] do |f| %>
9
+ <%= render partial: 'form', locals: { f: f } %>
10
+ <% end %>
11
+ </div>
12
+
13
+ </div>
@@ -0,0 +1,8 @@
1
+ <%= form_with theme: 'search' do |f| %>
2
+ <div class="fields">
3
+ <%= f.text_field :name, placeholder: "用户名:" %>
4
+ <%= f.text_field :mobile, placeholder: "手机号:" %>
5
+ <%= f.text_field :email, placeholder: "hola@123.com" %>
6
+ <%= f.submit "查询", class: 'ui green small button' %>
7
+ </div>
8
+ <% end %>
@@ -0,0 +1,8 @@
1
+ if ($('.ui.modals').length === 0) {
2
+ $('body').append('<%= j(render 'edit') %>');
3
+ } else {
4
+ $('.ui.modals').html('<%= j(render 'edit') %>');
5
+ }
6
+
7
+
8
+ $('.ui.modal').modal('setting', {autofocus: false}).modal('show');
@@ -0,0 +1,68 @@
1
+ <div class="">
2
+
3
+ <div class="ui top attached menu borderless">
4
+ <div class="item"><strong>用户列表</strong></div>
5
+ </div>
6
+
7
+ <div class="ui segment bottom attached">
8
+ <%= render 'search_form' %>
9
+ </div>
10
+
11
+ <div class="ui segment top attached">
12
+ <%= link_to '新建', new_admin_manager_path, class: 'ui teal button', remote: true %>
13
+ </div>
14
+
15
+ <table class="table is-hoverable is-fullwidth">
16
+ <thead>
17
+ <tr>
18
+ <th>ID</th>
19
+ <th>Title</th>
20
+ <th>Type</th>
21
+ <th>Real Name</th>
22
+ <th>Roles</th>
23
+ <th>Leader</th>
24
+ <th>Status</th>
25
+ <th>Disabled?</th>
26
+ <th>User</th>
27
+ <th>Join On</th>
28
+ <th></th>
29
+ </tr>
30
+ </thead>
31
+
32
+ <tbody>
33
+ <% @managers.each do |manager| %>
34
+ <tr>
35
+ <td><%= manager.id %></td>
36
+ <td><%= manager.title %></td>
37
+ <td>
38
+ <%= manager.type %>
39
+ </td>
40
+ <td><%= manager.user&.name %></td>
41
+ <td>
42
+ <div class="ui teal label"><%= manager.who&.name %></div>
43
+ </td>
44
+ <td><%= manager.leader&.name %></td>
45
+ <td><%# manager.status %></td>
46
+ <td><%= manager.disabled %></td>
47
+ <td>
48
+ <% if manager.user_id.present? %>
49
+ <%= link_to manager.user&.email, admin_user_url(manager.user_id) %>
50
+ <% else %>
51
+ <%= link_to '用户绑定', user_admin_manager_path(manager), class: 'ui blue label', remote: true %>
52
+ <% end %>
53
+ </td>
54
+ <td><%= manager.join_on %></td>
55
+ <td>
56
+ <%= link_to '详细', admin_manager_path(manager), class: 'ui blue label' %>
57
+ <%= link_to '编辑', edit_admin_manager_path(manager), class: 'ui pink label', remote: true %>
58
+ <%= link_to '删除', admin_manager_path(manager), method: :delete, data: { confirm: 'Are you sure?' }, class: 'ui red label' %>
59
+ </td>
60
+ </tr>
61
+ <% end %>
62
+ </tbody>
63
+ </table>
64
+
65
+ <%= paginate @managers %>
66
+ </div>
67
+
68
+
@@ -0,0 +1,8 @@
1
+ if ($('.ui.modals').length === 0) {
2
+ $('body').append('<%= j(render 'new') %>');
3
+ } else {
4
+ $('.ui.modals').html('<%= j(render 'new') %>');
5
+ }
6
+
7
+
8
+ $('.ui.modal').modal('setting', {autofocus: false}).modal('show');
File without changes
@@ -0,0 +1 @@
1
+ $('#id').append('<%= j(render '_show') %>');
@@ -0,0 +1,5 @@
1
+ <%= form_with theme: 'search' do |f| %>
2
+ <div class="fields">
3
+ <%= f.submit %>
4
+ </div>
5
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <%= render 'error_messages', target: @reward_income %>
2
+ <%= f.number_field :reward_amount %>
3
+ <%= f.submit %>
@@ -0,0 +1,11 @@
1
+ <div class="ui segment breadcrumb">
2
+ <%= link_to 'Back', admin_reward_reward_incomes_path(@reward_income.reward_id), class: 'section' %>
3
+ <div class="divider">/</div>
4
+ <div class="active section">Edit</div>
5
+ </div>
6
+
7
+ <div class="ui segment">
8
+ <%= form_with model: @reward_income, scope: :reward_income, url: admin_reward_income_path(@reward_income), method: :patch, local: true do |f| %>
9
+ <%= render partial: 'form', locals: { f: f } %>
10
+ <% end %>
11
+ </div>
@@ -0,0 +1,59 @@
1
+ <div class="ui segment breadcrumb">
2
+ <%= link_to 'Back', admin_rewards_path, class: 'section' %>
3
+ <div class="divider">/</div>
4
+ <div class="action section">incomes</div>
5
+ </div>
6
+
7
+ <div class="ui top attached borderless menu">
8
+ <div class="header item">Admin Reward Incomes</div>
9
+ <div class="right menu">
10
+ <div class="item">
11
+ <%= link_to 'New Admin Reward Income', new_admin_reward_reward_income_path, class: 'ui teal button' %>
12
+ </div>
13
+ </div>
14
+ </div>
15
+
16
+ <div class="ui attached segment">
17
+ <%= render 'filter' %>
18
+ </div>
19
+
20
+ <table class="table is-hoverable is-fullwidth">
21
+ <thead>
22
+ <tr>
23
+ <th><%= RewardIncome.human_attribute_name(:id) %></th>
24
+ <th><%= RewardIncome.human_attribute_name(:user_id) %></th>
25
+ <th>
26
+ <p><%= RewardIncome.human_attribute_name(:source_type) %></p>
27
+ <p><%= RewardIncome.human_attribute_name(:source_id) %></p>
28
+ </th>
29
+ <th><%= RewardIncome.human_attribute_name(:reward_amount) %></th>
30
+ <th>Actions</th>
31
+ </tr>
32
+ </thead>
33
+ <tbody>
34
+ <% @reward_incomes.each do |reward_income| %>
35
+ <tr>
36
+ <td><%= reward_income.id %></td>
37
+ <td><%= reward_income.user_id %></td>
38
+ <td>
39
+ <p><%= reward_income.source_type %></p>
40
+ <p><%= reward_income.source_id %></p>
41
+ </td>
42
+ <td><%= reward_income.reward_amount %></td>
43
+ <td class="ui labels">
44
+ <%= link_to admin_reward_income_path(reward_income), aria: { label: t('.show') }, class: 'ui blue mini icon button' do %>
45
+ <i class="location arrow icon"></i>
46
+ <% end %>
47
+ <%= link_to edit_admin_reward_income_path(reward_income), aria: { label: t('.edit') }, class: 'ui pink mini icon button' do %>
48
+ <i class="pencil alternate icon"></i>
49
+ <% end %>
50
+ <%= link_to admin_reward_income_path(reward_income), method: :delete, aria: { label: t('.destroy') }, data: { confrim: t('.confirm') }, class: 'ui red mini icon button' do %>
51
+ <i class="times icon"></i>
52
+ <% end %>
53
+ </td>
54
+ </tr>
55
+ <% end %>
56
+ </tbody>
57
+ </table>
58
+
59
+ <%= paginate @reward_incomes %>
@@ -0,0 +1,11 @@
1
+ <div class="ui segment breadcrumb">
2
+ <%= link_to 'Back', admin_reward_reward_incomes_path(@reward), class: 'section' %>
3
+ <div class="divider">/</div>
4
+ <div class="active section">Add</div>
5
+ </div>
6
+
7
+ <div class="ui segment">
8
+ <%= form_with model: @reward_income, url: admin_reward_reward_incomes_path, local: true do |f| %>
9
+ <%= render partial: 'form', locals: { f: f } %>
10
+ <% end %>
11
+ </div>
@@ -0,0 +1,18 @@
1
+ <div class="ui segment breadcrumb">
2
+ <%= link_to 'Back', admin_reward_incomes_path, class: 'section' %>
3
+ <div class="divider">/</div>
4
+ <div class="active section">Show</div>
5
+ </div>
6
+
7
+ <table class="table is-hoverable is-fullwidth">
8
+ <tbody>
9
+ <tr>
10
+ <td class="has-text-right"><%= RewardIncome.human_attribute_name(:type) %></td>
11
+ <td><%= @reward_income.type %></td>
12
+ </tr>
13
+ <tr>
14
+ <td class="has-text-right"><%= RewardIncome.human_attribute_name(:amount) %></td>
15
+ <td><%= @reward_income.amount %></td>
16
+ </tr>
17
+ </tbody>
18
+ </table>
@@ -0,0 +1,5 @@
1
+ <%= form_with theme: 'search' do |f| %>
2
+ <div class="fields">
3
+ <%= f.submit 'Search' %>
4
+ </div>
5
+ <% end %>
@@ -0,0 +1,7 @@
1
+ <%= form_with model: [:admin, @reward_expense], local: true do |f| %>
2
+ <%= render 'error_messages', target: @reward_expense %>
3
+ <%= f.hidden_field :reward_id, valud: @reward.id %>
4
+ <%= f.text_field :amount %>
5
+ <%= f.text_field :user_id %>
6
+ <%= f.submit %>
7
+ <% end %>
@@ -0,0 +1,49 @@
1
+ <div class="ui attached segment">
2
+ <%= render 'filter' %>
3
+ </div>
4
+
5
+ <table class="table is-hoverable is-fullwidth">
6
+ <thead>
7
+ <tr>
8
+ <th><%= RewardExpense.human_attribute_name(:id) %></th>
9
+ <th><%= RewardExpense.human_attribute_name(:amount) %></th>
10
+ <th><%= RewardExpense.human_attribute_name(:aim) %></th>
11
+ <th><%= RewardExpense.human_attribute_name(:user) %></th>
12
+ <th><%= RewardExpense.human_attribute_name(:aim_entity) %></th>
13
+ <th>
14
+ <% if params[:reward_id] %>
15
+ <%= link_to new_admin_reward_expense_path(reward_id: params[:reward_id]), remote: true, class: 'ui teal button' do %>
16
+ <i class="fas fa-plus"></i>
17
+ <% end %>
18
+ <% end %>
19
+ </th>
20
+ </tr>
21
+ </thead>
22
+ <tbody>
23
+ <% @reward_expenses.each do |reward_expense| %>
24
+ <tr>
25
+ <td><%= reward_expense.id %></td>
26
+ <td><%= reward_expense.amount %></td>
27
+ <td>
28
+ <%= reward_expense.aim&.name %>
29
+ </td>
30
+ <td>
31
+ <%= reward_expense.user&.name %>
32
+ </td>
33
+ <td>
34
+ <%= reward_expense.aim_entity&.id %>
35
+ </td>
36
+ <td>
37
+ <%= link_to edit_admin_reward_expense_path(reward_expense), aria: { label: t('.edit') }, remote: true, class: 'ui pink mini icon button' do %>
38
+ <i class="fas fa-pencil"></i>
39
+ <% end %>
40
+ <%= link_to admin_reward_expense_path(reward_expense), method: :delete, aria: { label: t('.destroy') }, data: { confirm: t('.confirm') }, remote: true, class: 'ui red mini icon button' do %>
41
+ <i class="fas fa-trash"></i>
42
+ <% end %>
43
+ </td>
44
+ </tr>
45
+ <% end %>
46
+ </tbody>
47
+ </table>
48
+
49
+ <%= paginate @reward_expenses %>
@@ -0,0 +1,26 @@
1
+ <div class="ui segment breadcrumb">
2
+ <%= link_to 'Back', admin_reward_expenses_path, class: 'section' %>
3
+ <div class="divider">/</div>
4
+ <div class="active section">Show</div>
5
+ </div>
6
+
7
+ <table class="table is-hoverable is-fullwidth">
8
+ <tbody>
9
+ <tr>
10
+ <td class="has-text-right"><%= RewardExpense.human_attribute_name(:amount) %></td>
11
+ <td><%= @reward_expense.amount %></td>
12
+ </tr>
13
+ <tr>
14
+ <td class="has-text-right"><%= RewardExpense.human_attribute_name(:aim) %></td>
15
+ <td><%= @reward_expense.aim %></td>
16
+ </tr>
17
+ <tr>
18
+ <td class="has-text-right"><%= RewardExpense.human_attribute_name(:aim_entity) %></td>
19
+ <td><%= @reward_expense.aim_entity %></td>
20
+ </tr>
21
+ <tr>
22
+ <td class="has-text-right"><%= RewardExpense.human_attribute_name(:user) %></td>
23
+ <td><%= @reward_expense.user %></td>
24
+ </tr>
25
+ </tbody>
26
+ </table>
@@ -0,0 +1,10 @@
1
+ <div class="ui attached segment">
2
+
3
+ <%= form_with theme: 'search' do |f| %>
4
+ <div class="fields">
5
+ <%= f.submit 'Search' %>
6
+ </div>
7
+ <% end %>
8
+
9
+ </div>
10
+
@@ -0,0 +1,3 @@
1
+ <%= render 'error_messages', target: @reward_income %>
2
+ <%= f.number_field :reward_amount %>
3
+ <%= f.submit %>
@@ -0,0 +1,11 @@
1
+ <div class="ui segment breadcrumb">
2
+ <%= link_to 'Back', admin_reward_reward_incomes_path(@reward_income.reward_id), class: 'section' %>
3
+ <div class="divider">/</div>
4
+ <div class="active section">Edit</div>
5
+ </div>
6
+
7
+ <div class="ui segment">
8
+ <%= form_with model: @reward_income, scope: :reward_income, url: admin_reward_income_path(@reward_income), method: :patch, local: true do |f| %>
9
+ <%= render partial: 'form', locals: { f: f } %>
10
+ <% end %>
11
+ </div>
@@ -0,0 +1,49 @@
1
+ <div class="ui segment breadcrumb">
2
+ <%= link_to 'Back', admin_rewards_path, class: 'section' %>
3
+ <div class="divider">/</div>
4
+ <div class="action section">incomes</div>
5
+ </div>
6
+
7
+ <div class="ui top attached borderless menu">
8
+ <div class="header item">Admin Reward Incomes</div>
9
+ <div class="right menu">
10
+ <div class="item">
11
+ <%= link_to 'New Admin Reward Income', new_admin_reward_reward_income_path, class: 'ui teal button' %>
12
+ </div>
13
+ </div>
14
+ </div>
15
+
16
+ <%= render 'filter' %>
17
+
18
+ <table class="table is-hoverable is-fullwidth">
19
+ <thead>
20
+ <tr>
21
+ <th><%= RewardIncome.human_attribute_name(:id) %></th>
22
+ <th><%= RewardIncome.human_attribute_name(:user_id) %></th>
23
+ <th><%= RewardIncome.human_attribute_name(:reward_amount) %></th>
24
+ <th>Actions</th>
25
+ </tr>
26
+ </thead>
27
+ <tbody>
28
+ <% @reward_incomes.each do |reward_income| %>
29
+ <tr>
30
+ <td><%= reward_income.id %></td>
31
+ <td><%= reward_income.user_id %></td>
32
+ <td><%= reward_income.reward_amount %></td>
33
+ <td class="ui labels">
34
+ <%= link_to admin_reward_income_path(reward_income), aria: { label: t('.show') }, class: 'ui blue mini icon button' do %>
35
+ <i class="location arrow icon"></i>
36
+ <% end %>
37
+ <%= link_to edit_admin_reward_income_path(reward_income), aria: { label: t('.edit') }, class: 'ui pink mini icon button' do %>
38
+ <i class="pencil alternate icon"></i>
39
+ <% end %>
40
+ <%= link_to admin_reward_income_path(reward_income), method: :delete, aria: { label: t('.destroy') }, data: { confrim: t('.confirm') }, class: 'ui red mini icon button' do %>
41
+ <i class="times icon"></i>
42
+ <% end %>
43
+ </td>
44
+ </tr>
45
+ <% end %>
46
+ </tbody>
47
+ </table>
48
+
49
+ <%= paginate @reward_incomes %>