lolita 3.4.2 → 3.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +36 -36
  3. data/Gemfile +29 -29
  4. data/README.md +147 -147
  5. data/Rakefile +6 -6
  6. data/app/assets/javascripts/lolita/application.js +6 -6
  7. data/app/assets/javascripts/lolita/tab.js +100 -100
  8. data/app/assets/stylesheets/lolita/PIE-custom.htc +87 -87
  9. data/app/assets/stylesheets/lolita/PIE.htc +81 -81
  10. data/app/assets/stylesheets/lolita/application.css +6 -6
  11. data/app/assets/stylesheets/lolita/default.css.erb +169 -169
  12. data/app/assets/stylesheets/lolita/jquery-ui-1.8.16.lolita.css.erb +567 -567
  13. data/app/assets/stylesheets/lolita/style.css.erb +553 -553
  14. data/app/helpers/components/lolita/configuration/list_component.rb +10 -10
  15. data/app/helpers/components/lolita/configuration_component.rb +20 -20
  16. data/app/views/components/lolita/configuration/column/_first.html.haml +1 -1
  17. data/app/views/components/lolita/configuration/column/header/_first.html.haml +1 -1
  18. data/app/views/components/lolita/configuration/column/header/_sort.html.haml +6 -6
  19. data/app/views/components/lolita/configuration/columns/header/_display.html.haml +5 -5
  20. data/app/views/components/lolita/configuration/field/array/checkbox/_display.html.haml +7 -7
  21. data/app/views/components/lolita/configuration/field/string/text/_display.html.haml +7 -7
  22. data/app/views/components/lolita/configuration/search/_display.html.haml +2 -2
  23. data/app/views/components/lolita/configuration/tab/_display.html.haml +3 -3
  24. data/app/views/components/lolita/configuration/tabs/_form.html.haml +6 -6
  25. data/app/views/kaminari/lolita/_first_page.html.erb +11 -11
  26. data/app/views/kaminari/lolita/_gap.html.erb +8 -8
  27. data/app/views/kaminari/lolita/_last_page.html.erb +11 -11
  28. data/app/views/kaminari/lolita/_next_page.html.erb +11 -11
  29. data/app/views/kaminari/lolita/_page.html.erb +12 -12
  30. data/app/views/kaminari/lolita/_paginator.html.erb +23 -23
  31. data/app/views/kaminari/lolita/_prev_page.html.erb +11 -11
  32. data/app/views/lolita/info/index.html.erb +232 -232
  33. data/author +1 -1
  34. data/config/routes.rb +6 -6
  35. data/lib/generators/lolita/install_generator.rb +19 -19
  36. data/lib/generators/lolita/uninstall_generator.rb +70 -70
  37. data/lib/generators/templates/lolita.rb +13 -13
  38. data/lib/lolita.rb +140 -140
  39. data/lib/lolita/adapter/abstract_adapter.rb +15 -15
  40. data/lib/lolita/adapter/active_record.rb +227 -227
  41. data/lib/lolita/adapter/common_helper.rb +221 -221
  42. data/lib/lolita/adapter/field_helper.rb +18 -18
  43. data/lib/lolita/adapter/mongoid.rb +241 -241
  44. data/lib/lolita/components/base.rb +11 -11
  45. data/lib/lolita/configuration.rb +60 -60
  46. data/lib/lolita/configuration/column.rb +181 -181
  47. data/lib/lolita/configuration/field/big_decimal.rb +12 -12
  48. data/lib/lolita/configuration/field/boolean.rb +12 -12
  49. data/lib/lolita/configuration/field/date.rb +12 -12
  50. data/lib/lolita/configuration/field/hidden.rb +12 -12
  51. data/lib/lolita/configuration/field/integer.rb +11 -11
  52. data/lib/lolita/configuration/field/string.rb +16 -16
  53. data/lib/lolita/configuration/field/time.rb +13 -13
  54. data/lib/lolita/configuration/field_set.rb +25 -25
  55. data/lib/lolita/configuration/filter.rb +116 -116
  56. data/lib/lolita/configuration/list.rb +200 -200
  57. data/lib/lolita/configuration/search.rb +104 -104
  58. data/lib/lolita/controllers/component_helpers.rb +156 -156
  59. data/lib/lolita/controllers/internal_helpers.rb +71 -71
  60. data/lib/lolita/controllers/url_helpers.rb +7 -7
  61. data/lib/lolita/dbi/base.rb +56 -56
  62. data/lib/lolita/hooks/named_hook.rb +125 -125
  63. data/lib/lolita/lazy_loader.rb +54 -54
  64. data/lib/lolita/navigation/tree.rb +132 -132
  65. data/lib/lolita/rails/engine.rb +23 -23
  66. data/lib/lolita/rails/routes.rb +129 -129
  67. data/lib/lolita/ruby_ext/accessors.rb +26 -26
  68. data/lib/lolita/search/simple.rb +75 -75
  69. data/lib/lolita/support/formatter.rb +62 -62
  70. data/lib/lolita/support/formatter/rails.rb +56 -56
  71. data/lib/lolita/system_configuration/base.rb +178 -178
  72. data/lib/lolita/test/matchers.rb +77 -77
  73. data/lib/lolita/version.rb +30 -30
  74. data/lib/tasks/tinymce-assets.rake +6 -6
  75. data/lolita.gemspec +34 -34
  76. data/spec/adapter/common_helper_spec.rb +95 -95
  77. data/spec/adapter_helper.rb +42 -42
  78. data/spec/builder_spec.rb +120 -120
  79. data/spec/configuration/base_spec.rb +22 -22
  80. data/spec/configuration/field_spec.rb +118 -118
  81. data/spec/configuration/filter_spec.rb +131 -131
  82. data/spec/configuration/tab_spec.rb +187 -187
  83. data/spec/configuration/tabs_spec.rb +120 -120
  84. data/spec/generators/lolita/install_generator_spec.rb +54 -54
  85. data/spec/generators/lolita/uninstall_generator_spec.rb +48 -48
  86. data/spec/orm/mongoid.rb +12 -12
  87. data/spec/rails_app/app/controllers/application_controller.rb +3 -3
  88. data/spec/rails_app/app/helpers/application_helper.rb +3 -3
  89. data/spec/rails_app/app/mongoid/address.rb +7 -7
  90. data/spec/rails_app/app/mongoid/category.rb +18 -18
  91. data/spec/rails_app/app/mongoid/comment.rb +5 -5
  92. data/spec/rails_app/app/mongoid/post.rb +30 -30
  93. data/spec/rails_app/app/mongoid/preference.rb +5 -5
  94. data/spec/rails_app/app/mongoid/profile.rb +13 -13
  95. data/spec/rails_app/app/mongoid/tag.rb +3 -3
  96. data/spec/rails_app/app/views/components/lolita/configuration/list/_body_cell.html.erb +1 -1
  97. data/spec/rails_app/config/application.rb +33 -33
  98. data/spec/rails_app/config/boot.rb +7 -7
  99. data/spec/rails_app/config/environment.rb +5 -5
  100. data/spec/rails_app/config/environments/development.rb +23 -23
  101. data/spec/rails_app/config/environments/production.rb +37 -37
  102. data/spec/rails_app/config/environments/test.rb +37 -37
  103. data/spec/rails_app/config/initializers/backtrace_silencers.rb +7 -7
  104. data/spec/rails_app/config/initializers/inflections.rb +2 -2
  105. data/spec/rails_app/config/initializers/secret_token.rb +1 -1
  106. data/spec/rails_app/config/routes.rb +2 -2
  107. data/spec/rails_app/lib/lolita/configuration/field/my_custom_collection.rb +13 -13
  108. data/spec/rails_app/public/javascripts/jquery-1.5.1.min.js +15 -15
  109. data/spec/rails_app/public/javascripts/lolita/main.js +6 -6
  110. data/spec/rails_app/public/javascripts/modernizr-1.7.min.js +1 -1
  111. data/spec/rails_app/public/javascripts/rails.js +137 -137
  112. data/spec/rails_app/public/javascripts/tinymce/langs/en.js +221 -221
  113. data/spec/rails_app/public/javascripts/tinymce/license.txt +504 -504
  114. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/about.htm +52 -52
  115. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/anchor.htm +26 -26
  116. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/charmap.htm +51 -51
  117. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/color_picker.htm +74 -74
  118. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/editor_template_src.js +1328 -1328
  119. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/image.htm +80 -80
  120. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/about.js +73 -73
  121. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/anchor.js +42 -42
  122. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/charmap.js +354 -354
  123. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/color_picker.js +329 -329
  124. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/image.js +247 -247
  125. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/link.js +153 -153
  126. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/source_editor.js +56 -56
  127. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/langs/en.js +68 -68
  128. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/langs/en_dlg.js +53 -53
  129. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/link.htm +57 -57
  130. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/shortcuts.htm +47 -47
  131. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/content.css +66 -66
  132. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/dialog.css +117 -117
  133. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/ui.css +988 -988
  134. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/source_editor.htm +25 -25
  135. data/spec/rails_app/public/javascripts/tinymce/tiny_mce_popup.js +4 -4
  136. data/spec/rails_app/public/stylesheets/lolita/default.css +169 -169
  137. data/spec/rails_app/public/stylesheets/lolita/style.css +214 -214
  138. data/spec/spec_helper.rb +51 -51
  139. data/vendor/assets/javascripts/application_vendor_lolita.js +4 -4
  140. data/vendor/assets/javascripts/jquery-numeric.js +279 -279
  141. data/vendor/assets/javascripts/modernizr_1_7_min.js +1 -1
  142. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/content.css +66 -66
  143. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/dialog.css +117 -117
  144. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/cirkuit/ui.css +988 -988
  145. data/vendor/assets/stylesheets/jquery-ui-1.8.16.custom.css +567 -567
  146. metadata +4 -3
