Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #33 from kibousoft/feature/ico-KSN-6
ICO申し込み履歴確認機能
  • Loading branch information
ANNotunzdY committed Jul 20, 2018
2 parents c7e6272 + 582ab19 commit b14a8a9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
4 changes: 3 additions & 1 deletion app/controllers/ico_requests_controller.rb
Expand Up @@ -3,7 +3,9 @@ class IcoRequestsController < ApplicationController

# GET /ico_requests
def index
@ico_requests = IcoRequest.all
current_account

@ico_requests = IcoRequest.where(email: @current_user.email)
end

# GET /ico_requests/1
Expand Down
13 changes: 2 additions & 11 deletions app/views/ico_requests/index.html.haml
Expand Up @@ -5,28 +5,19 @@
%thead
%tr
%th= model_class.human_attribute_name(:id)
%th= model_class.human_attribute_name(:user_id)
%th= model_class.human_attribute_name(:ico_event_id)
%th= model_class.human_attribute_name(:amount)
%th= model_class.human_attribute_name(:email)
%th= model_class.human_attribute_name(:eth_wallet_address)
%th= model_class.human_attribute_name(:token_wallet_address)
%th= model_class.human_attribute_name(:created_at)
%th=t '.actions', :default => t("helpers.actions")
%tbody
- @ico_requests.each do |ico_request|
%tr
%td= link_to ico_request.id, ico_request_path(ico_request)
%td= ico_request.user_id
%td= ico_request.ico_event_id
%td= ico_request.id
%td= ico_request.amount
%td= ico_request.email
%td= ico_request.eth_wallet_address
%td= ico_request.token_wallet_address
%td=l ico_request.created_at
%td
= link_to t('.show', :default => t("helpers.links.show")), ico_request_path(ico_request), :class => 'btn btn-default btn-xs'
= link_to t('.edit', :default => t("helpers.links.edit")), edit_ico_request_path(ico_request), :class => 'btn btn-default btn-xs'
= link_to t('.destroy', :default => t("helpers.links.destroy")), ico_request_path(ico_request), :method => :delete, :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, :class => 'btn btn-xs btn-danger'

= link_to t('.new', :default => t("helpers.links.new")), new_ico_request_path, :class => 'btn btn-primary'
= link_to t('.new', :default => t("helpers.links.new")), new_ico_requests_path, :class => 'btn btn-primary'
1 change: 1 addition & 0 deletions config/locales/ico_request.ja.yml
Expand Up @@ -11,3 +11,4 @@ ja:
email: メールアドレス
eth_wallet_address: 入金元Etheriumアドレス
token_wallet_address: PHOTON GOLD保存先ウォレットアドレス
created_at: 申込日
1 change: 1 addition & 0 deletions config/routes.rb
Expand Up @@ -71,6 +71,7 @@

# ICO Request
resource :ico_requests, only: [:new, :create]
get '/ico_requests', action: :index, controller: 'ico_requests'

namespace :settings do
resource :profile, only: [:show, :update]
Expand Down

0 comments on commit b14a8a9

Please sign in to comment.