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.7.0 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.6.2.pre.alpha1 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.6.2 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.6.1.pre.alpha1 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.6.1 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.6.0 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.5.1 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.5.0 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.4.2 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.4.1 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.4.0.pre.alpha6 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.4.0.pre.alpha5 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.4.0 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.4.0.pre.test4 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.4.0.pre.test3 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.4.0.pre.test2 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.4.0.pre.alpha4 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.4.0.pre.alpha2 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.4.0.pre.alpha1 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb
playbook_ui-7.3.0.pre.alpha12 app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb