Implement tooltips for suppliers table view

This commit is contained in:
2013-03-11 21:46:56 +01:00
parent 0979eda9be
commit 7386768991
28 changed files with 6641 additions and 19 deletions
@@ -103,6 +103,7 @@ module Suppliers
# GET /sections/1/tables_view.json
def tables_view
@section = Section.find_by_supplier_id_and_id!(current_supplier.id, params[:id])
@tables = Table.enrich_active_list_id(@section.tables)
respond_to do |format|
format.html # show.html.erb
@@ -138,5 +139,15 @@ module Suppliers
else render(json: json_alert('messages.could_not_arrange_tables'))
end
end
def table_actions
@section = Section.find_by_supplier_id_and_id!(current_supplier.id, params[:id])
render(text: 'No table_id given', content_type: Mime::HTML.to_s) and return unless params[:table_id].present?
@table = Table.find(params[:table_id])
render(text: 'Table is not correct', content_type: Mime::HTML.to_s) and return unless @table.section_id == @section.id
@list = List.active_for_table(@table).first
@orders = @list ? @list.active_orders : []
render layout: false
end
end
end