2012-06-17 03:15:46 +02:00
|
|
|
<%= error_messages_for f.object %>
|
|
|
|
|
|
|
|
<div class="box">
|
|
|
|
<div class="boxline">
|
|
|
|
<% if !f.object.new_record? && !f.object.url.blank? %>
|
2012-06-30 18:18:36 +02:00
|
|
|
<%= f.label :url, "URL:", :class => "required" %>
|
|
|
|
<div class="d">
|
|
|
|
<a href="<%= f.object.url %>"><%= f.object.url %></a>
|
|
|
|
</div>
|
2012-06-17 03:15:46 +02:00
|
|
|
<% elsif !f.object.id %>
|
|
|
|
<%= f.label :url, "URL:", :class => "required" %>
|
2012-07-05 01:58:58 +02:00
|
|
|
<%= f.text_field :url, :autocomplete => "off" %>
|
2012-06-17 03:15:46 +02:00
|
|
|
<%= button_to_function "Fetch Title",
|
|
|
|
"Lobsters.fetchURLTitle($(this), $('#story_url'), $('#story_title'));" %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="boxline">
|
|
|
|
<%= f.label :title, "Title:", :class => "required" %>
|
2012-07-05 01:58:58 +02:00
|
|
|
<%= f.text_field :title, :maxlength => 100, :autocomplete => "off" %>
|
2012-06-17 03:15:46 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="boxline" style="margin-bottom: 2px;">
|
2012-06-30 18:18:36 +02:00
|
|
|
<%= f.label :tags_a, "Tags:", :class => "required",
|
|
|
|
:style => "line-height: 2.3em;" %>
|
|
|
|
<%= f.select "tags_a", Tag.order(:tag).map{|t|
|
|
|
|
[ "#{t.tag} - #{t.description}", t.tag ] }, {},
|
2012-07-01 02:43:16 +02:00
|
|
|
{ :multiple => true } %>
|
2012-06-17 03:15:46 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="boxline">
|
|
|
|
<%= f.label :description, "Text:", :class => "required" %>
|
2012-07-01 02:43:16 +02:00
|
|
|
<%= f.text_area :description, :rows => 15,
|
2012-08-17 21:15:04 +02:00
|
|
|
:placeholder => "Optional when submitting a URL; please see guidelines",
|
2012-07-05 01:58:58 +02:00
|
|
|
:autocomplete => "off" %>
|
2012-06-17 03:15:46 +02:00
|
|
|
</div>
|
|
|
|
</div>
|