% pagestart = params[:page].present? ? params[:page].to_i : 1 %> <% i = pagestart <= 1 ? 1 : ((pagestart - 1) * 10) + 1 %> <% if mydata.length>0 %> <% mydata.each do |decro| functiontype= "" functiobj = get_catering_details(decro.ch_compcode,decro.ch_entry_no) if functiobj functiontype=functiobj.chd_function datetype = functiobj.chd_date datetime = functiobj.chd_time remakrs = functiobj.chd_remarks end funcnam = "" funcobj = get_function_type_name(functiontype) if funcobj funcnam = funcobj.func_type end username= "" userobj = user_detail(decro.ch_cater_entryby) if userobj username = userobj.firstname end priority_class = case decro.ch_priority when 'Silver' 'badge-silver' when 'Gold' 'badge-gold' when 'Platinum' 'badge-platinum' else '' end %>