aboutsummaryrefslogtreecommitdiff
blob: 7a5bdf8cc8d39c80a74002b24b62f6f02cc0b76d (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<h1>
  <%= sanitize(spelling(@rev.title), :tags => %w[span]) %>
  <% if @glsa.restricted? %><span class="red">(CONFIDENTIAL)</span><% end %>
</h1>

<div class="box buttons">
  <span class="floatright">
    Show revision:
    <%= select_tag :revid,
                   options_from_collection_for_select(@glsa.revisions, :revid, :to_s, @rev.revid),
                   :onchange => "document.location = '#{url_for :controller=> :glsa, :action => :show, :id => @glsa}?rev_id=' + this.value" %>
  </span>
  <%= link_to "#{image_tag 'icons/edit.png'} Edit this draft".html_safe, edit_glsa_path(@glsa), {:class => 'button'} %>
  <%= link_to "#{image_tag 'icons/xml.png'} View as XML".html_safe, glsa_path(@glsa, :format => 'xml'), {:class => 'button'} %>
  <%= link_to "#{image_tag 'icons/txt.png'} View as Text".html_safe, glsa_path(@glsa, :format => 'txt'), {:class => 'button'} %>
  <%= link_to_function "#{image_tag 'icons/reference.png'} Import references".html_safe, "GLSAMaker.editing.references.import_dialog(#{@glsa.id})", {:class => 'button'} %>
  <%= link_to "#{image_tag 'icons/diff.png'} Compare revisions".html_safe, diff_glsa_path(@glsa, :old => @glsa.last_revision.revid - 1, :new => @glsa.last_revision.revid), {:class => 'button'} %>
  <%= link_to "#{image_tag 'icons/sent.png'} Release advisory".html_safe, prepare_release_glsa_path(@glsa), {:class => 'button'} if current_user.access >= 2 %>
  <%= link_to "#{image_tag 'icons/delete.png'} Delete".html_safe, glsa_path(@glsa), :method => :delete, :confirm => "Do you really want to delete this item?", :class => 'button' if current_user.is_el_jefe? %>
  <%= link_to "#{image_tag 'icons/bug.png'} Close bugs".html_safe, finalize_release_glsa_path(@glsa, :close_bugs => '1'), :method => :post, :class => 'button' if @glsa.status == 'release' %>
</div>

<div style="float: right; width: 40%;">
  <div class="box pmargin">
    <h2>
      GLSA <%= status_icon @glsa.status %> <tt><%= @glsa.glsa_id %>:r<%= @rev.revid %></tt>
      <%= bugready_icon @rev.bug_ready? %>
      <%= approval_icon @glsa.approval_status %>
      <%= workflow_icon(@glsa.workflow_status(current_user)) %>
      <%= restricted_icon @glsa.restricted %>
    </h2><br />
    <% if @glsa.is_approved? and @glsa.last_revision.bug_ready? %>
      <p><%= image_tag 'icons/ok.png' %> This draft is <strong>ready for sending</strong>.</p>
    <% else %>
      <p><%= image_tag 'icons/pending.png' %> This draft is <strong>not ready for sending.</strong></p>
    <% end %>
    <p>
      <span style="float: right; font-size: 90%;"><%= @glsa.created_at.to_s %></span>
      Requester: <strong><%= @glsa.requester.to_s %></strong>
    </p>
    <% if @glsa.submitter %>
    <p>
      <span style="float: right; font-size: 90%;"><%= @glsa.updated_at.to_s %></span>
      Submitter: <strong><%= @glsa.submitter.to_s %></strong>
    </p>
    <% end %>
    <p>
      <span style="float: right; font-size: 90%;"><%= @glsa.updated_at.to_s %></span>
      Editor: <strong><%= @rev.user.to_s %></strong>
    </p>
  </div>
  
  <div class="box">
    <%= box_title("Bugs (#{@rev.bugs.count})", :icon => 'icons/bug.png',
        :toolbar => [{:title => 'Update all cached metadata', :icon => 'icons/refresh.png', :uri => "/glsa/update_cache/#{@glsa.id}"}])
    %>
    <table id="bugtable">
      <%= render :partial => "show_bug_row", :collection => @rev.bugs, :as => :bug %>
    </table>
  </div>

  <%= render :partial => "comments" %>
</div>

<table class="glsamaker-table code-preserve-ws nopadding" style="width: 59%;">
  <tr>
    <th>Field</th>
    <th>Content</th>
  </tr>
  <tr>
    <th class="left"><%= image_tag 'icons/access.png' %> Access</th>
    <td>
      <%= @rev.access %>
    </td>
  </tr>
  <tr class="odd">
    <th class="left"><%= image_tag 'icons/severity.png' %> Severity</th>
    <td>
      <%= @rev.severity %>
    </td>
  </tr>
  <tr>
    <th class="left"><%= image_tag 'icons/synopsis.png' %> Synopsis</th>
    <td>
      <%= field_content(@rev.synopsis) %>
    </td>
  </tr>
  <tr class="odd">
    <th class="left"><%= image_tag 'icons/unaffected.png' %> Unaffected packages</th>
    <td>
      <ul>
        <% @rev.packages.each do |pkg| ; next unless pkg.my_type == "unaffected" %>
          <li><%= pkg.comp %><strong><%= pkg.atom %></strong>-<%= pkg.version %> on <%= pkg.arch %> (auto: <%= pkg.automatic %>)</li>
        <% end %>
      </ul>
    </td>
  </tr>
  <tr>
    <th class="left"><%= image_tag 'icons/affected.png' %> Vulnerable packages</th>
    <td>
      <ul>
        <% @rev.packages.each do |pkg| ; next unless pkg.my_type == "vulnerable" %>
          <li><%= pkg.comp %><strong><%= pkg.atom %></strong>-<%= pkg.version %> on <%= pkg.arch %> (auto: <%= pkg.automatic %>)</li>
        <% end %>
      </ul>
    </td>
  </tr>
  <tr class="odd">
    <th class="left"><%= image_tag 'icons/background.png' %> Background</th>
    <td>
      <%= field_content(@rev.background) %>
    </td>
  </tr>
  <tr>
    <th class="left"><%= image_tag 'icons/document.png' %> Description</th>
    <td>
      <%= field_content(@rev.description) %>
    </td>
  </tr>
  <tr class="odd">
    <th class="left"><%= image_tag 'icons/impact.png' %> Impact</th>
    <td>
      <%= field_content(@rev.impact) %>
    </td>
  </tr>
  <tr>
    <th class="left"><%= image_tag 'icons/workaround.png' %> Workaround</th>
    <td>
      <%= field_content(@rev.workaround) %>
    </td>
  </tr>
  <tr class="odd">
    <th class="left"><%= image_tag 'icons/resolution.png' %> Resolution</th>
    <td>
      <%= field_content(@rev.resolution) %>
    </td>
  </tr>
  <tr>
    <th class="left"><%= image_tag 'icons/reference.png' %> References</th>
    <td>
      <ul>
        <% @rev.references.each do |r| %>
          <li><%= link_to r.title, r.url -%></li>
        <% end %>
      </ul>
    </td>
  </tr>
</table>

<br style="break: both;" />