Sha256: e05d009414ff34b94d520c127cec31bd3e3a358f5b8d1a5f0e99629532c7b5b2

Contents?: true

Size: 1.3 KB

Versions: 160

Compression:

Stored size: 1.3 KB

Contents

<%= content_tag(:div,
    id: object.id,
    data: object.data,
    class: object.classname) do %>
    <%# Rating value %>
    <% if object.hide_rating %>
      <%= content_tag(:div, "", class: "pb_star_rating_number") %>
    <% else %>
      <%= content_tag(:div, object.rating, class: "pb_star_rating_number") %>
    <% end %>

    <%= content_tag(:div, class: "pb_star_rating_wrapper") do %>
      <%# Gold stars generated by rating value %>
      <%= content_tag(:div, class: "pb_star_rating_highlight") do %>
        <% object.star_count.times do %>
          <%= pb_rails("icon", props: { icon: "star", fixed_width: true }) %>
        <% end %>
        <% unless object.star_full %>
          <%= pb_rails("icon", props: { icon: "star-half", fixed_width: true }) %>
        <% end %>
      <% end %>

      <%# Grey background stars as base %>
      <%= content_tag(:div, class: "pb_star_rating_base") do %>
        <%= pb_rails("icon", props: { icon: "star", fixed_width: true }) %>
        <%= pb_rails("icon", props: { icon: "star", fixed_width: true }) %>
        <%= pb_rails("icon", props: { icon: "star", fixed_width: true }) %>
        <%= pb_rails("icon", props: { icon: "star", fixed_width: true }) %>
        <%= pb_rails("icon", props: { icon: "star", fixed_width: true }) %>
      <% end %>
    <% end %>
<% end %>

Version data entries

160 entries across 160 versions & 1 rubygems

Version Path
playbook_ui-7.14.0.pre.alpha1 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.16.0 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.15.1 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.15.0 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.14.0 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.13.0.pre.alpha1 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.13.0 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.12.1 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.12.0 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.11.1 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.11.0 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.11.0.pre.alpha1 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.10.0 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.9.0 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.8.4 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.8.3 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.8.2 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.8.1 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.8.0 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.7.0.pre.alpha1 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb