Sha256: f1c04a61f7b6b8c833c7592bec43b0d666aa03ae78a50c3312f25ef3b1f6d475

Contents?: true

Size: 1.99 KB

Versions: 97

Compression:

Stored size: 1.99 KB

Contents

<%= content_tag(:div,
    id: object.id,
    data: object.data,
    class: object.classname,
    aria: object.aria) do %>

  <% if object.size == "md" %>
    <!-- icon -->
    <% if object.show_icon %>
      <%= pb_rails("body", props: {
        color: "light",
        tag: "div",
      }) do %>
        <%= pb_rails("icon", props: { icon: "calendar-alt", fixed_width: true }) %>
      <% end %>
    <% end %>

    <!-- day_of_week -->
    <% if object.show_day_of_week %>
      <%= pb_rails("title", props: { tag: "div", text: object.day_of_week, size: 4 }) %>
      <%= pb_rails("body", props: {
        text: "•",
        color: "light",
        tag: "div",
      }) %>
    <% end %>

    <!-- month day, year -->

    <%# if not current year %>
    <% if object.year.to_s == DateTime.now.year.to_s %>
      <%= pb_rails("title", props: { tag: "div", text: "#{object.month} #{object.day}", size: 4 }) %>
    <%# if is current year %>
    <% else %>
      <%= pb_rails("title", props: { tag: "div", text: "#{object.month} #{object.day}, #{object.year}", size: 4 }) %>
    <% end %>

  <% else %>

    <!-- icon -->
    <% if object.show_icon %>
      <%= pb_rails("body", props: {
        color: "light",
        tag: "div",
      }) do %>
        <%= pb_rails("icon", props: { icon: "calendar-alt", fixed_width: true }) %>
      <% end %>
    <% end %>

    <!-- day_of_week -->
    <% if object.show_day_of_week %>
      <%= pb_rails("caption", props: { tag: "div", text: object.day_of_week }) %>
      <%= pb_rails("caption", props: {
        text: "•",
        color: "light",
        tag: "div",
      }) %>
    <% end %>

    <!-- month day, year -->

    <%# if not current year %>
    <% if object.year.to_s == DateTime.now.year.to_s %>
      <%= pb_rails("caption", props: { tag: "span", text: "#{object.month} #{object.day}" }) %>
    <%# if is current year %>
    <% else %>
      <%= pb_rails("caption", props: { tag: "span", text: "#{object.month} #{object.day}, #{object.year}" }) %>
    <% end %>
  <% end %>
<% end %>

Version data entries

97 entries across 97 versions & 1 rubygems

Version Path
playbook_ui-9.7.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.6.1 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.6.1.pre.deps1 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.6.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.5.0.alpha.rs.downgrade app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.5.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.4.0.alpha.sisense app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.4.0.alpha.user.kit.bug app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.4.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.3.1.pre.alpha2 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.4.0.pre.alpha2 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.4.0.pre.alpha1 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.3.1.pre.alpha1 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.3.0.alpha.inline3 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.3.0.pre.alpha.password.strength.2 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.3.0.alpha.inline2 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.3.0.alpha.inline1 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.3.0.pre.alpha.password.strength.1 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.3.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-9.2.2.pre.alpha.margin app/pb_kits/playbook/pb_date/date.html.erb