31 lines
1.1 KiB
Text
31 lines
1.1 KiB
Text
- with_async = dashboard_async_required_settings? settings, async
|
|
|
|
- unless with_async
|
|
h3 = settings[:title].presence || block_definition[:label]
|
|
|
|
- if @can_edit && \
|
|
block_definition[:no_settings].blank? && \
|
|
(!block_definition.key?(:with_settings_if) || block_definition[:with_settings_if].call(@project))
|
|
= render partial: block_definition[:settings_partial].presence || "#{async[:partial]}_settings",
|
|
locals: build_dashboard_partial_locals(block,
|
|
block_definition,
|
|
settings,
|
|
dashboard).merge({ hide: with_async })
|
|
|
|
- if with_async
|
|
= render_async_cache _dashboard_async_blocks_path(@project,
|
|
dashboard.async_params(block, async, settings)) do
|
|
.clear-both
|
|
p
|
|
i.fas.fa-sync.fa-spin
|
|
'
|
|
= l(:label_loading)
|
|
|
|
= content_for :render_async
|
|
|
|
javascript:
|
|
$(function() {
|
|
$('#ajax-indicator').hide();
|
|
})
|
|
- else
|
|
p.nodata = l :label_no_data
|