@@ -1,11 +1,11 @@
1
- module Components
2
- module Lolita
3
- module Configuration
4
- module ListComponent
5
- def sort_options
6
- params[:sort]
7
- end
8
- end
9
- end
10
- end
1
+ module Components
2
+ module Lolita
3
+ module Configuration
4
+ module ListComponent
5
+ def sort_options
6
+ params[:sort]
7
+ end
8
+ end
9
+ end
10
+ end
11
11
  end
@@ -1,21 +1,21 @@
1
- module Components
2
- module Lolita
3
- module ConfigurationComponent
4
- def link_to_remove_fields(name, f)
5
- f.hidden_field(:_destroy) + link_to_function(name, "remove_fields(this)")
6
- end
7
-
8
- def link_to_add_fields(name, f, nested_form)
9
- new_object = nested_form.klass.new
10
- fields_content = ""
11
- fields = f.fields_for(nested_form.name, new_object, :child_index => "new_#{nested_form.name}") do |builder|
12
- self.current_form(builder) do
13
- fields_content = render_component(nested_form, :"fields")
14
- end
15
- end
16
- link_to_function(name, "add_fields(this, \"#{nested_form.name}\", \"#{escape_javascript(fields_content)}\")")
17
- end
18
-
19
- end
20
- end
1
+ module Components
2
+ module Lolita
3
+ module ConfigurationComponent
4
+ def link_to_remove_fields(name, f)
5
+ f.hidden_field(:_destroy) + link_to_function(name, "remove_fields(this)")
6
+ end
7
+
8
+ def link_to_add_fields(name, f, nested_form)
9
+ new_object = nested_form.klass.new
10
+ fields_content = ""
11
+ fields = f.fields_for(nested_form.name, new_object, :child_index => "new_#{nested_form.name}") do |builder|
12
+ self.current_form(builder) do
13
+ fields_content = render_component(nested_form, :"fields")
14
+ end
15
+ end
16
+ link_to_function(name, "add_fields(this, \"#{nested_form.name}\", \"#{escape_javascript(fields_content)}\")")
17
+ end
18
+
19
+ end
20
+ end
21
21
  end
