dune-admin 1.0.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.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.gitmodules +3 -0
- data/.rspec +2 -0
- data/.travis.yml +18 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +14 -0
- data/LICENSE.txt +22 -0
- data/README.md +74 -0
- data/Rakefile +14 -0
- data/app/assets/images/dune/admin/.gitkip +0 -0
- data/app/assets/javascripts/dune-admin.js +2 -0
- data/app/assets/javascripts/dune/admin/admin.js.coffee +11 -0
- data/app/assets/javascripts/dune/admin/channels/new.js.coffee +14 -0
- data/app/assets/javascripts/dune/admin/modules/sort.js.coffee +44 -0
- data/app/assets/stylesheets/dune/admin/.gitkip +0 -0
- data/app/assets/stylesheets/dune/admin/admin.sass +37 -0
- data/app/assets/stylesheets/neighborly-admin.sass +1 -0
- data/app/controllers/dune/admin/base_controller.rb +25 -0
- data/app/controllers/dune/admin/channels/members_controller.rb +46 -0
- data/app/controllers/dune/admin/channels_controller.rb +49 -0
- data/app/controllers/dune/admin/contacts_controller.rb +9 -0
- data/app/controllers/dune/admin/contributions_controller.rb +33 -0
- data/app/controllers/dune/admin/dashboard_controller.rb +8 -0
- data/app/controllers/dune/admin/financials_controller.rb +33 -0
- data/app/controllers/dune/admin/press_assets_controller.rb +26 -0
- data/app/controllers/dune/admin/projects_controller.rb +80 -0
- data/app/controllers/dune/admin/reports/base_controller.rb +8 -0
- data/app/controllers/dune/admin/reports/contribution_reports_controller.rb +8 -0
- data/app/controllers/dune/admin/reports/funding_raised_per_project_reports_controller.rb +4 -0
- data/app/controllers/dune/admin/reports/statistics_controller.rb +5 -0
- data/app/controllers/dune/admin/tags_controller.rb +35 -0
- data/app/controllers/dune/admin/users_controller.rb +27 -0
- data/app/models/dune/admin/.gitkip +0 -0
- data/app/models/dune/admin/contribution_concern.rb +23 -0
- data/app/models/dune/admin/funding_raised_per_project_report.rb +5 -0
- data/app/models/dune/admin/project_concern.rb +41 -0
- data/app/models/dune/admin/statistics.rb +5 -0
- data/app/models/dune/admin/user_concern.rb +13 -0
- data/app/policies/dune/admin/admin_policy.rb +7 -0
- data/app/views/dune/admin/.gitkip +0 -0
- data/app/views/dune/admin/channels/_form.html.slim +98 -0
- data/app/views/dune/admin/channels/edit.html.slim +7 -0
- data/app/views/dune/admin/channels/index.html.slim +58 -0
- data/app/views/dune/admin/channels/members/index.html.slim +38 -0
- data/app/views/dune/admin/channels/members/new.html.slim +11 -0
- data/app/views/dune/admin/channels/new.html.slim +7 -0
- data/app/views/dune/admin/contacts/index.html.slim +32 -0
- data/app/views/dune/admin/contacts/show.html.slim +34 -0
- data/app/views/dune/admin/contributions/index.html.slim +138 -0
- data/app/views/dune/admin/dashboard/index.html.slim +65 -0
- data/app/views/dune/admin/financials/index.html.slim +88 -0
- data/app/views/dune/admin/layouts/_menu.html.slim +11 -0
- data/app/views/dune/admin/press_assets/_form.html.slim +11 -0
- data/app/views/dune/admin/press_assets/edit.html.slim +9 -0
- data/app/views/dune/admin/press_assets/index.html.slim +32 -0
- data/app/views/dune/admin/press_assets/new.html.slim +9 -0
- data/app/views/dune/admin/projects/index.html.slim +151 -0
- data/app/views/dune/admin/projects/populate_contribution.html.slim +48 -0
- data/app/views/dune/admin/tags/_form.html.slim +4 -0
- data/app/views/dune/admin/tags/edit.html.slim +7 -0
- data/app/views/dune/admin/tags/index.html.slim +44 -0
- data/app/views/dune/admin/tags/new.html.slim +7 -0
- data/app/views/dune/admin/users/index.html.slim +68 -0
- data/bin/rails +8 -0
- data/config/locales/en.yml +274 -0
- data/config/routes.rb +47 -0
- data/db/migrate/20141005184741_create_dune_admin_funding_raised_per_project_reports.rb +21 -0
- data/db/migrate/20141005191509_create_dune_admin_statistics.rb +55 -0
- data/dune-admin.gemspec +27 -0
- data/lib/dune/admin.rb +10 -0
- data/lib/dune/admin/engine.rb +13 -0
- data/lib/dune/admin/version.rb +5 -0
- data/spec/controllers/dune/admin/channels/members_controller_spec.rb +119 -0
- data/spec/controllers/dune/admin/channels_controller_spec.rb +161 -0
- data/spec/controllers/dune/admin/contacts_controller_spec.rb +23 -0
- data/spec/controllers/dune/admin/cotributions_controller_spec.rb +130 -0
- data/spec/controllers/dune/admin/dasboard_controller_spec.rb +18 -0
- data/spec/controllers/dune/admin/financials_controller_spec.rb +45 -0
- data/spec/controllers/dune/admin/press_assets_controller_spec.rb +138 -0
- data/spec/controllers/dune/admin/projects_controller_spec.rb +201 -0
- data/spec/controllers/dune/admin/tags_controller_spec.rb +137 -0
- data/spec/controllers/dune/admin/users_controller_spec.rb +30 -0
- data/spec/models/dune/admin/contribution_concern_spec.rb +19 -0
- data/spec/models/dune/admin/project_concern_spec.rb +56 -0
- data/spec/models/dune/admin/user_concern_spec.rb +65 -0
- data/spec/policies/dune/admin/admin_policy_spec.rb +22 -0
- data/spec/spec_helper.rb +40 -0
- metadata +237 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
nav.tabs
|
|
2
|
+
ul
|
|
3
|
+
li = tab_link_to t('neighborly.admin.dashboard.index.menu'), root_path
|
|
4
|
+
li = tab_link_to t('dune.admin.projects.index.menu'), projects_path
|
|
5
|
+
li = tab_link_to t('dune.admin.contributions.index.menu'), contributions_path
|
|
6
|
+
li = tab_link_to t('dune.admin.users.index.menu'), users_path
|
|
7
|
+
li = tab_link_to t('dune.admin.channels.index.menu'), channels_path
|
|
8
|
+
li = tab_link_to t('neighborly.admin.tags.index.menu'), tags_path
|
|
9
|
+
li = tab_link_to t('dune.admin.press_assets.index.menu'), press_assets_path
|
|
10
|
+
li = tab_link_to t('dune.admin.financials.index.menu'), financials_path
|
|
11
|
+
li = tab_link_to t('neighborly.admin.contacts.index.menu'), contacts_path
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
- content_for :title, t('.title')
|
|
2
|
+
= simple_form_for resource, url: (resource.persisted? ? press_asset_path(resource) : press_assets_path) do |f|
|
|
3
|
+
= f.input :title
|
|
4
|
+
= f.input :url
|
|
5
|
+
= f.input :image, as: :file, required: !resource.persisted?
|
|
6
|
+
- if resource.image.present?
|
|
7
|
+
.image-preview
|
|
8
|
+
= image_tag(resource.image.thumb.url, size: '170x60')
|
|
9
|
+
br/
|
|
10
|
+
br/
|
|
11
|
+
= f.button :submit, data: { disable_with: I18n.t('words.sending') }
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.admin
|
|
2
|
+
.row
|
|
3
|
+
= render 'dune/admin/layouts/menu'
|
|
4
|
+
section.content.large-12.columns
|
|
5
|
+
.text-right
|
|
6
|
+
= link_to t('.new'), new_press_asset_path, class: 'button'
|
|
7
|
+
.data-table
|
|
8
|
+
= paginate @press_assets
|
|
9
|
+
- if @press_assets.empty?
|
|
10
|
+
= t('.no_press_assets')
|
|
11
|
+
- else
|
|
12
|
+
table
|
|
13
|
+
thead
|
|
14
|
+
tr
|
|
15
|
+
th style="width: 200px;"
|
|
16
|
+
= t('.title')
|
|
17
|
+
th= t('.url')
|
|
18
|
+
th= t('.image')
|
|
19
|
+
th
|
|
20
|
+
tbody
|
|
21
|
+
- @press_assets.each do |press_asset|
|
|
22
|
+
tr id=press_asset.id
|
|
23
|
+
td = press_asset.title
|
|
24
|
+
td = link_to(press_asset.url, target: 'blank')
|
|
25
|
+
td = image_tag(press_asset.image.thumb.url, width: 100)
|
|
26
|
+
td
|
|
27
|
+
.pull-right
|
|
28
|
+
= link_to t('.edit'), edit_press_asset_path(press_asset), class: 'button tiny'
|
|
29
|
+
|
|
|
30
|
+
= link_to t('.destroy'), press_asset_path(press_asset), method: :delete, confirm: t('words.confirm'), class: 'button tiny alert'
|
|
31
|
+
|
|
32
|
+
= paginate @press_assets
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
- @title = t('.title')
|
|
2
|
+
.admin
|
|
3
|
+
.row
|
|
4
|
+
= render 'dune/admin/layouts/menu'
|
|
5
|
+
section.content.large-12.columns
|
|
6
|
+
h4
|
|
7
|
+
strong= "#{@total_projects} "
|
|
8
|
+
= t('.total_projects')
|
|
9
|
+
|
|
10
|
+
.filters
|
|
11
|
+
= form_tag projects_path, method: :get, class: 'form-horizontal' do |f|
|
|
12
|
+
= hidden_field_tag :order_by, params[:order_by]
|
|
13
|
+
.row
|
|
14
|
+
.large-3.columns
|
|
15
|
+
= label_tag :by_id, t('.id')
|
|
16
|
+
= text_field_tag :by_id, params[:by_id], class: 'input-small'
|
|
17
|
+
|
|
18
|
+
- [:between_created_at, :between_expires_at, :between_online_date].each do |between_field|
|
|
19
|
+
.large-3.columns
|
|
20
|
+
= label_tag "#{between_field}_start_at".to_sym, t(".#{between_field}")
|
|
21
|
+
= text_field_tag "#{between_field}[start_at]", (params[between_field][:start_at] if params[between_field].present?)
|
|
22
|
+
|
|
|
23
|
+
|
|
|
24
|
+
= text_field_tag "#{between_field}[ends_at]", (params[between_field][:ends_at] if params[between_field].present?)
|
|
25
|
+
|
|
26
|
+
.row
|
|
27
|
+
.large-4.columns
|
|
28
|
+
= label_tag :pg_search, t('.project')
|
|
29
|
+
= text_field_tag :pg_search, params[:pg_search]
|
|
30
|
+
.large-4.columns
|
|
31
|
+
= label_tag :with_state, t('.with_state')
|
|
32
|
+
= select_tag :with_state, options_for_select(Project.state_names, params[:with_state]), include_blank: true
|
|
33
|
+
.large-4.columns
|
|
34
|
+
= label_tag :by_category_id, t('.by_category')
|
|
35
|
+
= select_tag :by_category_id, options_from_collection_for_select(Category.all, :id, :name_pt,params[:by_category_id]), include_blank: true
|
|
36
|
+
.row
|
|
37
|
+
.large-6.columns
|
|
38
|
+
= label_tag :user_name_contains, t('.user')
|
|
39
|
+
= text_field_tag :user_name_contains, params[:user_name_contains]
|
|
40
|
+
.large-6.columns
|
|
41
|
+
= label_tag :by_user_email, t('.by_user_email')
|
|
42
|
+
= text_field_tag :by_user_email, params[:by_user_email]
|
|
43
|
+
|
|
44
|
+
.row
|
|
45
|
+
.large-12.columns.text-right
|
|
46
|
+
= submit_tag t('.submit'), class: 'button'
|
|
47
|
+
.row
|
|
48
|
+
.large-6.columns.text-left
|
|
49
|
+
= paginate @projects
|
|
50
|
+
.large-6.columns.text-right
|
|
51
|
+
= pluralize_without_number @projects.to_a.size, t('words.found_singular'), t('words.found_plural')
|
|
52
|
+
|
|
|
53
|
+
strong = @projects.to_a.size
|
|
54
|
+
|
|
|
55
|
+
= pluralize_without_number(@projects.to_a.size, t('words.project_singular'), t('words.project_plural')).downcase
|
|
56
|
+
.data-table
|
|
57
|
+
- if @projects.empty?
|
|
58
|
+
= t('.no_projects')
|
|
59
|
+
- else
|
|
60
|
+
table.small
|
|
61
|
+
thead
|
|
62
|
+
tr
|
|
63
|
+
th style="width: 200px;"
|
|
64
|
+
= t('.name')
|
|
65
|
+
th= t('.category')
|
|
66
|
+
th= t('.user_id')
|
|
67
|
+
th
|
|
68
|
+
a data-sort="goal" href='#'= t('.goal')
|
|
69
|
+
span.sort-order
|
|
70
|
+
th
|
|
71
|
+
a data-sort="pt.progress" href='#'= t('.pledged')
|
|
72
|
+
span.sort-order
|
|
73
|
+
th
|
|
74
|
+
a data-sort="pt.total_contributions" href='#'= t('.total_contributions')
|
|
75
|
+
span.sort-order
|
|
76
|
+
th= t('.recommended')
|
|
77
|
+
th= t('.featured')
|
|
78
|
+
th= t('.home_page')
|
|
79
|
+
th
|
|
80
|
+
a data-sort="online_date" href='#'= t('.online_date')
|
|
81
|
+
span.sort-order
|
|
82
|
+
th
|
|
83
|
+
a data-sort="projects.expires_at" href='#'= t('.expires_at')
|
|
84
|
+
span.sort-order
|
|
85
|
+
th= t('.state')
|
|
86
|
+
th
|
|
87
|
+
tbody
|
|
88
|
+
- @projects.each do |project|
|
|
89
|
+
tr id=project.id
|
|
90
|
+
td
|
|
91
|
+
= link_to project.name, main_app.project_path(project)
|
|
92
|
+
- if project.channels.present?
|
|
93
|
+
|
|
|
94
|
+
- project.channels.each do |channel|
|
|
95
|
+
span.label.label-inverse= channel.name
|
|
96
|
+
|
|
|
97
|
+
td= project.category
|
|
98
|
+
td= best_in_place project, :user_id, type: :input
|
|
99
|
+
td= best_in_place project, :goal, type: :input, display_as: :display_goal
|
|
100
|
+
td= "#{project.display_pledged} (#{project.progress}%)"
|
|
101
|
+
td= project.total_contributions
|
|
102
|
+
td.checkbox= best_in_place project, :recommended, type: :checkbox, collection: [t('words._no'), t('words._yes')]
|
|
103
|
+
td.checkbox= best_in_place project, :featured, type: :checkbox, collection: [t('words._no'), t('words._yes')]
|
|
104
|
+
td.checkbox= best_in_place project, :home_page, type: :checkbox, collection: [t('words._no'), t('words._yes')]
|
|
105
|
+
td= project.online_date.to_date if project.online_date
|
|
106
|
+
td= project.display_expires_at
|
|
107
|
+
td
|
|
108
|
+
- if project.online?
|
|
109
|
+
span.label.label-online= project.state
|
|
110
|
+
- elsif project.successful?
|
|
111
|
+
span.label.label-success= project.state
|
|
112
|
+
- elsif project.failed? or project.rejected?
|
|
113
|
+
span.label.label-important= project.state
|
|
114
|
+
- elsif project.waiting_funds?
|
|
115
|
+
span.label.label-warning= project.state
|
|
116
|
+
- else
|
|
117
|
+
span.label= project.state
|
|
118
|
+
td
|
|
119
|
+
= link_to 'javascript:void(0);', class: 'button tiny secondary', data: {dropdown: "dropdown-#{project.id}"} do
|
|
120
|
+
i.icon-et-down-dir
|
|
121
|
+
ul[id="dropdown-#{project.id}" data-dropdown-content class="f-dropdown"]
|
|
122
|
+
li
|
|
123
|
+
= link_to populate_contribution_project_path(project) do
|
|
124
|
+
= t('.populate_contribution')
|
|
125
|
+
- if project.can_approve?
|
|
126
|
+
li
|
|
127
|
+
= link_to approve_project_path(project), method: :put do
|
|
128
|
+
= t('.approve')
|
|
129
|
+
|
|
130
|
+
- if project.can_launch?
|
|
131
|
+
li
|
|
132
|
+
= link_to launch_project_path(project), method: :put do
|
|
133
|
+
= t('.launch')
|
|
134
|
+
|
|
135
|
+
- if project.can_reject?
|
|
136
|
+
li
|
|
137
|
+
= link_to reject_project_path(project), method: :put do
|
|
138
|
+
= t('.reject')
|
|
139
|
+
|
|
140
|
+
- if project.can_push_to_draft?
|
|
141
|
+
li
|
|
142
|
+
= link_to push_to_draft_project_path(project), method: :put do
|
|
143
|
+
= t('.send_to_draft')
|
|
144
|
+
|
|
145
|
+
- if project.can_push_to_trash?
|
|
146
|
+
li
|
|
147
|
+
= link_to project_path(project), method: :delete, data: {confirm: t('neighborly.admin.confirm_dialog')} do
|
|
148
|
+
= t('.send_to_trash')
|
|
149
|
+
= paginate @projects
|
|
150
|
+
|
|
151
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
- content_for :title, t('.title')
|
|
2
|
+
.admin
|
|
3
|
+
.row
|
|
4
|
+
= render 'dune/admin/layouts/menu'
|
|
5
|
+
section.content.large-12.columns
|
|
6
|
+
h3 = "Pre populate contributions on #{resource.name}"
|
|
7
|
+
|
|
8
|
+
= form_tag populate_project_path, :multipart => true do
|
|
9
|
+
fieldset.first
|
|
10
|
+
legend
|
|
11
|
+
| Create a new guest user
|
|
12
|
+
.input
|
|
13
|
+
= label_tag 'user[name]', 'Name'
|
|
14
|
+
= text_field_tag 'user[name]'
|
|
15
|
+
.input
|
|
16
|
+
= label_tag 'user[profile_type]', 'Profile Type'
|
|
17
|
+
.row
|
|
18
|
+
label.large-2.columns
|
|
19
|
+
= radio_button_tag 'user[profile_type]', 'personal', true
|
|
20
|
+
|
|
|
21
|
+
| Person
|
|
22
|
+
|
|
|
23
|
+
label.large-10.columns
|
|
24
|
+
= radio_button_tag 'user[profile_type]', 'organization'
|
|
25
|
+
|
|
|
26
|
+
| Organization (Company, Foundation, etc...)
|
|
27
|
+
.input
|
|
28
|
+
= label_tag 'user[uploaded_image]', 'Image'
|
|
29
|
+
= file_field_tag 'user[uploaded_image]'
|
|
30
|
+
fieldset.last
|
|
31
|
+
legend
|
|
32
|
+
| Or add this contribution a registered user
|
|
33
|
+
.input
|
|
34
|
+
= label_tag 'user[id]', 'User ID'
|
|
35
|
+
= text_field_tag 'user[id]'
|
|
36
|
+
.clearfix
|
|
37
|
+
hr
|
|
38
|
+
.input
|
|
39
|
+
= label_tag 'contribution[reward_id]', 'Reward value'
|
|
40
|
+
= select_tag 'contribution[reward_id]', options_from_collection_for_select(resource.rewards.not_soon, "id", "display_minimum"), :include_blank => true
|
|
41
|
+
.input
|
|
42
|
+
= label_tag 'contribution[value]', 'Value'
|
|
43
|
+
= text_field_tag 'contribution[value]'
|
|
44
|
+
.input
|
|
45
|
+
= label_tag 'contribution[anonymous]', 'Anonymous'
|
|
46
|
+
= check_box_tag 'contribution[anonymous]', true, checked: true
|
|
47
|
+
.input
|
|
48
|
+
= submit_tag 'Submit', class: 'button'
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
- @title = t('.title')
|
|
2
|
+
.admin
|
|
3
|
+
.row
|
|
4
|
+
= render 'dune/admin/layouts/menu'
|
|
5
|
+
section.content.large-12.columns
|
|
6
|
+
.filters
|
|
7
|
+
= form_tag tags_path, method: :get, class: 'form-horizontal' do |f|
|
|
8
|
+
.row
|
|
9
|
+
.large-6.columns
|
|
10
|
+
= label_tag :popular, t('.only_polular')
|
|
11
|
+
= check_box_tag :popular, :true, params[:popular].present?
|
|
12
|
+
.large-6.columns.text-right
|
|
13
|
+
= submit_tag t('.submit'), class: 'button'
|
|
14
|
+
|
|
15
|
+
.text-right
|
|
16
|
+
= link_to t('.new'), new_tag_path, class: 'button'
|
|
17
|
+
.data-table
|
|
18
|
+
= paginate @tags
|
|
19
|
+
- if @tags.empty?
|
|
20
|
+
= t('.no_tags')
|
|
21
|
+
- else
|
|
22
|
+
table
|
|
23
|
+
thead
|
|
24
|
+
tr
|
|
25
|
+
th style="width: 200px;"
|
|
26
|
+
= t('.name')
|
|
27
|
+
th
|
|
28
|
+
= t('.total_projects_using')
|
|
29
|
+
th
|
|
30
|
+
= t('.visible')
|
|
31
|
+
th
|
|
32
|
+
tbody
|
|
33
|
+
- @tags.each do |tag|
|
|
34
|
+
tr id=tag.id
|
|
35
|
+
td = tag.display_name
|
|
36
|
+
td = tag.taggings.count
|
|
37
|
+
td = best_in_place tag, :visible, type: :checkbox, collection: [t('words._no'), t('words._yes')]
|
|
38
|
+
td
|
|
39
|
+
.text-right
|
|
40
|
+
= link_to t('.edit'), edit_tag_path(tag), class: 'button tiny'
|
|
41
|
+
|
|
|
42
|
+
= link_to t('.destroy'), tag_path(tag), method: :delete, confirm: t('neighborly.admin.confirm_dialog'), class: 'button tiny alert'
|
|
43
|
+
|
|
44
|
+
= paginate @tags
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
- @title = t('.title')
|
|
2
|
+
.admin
|
|
3
|
+
.row
|
|
4
|
+
= render 'dune/admin/layouts/menu'
|
|
5
|
+
section.content.large-12.columns
|
|
6
|
+
.filters
|
|
7
|
+
= form_for users_path, method: :get, class: 'form-horizontal' do |f|
|
|
8
|
+
= f.hidden_field :order_by, name: :order_by, value: params[:order_by]
|
|
9
|
+
.row
|
|
10
|
+
.large-2.columns
|
|
11
|
+
= f.label :by_id, t('.id')
|
|
12
|
+
= f.text_field :by_id, class: 'input-small', name: :by_id, value: params[:by_id]
|
|
13
|
+
.large-5.columns
|
|
14
|
+
= f.label :by_name, t('.name')
|
|
15
|
+
= f.text_field :by_name, class: 'input-small', name: :by_name, value: params[:by_name]
|
|
16
|
+
.large-5.columns
|
|
17
|
+
= f.label :by_email, t('.email')
|
|
18
|
+
= f.text_field :by_email, class: 'input-small', name: :by_email, value: params[:by_email]
|
|
19
|
+
.large-12.columns
|
|
20
|
+
= f.label :by_key, t('.key')
|
|
21
|
+
= f.text_field :by_key, name: :by_key, value: params[:by_key]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
.large-6.columns.text-left
|
|
25
|
+
= check_box_tag :has_credits, :true, params[:has_credits].present?
|
|
26
|
+
= label_tag :has_credits, t('.credits')
|
|
27
|
+
.large-6.columns.text-right
|
|
28
|
+
= submit_tag t('.submit'), class: 'button'
|
|
29
|
+
|
|
30
|
+
.row
|
|
31
|
+
.large-6.columns.text-left
|
|
32
|
+
strong= "#{@total_users} "
|
|
33
|
+
= t('.total_contributions')
|
|
34
|
+
| ·
|
|
35
|
+
strong= "#{number_to_currency @total_contributed, precision: 0} "
|
|
36
|
+
= t('.total_contributed')
|
|
37
|
+
| ·
|
|
38
|
+
strong= "#{number_to_currency @total_credits, precision: 0} "
|
|
39
|
+
= t('.total_credits')
|
|
40
|
+
.large-6.columns.text-right
|
|
41
|
+
= paginate @users
|
|
42
|
+
.data-table
|
|
43
|
+
- if @users.empty?
|
|
44
|
+
= t('.no_users')
|
|
45
|
+
- else
|
|
46
|
+
table
|
|
47
|
+
thead
|
|
48
|
+
tr
|
|
49
|
+
th= t('.id')
|
|
50
|
+
th= t('.user')
|
|
51
|
+
th= t('.email')
|
|
52
|
+
th
|
|
53
|
+
a data-sort="coalesce(user_totals.sum,0)" href='#'= t('.total_contributed')
|
|
54
|
+
span.sort-order
|
|
55
|
+
th
|
|
56
|
+
a data-sort="coalesce(user_totals.credits,0)" href='#'= t('.credits')
|
|
57
|
+
span.sort-order
|
|
58
|
+
th
|
|
59
|
+
tbody
|
|
60
|
+
- for user in @users do
|
|
61
|
+
tr id=user.id
|
|
62
|
+
td= link_to user.id, main_app.user_path(user), target: '_blank'
|
|
63
|
+
td= link_to user.name, contributions_path(by_user_id: user.id), target: '_blank'
|
|
64
|
+
td= user.email
|
|
65
|
+
td= user.user_total ? user.user_total.sum : 0
|
|
66
|
+
td= user.credits
|
|
67
|
+
td= link_to t('.edit'), main_app.edit_user_path(user), class: 'button tiny', target: :blank
|
|
68
|
+
= paginate @users
|
data/bin/rails
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
|
|
3
|
+
|
|
4
|
+
ENGINE_ROOT = File.expand_path('../..', __FILE__)
|
|
5
|
+
ENGINE_PATH = File.expand_path('../../lib/dune/admin/engine', __FILE__)
|
|
6
|
+
|
|
7
|
+
require 'rails/all'
|
|
8
|
+
require 'rails/engine/commands'
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
en:
|
|
2
|
+
neighborly:
|
|
3
|
+
admin:
|
|
4
|
+
confirm_dialog: 'You are sure?'
|
|
5
|
+
dashboard:
|
|
6
|
+
index:
|
|
7
|
+
title: 'Dashboard'
|
|
8
|
+
menu: 'Dashboard'
|
|
9
|
+
download_statistics_report: 'Download Statistics Report'
|
|
10
|
+
download_funding_raised_per_project_report: 'Download Funding Raised Per Project Report'
|
|
11
|
+
total_users:
|
|
12
|
+
title: 'Total Users'
|
|
13
|
+
hint: 'Number of People Engaged on Platform'
|
|
14
|
+
total_organization_users:
|
|
15
|
+
title: 'Total Companies/Organizations'
|
|
16
|
+
hint: 'Number of Companies/Organizations Engaged on Platform'
|
|
17
|
+
total_communities:
|
|
18
|
+
title: 'Total Communities'
|
|
19
|
+
hint: 'Number of Communities Served'
|
|
20
|
+
total_projects:
|
|
21
|
+
title: 'Total Projects'
|
|
22
|
+
hint: 'Number of Projects on Plataform'
|
|
23
|
+
total_projects_draft:
|
|
24
|
+
title: 'Total Projects on Draft'
|
|
25
|
+
hint: 'Number of Projects on Draft Mode'
|
|
26
|
+
total_projects_online:
|
|
27
|
+
title: 'Total Projects Online'
|
|
28
|
+
hint: 'Number of Projects Online Now'
|
|
29
|
+
total_contributions:
|
|
30
|
+
title: 'Total Contributions'
|
|
31
|
+
hint: 'Number of Contributions'
|
|
32
|
+
total_contributors:
|
|
33
|
+
title: 'Total Contributors'
|
|
34
|
+
hint: 'Number of Contributors'
|
|
35
|
+
total_contributed:
|
|
36
|
+
title: 'Total Contributed'
|
|
37
|
+
hint: 'Funding Raised'
|
|
38
|
+
total_subscribers:
|
|
39
|
+
title: 'Total Followers'
|
|
40
|
+
hint: 'Number of Followers'
|
|
41
|
+
contacts:
|
|
42
|
+
index:
|
|
43
|
+
menu: 'Contacts'
|
|
44
|
+
title: 'Companies Contacts'
|
|
45
|
+
first_name: 'First Name'
|
|
46
|
+
last_name: 'Last Name'
|
|
47
|
+
email: 'Email Address'
|
|
48
|
+
company_name: 'Company Name'
|
|
49
|
+
created_at: 'Created at'
|
|
50
|
+
no_records: 'No contacts yet'
|
|
51
|
+
details: 'Details'
|
|
52
|
+
show:
|
|
53
|
+
title: 'Companies Contact - Details'
|
|
54
|
+
first_name: 'First Name'
|
|
55
|
+
last_name: 'Last Name'
|
|
56
|
+
phone: 'Phone'
|
|
57
|
+
email: 'Email Address'
|
|
58
|
+
company_name: 'Company Name'
|
|
59
|
+
company_website: 'Company Website'
|
|
60
|
+
message: 'Message'
|
|
61
|
+
created_at: 'Contact sent at %{date}'
|
|
62
|
+
back: 'Back'
|
|
63
|
+
tags:
|
|
64
|
+
index:
|
|
65
|
+
menu: 'Tags'
|
|
66
|
+
title: 'Tags management'
|
|
67
|
+
name: 'Name'
|
|
68
|
+
total_projects_using: 'Total projects using'
|
|
69
|
+
no_tags: 'No tags yet'
|
|
70
|
+
edit: 'Edit'
|
|
71
|
+
destroy: 'Destroy'
|
|
72
|
+
new: 'Add new tag'
|
|
73
|
+
only_polular: 'Show only popular tags'
|
|
74
|
+
submit: 'Search'
|
|
75
|
+
new:
|
|
76
|
+
title:
|
|
77
|
+
'Add new tag'
|
|
78
|
+
edit:
|
|
79
|
+
title: 'Edit tag'
|
|
80
|
+
channels:
|
|
81
|
+
messages:
|
|
82
|
+
successful:
|
|
83
|
+
push_to_draft: 'The channel is no longer visible!'
|
|
84
|
+
push_to_online: 'The channel is now visible!'
|
|
85
|
+
index:
|
|
86
|
+
menu: 'Channels'
|
|
87
|
+
title: 'Channels management'
|
|
88
|
+
manage_members: 'Manage'
|
|
89
|
+
name: 'Name'
|
|
90
|
+
members: 'Members'
|
|
91
|
+
permalink: 'Permalink'
|
|
92
|
+
created_at: 'Created at'
|
|
93
|
+
state: 'State'
|
|
94
|
+
no_chaneels: 'No channels yet'
|
|
95
|
+
edit: 'Edit'
|
|
96
|
+
destroy: 'Destroy'
|
|
97
|
+
new: 'Add new channel'
|
|
98
|
+
push_to_draft: 'Send to draft'
|
|
99
|
+
push_to_online: 'Make it visible'
|
|
100
|
+
new:
|
|
101
|
+
title:
|
|
102
|
+
'Add new channel'
|
|
103
|
+
edit:
|
|
104
|
+
title: 'Edit channel'
|
|
105
|
+
form:
|
|
106
|
+
associate_existing_user: 'Associate an existing user'
|
|
107
|
+
create_new_channel_user: 'Create a new user'
|
|
108
|
+
start_content: 'Content for Start Page'
|
|
109
|
+
success_content: 'Content for Successfully Submitted Page'
|
|
110
|
+
members:
|
|
111
|
+
messages:
|
|
112
|
+
removed: 'Successfully removed!'
|
|
113
|
+
success: 'Success! Now the user owns this channel.'
|
|
114
|
+
user_not_found: 'User not found.'
|
|
115
|
+
already_a_member: "This user already owns a channel."
|
|
116
|
+
index:
|
|
117
|
+
title: 'Manage %{channel_name} Members'
|
|
118
|
+
no_members: 'No memberts yet.'
|
|
119
|
+
id: 'User ID'
|
|
120
|
+
name: 'Name'
|
|
121
|
+
email: 'Email'
|
|
122
|
+
destroy: 'Remove'
|
|
123
|
+
new: 'Add new Member'
|
|
124
|
+
new:
|
|
125
|
+
title: 'Add new Member'
|
|
126
|
+
user_id: 'User ID'
|
|
127
|
+
|
|
128
|
+
press_assets:
|
|
129
|
+
index:
|
|
130
|
+
menu: 'Press Assets'
|
|
131
|
+
page_title: 'Press assets management'
|
|
132
|
+
no_press_assets: 'No press assets'
|
|
133
|
+
title: 'Title'
|
|
134
|
+
url: 'URL'
|
|
135
|
+
image: 'Image'
|
|
136
|
+
edit: 'Edit'
|
|
137
|
+
destroy: 'Destroy'
|
|
138
|
+
new: 'Add new press asset'
|
|
139
|
+
new:
|
|
140
|
+
title: 'Add new press asset'
|
|
141
|
+
edit:
|
|
142
|
+
title: 'Edit press asset'
|
|
143
|
+
projects:
|
|
144
|
+
index:
|
|
145
|
+
by_state: 'By state'
|
|
146
|
+
between_created_at: 'Created at between'
|
|
147
|
+
between_expires_at: 'Expires at between'
|
|
148
|
+
between_online_date: 'Between online date'
|
|
149
|
+
project: 'Search'
|
|
150
|
+
with_state: 'By state'
|
|
151
|
+
by_category: 'By category'
|
|
152
|
+
user: 'User name'
|
|
153
|
+
by_user_email: 'By user email'
|
|
154
|
+
id: ID
|
|
155
|
+
name: 'Name'
|
|
156
|
+
populate_contribution: 'Prepopulate contribution'
|
|
157
|
+
send_to_trash: "Send to TRASH"
|
|
158
|
+
send_to_draft: 'Send to DRAFT!'
|
|
159
|
+
approve: 'Approve!'
|
|
160
|
+
reject: 'Reject!'
|
|
161
|
+
launch: 'Launch!'
|
|
162
|
+
user_id: 'User ID'
|
|
163
|
+
goal: 'Goal'
|
|
164
|
+
total_contributions: 'Contributions'
|
|
165
|
+
online_date: 'Online date'
|
|
166
|
+
pledged: 'Pledged'
|
|
167
|
+
recommended: 'Recommended?'
|
|
168
|
+
state: 'State'
|
|
169
|
+
menu: 'Projects'
|
|
170
|
+
title: 'Projects management'
|
|
171
|
+
total_projects: 'projects'
|
|
172
|
+
submit: 'filter'
|
|
173
|
+
expires_at: 'Expires at'
|
|
174
|
+
category: 'Category'
|
|
175
|
+
order_table: 'Order table'
|
|
176
|
+
order_date: 'Send date'
|
|
177
|
+
order_asc: 'Goal asc'
|
|
178
|
+
order_desc: 'Goal desc'
|
|
179
|
+
order_created_at: 'Submission date'
|
|
180
|
+
featured: 'Featured?'
|
|
181
|
+
home_page: 'Home page?'
|
|
182
|
+
financials:
|
|
183
|
+
index:
|
|
184
|
+
menu: 'Financial reports'
|
|
185
|
+
title: 'Financial reports'
|
|
186
|
+
submit: 'Filter'
|
|
187
|
+
with_state: 'By state'
|
|
188
|
+
by_progress: By progress %
|
|
189
|
+
user: 'User name'
|
|
190
|
+
project: 'Project name'
|
|
191
|
+
download_search_report: 'Download report of results'
|
|
192
|
+
users:
|
|
193
|
+
index:
|
|
194
|
+
title: "Users management"
|
|
195
|
+
menu: 'Users'
|
|
196
|
+
credits: Credits
|
|
197
|
+
credits_view: "Calculated credits"
|
|
198
|
+
id: ID
|
|
199
|
+
key: Key
|
|
200
|
+
submit: Search
|
|
201
|
+
has_credits_difference: "Discrepancy in credits"
|
|
202
|
+
total_contributed: contributed
|
|
203
|
+
total_contributors: contributors
|
|
204
|
+
total_contributions: contributions
|
|
205
|
+
total_users: users
|
|
206
|
+
total_credits: credits
|
|
207
|
+
total_credits_view: "calculated credits"
|
|
208
|
+
user: User
|
|
209
|
+
value: Value
|
|
210
|
+
provider: Provider
|
|
211
|
+
edit: 'Edit'
|
|
212
|
+
contributions:
|
|
213
|
+
messages:
|
|
214
|
+
successful:
|
|
215
|
+
confirm: 'Contribution confirmed!'
|
|
216
|
+
pendent: 'Contribution unconfirmed!'
|
|
217
|
+
refund: 'Contribution refunded!'
|
|
218
|
+
change_reward: 'Reward changed!'
|
|
219
|
+
hide: 'Contribution hidden!'
|
|
220
|
+
cancel: 'Contribution canceled!'
|
|
221
|
+
push_to_trash: 'Contribution deleted!'
|
|
222
|
+
index:
|
|
223
|
+
push_to_trash: 'Delete contribution'
|
|
224
|
+
cancel: 'Cancel contribution'
|
|
225
|
+
refund_and_hide: 'Refund and hide'
|
|
226
|
+
contribution_info: 'Info of contribution %{key}'
|
|
227
|
+
payment_id: 'Payment ID'
|
|
228
|
+
payment_method: 'Payment method'
|
|
229
|
+
payment_fee: 'Payment method fee'
|
|
230
|
+
fee_paid_by_user: 'Fee paid by user?'
|
|
231
|
+
user_email: 'User email'
|
|
232
|
+
pending_to_refund: 'Pending to refund'
|
|
233
|
+
created_at: 'Created at'
|
|
234
|
+
title: "Contributions management"
|
|
235
|
+
menu: 'Contributions'
|
|
236
|
+
anonymous: Anonymous?
|
|
237
|
+
confirmed: Confirmed?
|
|
238
|
+
credits: "Used credits?"
|
|
239
|
+
id: ID
|
|
240
|
+
key: Key
|
|
241
|
+
no_contributions: "No contributors found."
|
|
242
|
+
project: Project
|
|
243
|
+
refunded: Refunded?
|
|
244
|
+
requested_refund: "Requested refund?"
|
|
245
|
+
reward: Reward
|
|
246
|
+
no_reward: "No reward"
|
|
247
|
+
submit: Search
|
|
248
|
+
total_contributed: contributed
|
|
249
|
+
total_contributors: contributors
|
|
250
|
+
total_contributions: contributions
|
|
251
|
+
total_users: Users
|
|
252
|
+
user: User
|
|
253
|
+
value: Value
|
|
254
|
+
statistics:
|
|
255
|
+
index:
|
|
256
|
+
menu: "Statistics"
|
|
257
|
+
title: "Statistics"
|
|
258
|
+
total_users: "Users"
|
|
259
|
+
total_contributions: "Contributions"
|
|
260
|
+
total_contributors: "Contributors"
|
|
261
|
+
total_contributed: "Contributed"
|
|
262
|
+
total_projects: "Projects"
|
|
263
|
+
total_projects_success: "Successful"
|
|
264
|
+
total_projects_online: "Online"
|
|
265
|
+
projects_by_week:
|
|
266
|
+
title: "Projects sent per week"
|
|
267
|
+
current_period: "Last 8 weeks"
|
|
268
|
+
previous_period: "Previous 8 weeks"
|
|
269
|
+
last_year: "Last year"
|
|
270
|
+
contributions_by_week:
|
|
271
|
+
title: "Backed value confirmed per week"
|
|
272
|
+
current_period: "Last 8 weeks"
|
|
273
|
+
previous_period: "Previous 8 weeks"
|
|
274
|
+
last_year: "Last year"
|