summaryrefslogtreecommitdiff
blob: 87d836f1016c3e54123231509024ae74cdc6e922 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<% if @glsa.nil? %>
<p>No or invalid GLSA ID specified.</p>
<% else %>
<%= form_tag(glsa_comments_path(@glsa, @comment), :remote => true, :class => "popupform") do -%>
  <%= fields_for :newcomment do |f| %>
    <p>
      <%= f.text_area :text, :class => "nice", :rows => 4 %>
    </p>

    <p style="text-align: right;">
      <% if current_user.access >= 2 and not @glsa.is_owner? current_user %>
      <span class="left">
      Rating:
      <%= f.radio_button :rating, "approval" %><label for="newcomment_rating_approval"><%= image_tag 'icons/approval.png', :alt => 'Approval', :title => 'Approval' %></label>&nbsp;
      <%= f.radio_button :rating, "rejection" %><label for="newcomment_rating_rejection"><%= image_tag 'icons/rejection.png', :alt => 'Rejection', :title => 'Rejection' %></label>&nbsp;
      <%= f.radio_button :rating, "neutral", :checked => true %><label for="newcomment_rating_neutral"><%= image_tag 'icons/comment.png', :alt => 'Neutral', :title => 'Neutral' %></label>
      </span>
      <% else %>
        <%= f.hidden_field :rating, :value => 'neutral' %>
      <% end %>
    <% end %>
      <input type="submit" class="button" value="Add comment" id="addcommentsubmit" />
    </p>
<% end -%>
<% end %>