Noosfero/noosfero

View on GitHub
app/views/tasks/_suggest_article_accept_details.html.erb

Summary

Maintainability
Test Coverage
<% unless task.requestor %>
  <%= labelled_form_field(_("Sent by: "), f.text_field(:name)) %>
  <p><%= label_tag(_("Email: %s") % task.email) %> </p>
<% end %>

<%= f.fields_for 'article', OpenStruct.new(task.article) do |a| %>
  <%= required labelled_form_field(_('Title'), a.text_field(:name, :size => 50)) %>
  <%= labelled_form_field(_('Source'), a.text_field(:source_name)) %>
  <%= labelled_form_field(_("Source URL"), a.text_field(:source)) %>

  <%= select_profile_folder(_('Select the folder where the article must be published'), "tasks[#{task.id}][task][article][parent_id]", task.target, task.article[:parent_id]) %>
  <%= labelled_form_field(_('Highlight this article'), a.check_box(:highlighted)) %>

  <%= a.hidden_field(:type) %>
  <%= render :partial => 'shared/lead_and_body', :locals => {:f => a, :lead_id => task.id} %>
<% end %>