Skip to content

Commit

Permalink
Merge pull request #2189 from srgpqt/master
Browse files Browse the repository at this point in the history
Fix form layout on export page
  • Loading branch information
mshibuya committed Feb 25, 2015
2 parents 2f4fc32 + 87fe22a commit 9be0e00
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/views/rails_admin/main/export.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
%legend
%i.icon-chevron-down
= t('admin.export.select')
.control-group
.form-group.control-group
.controls
.col-sm-2
%label.col-sm-10.checkbox{for: 'check_all'}
= check_box_tag 'all', 'all', true, { id: 'check_all' }
= t('admin.export.select_all_fields')
.control-group
.form-group.control-group
%label.col-sm-2.control-label{rel: 'tooltip', :'data-original-title' => t('admin.export.click_to_reverse_selection'), onclick: 'jQuery(this).siblings(".controls").find("input").click()'}= t('admin.export.fields_from', name: @model_config.label_plural.downcase)
.col-sm-10.controls
- visible_fields.select{ |f| !f.association? || f.association.polymorphic? }.each do |field|
Expand All @@ -34,7 +34,7 @@

- visible_fields.select{ |f| f.association? && !f.association.polymorphic? }.each do |field|
- fields = field.associated_model_config.export.with(controller: self.controller, view: self, object: (associated_model = field.associated_model_config.abstract_model.model).new).visible_fields.select{ |f| !f.association? }
.control-group
.form-group.control-group
%label.col-sm-2.control-label{rel: 'tooltip', :'data-original-title' => t('admin.export.click_to_reverse_selection'), onclick: 'jQuery(this).siblings(".controls").find("input").click()'}= t('admin.export.fields_from_associated', name: field.label.downcase)
.col-sm-10.controls
- fields.each do |associated_model_field|
Expand All @@ -47,22 +47,22 @@
%legend
%i.icon-chevron-down
= t('admin.export.options_for', name: 'csv')
.control-group
.form-group.control-group
- guessed_encoding = @abstract_model.encoding
%label.col-sm-2.control-label{for: "csv_options_encoding_to"}= t('admin.export.csv.encoding_to')
.col-sm-10.controls
-# from http://books.google.com/support/partner/bin/answer.py?answer=30990 :
= select_tag 'csv_options[encoding_to]', options_for_select(RailsAdmin::CSVConverter::TARGET_ENCODINGS), include_blank: true
%p.help-block= t('admin.export.csv.encoding_to_help', name: guessed_encoding)

.control-group
.form-group.control-group
%label.col-sm-2.control-label{for: "csv_options_skip_header"}= t('admin.export.csv.skip_header')
.col-sm-10.controls
%label.checkbox
= check_box_tag 'csv_options[skip_header]', 'true'
%p.help-block= t('admin.export.csv.skip_header_help')

.control-group
.form-group.control-group
%label.col-sm-2.control-label{for: "csv_options_generator_col_sep"}= t('admin.export.csv.col_sep')
.col-sm-10.controls
= select_tag 'csv_options[generator][col_sep]', options_for_select({ '' => t('admin.export.csv.default_col_sep'), "<comma> ','" => ',', "<semicolon> ';'" => ';', '<tabs>' => "'\t'" })
Expand Down

0 comments on commit 9be0e00

Please sign in to comment.