|
| 1 | +<div class="dataTables_wrapper"> |
| 2 | + <table class="table table-striped dataTable mb-0"> |
| 3 | + <thead> |
| 4 | + <tr> |
| 5 | + <th class="no-sort" data-column-visible="false"><span class="visually-hidden">Select</span></th> |
| 6 | + <% columns.each_with_index do |column, index| %> |
| 7 | + <th><%= column %></th> |
| 8 | + <% end %> |
| 9 | + </tr> |
| 10 | + </thead> |
| 11 | + <tbody> |
| 12 | + <% entries = ['Auto-complete in password field', 'DOM-based cross-site scripting (XSS)', 'Insufficient cross-site request forgery (CSRF) protection', 'Reflected cross-site scripting (XSS)'] %> |
| 13 | + <% entries.each_with_index do |entry, index| %> |
| 14 | + <tr id="entry-<%= index %>"> |
| 15 | + <td><input type="checkbox" /></td> |
| 16 | + <td> |
| 17 | + <a |
| 18 | + href="javascript:void(0)" |
| 19 | + class="js-try-pro" |
| 20 | + data-term="issuelib" |
| 21 | + data-url="https://dradis.com/pro/pages/issuelib.html"> |
| 22 | + <%= entry %> |
| 23 | + </a> |
| 24 | + </td> |
| 25 | + <td>Published</td> |
| 26 | + <% if import %> |
| 27 | + <% @default_button_state = 'published' %> |
| 28 | + <td class="column-actions"> |
| 29 | + <div class="btn-group btn-states" data-behavior="btn-states"> |
| 30 | + <a |
| 31 | + href="javascript:void(0)" |
| 32 | + class="btn btn-primary js-try-pro" |
| 33 | + data-term="issuelib" |
| 34 | + data-url="https://dradis.com/pro/pages/issuelib.html"> |
| 35 | + <i class="fa-solid fa-plus"></i> Add issue |
| 36 | + (<span data-behavior="state-button"><%= @default_button_state.humanize %></span>) |
| 37 | + </a> |
| 38 | + <a href="#" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| 39 | + <span class="visually-hidden">Toggle Dropdown</span> |
| 40 | + </a> |
| 41 | + <div class="dropdown-menu"> |
| 42 | + <%= collection_radio_buttons(entry, :state, [['draft', 'draft'], ['ready_for_review', 'ready_for_review'], ['published', 'published']], :first, :first) do |b| %> |
| 43 | + <span> |
| 44 | + <%= b.label class: 'state', for: "#{entry}_state_#{b.value}" do %> |
| 45 | + <%= b.radio_button id: "#{entry}_state_#{b.value}", class: 'd-none', data: { behavior: 'state-radio' }, checked: b.value == @default_button_state %> |
| 46 | + <i class="fa-solid fa-check fa-fw"></i> |
| 47 | + <div class="state-label"> |
| 48 | + <p data-behavior="state-label"><%= b.text.humanize %></p> |
| 49 | + <% case b.value %> |
| 50 | + <% when 'draft' %> |
| 51 | + <span>Still not ready for review or the report.</span> |
| 52 | + <% when 'ready_for_review' %> |
| 53 | + <span>All done on this one, ready for QA.</span> |
| 54 | + <% when 'published' %> |
| 55 | + <span>Content is final, ready for the report.</span> |
| 56 | + <% end %> |
| 57 | + </div> |
| 58 | + <% end %> |
| 59 | + </span> |
| 60 | + <% end %> |
| 61 | + </div> |
| 62 | + </div> |
| 63 | + </td> |
| 64 | + <% else %> |
| 65 | + <td>on <%= (Date.today - 1.month).strftime('%b %d, %Y') %></td> |
| 66 | + <td>on <%= Date.today.strftime('%b %d, %Y') %></td> |
| 67 | + <% end %> |
| 68 | + </tr> |
| 69 | + <% end %> |
| 70 | + </tbody> |
| 71 | + </table> |
| 72 | +</div> |
0 commit comments