Skip to content

Commit

Permalink
Various admin style fixes (#937)
Browse files Browse the repository at this point in the history
- remove clipboard icons #867
- cards overflow and breakword #929
- deposit details ui #928
  • Loading branch information
webmix authored and Louis committed Apr 24, 2018
1 parent 928e2af commit 27cbd4e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
8 changes: 8 additions & 0 deletions app/assets/stylesheets/admin.scss
Expand Up @@ -27,6 +27,14 @@
flex-direction: row-reverse;
text-align: right;
font-weight: bold;
max-width: 30%;
}
dd {
margin-bottom: 0;
span {
width: 100%;
word-wrap: break-word;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Expand Up @@ -175,7 +175,7 @@ def language_path(lang=nil)
end

def description_for(name, &block)
content_tag :div, class: "dl-#{name} dl-horizontal" do
content_tag :dl, class: "dl-#{name} dl-horizontal" do
capture(&block)
end
end
Expand Down
12 changes: 6 additions & 6 deletions app/views/admin/deposits/fiats/show.html.erb
@@ -1,16 +1,16 @@
<div class="row">
<div class="col-6">
<div class="col-md-4">
<div class="card card-primary">
<div class="card-header">
<h3 class="card-title">Deposit details</h3>
</div>
<div class="card-body">
<%= description_for :member do %>
<b>ID</b>: <%= @deposit.sn %><br>
<b>Member</b>: <%= @deposit.member.email %><br>
<b>Amount</b>: <%= number_with_precision(@deposit.amount, precision: 2) %><br>
<b>Created at</b>: <%= t(@deposit.created_at, format: :long) %><br>
<b>State</b>: <%= @deposit.aasm_state_text %>
<dt>ID</dt> <dd><%= @deposit.sn %></dd>
<dt>Member</dt> <dd><%= @deposit.member.email %></dd>
<dt>Amount</dt> <dd><%= number_with_precision(@deposit.amount, precision: 2) %></dd>
<dt>Created at</dt> <dd><%= t(@deposit.created_at, format: :long) %></dd>
<dt>State</dt> <dd><%= @deposit.aasm_state_text %></dd>
<% end %>
</div>
<% if @deposit.may_accept? %>
Expand Down
12 changes: 3 additions & 9 deletions app/views/admin/withdraws/fiats/show.html.erb
Expand Up @@ -12,19 +12,13 @@
<%= item_for @withdraw, :aasm_state_text %>
<hr class="split">
<%= item_for @withdraw.member, :email do %>
<span class="fa fa-copy" data-clipboard-text="<%= @withdraw.member.email %>">
<%= @withdraw.member.email %>
</span>
<%= @withdraw.member.email %>
<% end %>
<%= item_for @withdraw, 'Recipient ID' do %>
<span class="fa fa-copy" data-clipboard-text="<%= @withdraw.rid %>">
<%= @withdraw.rid %>
</span>
<%= @withdraw.rid %>
<% end %>
<%= item_for @withdraw, :amount do %>
<span class="fa fa-copy" data-clipboard-text="<%= @withdraw.amount %>">
<%= @withdraw.amount %>
</span>
<%= @withdraw.amount %>
<% end %>
<ul class="list-inline w-100 px-3 mt-3 pt-3 border-top">
<% if @withdraw.may_accept? || @withdraw.may_process? || @withdraw.may_success? %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/admin/_account.html.erb
Expand Up @@ -5,7 +5,7 @@
<span><%= account.currency.code.upcase %></span>
</div>
<div class="card-body">
<dl>
<dl class="dl-horizontal">
<%= item_for account, :amount %>
<%= item_for account, :locked %>
<%= item_for account, :balance %>
Expand Down

0 comments on commit 27cbd4e

Please sign in to comment.