@@ -1,2 +1,2 @@
1
- %td{:class => "first-column cell"}
1
+ %td{:class => "first-column cell"}
2
2
  = check_box_tag "#{resource_name}[id]", record.id
@@ -1 +1 @@
1
- %th{:class => "first-column"}= "*"
1
+ %th{:class => "first-column"}= "*"
@@ -1,6 +1,6 @@
1
- - sort_mapping = {"desc" => '⇓', "asc" => '⇑'}
2
- - new_params = params.reject{|k,v| ["controller","action"].include?(k.to_s)}
3
- - direction_indicator = raw(sort_mapping[column.current_sort_state(new_params)[1]])
4
- - new_params[:s] = column.sort_params(new_params)
5
-
6
- = link_to raw("#{column.title.to_s.capitalize} #{direction_indicator}"), lolita_resources_path(new_params)
1
+ - sort_mapping = {"desc" => '⇓', "asc" => '⇑'}
2
+ - new_params = params.reject{|k,v| ["controller","action"].include?(k.to_s)}
3
+ - direction_indicator = raw(sort_mapping[column.current_sort_state(new_params)[1]])
4
+ - new_params[:s] = column.sort_params(new_params)
5
+
6
+ = link_to raw("#{column.title.to_s.capitalize} #{direction_indicator}"), lolita_resources_path(new_params)
@@ -1,5 +1,5 @@
1
- %thead
2
- %tr
3
- - columns.each do |column|
4
- = render_component *column.build("header")
5
- = render_component "lolita/configuration/column/header", :last
1
+ %thead
2
+ %tr
3
+ - columns.each do |column|
4
+ = render_component *column.build("header")
5
+ = render_component "lolita/configuration/column/header", :last
@@ -1,8 +1,8 @@
1
- - ids_method = field.name.to_s.match(/_ids$/) ? field.name : "#{field.name.to_s.singularize}_ids"
2
- = hidden_field_tag "#{resource_name}[#{ids_method}][]",""
3
- - field.view_values(self).each do |value|
4
- - editors = resource.send(:"#{ids_method}")
5
- .habtm-container
6
- = label_tag "#{resource_name}_#{field.name}_#{value.last}",value.first, :class => "habtm-label"
7
- = check_box_tag "#{resource_name}[#{ids_method}][]", value.last, resource.send("#{ids_method}").include?(value.last), :id => "#{resource_name}_#{field.name}_#{value.last}", :class => "habtm-checkbox"
1
+ - ids_method = field.name.to_s.match(/_ids$/) ? field.name : "#{field.name.to_s.singularize}_ids"
2
+ = hidden_field_tag "#{resource_name}[#{ids_method}][]",""
3
+ - field.view_values(self).each do |value|
4
+ - editors = resource.send(:"#{ids_method}")
5
+ .habtm-container
6
+ = label_tag "#{resource_name}_#{field.name}_#{value.last}",value.first, :class => "habtm-label"
7
+ = check_box_tag "#{resource_name}[#{ids_method}][]", value.last, resource.send("#{ids_method}").include?(value.last), :id => "#{resource_name}_#{field.name}_#{value.last}", :class => "habtm-checkbox"
8
8
  .clear
