_approve_article.rhtml 1.72 KB
<h2><%= _('New article')  %></h2>

<% form_for('task', task, :url => { :action => 'close', :id => task.id } ) do |f| %>

  <% if task.article.nil? %>
    <%= _('%s wanted to publish some content, but this content was deleted and cannot be published anymore.') % content_tag('strong', link_to( task.requestor.name, task.requestor.public_profile_url ) ) %>
    <%= hidden_field_tag(:decision, 'cancel') %>
  <% else %>
    <%= _('%s wants to publish content: %s.') %
      [content_tag('strong', link_to( task.requestor.name, task.requestor.public_profile_url ) ),
      content_tag('strong', link_to( task.name, task.article.url ) )] %>

    <div>
      <%= radio_button_tag(:decision, 'finish', true,
        :id => "decision-finish-#{task.id}",
        :onclick => "Element.show('group-for-friend-#{task.id}')") %>
      <label for="<%= "decision-finish-#{task.id}" %>"><b><%= _('Accept') %></b></label>

     &nbsp; &nbsp;

      <%= radio_button_tag(:decision, 'cancel', false,
          :id => "decision-cancel-#{task.id}",
          :onclick => "Element.hide('group-for-friend-#{task.id}')") %>
      <label for="<%= "decision-cancel-#{task.id}" %>"><b><%= _('Ignore') %></b></label>

      <%= labelled_form_field _('Name for publishing'), f.text_field(:name, :style => 'width:80%;') %>

      <%= select_folder(_('Select the folder where the article must be published'), 'task', 'article_parent_id', task.target.folders) %>
      <%= labelled_form_field( _('Highlight this article'), f.check_box(:highlighted)) %>
      <%= labelled_form_field _('Comment for author'), f.text_area(:closing_statment, :style => 'height:200px; width:80%;') %>

    </div>
  <% end %>

  <% button_bar do %>
    <%= submit_button(:ok, _('Ok!')) %>
  <% end %>
<% end %>