lib/voruby/votables/votable.rb in voruby-1.0.2 vs lib/voruby/votables/votable.rb in voruby-1.1
- old
+ new
@@ -362,23 +362,23 @@
# [_header_class_:]
# The class to assign the header of the HTML table.
def create_headers(res, tbl,
infer_add_to_cart_ref, add_to_cart_header_value,
infer_access_ref, access_ref_header_value, access_ref_col,
- header_class)
+ header_class, id=nil)
headers = Array.new
thead = "<thead class=\"#{header_class}\">\n"
thead << "<tr>\n"
if infer_add_to_cart_ref
thead << "<th>#{add_to_cart_header_value}</th>\n"
- headers.push(' ')
+ headers.push("<a href=\"javascript:void(0);\" onclick=\"siap.addAllRowsToCart('#{id}');\">*</a>")
end
if infer_access_ref
thead << "<th>#{access_ref_header_value}</th>\n"
- headers.push(' ')
+ headers.push(' ')
end
col_count = 0
fields(res, tbl).each do |field|
if infer_access_ref and col_count == access_ref_col
headers[1] = field.ucd.value
@@ -568,10 +568,10 @@
if access_ref_col
# Create headers
thead = create_headers(res, tbl,
infer_add_to_cart_ref, add_to_cart_header_value,
infer_access_ref, access_ref_header_value, access_ref_col,
- header_class)
+ header_class, id)
# Create body
tbody = create_body(res, tbl,
infer_add_to_cart_ref, add_to_cart_link_value, add_to_cart_link_ref,
infer_access_ref, access_ref_link_value, access_ref_col,
\ No newline at end of file