@@ -1,7 +1,7 @@
1
- = current_form.text_area field.name, :rows=>(field.rows || 20), :"data-simple"=>field.simple
2
- - if @textarea_component_include_tinymce_once.nil?
3
- :javascript
4
- $(function(){
5
- TinyMCEConfigManager.get().load();
6
- })
7
- - @textarea_component_include_tinymce_once = "done"
1
+ = current_form.text_area field.name, :rows=>(field.rows || 20), :"data-simple"=>field.simple
2
+ - if @textarea_component_include_tinymce_once.nil?
3
+ :javascript
4
+ $(function(){
5
+ TinyMCEConfigManager.get().load();
6
+ })
7
+ - @textarea_component_include_tinymce_once = "done"
@@ -1,2 +1,2 @@
1
- = form_tag lolita_resources_path(), :method => :get, :class => "search" do
2
- %input{:type => "text", :name => "q", :value => params[:q], :placeholder => t("lolita.search")}
1
+ = form_tag lolita_resources_path(), :method => :get, :class => "search" do
2
+ %input{:type => "text", :name => "q", :value => params[:q], :placeholder => t("lolita.search")}
@@ -1,4 +1,4 @@
1
- %div{:class => "tab #{active && "active"}", :id => "tab_#{tab.__id__}"}
2
- = render_component "lolita/configuration/tab", :error_msg, :tab => tab
3
- = render_component *tab.build
1
+ %div{:class => "tab #{active && "active"}", :id => "tab_#{tab.__id__}"}
2
+ = render_component "lolita/configuration/tab", :error_msg, :tab => tab
3
+ = render_component *tab.build
4
4
  = #render_component "lolita/configuration/tab", :form, :tab => tab
@@ -1,7 +1,7 @@
1
- = form_for resource, :url => resource.new_record? ? lolita_resources_path : lolita_resource_path(:id=>resource.id), :method => resource.new_record? ? :post : :put, :html => {:multipart => true, :class => "associated"} do |form|
2
- - self.current_form = form
3
- - tabs.associated.each_with_index do |tab,index|
4
- = render_component :"lolita/configuration/tab", :display, :tab => tab, :active => index == 0
5
- - self.current_form = nil
6
- - tabs.dissociated.each_with_index do |tab,index|
1
+ = form_for resource, :url => resource.new_record? ? lolita_resources_path : lolita_resource_path(:id=>resource.id), :method => resource.new_record? ? :post : :put, :html => {:multipart => true, :class => "associated"} do |form|
2
+ - self.current_form = form
3
+ - tabs.associated.each_with_index do |tab,index|
4
+ = render_component :"lolita/configuration/tab", :display, :tab => tab, :active => index == 0
5
+ - self.current_form = nil
6
+ - tabs.dissociated.each_with_index do |tab,index|
7
7
  = render_component :"lolita/configuration/tab", :display, :tab => tab, :active => false
