<% if session[:pixtech] && !session[:pixtech].blank? && Pixways.get_pixtech_param_value(session[:pixtech],'automatic_images_flow')!='true' && Server.itself?(PIXADMIN_SERVER_NAME) %>
<% if med.flow == 1 %>
<% if Pixways.get_pixtech_param_value(session[:pixtech],'pixtech_only')=='true' %>
<%= image_tag("pixtech_tag.png", title: 'Envoyée sur PixTech')%>
<% else %>

<% end %>
<% elsif med.flow == 2 %>

<% end %>
<% end %>
<%= check_box_tag("lb_#{med.id}", '1', true) %>
<% unless Server.itself?(PP2_SERVER_NAME) %>
<% if session[:provbd][med.provider_id] == 1 %>
<%= link_to downloads_path('ids[]' => med.id, definition: "BD"), {title: I18n.t("BD_download"), class: "BD", target: :blank} do %>
<% end %>
<% else %>
<%= link_to downloads_path('ids[]' => med.id, definition: "BD"), data: { confirm: I18n.t("BD_demand") }, title: I18n.t("BD_demand_hint"), class: "BD", target: :blank do %>
<%end%>
<% end %>
<% if session[:provhd][med.provider_id] == 1 %>
<%= link_to downloads_path('ids[]' => med.id, definition: "HD"), {title: I18n.t("HD_download"), class: "HD", target: :blank} do %>
<%end%>
<% else %>
<%= link_to downloads_path('ids[]' => med.id, definition: "HD"), data: { confirm: I18n.t("HD_demand") }, title: I18n.t("HD_demand_hint"), class: "HD", target: :blank do %>
<%end%>
<% end %>
<% end %>
<%= link_to("
".html_safe, nil, :class => 'add_other', title: I18n.t('add_to_another_lightbox'), id: med.id) %>
<% unless med.reportage.blank? %>
<% img_rep = Reportage.joins(:reportage_photos).where(reportages: {no_reportage: med.reportage, string_key: med.provider.string_key},reportage_photos: {photo_ms_id: med.ms_image_id}).first %>
<% unless img_rep.nil? %>
<% if img_rep.nb_photos > 0 %>
<%# REPORTAGES_LOG.warn("[#{Time.now().strftime("%Y-%m-%d %H:%M:%S")}] : Picto sous vignette - reportage '#{med.reportage}' - nb photos : #{img_rep.nb_photos} - string_key : #{med.provider.string_key}") if img_rep.nb_photos >= BIG_REP_SIZE %>
<%= link_to medias_path(:reportage => med.reportage, :anchor => med.id, :provider_id => med.provider_id), {title: I18n.t("feature"),:target => '_blank'} do %>
<%= img_rep.nb_photos >= MAX_IMG_REPORTAGE ? ">#{MAX_IMG_REPORTAGE}" : img_rep.nb_photos %>
<% end %>
<% end %>
<% end %>
<% end %>
<%= link_to "
".html_safe, light_box_image_path("ids[]" => med.id), method: :delete, class: "pw_trash_icon", :data => { confirm: I18n.t("trash_confirm") }, title: I18n.t('trash_hint') %>