<% unless defined?(suggesting) %>
<% if f.object.url_is_editable_by_user?(@user) %>
<%= f.label :url, "URL:", :class => "required" %>
<%= f.text_field :url, :autocomplete => "off" %>
<%= button_tag "Fetch Title", :id => "story_fetch_title",
:type => "button" %>
<% elsif !f.object.new_record? && !f.object.url.blank? %>
<%= f.label :url, "URL:", :class => "required" %>
<% end %>
<% end %>
<%= f.label :title, "Title:", :class => "required" %>
<%= f.text_field :title, :maxlength => 100, :autocomplete => "off" %>
<%= f.label :tags_a, "Tags:", :class => "required",
:style => "line-height: 2.3em;" %>
<%= f.select "tags_a", options_for_select(
Tag.all_with_filtered_counts_for(@user).map{|t|
html = "#{h(t.tag)} - #{h(t.description.to_s)}"
if t.hotness_mod != 0
html << " (hotness mod #{t.hotness_mod > 0 ? "+" : ""}#{t.hotness_mod})"
end
if t.filtered_count > 0
html << " #{t.filtered_count} user" <<
(t.filtered_count == 1 ? "" : "s") << " filtering"
end
[ "#{t.tag} - #{t.description}", t.tag, { "data-html" => raw(html) } ]},
f.object.tags_a), {}, { :multiple => true } %>
<% unless defined?(suggesting) %>
<%= f.label :description, "Text:", :class => "required" %>
<%= f.text_area :description, :rows => 15,
:placeholder => "Optional when submitting a URL; please see guidelines",
:autocomplete => "off" %>
Story submission guidelines
">
To be able to easily submit a page you're viewing in your browser
to <%= Rails.application.name %>, drag the bookmarklet to the right
to your bookmark bar. You'll be taken to this page with the viewed
page's URL and title.
When submitting a URL, the text field is optional and should only
be used when additional context or explanation of the URL is
needed. Commentary or opinion should be reserved for a comment,
so that it can be voted on separately from the story.
Do not editorialize story titles, but when the original story's
title has no context or is unclear, please change it. Please
remove extraneous components from titles such as the name of the
site or section.
If no tags clearly apply to the story you are submitting, chances
are it does not belong here. Do not overreach with tags if they
are not the primary focus of the story.
When the story being submitted is more than a year or so old,
please add the year the story was written to the post title in
parentheses.
<% end %>
<% unless defined?(suggesting) %>
<%= f.label :user_is_author, "Author:", :class => "required" %>
<%= f.check_box :user_is_author %>
<%= f.label :user_is_author,
(f.object.id && f.object.user_id != @user.id ? "Submitter is" : "I am") +
" the author of the story at this URL (or this text)",
:class => "normal" %>
<% end %>