<commit_before>#hipsterTopBar
  h1 Saved and Previous Orders for #{@basket.shop_name}

= render "shared/flash"

p
  a href="#{auto_basket_path}" class="button" Return To Basket


- if @nick.blank?
  h2 Not stalking you or anything, but…
  p who are you? If I don’t know, I can’t show you your recent orders.

  form method="get"
    input required="required" name="nick" placeholder="Enter Your Nickname"
    input type="submit" class="primary" value="Set Nickname"

- else

  h2 Your Previous Orders, #{@nick}

  - if @previous_orders.empty?
    p You haven’t previously ordered from this shop.

  - else
    table
      tr
        th.hideOnPressure Date
        th Order
        th Actions

      - @previous_orders.each do |po|
        tr
          td.hideOnPressure = po.date
          td = order_details(po)
          td
            - if @basket.editable?
              a href="#{copy_order_path(po.uuid, mode: :nocheck)}" title="You can edit this order before you place it into the group basket." class="button" data-method="put" data-confirm="#{overwrite_order_confirm}" order this

              - if has_nick?
                a href="#{copy_order_path(po.uuid, mode: :insta)}" title="This order will be placed into the group basket instantly with your nick." class="button" data-method="put" data-confirm="#{overwrite_order_confirm}" insta order this
            - else
              ' Basket not editable


h2 Saved Orders

p You can delete anyone’s orders, because it’s not feasible to protect them properly. Please be careful and don’t go dictator on others. Thanks.

- if @saved.none?

  p No saved orders yet.

- else

  table
    tr
      th Name
      th.hideOnPressure Order
      th Actions

    - @saved.each do |s|
      tr
        td = s.name
        td.hideOnPressure = order_details(s)

        td
          - if @basket.editable?
            a href="#{copy_saved_order_path(s.uuid, mode: :nocheck)}" title="You can edit this order before you place it into the group basket." class="button" data-method="put" data-confirm="#{overwrite_order_confirm}" order this

            - if has_nick?
              a href="#{copy_saved_order_path(s.uuid, mode: :insta)}" title="This order will be placed into the group basket instantly with your nick." class="button" data-method="put" data-confirm="#{overwrite_order_confirm}" insta order this

            a href="#{destroy_saved_order_path(s.uuid)}" title="This removes the saved order for all users. Think about it." class="button danger" data-method="delete" data-confirm="STOP! Think about the consequences of removing “#{s.name}”. Continue?" destroy

          - else
            ' Basket not editable

p
  a href="#{auto_basket_path}" class="button" Return To Basket<commit_msg>allow saved orders to be destroyed, even when basket is closed<commit_after>#hipsterTopBar
  h1 Saved and Previous Orders for #{@basket.shop_name}

= render "shared/flash"

p
  a href="#{auto_basket_path}" class="button" Return To Basket


- if @nick.blank?
  h2 Not stalking you or anything, but…
  p who are you? If I don’t know, I can’t show you your recent orders.

  form method="get"
    input required="required" name="nick" placeholder="Enter Your Nickname"
    input type="submit" class="primary" value="Set Nickname"

- else

  h2 Your Previous Orders, #{@nick}

  - if @previous_orders.empty?
    p You haven’t previously ordered from this shop.

  - else
    table
      tr
        th.hideOnPressure Date
        th Order
        th Actions

      - @previous_orders.each do |po|
        tr
          td.hideOnPressure = po.date
          td = order_details(po)
          td
            - if @basket.editable?
              a href="#{copy_order_path(po.uuid, mode: :nocheck)}" title="You can edit this order before you place it into the group basket." class="button" data-method="put" data-confirm="#{overwrite_order_confirm}" order this

              - if has_nick?
                a href="#{copy_order_path(po.uuid, mode: :insta)}" title="This order will be placed into the group basket instantly with your nick." class="button" data-method="put" data-confirm="#{overwrite_order_confirm}" insta order this
            - else
              ' Basket not editable


h2 Saved Orders

p You can delete anyone’s orders, because it’s not feasible to protect them properly. Please be careful and don’t go dictator on others. Thanks.

- if @saved.none?

  p No saved orders yet.

- else

  table
    tr
      th Name
      th.hideOnPressure Order
      th Actions

    - @saved.each do |s|
      tr
        td = s.name
        td.hideOnPressure = order_details(s)

        td
          - if @basket.editable?
            a href="#{copy_saved_order_path(s.uuid, mode: :nocheck)}" title="You can edit this order before you place it into the group basket." class="button" data-method="put" data-confirm="#{overwrite_order_confirm}" order this

            - if has_nick?
              a href="#{copy_saved_order_path(s.uuid, mode: :insta)}" title="This order will be placed into the group basket instantly with your nick." class="button" data-method="put" data-confirm="#{overwrite_order_confirm}" insta order this

          a href="#{destroy_saved_order_path(s.uuid)}" title="This removes the saved order for all users. Think about it." class="button danger" data-method="delete" data-confirm="STOP! Think about the consequences of removing “#{s.name}”. Continue?" destroy
p
  a href="#{auto_basket_path}" class="button" Return To Basket
{'fraction_non_alphanumeric': 0.1029143897996357, 'fraction_numerical': 0.0014571948998178506, 'mean_word_length': 2.910968660968661, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4025105', 'n_tokens_mistral': 1645, 'n_tokens_neox': 1604, 'n_words': 563}