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,58 @@
|
|
|
1
|
+
- @title = t('.title')
|
|
2
|
+
.admin
|
|
3
|
+
.row
|
|
4
|
+
= render 'dune/admin/layouts/menu'
|
|
5
|
+
section.content.large-12.columns
|
|
6
|
+
.text-right
|
|
7
|
+
= link_to t('.new'), new_channel_path, class: 'button'
|
|
8
|
+
.data-table
|
|
9
|
+
= paginate collection
|
|
10
|
+
- if collection.empty?
|
|
11
|
+
= t('.no_channels')
|
|
12
|
+
- else
|
|
13
|
+
table
|
|
14
|
+
thead
|
|
15
|
+
tr
|
|
16
|
+
th style="width: 200px;"
|
|
17
|
+
= t('.name')
|
|
18
|
+
th
|
|
19
|
+
= t('.members')
|
|
20
|
+
th
|
|
21
|
+
= t('.permalink')
|
|
22
|
+
th
|
|
23
|
+
= t('.created_at')
|
|
24
|
+
th
|
|
25
|
+
= t('.state')
|
|
26
|
+
th
|
|
27
|
+
tbody
|
|
28
|
+
- collection.each do |channel|
|
|
29
|
+
tr id=channel.id
|
|
30
|
+
td = channel.name
|
|
31
|
+
td
|
|
32
|
+
- if channel.members.any?
|
|
33
|
+
ul
|
|
34
|
+
- for user in channel.members
|
|
35
|
+
li = link_to user.display_name, main_app.user_path(user)
|
|
36
|
+
= link_to t('.manage_members'), channel_members_path(channel), class: 'button secondary tiny'
|
|
37
|
+
td = channel.permalink
|
|
38
|
+
td = channel.created_at.to_date
|
|
39
|
+
td = channel.state
|
|
40
|
+
td
|
|
41
|
+
.text-right
|
|
42
|
+
= link_to t('.edit'), edit_channel_path(channel), class: 'button tiny'
|
|
43
|
+
|
|
|
44
|
+
= link_to t('.destroy'), channel_path(channel), method: :delete, confirm: t('neighborly.admin.confirm_dialog'), class: 'button tiny alert'
|
|
45
|
+
|
|
|
46
|
+
= link_to 'javascript:void(0);', class: 'button tiny secondary', data: {dropdown: "dropdown-#{channel.id}"} do
|
|
47
|
+
i.icon-et-down-dir
|
|
48
|
+
ul.text-left[id="dropdown-#{channel.id}" data-dropdown-content class="f-dropdown"]
|
|
49
|
+
li
|
|
50
|
+
- if channel.online?
|
|
51
|
+
= link_to push_to_draft_channel_path(channel), method: :put do
|
|
52
|
+
= t('.push_to_draft')
|
|
53
|
+
- if channel.draft?
|
|
54
|
+
= link_to push_to_online_channel_path(channel), method: :put do
|
|
55
|
+
= t('.push_to_online')
|
|
56
|
+
|
|
57
|
+
= paginate collection
|
|
58
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
- @title = t('.title', channel_name: parent.name)
|
|
2
|
+
.admin
|
|
3
|
+
.row
|
|
4
|
+
= render 'dune/admin/layouts/menu'
|
|
5
|
+
section.content.large-12.columns
|
|
6
|
+
.row
|
|
7
|
+
.large-8.columns
|
|
8
|
+
h3 = @title
|
|
9
|
+
|
|
10
|
+
.large-4.columns.text-right
|
|
11
|
+
= link_to t('.new'), new_channel_member_path(parent), class: 'button'
|
|
12
|
+
.data-table
|
|
13
|
+
= paginate @members
|
|
14
|
+
- if @members.empty?
|
|
15
|
+
= t('.no_members')
|
|
16
|
+
- else
|
|
17
|
+
table
|
|
18
|
+
thead
|
|
19
|
+
tr
|
|
20
|
+
th
|
|
21
|
+
= t('.id')
|
|
22
|
+
th
|
|
23
|
+
= t('.name')
|
|
24
|
+
th
|
|
25
|
+
= t('.email')
|
|
26
|
+
th
|
|
27
|
+
tbody
|
|
28
|
+
- @members.each do |member|
|
|
29
|
+
tr id=member.id
|
|
30
|
+
td = member.id
|
|
31
|
+
td = link_to member.display_name, member
|
|
32
|
+
td = member.email
|
|
33
|
+
td
|
|
34
|
+
.text-right
|
|
35
|
+
= link_to t('.destroy'), channel_member_path(parent, member), method: :delete, confirm: t('neighborly.admin.confirm_dialog'), class: 'button tiny alert'
|
|
36
|
+
|
|
37
|
+
= paginate @members
|
|
38
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
.admin
|
|
2
|
+
.row
|
|
3
|
+
= render 'dune/admin/layouts/menu'
|
|
4
|
+
section.content.large-12.columns
|
|
5
|
+
.title
|
|
6
|
+
h3 = @title = t('.title')
|
|
7
|
+
|
|
8
|
+
= form_tag channel_members_path(parent) do
|
|
9
|
+
= label_tag :user_id, t('.user_id')
|
|
10
|
+
= text_field_tag :user_id
|
|
11
|
+
= button_tag :submit, data: { disable_with: I18n.t('words.sending') }, class: 'button'
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
- @title = t('.title')
|
|
2
|
+
.admin
|
|
3
|
+
.row
|
|
4
|
+
= render 'dune/admin/layouts/menu'
|
|
5
|
+
section.content.large-12.columns
|
|
6
|
+
.data-table
|
|
7
|
+
= paginate collection
|
|
8
|
+
- if collection.empty?
|
|
9
|
+
= t('.no_records')
|
|
10
|
+
- else
|
|
11
|
+
table
|
|
12
|
+
thead
|
|
13
|
+
tr
|
|
14
|
+
th = t('.first_name')
|
|
15
|
+
th = t('.last_name')
|
|
16
|
+
th = t('.company_name')
|
|
17
|
+
th = t('.email_address')
|
|
18
|
+
th = t('.created_at')
|
|
19
|
+
th
|
|
20
|
+
tbody
|
|
21
|
+
- collection.each do |contact|
|
|
22
|
+
tr id=contact.id
|
|
23
|
+
td = contact.first_name
|
|
24
|
+
td = contact.last_name
|
|
25
|
+
td = contact.company_name
|
|
26
|
+
td = contact.email
|
|
27
|
+
td = l contact.created_at, format: :long
|
|
28
|
+
td
|
|
29
|
+
.text-right
|
|
30
|
+
= link_to t('.details'), contact_path(contact), class: 'button tiny'
|
|
31
|
+
|
|
32
|
+
= paginate collection
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
- @title = t('.title')
|
|
2
|
+
.admin
|
|
3
|
+
.row
|
|
4
|
+
= render 'dune/admin/layouts/menu'
|
|
5
|
+
section.content.large-12.columns
|
|
6
|
+
h2 = @title
|
|
7
|
+
p
|
|
8
|
+
i = t('.created_at', date: l(resource.created_at, format: :long))
|
|
9
|
+
|
|
10
|
+
strong = "#{t('.first_name')}: "
|
|
11
|
+
p = resource.first_name
|
|
12
|
+
|
|
13
|
+
strong = "#{t('.last_name')}: "
|
|
14
|
+
p = resource.last_name
|
|
15
|
+
|
|
16
|
+
strong = "#{t('.email')}: "
|
|
17
|
+
p = resource.email
|
|
18
|
+
|
|
19
|
+
- if resource.phone.present?
|
|
20
|
+
strong = "#{t('.phone')}: "
|
|
21
|
+
p = resource.phone
|
|
22
|
+
|
|
23
|
+
strong = "#{t('.company_name')}: "
|
|
24
|
+
p = resource.company_name
|
|
25
|
+
|
|
26
|
+
- if resource.company_website.present?
|
|
27
|
+
strong = "#{t('.company_website')}: "
|
|
28
|
+
p = resource.company_website
|
|
29
|
+
|
|
30
|
+
- if resource.message.present?
|
|
31
|
+
strong = "#{t('.message')}: "
|
|
32
|
+
p = resource.message
|
|
33
|
+
|
|
34
|
+
= link_to t('.back'), :back, class: 'button'
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
- content_for :title, t('.title')
|
|
2
|
+
.admin
|
|
3
|
+
.row
|
|
4
|
+
= render 'dune/admin/layouts/menu'
|
|
5
|
+
section.content.large-12.columns
|
|
6
|
+
.filters
|
|
7
|
+
= form_tag contributions_path, method: :get, class: 'form-horizontal' do |f|
|
|
8
|
+
.row
|
|
9
|
+
.large-3.columns
|
|
10
|
+
= label_tag :by_user_id, t('.user_id')
|
|
11
|
+
= text_field_tag :by_user_id, params[:by_user_id], class: 'input-small'
|
|
12
|
+
.large-3.columns
|
|
13
|
+
= label_tag :between_values, t('.between_values')
|
|
14
|
+
= text_field_tag 'between_values[start_at]', (params[:between_values][:start_at] if params[:between_values].present?), class: 'input-small'
|
|
15
|
+
|
|
|
16
|
+
|
|
|
17
|
+
= text_field_tag 'between_values[ends_at]', (params[:between_values][:ends_at] if params[:between_values].present?), class: 'input-small'
|
|
18
|
+
.large-3.columns
|
|
19
|
+
= label_tag :with_state, t('.by_state')
|
|
20
|
+
= select_tag :with_state, options_for_select(Contribution.state_names, params[:with_state]), include_blank: true
|
|
21
|
+
.large-3.columns
|
|
22
|
+
= label_tag :by_key, t('.key')
|
|
23
|
+
= text_field_tag :by_key, params[:by_key]
|
|
24
|
+
.large-6.columns
|
|
25
|
+
= label_tag :project_name_contains, t('.project')
|
|
26
|
+
= text_field_tag :project_name_contains, params[:project_name_contains]
|
|
27
|
+
.large-6.columns
|
|
28
|
+
= label_tag :user_name_contains, t('.user')
|
|
29
|
+
= text_field_tag :user_name_contains, params[:user_name_contains], class: 'input-medium'
|
|
30
|
+
.large-6.columns
|
|
31
|
+
= label_tag :user_email_contains, t('.user_email')
|
|
32
|
+
= text_field_tag :user_email_contains, params[:user_email_contains], class: 'input-medium'
|
|
33
|
+
.large-6.columns.text-left
|
|
34
|
+
= check_box_tag :credits, :true, params[:credits]
|
|
35
|
+
= label_tag :credits, t('.credits')
|
|
36
|
+
.large-6.columns.text-right
|
|
37
|
+
= submit_tag t('.submit'), class: 'button'
|
|
38
|
+
|
|
39
|
+
.row
|
|
40
|
+
.large-6.columns.text-left
|
|
41
|
+
= paginate @contributions
|
|
42
|
+
.large-6.columns.text-right
|
|
43
|
+
= pluralize_without_number collection.count, t('words.found_singular'), t('words.found_plural')
|
|
44
|
+
|
|
|
45
|
+
strong= collection.count
|
|
46
|
+
|
|
|
47
|
+
= pluralize_without_number(collection.count, t('words.contribution_singular'), t('words.contribution_plural')).downcase
|
|
48
|
+
- if @contributions.empty?
|
|
49
|
+
= t('.no_contributions')
|
|
50
|
+
- else
|
|
51
|
+
table
|
|
52
|
+
thead
|
|
53
|
+
tr
|
|
54
|
+
th= t('.info')
|
|
55
|
+
th= t('.project')
|
|
56
|
+
th= t('.user')
|
|
57
|
+
th= t('.value')
|
|
58
|
+
th= t('.reward')
|
|
59
|
+
th= t('.key')
|
|
60
|
+
th= t('.anonymous')
|
|
61
|
+
th= t('.credits')
|
|
62
|
+
th= t('.state')
|
|
63
|
+
th
|
|
64
|
+
tbody
|
|
65
|
+
- @contributions.includes(:project, :user, :reward).each do |contribution|
|
|
66
|
+
tr id=contribution.id
|
|
67
|
+
td
|
|
68
|
+
.reveal-modal.small.fixed id="contribution-info-#{contribution.id}"
|
|
69
|
+
a.close-reveal-modal ×
|
|
70
|
+
h5 = t('.contribution_info', key: contribution.key)
|
|
71
|
+
.modal-body style='text-align: left'
|
|
72
|
+
p
|
|
73
|
+
strong= t('.payment_method')
|
|
74
|
+
|
|
|
75
|
+
= contribution.payment_method
|
|
76
|
+
p
|
|
77
|
+
strong= t('.payment_fee')
|
|
78
|
+
|
|
|
79
|
+
= number_to_currency contribution.payment_service_fee
|
|
80
|
+
p
|
|
81
|
+
strong= t('.fee_paid_by_user')
|
|
82
|
+
|
|
|
83
|
+
= contribution.payment_service_fee_paid_by_user ? t('words._yes') : t('words._no')
|
|
84
|
+
p
|
|
85
|
+
strong= t('.payment_id')
|
|
86
|
+
|
|
|
87
|
+
= contribution.payment_id
|
|
88
|
+
p
|
|
89
|
+
strong= t('.user_email')
|
|
90
|
+
|
|
|
91
|
+
= contribution.user.email
|
|
92
|
+
p
|
|
93
|
+
strong= t('.created_at')
|
|
94
|
+
|
|
|
95
|
+
= l(contribution.created_at)
|
|
96
|
+
|
|
97
|
+
= link_to "#contribution-info-#{contribution.id}", class: 'button tiny secondary', data: { 'reveal-id' => "contribution-info-#{contribution.id}" } do
|
|
98
|
+
i.icon-et-info-circled
|
|
99
|
+
td title=contribution.project.name
|
|
100
|
+
= link_to main_app.project_path(contribution.project) do
|
|
101
|
+
= image_tag contribution.project.display_image, size: '100x100'
|
|
102
|
+
td title=contribution.user.display_name
|
|
103
|
+
= link_to main_app.user_path(contribution.user) do
|
|
104
|
+
= contribution.user.display_image_html width: 50, height: 50
|
|
105
|
+
.user_id= best_in_place contribution, :user_id, type: :input
|
|
106
|
+
td= best_in_place contribution, :value, type: :input
|
|
107
|
+
td title=("#{contribution.reward.display_minimum} - #{contribution.reward.description}" if contribution.reward)
|
|
108
|
+
- if contribution.reward
|
|
109
|
+
= contribution.reward.display_minimum
|
|
110
|
+
- else
|
|
111
|
+
| -
|
|
112
|
+
|
|
|
113
|
+
= link_to 'javascript:void(0);', class: 'button tiny secondary', data: {dropdown: "dropdown-reward-#{contribution.id}"} do
|
|
114
|
+
i.icon-et-down-dir
|
|
115
|
+
ul[id="dropdown-reward-#{contribution.id}" data-dropdown-content class="f-dropdown"]
|
|
116
|
+
li title=("#{t('.no_reward')}" ) = link_to t('.no_reward'), change_reward_contribution_path(contribution, reward_id: nil), method: :put
|
|
117
|
+
- contribution.available_rewards.each do |reward|
|
|
118
|
+
li title=("#{reward.display_minimum} - #{reward.description}" ) = link_to reward.minimum_value, change_reward_contribution_path(contribution, reward_id: reward.id, local_params: params), method: :put
|
|
119
|
+
|
|
120
|
+
td.key= contribution.key
|
|
121
|
+
td.checkbox= best_in_place contribution, :anonymous, type: :checkbox, collection: [t('words._no'), t('words._yes')]
|
|
122
|
+
td= (contribution.credits ? t('words._yes') : t('words._no'))
|
|
123
|
+
td= contribution.state
|
|
124
|
+
td
|
|
125
|
+
= link_to 'javascript:void(0);', class: 'button tiny secondary', data: {dropdown: "dropdown-#{contribution.id}"} do
|
|
126
|
+
i.icon-et-down-dir
|
|
127
|
+
ul[id="dropdown-#{contribution.id}" data-dropdown-content class="f-dropdown"]
|
|
128
|
+
- if contribution.confirmed?
|
|
129
|
+
li= link_to t('admin.contributions.index.unconfirm_contribution'), pendent_contribution_path(contribution, local_params: params), method: :put
|
|
130
|
+
- else
|
|
131
|
+
li= link_to t('admin.contributions.index.confirm_contribution'), confirm_contribution_path(contribution, local_params: params), method: :put
|
|
132
|
+
- if contribution.requested_refund? or contribution.confirmed?
|
|
133
|
+
li= link_to t('admin.contributions.index.refund_contribution'), refund_contribution_path(contribution, local_params: params), method: :put
|
|
134
|
+
li= link_to t('admin.contributions.index.refund_and_hide'), hide_contribution_path(contribution, local_params: params), method: :put
|
|
135
|
+
li= link_to t('admin.contributions.index.cancel'), cancel_contribution_path(contribution, local_params: params), method: :put
|
|
136
|
+
li= link_to t('admin.contributions.index.push_to_trash'), push_to_trash_contribution_path(contribution, local_params: params), method: :put
|
|
137
|
+
= paginate @contributions
|
|
138
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
- @title = t('.title')
|
|
2
|
+
- @statistics = collection.first
|
|
3
|
+
.admin
|
|
4
|
+
.row
|
|
5
|
+
= render 'dune/admin/layouts/menu'
|
|
6
|
+
section.content.large-12.columns
|
|
7
|
+
.text-right
|
|
8
|
+
= link_to t('.download_funding_raised_per_project_report'), reports_funding_raised_per_project_reports_path(format: :csv), class: 'button small secondary'
|
|
9
|
+
|
|
|
10
|
+
= link_to t('.download_statistics_report'), reports_statistics_path(format: :csv), class: 'button small secondary'
|
|
11
|
+
|
|
12
|
+
.row.collapse
|
|
13
|
+
.large-6.small-6.columns
|
|
14
|
+
.box
|
|
15
|
+
.title = t('.total_contributions.title')
|
|
16
|
+
p = @statistics.total_contributions
|
|
17
|
+
.hint = t('.total_contributions.hint')
|
|
18
|
+
|
|
19
|
+
.large-6.small-6.columns
|
|
20
|
+
.box
|
|
21
|
+
.title = t('.total_contributors.title')
|
|
22
|
+
p = @statistics.total_contributors
|
|
23
|
+
.hint = t('.total_contributors.hint')
|
|
24
|
+
|
|
25
|
+
.large-6.small-6.columns
|
|
26
|
+
.box
|
|
27
|
+
.title = t('.total_contributed.title')
|
|
28
|
+
p = number_to_currency @statistics.total_contributed
|
|
29
|
+
.hint = t('.total_contributed.hint')
|
|
30
|
+
|
|
31
|
+
.large-6.small-6.columns
|
|
32
|
+
.box
|
|
33
|
+
.title = t('.total_users.title')
|
|
34
|
+
p = @statistics.total_users
|
|
35
|
+
.hint = t('.total_users.hint')
|
|
36
|
+
|
|
37
|
+
.large-6.small-6.columns
|
|
38
|
+
.box
|
|
39
|
+
.title = t('.total_organization_users.title')
|
|
40
|
+
p = @statistics.total_organization_users
|
|
41
|
+
.hint = t('.total_organization_users.hint')
|
|
42
|
+
|
|
43
|
+
.large-6.small-6.columns
|
|
44
|
+
.box
|
|
45
|
+
.title = t('.total_communities.title')
|
|
46
|
+
p = @statistics.total_communities
|
|
47
|
+
.hint = t('.total_communities.hint')
|
|
48
|
+
|
|
49
|
+
.large-6.small-6.columns
|
|
50
|
+
.box
|
|
51
|
+
.title = t('.total_projects.title')
|
|
52
|
+
p = @statistics.total_projects
|
|
53
|
+
.hint = t('.total_projects.hint')
|
|
54
|
+
|
|
55
|
+
.large-6.small-6.columns
|
|
56
|
+
.box
|
|
57
|
+
.title = t('.total_projects_draft.title')
|
|
58
|
+
p = @statistics.total_projects_draft
|
|
59
|
+
.hint = t('.total_projects_draft.hint')
|
|
60
|
+
|
|
61
|
+
.large-6.small-6.columns
|
|
62
|
+
.box
|
|
63
|
+
.title = t('.total_projects_online.title')
|
|
64
|
+
p = @statistics.total_projects_online
|
|
65
|
+
.hint = t('.total_projects_online.hint')
|
|
@@ -0,0 +1,88 @@
|
|
|
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 financials_path, method: :get, class: 'form-horizontal' do |f|
|
|
8
|
+
.large-4.columns
|
|
9
|
+
= label_tag :by_permalink, t('.permalink')
|
|
10
|
+
= text_field_tag :by_permalink, params[:by_permalink], class: 'input-small'
|
|
11
|
+
.large-4.columns
|
|
12
|
+
= label_tag :between_expires_at_start_at, t('.between_expires_at')
|
|
13
|
+
= text_field_tag 'between_expires_at[start_at]', (params[:between_expires_at][:start_at] if params[:between_expires_at].present?), class: 'input-small'
|
|
14
|
+
|
|
|
15
|
+
|
|
|
16
|
+
= text_field_tag 'between_expires_at[ends_at]', (params[:between_expires_at][:ends_at] if params[:between_expires_at].present?), class: 'input-small'
|
|
17
|
+
.large-4.columns
|
|
18
|
+
= label_tag :by_progress, t('.by_progress')
|
|
19
|
+
= text_field_tag :by_progress, params[:by_progress], class: 'input-small'
|
|
20
|
+
.large-4.columns
|
|
21
|
+
= label_tag :name_contains, t('.project')
|
|
22
|
+
= text_field_tag :name_contains, params[:name_contains]
|
|
23
|
+
.large-6.columns
|
|
24
|
+
= label_tag :user_name_contains, t('.user')
|
|
25
|
+
= text_field_tag :user_name_contains, params[:user_name_contains]
|
|
26
|
+
.large-6.columns
|
|
27
|
+
= label_tag :with_state, t('.with_state')
|
|
28
|
+
= select_tag :with_state, options_for_select(Project.state_names, params[:with_state]), include_blank: true
|
|
29
|
+
.large-12.columns.text-right
|
|
30
|
+
= submit_tag t('.submit'), class: 'button'
|
|
31
|
+
|
|
|
32
|
+
= link_to t('.download_search_report'), financials_path(params: params, format: :csv), class: 'button secondary'
|
|
33
|
+
.row
|
|
34
|
+
.large-6.columns.text-left
|
|
35
|
+
= paginate @projects
|
|
36
|
+
.large-6.columns.text-right
|
|
37
|
+
= pluralize_without_number @projects.count, t('words.found_singular'), t('words.found_plural')
|
|
38
|
+
|
|
|
39
|
+
strong= collection.count
|
|
40
|
+
|
|
|
41
|
+
= pluralize_without_number(@projects.count, t('words.project_singular'), t('words.project_plural')).downcase
|
|
42
|
+
.data-table
|
|
43
|
+
- if @projects.empty?
|
|
44
|
+
= t('.no_contributions')
|
|
45
|
+
- else
|
|
46
|
+
table
|
|
47
|
+
thead
|
|
48
|
+
tr
|
|
49
|
+
th style="width: 200px;"
|
|
50
|
+
= t('.name')
|
|
51
|
+
th= t('.user')
|
|
52
|
+
th= t('.goal')
|
|
53
|
+
th= t('.pledged')
|
|
54
|
+
th= t('.total_payment_service_fee')
|
|
55
|
+
th= t('.total_platform_fee')
|
|
56
|
+
th= t('.repass_value')
|
|
57
|
+
th= t('.expires_at')
|
|
58
|
+
th= t('.reports')
|
|
59
|
+
th= t('.state')
|
|
60
|
+
tbody
|
|
61
|
+
- @projects.each do |project|
|
|
62
|
+
tr id=project.id
|
|
63
|
+
td= link_to project.name, main_app.project_path(project), target: 'blank'
|
|
64
|
+
td= link_to project.user.display_name, main_app.user_path(project.user, anchor: :settings), target: '_blank'
|
|
65
|
+
td= project.display_goal
|
|
66
|
+
td= project.display_pledged
|
|
67
|
+
td= number_to_currency project.total_payment_service_fee, precision: 2
|
|
68
|
+
- platform_fee = Configuration[:platform_fee].to_f * project.pledged
|
|
69
|
+
td
|
|
70
|
+
= number_to_currency platform_fee, precision: 2
|
|
71
|
+
td
|
|
72
|
+
= number_to_currency ((project.pledged*0.87)), precistion: 2
|
|
73
|
+
td
|
|
74
|
+
= project.display_expires_at
|
|
75
|
+
td
|
|
76
|
+
= link_to t('.contribution_report'), reports_contribution_reports_path(project_id: project.id, format: :csv)
|
|
77
|
+
td
|
|
78
|
+
- if project.online?
|
|
79
|
+
span.label.label-online= project.state
|
|
80
|
+
- elsif project.successful?
|
|
81
|
+
span.label.label-success= project.state
|
|
82
|
+
- elsif project.failed? or project.rejected?
|
|
83
|
+
span.label.label-important= project.state
|
|
84
|
+
- elsif project.waiting_funds?
|
|
85
|
+
span.label.label-warning= project.state
|
|
86
|
+
- else
|
|
87
|
+
span.label= project.state
|
|
88
|
+
= paginate @projects
|