20 lines
887 B
Text
20 lines
887 B
Text
- if @saved_outfit
|
|
- if @is_owner
|
|
- if @has_unsaved_changes
|
|
= form_with url: outfit_path(@saved_outfit), method: :patch, class: "outfit-save-form" do |f|
|
|
= render "header/save_outfit_fields"
|
|
= f.submit "Save", class: "outfit-save-button"
|
|
- else
|
|
%button.outfit-save-button{disabled: true} Saved!
|
|
- elsif user_signed_in?
|
|
= form_with url: outfits_path, method: :post, class: "outfit-save-form" do |f|
|
|
= render "header/save_outfit_fields"
|
|
= f.submit "Save a copy", class: "outfit-save-button"
|
|
- else
|
|
= link_to "Log in to save a copy",
|
|
new_auth_user_session_path(return_to: request.fullpath),
|
|
class: "outfit-save-button"
|
|
- elsif user_signed_in?
|
|
= form_with url: outfits_path, method: :post, class: "outfit-save-form" do |f|
|
|
= render "header/save_outfit_fields"
|
|
= f.submit "Save", class: "outfit-save-button"
|