aboutsummaryrefslogtreecommitdiff
path: root/views/_search_table.haml
diff options
context:
space:
mode:
Diffstat (limited to 'views/_search_table.haml')
-rw-r--r--views/_search_table.haml21
1 files changed, 21 insertions, 0 deletions
diff --git a/views/_search_table.haml b/views/_search_table.haml
new file mode 100644
index 0000000..14a9cfa
--- /dev/null
+++ b/views/_search_table.haml
@@ -0,0 +1,21 @@
+%table#search_table
+ %tr
+ %th#selector
+ %input#toggle_all{ :type => "checkbox" }
+ :javascript
+ // This just toggles all the checkboxes.
+ $('#toggle_all').change( function() {
+ $('input.alert').each( function(index) {
+ this.checked = !this.checked;
+ });
+ });
+ %th#summary Summary
+ %th#time Last update
+ - if @alerts.length > 0
+ = partial("search_table_row", :collection => @alerts)
+ - else
+ %tr{:class => %w(notice)}
+ %td
+ %td{:style => "text-align: center;"}
+ = "No alerts found!"
+ %td