forked from lobsters/lobsters
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
story: check for duplicate URL on blur
- Loading branch information
1 parent
6ea6b1b
commit 5064cfe
Showing
6 changed files
with
77 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<div class="form_errors_header"> | ||
<% if story.errors.count == 1 && story.already_posted_story %> | ||
<div class="flash-error"> | ||
<h2>Error: This story was already submitted <%= | ||
time_ago_in_words_label(story.already_posted_story.created_at) %></h2> | ||
<p> | ||
Please view the <a href="<%= story.already_posted_story.comments_path %>" | ||
target="_blank">previous discussion</a> for this story. | ||
</p> | ||
</div> | ||
<% elsif story.errors.any? %> | ||
<%= error_messages_for story %> | ||
<% elsif !story.errors.any? && story.already_posted_story %> | ||
<div class="flash-notice"> | ||
<h2>Note: This story was already submitted <%= | ||
time_ago_in_words_label(story.already_posted_story.created_at) %>, but | ||
may be submitted again.</h2> | ||
<p> | ||
Please view the <a href="<%= story.already_posted_story.comments_path %>" | ||
target="_blank">previous discussion</a> for this story first. If the content | ||
has changed or warrants new discussion, you may submit it again. | ||
</p> | ||
</div> | ||
|
||
<% if defined?(f) %> | ||
<%= f.hidden_field :seen_previous %> | ||
<% end %> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters