Sha256: 97a97724a938c5278f6d8c62486492310b49f3ec2469808ebf5ccafb7572158f

Contents?: true

Size: 1.98 KB

Versions: 70

Compression:

Stored size: 1.98 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("caption", props: {
        tag: "div",
      }) do %>
        <%= pb_rails("icon", props: { icon: "calendar-alt", fixed_width: true, size: 'xs' }) %>
      <% 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

70 entries across 70 versions & 1 rubygems

Version Path
playbook_ui-10.9.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.8.1.pre.alpha.flexdeps app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.9.0.pre.alpha1 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.8.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.7.1 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.7.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.6.2.pre.alpha.dep app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.6.1.pre.alpha1 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.6.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.5.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.4.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.3.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.2.1.alpha.sisensefix app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.2.1 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.2.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.1.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.0.3.pre.alpha.walkthrough2 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.0.3.pre.alpha.walkthrough app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.0.1.alpha.railscusticon app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-10.0.2.pre.alpha.pre.iconfix app/pb_kits/playbook/pb_date/date.html.erb