forked from hpyhacking/peatio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include ransack and add fixed member stat
- Loading branch information
hpyhacking
committed
Apr 21, 2014
1 parent
a24611d
commit 0897db8
Showing
21 changed files
with
362 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,3 +70,8 @@ span.detail-section { | |
border: 1px solid lightgray; | ||
} | ||
|
||
.panel-footer { | ||
ul.pagination { | ||
margin: 0px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,33 @@ | ||
= render "admin/statistic/shared/filter", form_target: @members_grid, url: admin_statistic_members_path | ||
.row: .col-md-12 | ||
= datagrid_table @members_grid, @assets | ||
.row | ||
.col-md-5 | ||
.panel.panel-primary | ||
.panel-heading | ||
span = t('.search') | ||
.panel-body | ||
= search_form_for @q do |f| | ||
= f.label :email_cont | ||
= f.text_field :email_cont | ||
= f.submit | ||
.col-md-19 | ||
.panel.panel-primary | ||
.panel-heading | ||
span = t('.table') | ||
.panel-body | ||
= table_for(@members, class: 'table table-condensed table-hover', model: Member) do |t| | ||
- t.column :id, class: 'col-md-1' | ||
- t.column :email, class: 'col-md-2' do |x| | ||
code.text-info = x.email | ||
- t.column :created_at, class: 'col-md-3' | ||
- t.column :activated?, class: 'col-md-1' do |x| | ||
= yesno x.activated? | ||
- t.column :two_factor_activated?, class: 'col-md-1' do |x| | ||
= yesno x.two_factor_activated? | ||
- t.column :id_document_verified?, class: 'col-md-1' do |x| | ||
= yesno x.id_document_verified? | ||
- t.column :action, class: 'col-md-1' do |x| | ||
= link_to t('actions.view'), url_for([:admin, x]), target: '_blank' | ||
.panel-footer | ||
= paginate @members | ||
.pull-right | ||
h5 = @members.size | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Kaminari.configure do |config| | ||
config.default_per_page = 10 | ||
# config.max_per_page = nil | ||
# config.window = 4 | ||
# config.outer_window = 0 | ||
# config.left = 0 | ||
# config.right = 0 | ||
# config.page_method_name = :page | ||
# config.param_name = :page | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module Ransack | ||
module Helpers | ||
module FormHelper | ||
def search_form_for_with_default_url_opt(record, options = {}, &proc) | ||
options[:url] = '' | ||
options[:wrapper] = 'search' | ||
search_form_for_without_default_url_opt(record, options, &proc) | ||
end | ||
|
||
alias_method_chain :search_form_for, :default_url_opt | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Use this setup block to configure all options available in SimpleForm. | ||
SimpleForm.setup do |config| | ||
config.wrappers :bootstrap, tag: 'div', class: 'control-group', error_class: 'error' do |b| | ||
b.use :html5 | ||
b.use :placeholder | ||
b.use :label | ||
b.wrapper tag: 'div', class: 'controls' do |ba| | ||
ba.use :input | ||
ba.use :error, wrap_with: { tag: 'span', class: 'help-inline' } | ||
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' } | ||
end | ||
end | ||
|
||
config.wrappers :prepend, tag: 'div', class: "control-group", error_class: 'error' do |b| | ||
b.use :html5 | ||
b.use :placeholder | ||
b.use :label | ||
b.wrapper tag: 'div', class: 'controls' do |input| | ||
input.wrapper tag: 'div', class: 'input-prepend' do |prepend| | ||
prepend.use :input | ||
end | ||
input.use :hint, wrap_with: { tag: 'span', class: 'help-block' } | ||
input.use :error, wrap_with: { tag: 'span', class: 'help-inline' } | ||
end | ||
end | ||
|
||
config.wrappers :append, tag: 'div', class: "control-group", error_class: 'error' do |b| | ||
b.use :html5 | ||
b.use :placeholder | ||
b.use :label | ||
b.wrapper tag: 'div', class: 'controls' do |input| | ||
input.wrapper tag: 'div', class: 'input-append' do |append| | ||
append.use :input | ||
end | ||
input.use :hint, wrap_with: { tag: 'span', class: 'help-block' } | ||
input.use :error, wrap_with: { tag: 'span', class: 'help-inline' } | ||
end | ||
end | ||
end | ||
|
||
module SimpleForm | ||
module ActionViewExtensions | ||
module FormHelper | ||
def simple_form_for_with_default_class(record, options = {}, &block) | ||
options[:html] ||= {} | ||
options[:html][:class] ||= 'form-horizontal' | ||
simple_form_for_without_default_class(record, options, &block) | ||
end | ||
alias_method_chain :simple_form_for, :default_class | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,6 @@ | ||
zh-CN: | ||
easy_table: | ||
satoshi: | ||
amount: 充值数量 | ||
txid: 交易哈希 | ||
created_at: 交易时间 | ||
memo: 确认数 | ||
member_name: 用户 | ||
state_and_actions: 状态/操作 | ||
currency_obj_key_text: 币种 | ||
bank: | ||
sn: 充值编号 | ||
amount: 充值金额 | ||
created_at: 提交时间 | ||
fund_source: 充值帐号 | ||
memo: 备注 | ||
member_name: 用户 | ||
state_and_actions: 状态/操作 | ||
currency_obj_key_text: 币种 | ||
statistic: | ||
member: | ||
id: 编号 | ||
email: asdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.