hide csv button if there are no transactions

pull/2102/head
Ayrat Badykov 5 years ago
parent 484416a995
commit 830c30ae6a
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 8
      apps/block_scout_web/assets/js/lib/async_listing_load.js
  2. 8
      apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex

@ -219,6 +219,14 @@ export const elements = {
$el.hide()
}
},
'[csv-download]': {
render ($el, state) {
if (state.emptyResponse) {
return $el.hide()
}
return $el.show()
}
}
}

@ -50,8 +50,8 @@
</div>
</div>
</div>
<%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "top", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %>
@ -66,9 +66,9 @@
</div>
<div data-items></div>
<div class="transaction-bottom-panel">
<div class="download-all-transactions">
<div csv-download class="download-all-transactions">
Download&nbsp;
<a class="download-all-transactions-link" href=<%= address_transaction_path(@conn, :transactions_csv, %{"address_id" => to_string(@address.hash)}) %>>
<span><%= gettext("CSV") %></span>

Loading…
Cancel
Save