<% var photo_tray_length = photo_tray_objs.length; var i = photo_tray_length; var page_no = 1; var index = 0; _.each(photo_tray_objs, function(data, key){ var image_data = {}; image_data.orig_w = data.width; image_data.orig_h = data.height; image_data.s3_or_local = data.s3_or_local; image_data.size = data.size; image_data.from_device = data.from_device; image_data.thumb_url = data.thumb_url; image_data.back_url = data.back_url; var thumbs_width = ucd_config.photo_thumb_width; var thumbs_height = 0; if(image_data.orig_w / image_data.orig_h > 1){ thumbs_width = ucd_config.photo_thumb_width; thumbs_height = ucd_config.photo_thumb_width * image_data.orig_h / image_data.orig_w; }else{ thumbs_width = ucd_config.photo_thumb_width * image_data.orig_w / image_data.orig_h; thumbs_height = ucd_config.photo_thumb_width; } var titleStr = is_admin == 1?(' alt="' + data.uploadTime + '" title="' + data.uploadTime + '" '):''; var elements = ''; if (index < 24) { elements = '
Uploaded image #'+index+'' + data.size + 'delete
'; } else { elements = '
Uploaded image #'+index+'' + data.size + 'delete
'; } index += 1; var style = ''; if(key >= num_per_page){ style = ' style="display: none;"'; } if(key == 0){ elements = '
' + elements; page_no++; %> <% }else if(key > 0 && key % num_per_page == 0){ elements = '
' + elements; page_no++; %> <% }else if((key + 1) % num_per_page == 0){ elements += '
'; %> <% }else if(key == photo_tray_length - 1){ elements += '
'; %> <% } %> <%= elements%> <% }); %>