Sha256: 15cc51f09915b94bfe42ef07835f6825ecf4fd4536395b894947589c6a849e66

Contents?: true

Size: 903 Bytes

Versions: 117

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

117 entries across 117 versions & 1 rubygems

Version Path
bullet_train-themes-light-1.15.0 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.14.2 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.14.1 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.14.0 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.13.0 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.12.3 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.12.2 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.12.1 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.12.0 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.11.0 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.10.0 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.9.0 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.8.5 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.8.4 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.8.3 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.8.2 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.8.1 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.8.0 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.7.23 app/views/themes/light/attributes/_progress_bar.html.erb
bullet_train-themes-light-1.7.22 app/views/themes/light/attributes/_progress_bar.html.erb