tennpipes-helper 3.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +239 -0
- data/Rakefile +1 -0
- data/lib/tennpipes-helper.rb +62 -0
- data/lib/tennpipes-helper/asset_tag_helpers.rb +394 -0
- data/lib/tennpipes-helper/form_builder/abstract_form_builder.rb +279 -0
- data/lib/tennpipes-helper/form_builder/standard_form_builder.rb +40 -0
- data/lib/tennpipes-helper/form_helpers.rb +639 -0
- data/lib/tennpipes-helper/form_helpers/errors.rb +138 -0
- data/lib/tennpipes-helper/form_helpers/options.rb +98 -0
- data/lib/tennpipes-helper/form_helpers/security.rb +70 -0
- data/lib/tennpipes-helper/format_helpers.rb +372 -0
- data/lib/tennpipes-helper/locale/cs.yml +103 -0
- data/lib/tennpipes-helper/locale/da.yml +91 -0
- data/lib/tennpipes-helper/locale/de.yml +81 -0
- data/lib/tennpipes-helper/locale/en.yml +103 -0
- data/lib/tennpipes-helper/locale/es.yml +103 -0
- data/lib/tennpipes-helper/locale/fr.yml +79 -0
- data/lib/tennpipes-helper/locale/hu.yml +103 -0
- data/lib/tennpipes-helper/locale/it.yml +89 -0
- data/lib/tennpipes-helper/locale/ja.yml +103 -0
- data/lib/tennpipes-helper/locale/lv.yml +103 -0
- data/lib/tennpipes-helper/locale/nl.yml +82 -0
- data/lib/tennpipes-helper/locale/no.yml +91 -0
- data/lib/tennpipes-helper/locale/pl.yml +95 -0
- data/lib/tennpipes-helper/locale/pt_br.yml +103 -0
- data/lib/tennpipes-helper/locale/ro.yml +103 -0
- data/lib/tennpipes-helper/locale/ru.yml +103 -0
- data/lib/tennpipes-helper/locale/sv.yml +103 -0
- data/lib/tennpipes-helper/locale/tr.yml +103 -0
- data/lib/tennpipes-helper/locale/uk.yml +103 -0
- data/lib/tennpipes-helper/locale/zh_cn.yml +103 -0
- data/lib/tennpipes-helper/locale/zh_tw.yml +103 -0
- data/lib/tennpipes-helper/number_helpers.rb +283 -0
- data/lib/tennpipes-helper/output_helpers.rb +226 -0
- data/lib/tennpipes-helper/output_helpers/abstract_handler.rb +61 -0
- data/lib/tennpipes-helper/output_helpers/erb_handler.rb +27 -0
- data/lib/tennpipes-helper/output_helpers/haml_handler.rb +25 -0
- data/lib/tennpipes-helper/output_helpers/slim_handler.rb +18 -0
- data/lib/tennpipes-helper/render_helpers.rb +63 -0
- data/lib/tennpipes-helper/tag_helpers.rb +294 -0
- data/lib/tennpipes-helper/translation_helpers.rb +36 -0
- data/lib/tennpipes/rendering.rb +369 -0
- data/lib/tennpipes/rendering/erb_template.rb +40 -0
- data/lib/tennpipes/rendering/erubis_template.rb +66 -0
- data/lib/tennpipes/rendering/haml_template.rb +26 -0
- data/lib/tennpipes/rendering/slim_template.rb +20 -0
- data/test/fixtures/apps/render.rb +25 -0
- data/test/fixtures/apps/views/article/comment/show.slim +1 -0
- data/test/fixtures/apps/views/blog/post.erb +1 -0
- data/test/fixtures/apps/views/layouts/specific.erb +1 -0
- data/test/fixtures/apps/views/test/post.erb +1 -0
- data/test/fixtures/layouts/layout.erb +1 -0
- data/test/fixtures/markup_app/app.rb +87 -0
- data/test/fixtures/markup_app/views/button_to.erb +8 -0
- data/test/fixtures/markup_app/views/button_to.haml +5 -0
- data/test/fixtures/markup_app/views/button_to.slim +6 -0
- data/test/fixtures/markup_app/views/capture_concat.erb +14 -0
- data/test/fixtures/markup_app/views/capture_concat.haml +12 -0
- data/test/fixtures/markup_app/views/capture_concat.slim +12 -0
- data/test/fixtures/markup_app/views/content_for.erb +23 -0
- data/test/fixtures/markup_app/views/content_for.haml +19 -0
- data/test/fixtures/markup_app/views/content_for.slim +19 -0
- data/test/fixtures/markup_app/views/content_tag.erb +13 -0
- data/test/fixtures/markup_app/views/content_tag.haml +11 -0
- data/test/fixtures/markup_app/views/content_tag.slim +11 -0
- data/test/fixtures/markup_app/views/current_engine.erb +5 -0
- data/test/fixtures/markup_app/views/current_engine.haml +5 -0
- data/test/fixtures/markup_app/views/current_engine.slim +5 -0
- data/test/fixtures/markup_app/views/fields_for.erb +20 -0
- data/test/fixtures/markup_app/views/fields_for.haml +15 -0
- data/test/fixtures/markup_app/views/fields_for.slim +15 -0
- data/test/fixtures/markup_app/views/form_for.erb +72 -0
- data/test/fixtures/markup_app/views/form_for.haml +59 -0
- data/test/fixtures/markup_app/views/form_for.slim +59 -0
- data/test/fixtures/markup_app/views/form_tag.erb +95 -0
- data/test/fixtures/markup_app/views/form_tag.haml +78 -0
- data/test/fixtures/markup_app/views/form_tag.slim +79 -0
- data/test/fixtures/markup_app/views/link_to.erb +5 -0
- data/test/fixtures/markup_app/views/link_to.haml +4 -0
- data/test/fixtures/markup_app/views/link_to.slim +4 -0
- data/test/fixtures/markup_app/views/mail_to.erb +3 -0
- data/test/fixtures/markup_app/views/mail_to.haml +3 -0
- data/test/fixtures/markup_app/views/mail_to.slim +3 -0
- data/test/fixtures/markup_app/views/meta_tag.erb +3 -0
- data/test/fixtures/markup_app/views/meta_tag.haml +3 -0
- data/test/fixtures/markup_app/views/meta_tag.slim +3 -0
- data/test/fixtures/markup_app/views/partials/_erb.erb +1 -0
- data/test/fixtures/markup_app/views/partials/_haml.haml +1 -0
- data/test/fixtures/markup_app/views/partials/_slim.slim +1 -0
- data/test/fixtures/markup_app/views/simple_partial.erb +1 -0
- data/test/fixtures/markup_app/views/simple_partial.haml +1 -0
- data/test/fixtures/markup_app/views/simple_partial.slim +1 -0
- data/test/fixtures/render_app/app.rb +110 -0
- data/test/fixtures/render_app/views/_deep.erb +3 -0
- data/test/fixtures/render_app/views/_deep.haml +2 -0
- data/test/fixtures/render_app/views/_deep.slim +2 -0
- data/test/fixtures/render_app/views/_partial_block_erb.erb +10 -0
- data/test/fixtures/render_app/views/_partial_block_haml.haml +7 -0
- data/test/fixtures/render_app/views/_partial_block_slim.slim +7 -0
- data/test/fixtures/render_app/views/_unsafe.html.builder +2 -0
- data/test/fixtures/render_app/views/_unsafe_object.html.builder +2 -0
- data/test/fixtures/render_app/views/current_engine.haml +5 -0
- data/test/fixtures/render_app/views/current_engines/_erb.erb +1 -0
- data/test/fixtures/render_app/views/current_engines/_haml.haml +1 -0
- data/test/fixtures/render_app/views/current_engines/_slim.slim +1 -0
- data/test/fixtures/render_app/views/dive_inner_erb.erb +3 -0
- data/test/fixtures/render_app/views/dive_inner_haml.haml +2 -0
- data/test/fixtures/render_app/views/dive_inner_slim.slim +2 -0
- data/test/fixtures/render_app/views/dive_outer_erb.erb +3 -0
- data/test/fixtures/render_app/views/dive_outer_haml.haml +2 -0
- data/test/fixtures/render_app/views/dive_outer_slim.slim +2 -0
- data/test/fixtures/render_app/views/double_capture_erb.erb +3 -0
- data/test/fixtures/render_app/views/double_capture_haml.haml +2 -0
- data/test/fixtures/render_app/views/double_capture_slim.slim +2 -0
- data/test/fixtures/render_app/views/erb/test.erb +1 -0
- data/test/fixtures/render_app/views/explicit_engine.haml +5 -0
- data/test/fixtures/render_app/views/haml/test.haml +1 -0
- data/test/fixtures/render_app/views/render_block_erb.erb +5 -0
- data/test/fixtures/render_app/views/render_block_haml.haml +4 -0
- data/test/fixtures/render_app/views/render_block_slim.slim +4 -0
- data/test/fixtures/render_app/views/ruby_block_capture_erb.erb +1 -0
- data/test/fixtures/render_app/views/ruby_block_capture_haml.haml +1 -0
- data/test/fixtures/render_app/views/ruby_block_capture_slim.slim +1 -0
- data/test/fixtures/render_app/views/template/_user.haml +7 -0
- data/test/fixtures/render_app/views/template/haml_template.haml +1 -0
- data/test/fixtures/render_app/views/template/some_template.haml +2 -0
- data/test/fixtures/render_app/views/wrong_capture_erb.erb +3 -0
- data/test/fixtures/render_app/views/wrong_capture_haml.haml +2 -0
- data/test/fixtures/render_app/views/wrong_capture_slim.slim +2 -0
- data/test/helper.rb +88 -0
- data/test/test_asset_tag_helpers.rb +401 -0
- data/test/test_form_builder.rb +1216 -0
- data/test/test_form_helpers.rb +1056 -0
- data/test/test_format_helpers.rb +251 -0
- data/test/test_helpers.rb +10 -0
- data/test/test_locale.rb +20 -0
- data/test/test_number_helpers.rb +142 -0
- data/test/test_output_helpers.rb +157 -0
- data/test/test_render_helpers.rb +225 -0
- data/test/test_rendering.rb +706 -0
- data/test/test_rendering_extensions.rb +14 -0
- data/test/test_tag_helpers.rb +131 -0
- metadata +299 -0
@@ -0,0 +1,59 @@
|
|
1
|
+
= form_for MarkupUser.new, '/demo', :id => 'demo' do |f|
|
2
|
+
= f.error_messages(:header_message => "custom MarkupUser cannot be saved!")
|
3
|
+
= f.hidden_field :session_id
|
4
|
+
%p
|
5
|
+
= f.label :username, :caption => "Login: ", :class => 'user-label'
|
6
|
+
= f.text_field :username, :class => 'user-text', :value => "John"
|
7
|
+
%p
|
8
|
+
= f.label :password
|
9
|
+
= f.password_field :password, :class => 'user-password', :value => "secret"
|
10
|
+
%p
|
11
|
+
= f.label :age
|
12
|
+
= f.number_field :age, :class => 'numeric'
|
13
|
+
%p
|
14
|
+
= f.label :telephone
|
15
|
+
= f.telephone_field :telephone, :class => 'numeric'
|
16
|
+
%p
|
17
|
+
= f.label :email, :caption => 'Email Address: '
|
18
|
+
= f.email_field :email, :class => 'string'
|
19
|
+
%p
|
20
|
+
= f.label :webpage, :caption => 'Your Web Page: '
|
21
|
+
= f.url_field :webpage, :class => 'string'
|
22
|
+
%p
|
23
|
+
= f.label :search
|
24
|
+
= f.search_field :search, :class => 'string'
|
25
|
+
%p
|
26
|
+
= f.label :photo
|
27
|
+
= f.file_field :photo, :class => 'user-photo'
|
28
|
+
%p
|
29
|
+
= f.label :about, :caption => "About Me: "
|
30
|
+
= f.text_area :about, :class => 'user-about'
|
31
|
+
%p
|
32
|
+
= f.label :gender, :caption => "Your gender: "
|
33
|
+
= f.radio_button :gender, :value => 'male'
|
34
|
+
= f.radio_button :gender, :value => 'female'
|
35
|
+
%p
|
36
|
+
= f.label :country, :caption => "Your country"
|
37
|
+
= f.select :country, :options => ['USA', 'Canada', 'Mexico'], :selected => 'USA', :class => 'selector'
|
38
|
+
%p
|
39
|
+
= f.label :remember_me
|
40
|
+
= f.check_box :remember_me, :value => "1"
|
41
|
+
%p
|
42
|
+
= f.submit "Create", :class => 'success', :id => 'demo-button'
|
43
|
+
%p
|
44
|
+
= f.image_submit "buttons/post.png", :class => 'success', :id => 'image-button'
|
45
|
+
|
46
|
+
= form_for MarkupUser.new, '/another_demo', :id => 'demo2', :method => 'get' do |f|
|
47
|
+
= f.error_messages :header_message => "custom MarkupUser cannot be saved!"
|
48
|
+
= f.hidden_field :session_id
|
49
|
+
= f.text_field_block :username, { :class => 'input' }, { :caption => 'Nickname: ', :class => 'label' }
|
50
|
+
= f.password_field_block :code, { :class => 'input' }
|
51
|
+
= f.text_area_block :about, { :class => 'textarea' }
|
52
|
+
= f.file_field_block :photo, { :class => 'upload' }
|
53
|
+
= f.check_box_block :remember_me, { :class => 'checker' }
|
54
|
+
= f.select_block :state, :options => ['California', 'Texas'], :class => 'selector'
|
55
|
+
= f.submit_block "Create", { :class => 'button' }
|
56
|
+
= f.image_submit_block "buttons/ok.png", { :class => 'image' }
|
57
|
+
|
58
|
+
= form_for :markup_user, '/third_demo', :id => 'demo3', :method => 'get' do |f|
|
59
|
+
= f.text_field_block :username
|
@@ -0,0 +1,59 @@
|
|
1
|
+
= form_for MarkupUser.new, '/demo', :id => 'demo' do |f|
|
2
|
+
= f.error_messages(:header_message => "custom MarkupUser cannot be saved!")
|
3
|
+
= f.hidden_field :session_id
|
4
|
+
p
|
5
|
+
= f.label :username, :caption => "Login: ", :class => 'user-label'
|
6
|
+
= f.text_field :username, :class => 'user-text', :value => "John"
|
7
|
+
p
|
8
|
+
= f.label :password
|
9
|
+
= f.password_field :password, :class => 'user-password', :value => "secret"
|
10
|
+
p
|
11
|
+
= f.label :age
|
12
|
+
= f.number_field :age, :class => 'numeric'
|
13
|
+
p
|
14
|
+
= f.label :telephone
|
15
|
+
= f.telephone_field :telephone, :class => 'numeric'
|
16
|
+
p
|
17
|
+
= f.label :email, :caption => 'Email Address: '
|
18
|
+
= f.email_field :email, :class => 'string'
|
19
|
+
p
|
20
|
+
= f.label :webpage, :caption => 'Your Web Page: '
|
21
|
+
= f.url_field :webpage, :class => 'string'
|
22
|
+
p
|
23
|
+
= f.label :search
|
24
|
+
= f.search_field :search, :class => 'string'
|
25
|
+
p
|
26
|
+
= f.label :photo
|
27
|
+
= f.file_field :photo, :class => 'user-photo'
|
28
|
+
p
|
29
|
+
= f.label :about, :caption => "About Me: "
|
30
|
+
= f.text_area :about, :class => 'user-about'
|
31
|
+
p
|
32
|
+
= f.label :gender, :caption => "Your gender: "
|
33
|
+
= f.radio_button :gender, :value => 'male'
|
34
|
+
= f.radio_button :gender, :value => 'female'
|
35
|
+
p
|
36
|
+
= f.label :country, :caption => "Your country"
|
37
|
+
= f.select :country, :options => ['USA', 'Canada', 'Mexico'], :selected => 'USA', :class => 'selector'
|
38
|
+
p
|
39
|
+
= f.label :remember_me
|
40
|
+
= f.check_box :remember_me, :value => "1"
|
41
|
+
p
|
42
|
+
= f.submit "Create", :class => 'success', :id => 'demo-button'
|
43
|
+
p
|
44
|
+
= f.image_submit "buttons/post.png", :class => 'success', :id => 'image-button'
|
45
|
+
|
46
|
+
= form_for MarkupUser.new, '/another_demo', :id => 'demo2', :method => 'get' do |f|
|
47
|
+
= f.error_messages :header_message => "custom MarkupUser cannot be saved!"
|
48
|
+
= f.hidden_field :session_id
|
49
|
+
= f.text_field_block :username, { :class => 'input' }, { :caption => 'Nickname: ', :class => 'label' }
|
50
|
+
= f.password_field_block :code, { :class => 'input' }
|
51
|
+
= f.text_area_block :about, { :class => 'textarea' }
|
52
|
+
= f.file_field_block :photo, { :class => 'upload' }
|
53
|
+
= f.check_box_block :remember_me, { :class => 'checker' }
|
54
|
+
= f.select_block :state, :options => ['California', 'Texas'], :class => 'selector'
|
55
|
+
= f.submit_block "Create", { :class => 'button' }
|
56
|
+
= f.image_submit_block "buttons/ok.png", { :class => 'image' }
|
57
|
+
|
58
|
+
= form_for :markup_user, '/third_demo', :id => 'demo3', :method => 'get' do |f|
|
59
|
+
= f.text_field_block :username
|
@@ -0,0 +1,95 @@
|
|
1
|
+
<% form_tag '/simple', :class => 'simple-form' do %>
|
2
|
+
<%= hidden_field_tag :session_id, :value => "__secret__" %>
|
3
|
+
<% field_set_tag do %>
|
4
|
+
<%= label_tag :username %>
|
5
|
+
<%= text_field_tag :username %>
|
6
|
+
<%= label_tag :password %>
|
7
|
+
<%= password_field_tag :password %>
|
8
|
+
<%= label_tag :email %>
|
9
|
+
<%= email_field_tag :email %>
|
10
|
+
<%= label_tag :age %>
|
11
|
+
<%= number_field_tag :age %>
|
12
|
+
<%= label_tag :telephone %>
|
13
|
+
<%= telephone_field_tag :telephone %>
|
14
|
+
<%= label_tag :webpage %>
|
15
|
+
<%= url_field_tag :webpage %>
|
16
|
+
<%= label_tag :search %>
|
17
|
+
<%= search_field_tag :search %>
|
18
|
+
<%= check_box_tag :remember_me %>
|
19
|
+
<%= label_tag :gender %>
|
20
|
+
<%= label_tag :color %>
|
21
|
+
<%= select_tag :color, :options => ['green', 'orange', 'purple'] %>
|
22
|
+
<%= select_tag :type, :grouped_options => { 'foo' => ['foo', 'bar'], 'bar' => ['foo', 'bar'] } %>
|
23
|
+
<%= select_tag :character, :grouped_options => [['Friends',['Yoda',['Obiwan',1]]],['Enemies',['Palpatine',['Darth Vader',3]]]] %>
|
24
|
+
<%= radio_button_tag :gender, :value => 'male' %>
|
25
|
+
<%= radio_button_tag :gender, :value => 'female' %>
|
26
|
+
<%= submit_tag %>
|
27
|
+
<% end %>
|
28
|
+
<% end %>
|
29
|
+
|
30
|
+
<% form_tag '/advanced', :id => 'advanced', :class => 'advanced-form', :method => 'get' do %>
|
31
|
+
<%= error_messages_for MarkupUser.new, :header_message => "There are problems with saving user!" %>
|
32
|
+
<%= hidden_field_tag :session_id, :value => "__secret__" %>
|
33
|
+
<% field_set_tag "Advanced", :class => 'advanced-field-set' do %>
|
34
|
+
<p>
|
35
|
+
<%= label_tag :username, :class => 'first', :caption => "Nickname" %>
|
36
|
+
<%= text_field_tag :username, :value => params[:username], :id => 'the_username' %>
|
37
|
+
</p>
|
38
|
+
<p>
|
39
|
+
<%= label_tag :password, :class => 'first' %>
|
40
|
+
<%= password_field_tag :password, :value => params[:password] %>
|
41
|
+
</p>
|
42
|
+
<p>
|
43
|
+
<%= label_tag :email, :caption => 'Email Address' %>
|
44
|
+
<%= email_field_tag :email, :class => 'string' %>
|
45
|
+
</p>
|
46
|
+
<p>
|
47
|
+
<%= label_tag :age, :class => 'age' %>
|
48
|
+
<%= number_field_tag :age, :class => 'numeric' %>
|
49
|
+
</p>
|
50
|
+
<p>
|
51
|
+
<%= label_tag :telephone, :class => 'telephone' %>
|
52
|
+
<%= telephone_field_tag :telephone, :class => 'numeric' %>
|
53
|
+
</p>
|
54
|
+
<p>
|
55
|
+
<%= label_tag :webpage, :caption => 'Your Home Page' %>
|
56
|
+
<%= url_field_tag :webpage, :class => 'string' %>
|
57
|
+
</p>
|
58
|
+
<p>
|
59
|
+
<%= label_tag :search %>
|
60
|
+
<%= search_field_tag :search, :class => 'string' %>
|
61
|
+
</p>
|
62
|
+
<p>
|
63
|
+
<%= label_tag :about, :class => 'about', :caption => "About Me" %>
|
64
|
+
<%= text_area_tag :about, :class => 'large' %>
|
65
|
+
</p>
|
66
|
+
<p>
|
67
|
+
<%= label_tag :photo, :class => 'photo' %>
|
68
|
+
<%= file_field_tag :photo, :class => 'upload' %>
|
69
|
+
</p>
|
70
|
+
<p>
|
71
|
+
<%= label_tag :gender, :class => 'gender' %>
|
72
|
+
<%= radio_button_tag :gender, :value => 'male', :checked => true %>
|
73
|
+
<%= radio_button_tag :remember_me, :value => 'female' %>
|
74
|
+
<p>
|
75
|
+
<p>
|
76
|
+
<%= label_tag :fav_color %>
|
77
|
+
<%= select_tag :fav_color, :options => [ ['green', '1'], ['orange', '2'], ['purple', '3'] ], :selected => '2' %>
|
78
|
+
</p>
|
79
|
+
<p>
|
80
|
+
<%= check_box_tag :remember_me, :value => '1', :checked => true %>
|
81
|
+
<p>
|
82
|
+
<p>
|
83
|
+
<%= range_field_tag('ranger_with_min_max', :min => 1, :max => 50) %>
|
84
|
+
<%= range_field_tag('ranger_with_range', :range => 1..5) %>
|
85
|
+
</p>
|
86
|
+
<% end %>
|
87
|
+
<% field_set_tag(:class => 'buttons') do %>
|
88
|
+
<%= submit_tag "Login" %>
|
89
|
+
<%= button_tag "Cancel" %>
|
90
|
+
<%= image_submit_tag "buttons/submit.png" %>
|
91
|
+
<% end %>
|
92
|
+
<% end %>
|
93
|
+
|
94
|
+
<% form_tag '/dontprotect', :class => 'no-protection', :protect_from_csrf => false do %>
|
95
|
+
<% end %>
|
@@ -0,0 +1,78 @@
|
|
1
|
+
= form_tag '/simple', :class => 'simple-form' do
|
2
|
+
= error_messages_for nil
|
3
|
+
= field_set_tag do
|
4
|
+
= hidden_field_tag :session_id, :value => "__secret__"
|
5
|
+
= label_tag :username
|
6
|
+
= text_field_tag :username
|
7
|
+
= label_tag :password
|
8
|
+
= password_field_tag :password
|
9
|
+
= label_tag :email
|
10
|
+
= email_field_tag :email
|
11
|
+
= label_tag :age
|
12
|
+
= number_field_tag :age
|
13
|
+
= label_tag :telephone
|
14
|
+
= telephone_field_tag :telephone
|
15
|
+
= label_tag :webpage
|
16
|
+
= url_field_tag :webpage
|
17
|
+
= label_tag :search
|
18
|
+
= search_field_tag :search
|
19
|
+
= label_tag :color
|
20
|
+
= select_tag :color, :options => ['green', 'orange', 'purple']
|
21
|
+
= select_tag :type, :grouped_options => { 'foo' => ['foo', 'bar'], 'bar' => ['foo', 'bar'] }
|
22
|
+
= select_tag :character, :grouped_options => [['Friends',['Yoda',['Obiwan',1]]],['Enemies',['Palpatine',['Darth Vader',3]]]]
|
23
|
+
= label_tag :gender
|
24
|
+
= radio_button_tag :gender, :value => 'male'
|
25
|
+
= radio_button_tag :gender, :value => 'female'
|
26
|
+
= check_box_tag :remember_me
|
27
|
+
= submit_tag
|
28
|
+
|
29
|
+
= form_tag '/advanced', :id => 'advanced', :class => 'advanced-form', :method => 'get' do
|
30
|
+
= error_messages_for MarkupUser.new, :header_message => "There are problems with saving user!"
|
31
|
+
= hidden_field_tag :session_id, :value => "__secret__"
|
32
|
+
= field_set_tag "Advanced", :class => 'advanced-field-set' do
|
33
|
+
%p
|
34
|
+
= label_tag :username, :class => 'first', :caption => "Nickname"
|
35
|
+
= text_field_tag :username, :value => params[:username], :id => 'the_username'
|
36
|
+
%p
|
37
|
+
= label_tag :password, :class => 'first'
|
38
|
+
= password_field_tag :password, :value => params[:password]
|
39
|
+
%p
|
40
|
+
= label_tag :email, :caption => 'Email Address'
|
41
|
+
= email_field_tag :email, :class => 'string'
|
42
|
+
%p
|
43
|
+
= label_tag :age, :class => 'age'
|
44
|
+
= number_field_tag :age, :class => 'numeric'
|
45
|
+
%p
|
46
|
+
= label_tag :telephone, :class => 'telephone'
|
47
|
+
= telephone_field_tag :telephone, :class => 'numeric'
|
48
|
+
%p
|
49
|
+
= label_tag :webpage, :caption => 'Your Home Page'
|
50
|
+
= url_field_tag :webpage, :class => 'string'
|
51
|
+
%p
|
52
|
+
= label_tag :search
|
53
|
+
= search_field_tag :search, :class => 'string'
|
54
|
+
%p
|
55
|
+
= label_tag :about, :class => 'about', :caption => "About Me"
|
56
|
+
= text_area_tag :about, :class => 'large'
|
57
|
+
%p
|
58
|
+
= label_tag :gender, :class => 'gender'
|
59
|
+
= radio_button_tag :gender, :value => 'male', :checked => true
|
60
|
+
= radio_button_tag :gender, :value => 'female'
|
61
|
+
%p
|
62
|
+
= label_tag :photo, :class => 'photo'
|
63
|
+
= file_field_tag :photo, :class => 'upload'
|
64
|
+
%p
|
65
|
+
= label_tag :fav_color
|
66
|
+
= select_tag :fav_color, :options => [ ['green', '1'], ['orange', '2'], ['purple', '3'] ], :selected => '2'
|
67
|
+
%p
|
68
|
+
= check_box_tag :remember_me, :value => "1", :checked => true
|
69
|
+
%p
|
70
|
+
= range_field_tag('ranger_with_min_max', :min => 1, :max => 50)
|
71
|
+
= range_field_tag('ranger_with_range', :range => 1..5)
|
72
|
+
= field_set_tag(:class => 'buttons') do
|
73
|
+
= submit_tag "Login"
|
74
|
+
= button_tag "Cancel"
|
75
|
+
= image_submit_tag "buttons/submit.png"
|
76
|
+
|
77
|
+
= form_tag '/dontprotect', :class => 'no-protection', :protect_from_csrf => false do
|
78
|
+
= submit_tag "Login"
|
@@ -0,0 +1,79 @@
|
|
1
|
+
= form_tag '/simple', :class => 'simple-form' do
|
2
|
+
= error_messages_for nil
|
3
|
+
= field_set_tag do
|
4
|
+
= hidden_field_tag :session_id, :value => "__secret__"
|
5
|
+
= label_tag :username
|
6
|
+
= text_field_tag :username
|
7
|
+
= label_tag :password
|
8
|
+
= password_field_tag :password
|
9
|
+
= label_tag :email
|
10
|
+
= email_field_tag :email
|
11
|
+
= label_tag :age
|
12
|
+
= number_field_tag :age
|
13
|
+
= label_tag :telephone
|
14
|
+
= telephone_field_tag :telephone
|
15
|
+
= label_tag :webpage
|
16
|
+
= url_field_tag :webpage
|
17
|
+
= label_tag :search
|
18
|
+
= search_field_tag :search
|
19
|
+
= label_tag :color
|
20
|
+
= select_tag :color, :options => ['green', 'orange', 'purple']
|
21
|
+
= select_tag :type, :grouped_options => { 'foo' => ['foo', 'bar'], 'bar' => ['foo', 'bar'] }
|
22
|
+
= select_tag :character, :grouped_options => [['Friends',['Yoda',['Obiwan',1]]],['Enemies',['Palpatine',['Darth Vader',3]]]]
|
23
|
+
= label_tag :gender
|
24
|
+
= radio_button_tag :gender, :value => 'male'
|
25
|
+
= radio_button_tag :gender, :value => 'female'
|
26
|
+
= check_box_tag :remember_me
|
27
|
+
= submit_tag
|
28
|
+
|
29
|
+
= form_tag '/advanced', :id => 'advanced', :class => 'advanced-form', :method => 'get' do
|
30
|
+
= error_messages_for MarkupUser.new, :header_message => "There are problems with saving user!"
|
31
|
+
= hidden_field_tag :session_id, :value => "__secret__"
|
32
|
+
= field_set_tag "Advanced", :class => 'advanced-field-set' do
|
33
|
+
p
|
34
|
+
= label_tag :username, :class => 'first', :caption => "Nickname"
|
35
|
+
= text_field_tag :username, :value => params[:username], :id => 'the_username'
|
36
|
+
p
|
37
|
+
= label_tag :password, :class => 'first'
|
38
|
+
= password_field_tag :password, :value => params[:password]
|
39
|
+
p
|
40
|
+
= label_tag :email, :caption => 'Email Address'
|
41
|
+
= email_field_tag :email, :class => 'string'
|
42
|
+
p
|
43
|
+
= label_tag :age, :class => 'age'
|
44
|
+
= number_field_tag :age, :class => 'numeric'
|
45
|
+
p
|
46
|
+
= label_tag :telephone, :class => 'telephone'
|
47
|
+
= telephone_field_tag :telephone, :class => 'numeric'
|
48
|
+
p
|
49
|
+
= label_tag :webpage, :caption => 'Your Home Page'
|
50
|
+
= url_field_tag :webpage, :class => 'string'
|
51
|
+
p
|
52
|
+
= label_tag :search
|
53
|
+
= search_field_tag :search, :class => 'string'
|
54
|
+
p
|
55
|
+
= label_tag :about, :class => 'about', :caption => "About Me"
|
56
|
+
= text_area_tag :about, :class => 'large'
|
57
|
+
p
|
58
|
+
= label_tag :gender, :class => 'gender'
|
59
|
+
= radio_button_tag :gender, :value => 'male', :checked => true
|
60
|
+
= radio_button_tag :gender, :value => 'female'
|
61
|
+
p
|
62
|
+
= label_tag :photo, :class => 'photo'
|
63
|
+
= file_field_tag :photo, :class => 'upload'
|
64
|
+
p
|
65
|
+
= label_tag :fav_color
|
66
|
+
= select_tag :fav_color, :options => [ ['green', '1'], ['orange', '2'], ['purple', '3'] ], :selected => '2'
|
67
|
+
p
|
68
|
+
= check_box_tag :remember_me, :value => "1", :checked => true
|
69
|
+
p
|
70
|
+
= range_field_tag('ranger_with_min_max', :min => 1, :max => 50)
|
71
|
+
= range_field_tag('ranger_with_range', :range => 1..5)
|
72
|
+
|
73
|
+
= field_set_tag(:class => 'buttons') do
|
74
|
+
= submit_tag "Login"
|
75
|
+
= button_tag "Cancel"
|
76
|
+
= image_submit_tag "buttons/submit.png"
|
77
|
+
|
78
|
+
= form_tag '/dontprotect', :class => 'no-protection', :protect_from_csrf => false do
|
79
|
+
= submit_tag "Login"
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= current_engine %>
|
@@ -0,0 +1 @@
|
|
1
|
+
=current_engine
|
@@ -0,0 +1 @@
|
|
1
|
+
= current_engine
|
@@ -0,0 +1 @@
|
|
1
|
+
<p class="erb"><%= partial 'partials/erb', :engine => "erb" %></p>
|
@@ -0,0 +1 @@
|
|
1
|
+
%p.haml= partial 'partials/haml', :engine => "haml"
|
@@ -0,0 +1 @@
|
|
1
|
+
p.slim= partial 'partials/slim', :engine => "slim"
|