- content_for :title do Créer des achats de %i= @item.name pour un groupe de membre = form_tag create_for_users_admin_item_purchases_path(@item), multipart: true, class: 'form-horizontal' do - if @invalid_file .alert.alert-danger Le fichier transmis ne contenait pas d'e-mails en 2ème colonne. Veuillez réessayer avec un fichier conforme. - elsif @created_count || @already_purchased || @not_existing.try(:any?) %blockquote %p Le fichier a bien été importé. %ul - if @already_purchased > 0 %li #{@already_purchased} membres avaient déjà acheté le fichier. - if @created_count > 0 %li #{@created_count} membres ont été retrouvés par leur e-mail et ont eu un achat créé. - if @not_existing.try(:any?) %li #{@not_existing.count} membres n'existaient pas, ont eu un compte créé, un e-mail de bienvenue envoyé et un achat créé. = link_to '#', data: {toggle: 'collapse', target: '#not_imported'} do Détail %i.fa.fa-chevron-down .collapse#not_imported - @not_existing.each do |row| .well.well-sm= row.join(' | ') .form-group = file_field_tag :file %p.help-block Sélectionnez un fichier CSV contenant trois colonnes (nom d'utilisateur, e-mail et langue par défaut (fr/en)) et pas de ligne de titre. %span.help-block.with-errors .form-group = label_tag do Groupes %small %span.text-muted – = link_to 'Tous', '#', id: 'check-all' %span.text-muted – = link_to 'Aucun', '#', id: 'check-none' %p.help-block Sélectionnez les groupes auxquels appartiendront les éventuels membres encore non inscrits. .row - Group.all.each do |group| .col-sm-3 = label_tag nil, class: 'checkbox-inline' do = check_box_tag "group_ids[]", group.id = group.name %span.help-block.with-errors .form-group = submit_tag t('links.submit'), class: 'btn btn-primary' = link_to t('links.cancel'), admin_users_path, class: 'btn btn-default'