Sha256: 3e1d4f61147d9e954a1d23943c8e0e1ee3f5711725e277b3def867bce5259e81

Contents?: true

Size: 896 Bytes

Versions: 17

Compression:

Stored size: 896 Bytes

Contents

<% object ||= current_attributes_object %>
<% strategy ||= current_attributes_strategy || :none %>
<% url ||= nil %>
<% hide_completed ||= false %>

<% if object.send(total).present? %>
  <% completion_percent = (object.send(attribute).to_f / object.send(total).to_f) * 100.0 %>

  <% unless completion_percent == 100 && hide_completed %>
    <%= render 'shared/attributes/attribute', object: object, attribute: "#{attribute}_over_#{total}".to_sym, strategy: strategy, url: url do %>
      <% if completion_percent == 100 %>
        <i class="fal fa-check ti ti-check text-green-500"></i>
      <% else %>
        <div class="h-4 bg-slate-100 shadow-inner rounded w-full">
          <div class="h-4 <%= 'animate-pulse' unless completion_percent == 100 %> bg-primary-500 rounded" style="width: <%= completion_percent %>%"></div>
        </div>
      <% end %>
    <% end %>
  <% end %>
<% end %>

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
bullet_train-themes-light-1.2.27 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.2.26 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.2.25 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.2.24 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.2.23 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.2.22 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.2.21 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.2.20 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.2.19 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.2.18 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.2.17 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.2.16 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.2.15 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.2.14 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.2.13 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.2.12 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.2.11 app/views/themes/light/attributes/_progress_bar.html.erb