Sha256: 15cc51f09915b94bfe42ef07835f6825ecf4fd4536395b894947589c6a849e66

Contents?: true

Size: 903 Bytes

Versions: 121

Compression:

Stored size: 903 Bytes

Contents

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

<% if object.send(total).present? %>
  <% completion_percent = (object.public_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

121 entries across 121 versions & 1 rubygems

Version Path
bullet_train-themes-light-1.6.19 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.18 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.17 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.16 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.15 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.14 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.13 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.12 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.11 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.10 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.9 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.8 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.7 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.6 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.5 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.4 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.3 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.2 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.1 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.6.0 app/views/themes/light/attributes/_progress_bar.html.erb