@@ -1,11 +1,11 @@
1
- <%# Link to the "First" page
2
- - available local variables
3
- url: url to the first page
4
- current_page: a page object for the currently displayed page
5
- num_pages: total number of pages
6
- per_page: number of items to fetch per page
7
- remote: data-remote
8
- -%>
9
- <span class="first">
10
- <%= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote %>
11
- </span>
1
+ <%# Link to the "First" page
2
+ - available local variables
3
+ url: url to the first page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <span class="first">
10
+ <%= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote %>
11
+ </span>
@@ -1,8 +1,8 @@
1
- <%# Non-link tag that stands for skipped pages...
2
- - available local variables
3
- current_page: a page object for the currently displayed page
4
- num_pages: total number of pages
5
- per_page: number of items to fetch per page
6
- remote: data-remote
7
- -%>
8
- <span class="page gap"><%= raw(t 'views.pagination.truncate') %></span>
1
+ <%# Non-link tag that stands for skipped pages...
2
+ - available local variables
3
+ current_page: a page object for the currently displayed page
4
+ num_pages: total number of pages
5
+ per_page: number of items to fetch per page
6
+ remote: data-remote
7
+ -%>
8
+ <span class="page gap"><%= raw(t 'views.pagination.truncate') %></span>
@@ -1,11 +1,11 @@
1
- <%# Link to the "Last" page
2
- - available local variables
3
- url: url to the last page
4
- current_page: a page object for the currently displayed page
5
- num_pages: total number of pages
6
- per_page: number of items to fetch per page
7
- remote: data-remote
8
- -%>
9
- <span class="last">
10
- <%= link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote} %>
11
- </span>
1
+ <%# Link to the "Last" page
2
+ - available local variables
3
+ url: url to the last page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <span class="last">
10
+ <%= link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote} %>
11
+ </span>
@@ -1,11 +1,11 @@
1
- <%# Link to the "Next" page
2
- - available local variables
3
- url: url to the next page
4
- current_page: a page object for the currently displayed page
5
- num_pages: total number of pages
6
- per_page: number of items to fetch per page
7
- remote: data-remote
8
- -%>
9
- <span class="next">
10
- <%= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote %>
11
- </span>
1
+ <%# Link to the "Next" page
2
+ - available local variables
3
+ url: url to the next page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <span class="next">
10
+ <%= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote %>
11
+ </span>
@@ -1,12 +1,12 @@
1
- <%# Link showing page number
2
- - available local variables
3
- page: a page object for "this" page
4
- url: url to this page
5
- current_page: a page object for the currently displayed page
6
- num_pages: total number of pages
7
- per_page: number of items to fetch per page
8
- remote: data-remote
9
- -%>
10
- <span class="page<%= ' current' if page.current? %>">
11
- <%= link_to_unless page.current?, page, url, opts = {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
12
- </span>
1
+ <%# Link showing page number
2
+ - available local variables
3
+ page: a page object for "this" page
4
+ url: url to this page
5
+ current_page: a page object for the currently displayed page
6
+ num_pages: total number of pages
7
+ per_page: number of items to fetch per page
8
+ remote: data-remote
9
+ -%>
10
+ <span class="page<%= ' current' if page.current? %>">
11
+ <%= link_to_unless page.current?, page, url, opts = {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
12
+ </span>
@@ -1,23 +1,23 @@
1
- <%# The container tag
2
- - available local variables
3
- current_page: a page object for the currently displayed page
4
- num_pages: total number of pages
5
- per_page: number of items to fetch per page
6
- remote: data-remote
7
- paginator: the paginator that renders the pagination tags inside
8
- -%>
9
- <%= paginator.render do -%>
10
- <nav class="pagination">
11
- <%= first_page_tag unless current_page.first? %>
12
- <%= prev_page_tag unless current_page.first? %>
13
- <% each_page do |page| -%>
14
- <% if page.left_outer? || page.right_outer? || page.inside_window? -%>
15
- <%= page_tag page %>
16
- <% elsif !page.was_truncated? -%>
17
- <%= gap_tag %>
18
- <% end -%>
19
- <% end -%>
20
- <%= next_page_tag unless current_page.last? %>
21
- <%= last_page_tag unless current_page.last? %>
22
- </nav>
23
- <% end -%>
1
+ <%# The container tag
2
+ - available local variables
3
+ current_page: a page object for the currently displayed page
4
+ num_pages: total number of pages
5
+ per_page: number of items to fetch per page
6
+ remote: data-remote
7
+ paginator: the paginator that renders the pagination tags inside
8
+ -%>
9
+ <%= paginator.render do -%>
10
+ <nav class="pagination">
11
+ <%= first_page_tag unless current_page.first? %>
12
+ <%= prev_page_tag unless current_page.first? %>
13
+ <% each_page do |page| -%>
14
+ <% if page.left_outer? || page.right_outer? || page.inside_window? -%>
15
+ <%= page_tag page %>
16
+ <% elsif !page.was_truncated? -%>
17
+ <%= gap_tag %>
18
+ <% end -%>
19
+ <% end -%>
20
+ <%= next_page_tag unless current_page.last? %>
21
+ <%= last_page_tag unless current_page.last? %>
22
+ </nav>
23
+ <% end -%>
@@ -1,11 +1,11 @@
1
- <%# Link to the "Previous" page
2
- - available local variables
3
- url: url to the previous page
4
- current_page: a page object for the currently displayed page
5
- num_pages: total number of pages
6
- per_page: number of items to fetch per page
7
- remote: data-remote
8
- -%>
9
- <span class="prev">
10
- <%= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote %>
11
- </span>
1
+ <%# Link to the "Previous" page
2
+ - available local variables
3
+ url: url to the previous page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <span class="prev">
10
+ <%= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote %>
11
+ </span>
@@ -1,232 +1,232 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Lolita: Welcome aboard</title>
5
- <style type="text/css" media="screen">
6
- body {
7
- margin: 0;
8
- margin-bottom: 25px;
9
- padding: 0;
10
- background-color: #f0f0f0;
11
- font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
12
- font-size: 13px;
13
- color: #333;
14
- }
15
-
16
- h1 {
17
- font-size: 28px;
18
- color: #000;
19
- }
20
-
21
- a {color: #03c}
22
- a:hover {
23
- background-color: #03c;
24
- color: white;
25
- text-decoration: none;
26
- }
27
-
28
-
29
- #page {
30
- background-color: #f0f0f0;
31
- width: 750px;
32
- margin: 0;
33
- margin-left: auto;
34
- margin-right: auto;
35
- }
36
-
37
- #content {
38
- float: left;
39
- background-color: white;
40
- border: 3px solid #aaa;
41
- border-top: none;
42
- padding: 25px;
43
- width: 500px;
44
- }
45
-
46
- #sidebar {
47
- float: right;
48
- width: 175px;
49
- }
50
-
51
- #footer {
52
- clear: both;
53
- }
54
-
55
-
56
- #header, #about, #getting-started {
57
- padding-left: 75px;
58
- padding-right: 30px;
59
- }
60
-
61
-
62
- #header {
63
- background-image: url("images/lolita/plus.png");
64
- background-repeat: no-repeat;
65
- background-position: top left;
66
- height: 64px;
67
- }
68
- #header h1, #header h2 {margin: 0}
69
- #header h2 {
70
- color: #888;
71
- font-weight: normal;
72
- font-size: 16px;
73
- }
74
-
75
-
76
- #about h3 {
77
- margin: 0;
78
- margin-bottom: 10px;
79
- font-size: 14px;
80
- }
81
-
82
- #about-content {
83
- background-color: #ffd;
84
- border: 1px solid #fc0;
85
- margin-left: -55px;
86
- margin-right: -10px;
87
- }
88
- #about-content table {
89
- margin-top: 10px;
90
- margin-bottom: 10px;
91
- font-size: 11px;
92
- border-collapse: collapse;
93
- }
94
- #about-content td {
95
- padding: 10px;
96
- padding-top: 3px;
97
- padding-bottom: 3px;
98
- }
99
- #about-content td.name {color: #555}
100
- #about-content td.value {color: #000}
101
-
102
- #about-content ul {
103
- padding: 0;
104
- list-style-type: none;
105
- }
106
-
107
- #about-content.failure {
108
- background-color: #fcc;
109
- border: 1px solid #f00;
110
- }
111
- #about-content.failure p {
112
- margin: 0;
113
- padding: 10px;
114
- }
115
-
116
-
117
- #getting-started {
118
- border-top: 1px solid #ccc;
119
- margin-top: 25px;
120
- padding-top: 15px;
121
- }
122
- #getting-started h1 {
123
- margin: 0;
124
- font-size: 20px;
125
- }
126
- #getting-started h2 {
127
- margin: 0;
128
- font-size: 14px;
129
- font-weight: normal;
130
- color: #333;
131
- margin-bottom: 25px;
132
- }
133
- #getting-started ol {
134
- margin-left: 0;
135
- padding-left: 0;
136
- }
137
- #getting-started li {
138
- font-size: 18px;
139
- color: #888;
140
- margin-bottom: 25px;
141
- }
142
- #getting-started li h2 {
143
- margin: 0;
144
- font-weight: normal;
145
- font-size: 18px;
146
- color: #333;
147
- }
148
- #getting-started li p {
149
- color: #555;
150
- font-size: 13px;
151
- }
152
-
153
-
154
- #sidebar ul {
155
- margin-left: 0;
156
- padding-left: 0;
157
- }
158
- #sidebar ul h3 {
159
- margin-top: 25px;
160
- font-size: 16px;
161
- padding-bottom: 10px;
162
- border-bottom: 1px solid #ccc;
163
- }
164
- #sidebar li {
165
- list-style-type: none;
166
- }
167
- #sidebar ul.links li {
168
- margin-bottom: 5px;
169
- }
170
-
171
- </style>
172
- <script type="text/javascript">
173
- function about() {
174
- info = document.getElementById('about-content');
175
- if (window.XMLHttpRequest)
176
- { xhr = new XMLHttpRequest(); }
177
- else
178
- { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
179
- xhr.open("GET","lolita/info/properties",false);
180
- xhr.send("");
181
- info.innerHTML = xhr.responseText;
182
- info.style.display = 'block'
183
- }
184
- </script>
185
- </head>
186
- <body>
187
- <div id="page">
188
- <div id="sidebar">
189
- <ul id="sidebar-items">
190
- <li>
191
- <h3>Browse the documentation</h3>
192
- <ul class="links">
193
- <li><a href="http://rdoc.info/github/ithouse/lolita/master/frames">Lolita API</a></li>
194
- </ul>
195
- </li>
196
- </ul>
197
- </div>
198
-
199
- <div id="content">
200
- <div id="header">
201
- <h1>Welcome aboard</h1>
202
- <h2>You&rsquo;re riding Lolita!</h2>
203
- </div>
204
-
205
- <div id="about">
206
- <h3><a href="lolita/info/properties" onclick="about(); return false">About your application&rsquo;s environment</a></h3>
207
- <div id="about-content" style="display: none"></div>
208
- </div>
209
-
210
- <div id="getting-started">
211
- <h1>Getting started</h1>
212
- <h2>Here&rsquo;s how to get rolling:</h2>
213
-
214
- <ol>
215
- <li>
216
- <h2>Use <code>lolita_for</code> in config/routes.rb</h2>
217
- <p>run it.</p>
218
- </li>
219
-
220
- <li>
221
- <h2>Use <code>lolita</code> in your models</h2>
222
- <p></p>
223
- </li>
224
-
225
- </ol>
226
- </div>
227
- </div>
228
-
229
- <div id="footer">&nbsp;</div>
230
- </div>
231
- </body>
232
- </html>
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Lolita: Welcome aboard</title>
5
+ <style type="text/css" media="screen">
6
+ body {
7
+ margin: 0;
8
+ margin-bottom: 25px;
9
+ padding: 0;
10
+ background-color: #f0f0f0;
11
+ font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
12
+ font-size: 13px;
13
+ color: #333;
14
+ }
15
+
16
+ h1 {
17
+ font-size: 28px;
18
+ color: #000;
19
+ }
20
+
21
+ a {color: #03c}
22
+ a:hover {
23
+ background-color: #03c;
24
+ color: white;
25
+ text-decoration: none;
26
+ }
27
+
28
+
29
+ #page {
30
+ background-color: #f0f0f0;
31
+ width: 750px;
32
+ margin: 0;
33
+ margin-left: auto;
34
+ margin-right: auto;
35
+ }
36
+
37
+ #content {
38
+ float: left;
39
+ background-color: white;
40
+ border: 3px solid #aaa;
41
+ border-top: none;
42
+ padding: 25px;
43
+ width: 500px;
44
+ }
45
+
46
+ #sidebar {
47
+ float: right;
48
+ width: 175px;
49
+ }
50
+
51
+ #footer {
52
+ clear: both;
53
+ }
54
+
55
+
56
+ #header, #about, #getting-started {
57
+ padding-left: 75px;
58
+ padding-right: 30px;
59
+ }
60
+
61
+
62
+ #header {
63
+ background-image: url("images/lolita/plus.png");
64
+ background-repeat: no-repeat;
65
+ background-position: top left;
66
+ height: 64px;
67
+ }
68
+ #header h1, #header h2 {margin: 0}
69
+ #header h2 {
70
+ color: #888;
71
+ font-weight: normal;
72
+ font-size: 16px;
73
+ }
74
+
75
+
76
+ #about h3 {
77
+ margin: 0;
78
+ margin-bottom: 10px;
79
+ font-size: 14px;
80
+ }
81
+
82
+ #about-content {
83
+ background-color: #ffd;
84
+ border: 1px solid #fc0;
85
+ margin-left: -55px;
86
+ margin-right: -10px;
87
+ }
88
+ #about-content table {
89
+ margin-top: 10px;
90
+ margin-bottom: 10px;
91
+ font-size: 11px;
92
+ border-collapse: collapse;
93
+ }
94
+ #about-content td {
95
+ padding: 10px;
96
+ padding-top: 3px;
97
+ padding-bottom: 3px;
98
+ }
99
+ #about-content td.name {color: #555}
100
+ #about-content td.value {color: #000}
101
+
102
+ #about-content ul {
103
+ padding: 0;
104
+ list-style-type: none;
105
+ }
106
+
107
+ #about-content.failure {
108
+ background-color: #fcc;
109
+ border: 1px solid #f00;
110
+ }
111
+ #about-content.failure p {
112
+ margin: 0;
113
+ padding: 10px;
114
+ }
115
+
116
+
117
+ #getting-started {
118
+ border-top: 1px solid #ccc;
119
+ margin-top: 25px;
120
+ padding-top: 15px;
121
+ }
122
+ #getting-started h1 {
123
+ margin: 0;
124
+ font-size: 20px;
125
+ }
126
+ #getting-started h2 {
127
+ margin: 0;
128
+ font-size: 14px;
129
+ font-weight: normal;
130
+ color: #333;
131
+ margin-bottom: 25px;
132
+ }
133
+ #getting-started ol {
134
+ margin-left: 0;
135
+ padding-left: 0;
136
+ }
137
+ #getting-started li {
138
+ font-size: 18px;
139
+ color: #888;
140
+ margin-bottom: 25px;
141
+ }
142
+ #getting-started li h2 {
143
+ margin: 0;
144
+ font-weight: normal;
145
+ font-size: 18px;
146
+ color: #333;
147
+ }
148
+ #getting-started li p {
149
+ color: #555;
150
+ font-size: 13px;
151
+ }
152
+
153
+
154
+ #sidebar ul {
155
+ margin-left: 0;
156
+ padding-left: 0;
157
+ }
158
+ #sidebar ul h3 {
159
+ margin-top: 25px;
160
+ font-size: 16px;
161
+ padding-bottom: 10px;
162
+ border-bottom: 1px solid #ccc;
163
+ }
164
+ #sidebar li {
165
+ list-style-type: none;
166
+ }
167
+ #sidebar ul.links li {
168
+ margin-bottom: 5px;
169
+ }
170
+
171
+ </style>
172
+ <script type="text/javascript">
173
+ function about() {
174
+ info = document.getElementById('about-content');
175
+ if (window.XMLHttpRequest)
176
+ { xhr = new XMLHttpRequest(); }
177
+ else
178
+ { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
179
+ xhr.open("GET","lolita/info/properties",false);
180
+ xhr.send("");
181
+ info.innerHTML = xhr.responseText;
182
+ info.style.display = 'block'
183
+ }
184
+ </script>
185
+ </head>
186
+ <body>
187
+ <div id="page">
188
+ <div id="sidebar">
189
+ <ul id="sidebar-items">
190
+ <li>
191
+ <h3>Browse the documentation</h3>
192
+ <ul class="links">
193
+ <li><a href="http://rdoc.info/github/ithouse/lolita/master/frames">Lolita API</a></li>
194
+ </ul>
195
+ </li>
196
+ </ul>
197
+ </div>
198
+
199
+ <div id="content">
200
+ <div id="header">
201
+ <h1>Welcome aboard</h1>
202
+ <h2>You&rsquo;re riding Lolita!</h2>
203
+ </div>
204
+
205
+ <div id="about">
206
+ <h3><a href="lolita/info/properties" onclick="about(); return false">About your application&rsquo;s environment</a></h3>
207
+ <div id="about-content" style="display: none"></div>
208
+ </div>
209
+
210
+ <div id="getting-started">
211
+ <h1>Getting started</h1>
212
+ <h2>Here&rsquo;s how to get rolling:</h2>
213
+
214
+ <ol>
215
+ <li>
216
+ <h2>Use <code>lolita_for</code> in config/routes.rb</h2>
217
+ <p>run it.</p>
218
+ </li>
219
+
220
+ <li>
221
+ <h2>Use <code>lolita</code> in your models</h2>
222
+ <p></p>
223
+ </li>
224
+
225
+ </ol>
226
+ </div>
227
+ </div>
228
+
229
+ <div id="footer">&nbsp;</div>
230
+ </div>
231
+ </body>
232
+ </html>