mmsc_app/app/views/admin/organisateurs/_organisateur.html.haml
Nicolas Bally 12ab33ec2a suite
2020-06-28 22:33:18 +02:00

25 lines
884 B
Plaintext

%tr#organisateur_row{:id => organisateur.id}
-tr = {}
-tr[:cp] = capture do
%td
=d = organisateur.cp.to_s[0..1]
-dep = DepartementFrance.where(:num_dep => d).first
-if dep and !organisateur.circuit_region
-organisateur.circuit_region = CircuitRegion.where(:name => dep.region_name).first
- organisateur.save if organisateur.circuit_region
-tr[:actions] = capture do
%td.actions
= link_to i(:"trash-o"), [:admin, organisateur], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cet enregistrement ? ' } , :remote => true
= link_to i(:pencil), edit_admin_organisateur_path(organisateur), :remote => true
=# link_to i(:eye), admin_organisateur_path(organisateur), :remote => true
=render :partial => "qi/qi_ordered_table_object", :locals => {:tr => tr, :object => organisateur}