Sha256: e9fbf05ae86f3f613f8b379ce8f8d59d9835fd7e74614557d15c7a2ceb638190

Contents?: true

Size: 1.98 KB

Versions: 220

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: "sm" }) %>
      <% 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

220 entries across 220 versions & 1 rubygems

Version Path
playbook_ui-12.24.0.pre.alpha.play824753 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.24.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown752 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.24.0.pre.alpha.play824751 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.24.0.pre.alpha.railsmultilevelimprovements749 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.24.0.pre.alpha.play824745 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.24.0.pre.alpha.railsmultilevelimprovements742 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.24.0.pre.alpha.railsmultilevelimprovements741 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.24.0.pre.alpha.railsmultilevelimprovements739 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.24.0.pre.alpha.play824733 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.24.0.pre.alpha.play833boldoptionfortitle2and3721 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.24.0.pre.alpha.alphatestforselfhostfak720 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.24.0.pre.alpha.play833boldoptionfortitle2and3719 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.24.0.pre.alpha.play833boldoptionfortitle2and3717 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.24.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.23.0.pre.alpha.movemarkdown712 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.23.0.pre.alpha.movemarkdown708 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.23.0.pre.alpha.play698responsivespacingglobalprop703 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.23.0.pre.alpha.play698responsivespacingglobalprop701 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.23.0 app/pb_kits/playbook/pb_date/date.html.erb
playbook_ui-12.22.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown696 app/pb_kits/playbook/pb_date/date.html.erb