the_jobbook_admin_data 1.3.0a

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. data/.gitignore +19 -0
  2. data/CHANGELOG.rdoc +284 -0
  3. data/Gemfile +22 -0
  4. data/Gemfile.lock +121 -0
  5. data/Guardfile +14 -0
  6. data/MIT-LICENSE +20 -0
  7. data/README.md +37 -0
  8. data/README.rdoc +3 -0
  9. data/Rakefile +40 -0
  10. data/admin_data.gemspec +23 -0
  11. data/app/assets/images/add.png +0 -0
  12. data/app/assets/images/admin_data/.gitkeep +0 -0
  13. data/app/assets/images/no.png +0 -0
  14. data/app/assets/images/site.png +0 -0
  15. data/app/assets/images/sort_by_asc.jpg +0 -0
  16. data/app/assets/images/sort_by_desc.jpg +0 -0
  17. data/app/assets/images/sort_by_nothing.jpg +0 -0
  18. data/app/assets/javascripts/admin_data.js +18 -0
  19. data/app/assets/javascripts/admin_data/application.js +15 -0
  20. data/app/assets/javascripts/advance_search/act_on_result.js +45 -0
  21. data/app/assets/javascripts/advance_search/advance_search.js +83 -0
  22. data/app/assets/javascripts/advance_search/advance_search_structure.js +79 -0
  23. data/app/assets/javascripts/advance_search/ajaxify_advance_search.js +28 -0
  24. data/app/assets/javascripts/advance_search/build_first_row.js +8 -0
  25. data/app/assets/javascripts/advance_search/event_bindings.js +76 -0
  26. data/app/assets/javascripts/advance_search/global_ajax_setting.js +10 -0
  27. data/app/assets/javascripts/advance_search/sortby.js +14 -0
  28. data/app/assets/javascripts/advance_search/trigger_submit_on_domready.js +6 -0
  29. data/app/assets/javascripts/analytics/report.js +7 -0
  30. data/app/assets/javascripts/misc/drop_down_change.js +8 -0
  31. data/app/assets/javascripts/misc/js_util.js +58 -0
  32. data/app/assets/javascripts/misc/quick_search_input_focus.js +6 -0
  33. data/app/assets/javascripts/vendor/jquery-1.4.2.js +6240 -0
  34. data/app/assets/javascripts/vendor/jquery-ui-1.7.2.custom.min.js +298 -0
  35. data/app/assets/javascripts/vendor/jquery.ba-isjquery.js +21 -0
  36. data/app/assets/javascripts/vendor/jquery_form.js +814 -0
  37. data/app/assets/javascripts/vendor/log.js +9 -0
  38. data/app/assets/javascripts/vendor/rails.js +132 -0
  39. data/app/assets/stylesheets/admin_data.css +1141 -0
  40. data/app/assets/stylesheets/admin_data/application.css +13 -0
  41. data/app/assets/stylesheets/vendor/jquery-ui-1.7.2.custom.css +406 -0
  42. data/app/controllers/admin_data/application_controller.rb +107 -0
  43. data/app/controllers/admin_data/crud_controller.rb +100 -0
  44. data/app/controllers/admin_data/feed_controller.rb +48 -0
  45. data/app/controllers/admin_data/home_controller.rb +8 -0
  46. data/app/controllers/admin_data/migration_controller.rb +18 -0
  47. data/app/controllers/admin_data/public_controller.rb +28 -0
  48. data/app/controllers/admin_data/search_controller.rb +143 -0
  49. data/app/controllers/admin_data/table_structure_controller.rb +25 -0
  50. data/app/helpers/admin_data/application_helper.rb +320 -0
  51. data/app/views/admin_data/crud/association/_association_info.html.erb +11 -0
  52. data/app/views/admin_data/crud/association/_belongs_to_info.html.erb +7 -0
  53. data/app/views/admin_data/crud/association/_habtm_info.html.erb +7 -0
  54. data/app/views/admin_data/crud/association/_has_many_info.html.erb +7 -0
  55. data/app/views/admin_data/crud/association/_has_one_info.html.erb +6 -0
  56. data/app/views/admin_data/crud/edit.html.erb +36 -0
  57. data/app/views/admin_data/crud/misc/_form.html.erb +38 -0
  58. data/app/views/admin_data/crud/misc/_modify_record.html.erb +18 -0
  59. data/app/views/admin_data/crud/new.html.erb +25 -0
  60. data/app/views/admin_data/crud/show.html.erb +42 -0
  61. data/app/views/admin_data/feed/index.rss.builder +25 -0
  62. data/app/views/admin_data/home/index.html.erb +21 -0
  63. data/app/views/admin_data/migration/index.html.erb +18 -0
  64. data/app/views/admin_data/migration/jstest.html.erb +51 -0
  65. data/app/views/admin_data/search/advance_search.html.erb +1 -0
  66. data/app/views/admin_data/search/quick_search.html.erb +1 -0
  67. data/app/views/admin_data/search/search/_advance_search_form.html.erb +52 -0
  68. data/app/views/admin_data/search/search/_errors.html.erb +5 -0
  69. data/app/views/admin_data/search/search/_listing.html.erb +43 -0
  70. data/app/views/admin_data/search/search/_search_form.html.erb +27 -0
  71. data/app/views/admin_data/search/search/_title.html.erb +34 -0
  72. data/app/views/admin_data/shared/_breadcrum.html.erb +16 -0
  73. data/app/views/admin_data/shared/_drop_down_klasses.html.erb +4 -0
  74. data/app/views/admin_data/shared/_flash_message.html.erb +13 -0
  75. data/app/views/admin_data/shared/_header.html.erb +20 -0
  76. data/app/views/admin_data/shared/_powered_by.html.erb +6 -0
  77. data/app/views/admin_data/shared/_secondary_navigation.html.erb +26 -0
  78. data/app/views/admin_data/table_structure/index.html.erb +54 -0
  79. data/app/views/layouts/admin_data.html.erb +34 -0
  80. data/app/views/layouts/admin_data/application.html.erb +14 -0
  81. data/app/views/layouts/search.html.erb +71 -0
  82. data/config/routes.rb +32 -0
  83. data/lib/admin_data.rb +27 -0
  84. data/lib/admin_data/active_record_util.rb +102 -0
  85. data/lib/admin_data/analytics.rb +176 -0
  86. data/lib/admin_data/authenticator.rb +15 -0
  87. data/lib/admin_data/config.rb +38 -0
  88. data/lib/admin_data/configuration.rb +127 -0
  89. data/lib/admin_data/date_util.rb +58 -0
  90. data/lib/admin_data/engine.rb +17 -0
  91. data/lib/admin_data/model_finder.rb +15 -0
  92. data/lib/admin_data/rails_version_check.rb +8 -0
  93. data/lib/admin_data/search.rb +188 -0
  94. data/lib/admin_data/setup_config.rb +24 -0
  95. data/lib/admin_data/util.rb +102 -0
  96. data/lib/admin_data/version.rb +3 -0
  97. data/lib/tasks/admin_data_tasks.rake +4 -0
  98. data/script/rails +8 -0
  99. data/test/admin_data_test.rb +7 -0
  100. data/test/dummy/README.md +19 -0
  101. data/test/dummy/Rakefile +7 -0
  102. data/test/dummy/app/controllers/application_controller.rb +3 -0
  103. data/test/dummy/app/helpers/application_helper.rb +5 -0
  104. data/test/dummy/app/models/user.rb +3 -0
  105. data/test/dummy/app/models/user/student.rb +2 -0
  106. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  107. data/test/dummy/config.ru +4 -0
  108. data/test/dummy/config/application.rb +15 -0
  109. data/test/dummy/config/boot.rb +13 -0
  110. data/test/dummy/config/cucumber.yml +9 -0
  111. data/test/dummy/config/database.yml +25 -0
  112. data/test/dummy/config/database.yml.mysql +22 -0
  113. data/test/dummy/config/database.yml.pg +15 -0
  114. data/test/dummy/config/database.yml.sqlite3 +25 -0
  115. data/test/dummy/config/environment.rb +5 -0
  116. data/test/dummy/config/environments/development.rb +22 -0
  117. data/test/dummy/config/environments/production.rb +49 -0
  118. data/test/dummy/config/environments/test.rb +35 -0
  119. data/test/dummy/config/initializers/admin_data.rb +15 -0
  120. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  121. data/test/dummy/config/initializers/empty_spaces_to_nil.rb +10 -0
  122. data/test/dummy/config/initializers/inflections.rb +10 -0
  123. data/test/dummy/config/initializers/mime_types.rb +5 -0
  124. data/test/dummy/config/initializers/secret_token.rb +7 -0
  125. data/test/dummy/config/initializers/session_store.rb +8 -0
  126. data/test/dummy/config/locales/en.yml +5 -0
  127. data/test/dummy/config/routes.rb +9 -0
  128. data/test/dummy/db/development.sqlite3 +0 -0
  129. data/test/dummy/db/migrate/20091030202259_create_tables.rb +72 -0
  130. data/test/dummy/db/production.sqlite3 +1 -0
  131. data/test/dummy/db/schema.rb +23 -0
  132. data/test/dummy/db/seeds.rb +40 -0
  133. data/test/dummy/db/test.sqlite3 +0 -0
  134. data/test/dummy/features/advance_search/boolean.feature +74 -0
  135. data/test/dummy/features/advance_search/datetime.feature +101 -0
  136. data/test/dummy/features/advance_search/delete_all.feature +20 -0
  137. data/test/dummy/features/advance_search/destroy_all.feature +20 -0
  138. data/test/dummy/features/advance_search/integer.feature +69 -0
  139. data/test/dummy/features/advance_search/multiple_rows.feature +87 -0
  140. data/test/dummy/features/advance_search/string.feature +130 -0
  141. data/test/dummy/features/crud.feature +50 -0
  142. data/test/dummy/features/crud_show.feature +56 -0
  143. data/test/dummy/features/feed.feature +13 -0
  144. data/test/dummy/features/home.feature +42 -0
  145. data/test/dummy/features/migration.feature +7 -0
  146. data/test/dummy/features/quick_search.feature +113 -0
  147. data/test/dummy/features/step_definitions/advance_search_steps.rb +13 -0
  148. data/test/dummy/features/step_definitions/app_steps.rb +36 -0
  149. data/test/dummy/features/step_definitions/async.rb +18 -0
  150. data/test/dummy/features/step_definitions/configuration_steps.rb +61 -0
  151. data/test/dummy/features/step_definitions/crud_show_steps.rb +37 -0
  152. data/test/dummy/features/step_definitions/feed_steps.rb +24 -0
  153. data/test/dummy/features/step_definitions/quick_search_steps.rb +68 -0
  154. data/test/dummy/features/step_definitions/util.rb +90 -0
  155. data/test/dummy/features/step_definitions/web_steps.rb +219 -0
  156. data/test/dummy/features/support/env.rb +66 -0
  157. data/test/dummy/features/support/hooks.rb +9 -0
  158. data/test/dummy/features/support/paths.rb +33 -0
  159. data/test/dummy/features/table_structure.feature +18 -0
  160. data/test/dummy/lib/tasks/.gitkeep +0 -0
  161. data/test/dummy/lib/tasks/cucumber.rake +53 -0
  162. data/test/dummy/lib/tasks/dbs.rake +30 -0
  163. data/test/dummy/lib/tasks/sample_cars.rake +18 -0
  164. data/test/dummy/public/.gitkeep +0 -0
  165. data/test/dummy/script/cucumber +10 -0
  166. data/test/dummy/script/rails +6 -0
  167. data/test/dummy/test/factories.rb +30 -0
  168. data/test/dummy/test/test_helper.rb +7 -0
  169. data/test/integration/navigation_test.rb +10 -0
  170. data/test/test_helper.rb +15 -0
  171. data/test/unit/admin_data/model_finder_test.rb +16 -0
  172. data/test/unit/car_test.rb +96 -0
  173. data/test/unit/user_phone_test.rb +19 -0
  174. metadata +253 -0
@@ -0,0 +1,11 @@
1
+ <div class="block rounded">
2
+ <h3>Association Information</h3>
3
+ <div class='content association_info'>
4
+ <% if AdminData::ActiveRecordUtil.new(klass).has_association_info? %>
5
+ <%= render 'admin_data/crud/association/belongs_to_info' , :klass => klass, :model => model %>
6
+ <%= render 'admin_data/crud/association/has_one_info', :klass => klass, :model => model %>
7
+ <%= render 'admin_data/crud/association/has_many_info' , :klass => klass, :model => model %>
8
+ <%= render 'admin_data/crud/association/habtm_info' , :klass => klass, :model => model %>
9
+ <% end %>
10
+ </div>
11
+ </div>
@@ -0,0 +1,7 @@
1
+ <% if AdminData::ActiveRecordUtil.new(klass).declared_belongs_to_association_names.any? %>
2
+ <p class='belongs_to'>
3
+ <strong>belongs_to :</strong>
4
+ &nbsp;
5
+ <%= belongs_to_data(model, klass).html_safe %>
6
+ </p>
7
+ <% end %>
@@ -0,0 +1,7 @@
1
+ <% if AdminData::ActiveRecordUtil.new(klass).declared_habtm_association_names.any? %>
2
+ <p>
3
+ <strong>has_and_belongs_to_many :</strong>
4
+ <%= habtm_data(model, klass).html_safe %>
5
+ &nbsp;
6
+ </p>
7
+ <% end %>
@@ -0,0 +1,7 @@
1
+ <% if AdminData::ActiveRecordUtil.new(klass).declared_has_many_association_names.any? %>
2
+ <p>
3
+ <strong>has_many :</strong>
4
+ <%= has_many_data(model, klass).html_safe %>
5
+ &nbsp;
6
+ </p>
7
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <% if AdminData::ActiveRecordUtil.new(klass).declared_has_one_association_names.any? %>
2
+ <p>
3
+ <strong>has_one :</strong>
4
+ <%= has_one(model, klass).html_safe %>
5
+ </p>
6
+ <% end %>
@@ -0,0 +1,36 @@
1
+ <div id="main">
2
+ <div>
3
+ <h1 class='search_path'>
4
+ <%= link_to @klass, search_path(:klass => @klass.name) %>
5
+ >
6
+ <%= link_to "ID #{@model.id}", ''%>
7
+ </h1>
8
+ <div class='clear'></div>
9
+ </div>
10
+
11
+ <div class="block" id="block-tables">
12
+
13
+ <div class="content rounded">
14
+ <div class="inner umbrella">
15
+ <% url = admin_data_path(:klass => @klass.name, :id => @model.id)
16
+ html_options = {:class => 'form', :method => :put} %>
17
+ <%= form_for @model, :as => @klass.name.underscore.to_sym, :url => url, :html=> html_options do |f| %>
18
+ <%= render 'admin_data/shared/flash_message', :model => @model %>
19
+ <%= render 'admin_data/crud/misc/form', :klass => @klass, :f => f %>
20
+ <% end %>
21
+ </div>
22
+ </div>
23
+
24
+ </div>
25
+ </div>
26
+
27
+ <div id="sidebar">
28
+ <%= render 'admin_data/crud/association/association_info', :klass => @klass, :model => @model %>
29
+ <%= render 'admin_data/crud/misc/modify_record', :model => @model, :klass => @klass %>
30
+ </div>
31
+
32
+ <style type="text/css">
33
+ #main {
34
+ width:70%;
35
+ }
36
+ </style>
@@ -0,0 +1,38 @@
1
+ <% @columns.each do |col| %>
2
+ <div class='col_box'>
3
+ <span class='col_name'><%= col.name %></span>
4
+ <span class='col_type'>[<%= col.type.to_s %>]</span>
5
+ </div>
6
+ <div class='data'>
7
+ <%= form_field(klass, @model, col, f).html_safe %>
8
+ </div>
9
+ <% end %>
10
+
11
+ <% if AdminData::ActiveRecordUtil.new(klass).declared_habtm_association_names.any? %>
12
+ <div class='data'>
13
+ <%= form_field_for_habtm_records(klass, @model, f, '').html_safe %>
14
+ </div>
15
+ <% end %>
16
+
17
+ <div class='group navform' style='padding-top:10px;'>
18
+ <% if params[:action] == 'edit' || params[:action] == 'update' %>
19
+ <% label = 'Update' %>
20
+ <% else %>
21
+ <% label = 'Create' %>
22
+ <% end %>
23
+ <%= f.submit(label, :class => 'button', :disable_with => 'Please wait ...') %>
24
+ </div>
25
+
26
+ <style>
27
+ .col_name {
28
+ color: #222;
29
+ font-size: 15px;
30
+ }
31
+ .col_type {
32
+ color: dimgray;
33
+ }
34
+ .col_box {
35
+ margin-top: 20px;
36
+ padding-bottom: 4px;
37
+ }
38
+ </style>
@@ -0,0 +1,18 @@
1
+ <% if controller.send(:is_allowed_to_update?) %>
2
+ <div class="block rounded">
3
+ <h3>Modify Record</h3>
4
+ <div style='padding-left:15px'>
5
+ <p>
6
+ <%= link_to 'Edit', edit_path(:klass => klass.name.underscore, :id => model.id) %>
7
+ </p>
8
+ <p>
9
+ <%= link_to 'Delete', del_path(:klass => klass.name.underscore, :id => model.id) ,
10
+ { :confirm => ' You are deleting (not destroying) a record. Are you sure?', :method => :delete} %>
11
+ </p>
12
+ <p>
13
+ <%= link_to "Destroy", admin_data_path(:klass => klass.name.underscore, :id => model.id),
14
+ { :confirm => 'You are destroying a record. Are you sure?', :method => :delete} %>
15
+ </p>
16
+ </div>
17
+ </div>
18
+ <% end %>
@@ -0,0 +1,25 @@
1
+ <div id="main">
2
+
3
+ <%= breadcrum do %>
4
+ <%= link_to @klass, search_path(:klass => @klass.name) %>
5
+ <% end %>
6
+
7
+ <div class="block" id="block-tables">
8
+ <div class="secondary-navigation">
9
+ <%= render 'admin_data/shared/secondary_navigation', :klass => @klass %>
10
+ <div class="clear"></div>
11
+ </div>
12
+
13
+ <div class="content rounded">
14
+ <div class="inner umbrella">
15
+ <h1>Create a new record</h1>
16
+ <%= form_for @model, :as => @klass.name.underscore.to_sym,
17
+ :url => index_path(:klass => @klass.name),
18
+ :html => {:class => 'form', :method => :post} do |f| %>
19
+ <%= render 'admin_data/shared/flash_message', :model => @model %>
20
+ <%= render 'admin_data/crud/misc/form', :klass => @klass, :f => f %>
21
+ <% end %>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </div>
@@ -0,0 +1,42 @@
1
+ <div id="main">
2
+
3
+ <div>
4
+ <h1 class='search_path'>
5
+ <%= link_to @klass, search_path(:klass => @klass.name) %>
6
+ >
7
+ <%= link_to "ID #{@model.id}", ''%>
8
+ </h1>
9
+ <div class='clear'></div>
10
+ </div>
11
+
12
+ <%= render 'admin_data/shared/flash_message', :model => @model %>
13
+
14
+ <div class="block" id="block-tables">
15
+ <div class="content rounded">
16
+ <div class="inner">
17
+ <table class="table with_border" cellspacing="3" cellpadding="3">
18
+ <% AdminData::Util.label_values_pair_for(@model, self).each do |pair| %>
19
+ <tr>
20
+ <td><%=pair[0]%></td>
21
+ <td class='smaller'><%=pair[1]%></td>
22
+ </tr>
23
+ <% end %>
24
+ </table>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </div>
29
+
30
+ <div id="sidebar">
31
+ <%= render 'admin_data/crud/association/association_info', :klass => @klass, :model => @model %>
32
+ <%= render 'admin_data/crud/misc/modify_record', :model => @model, :klass => @klass %>
33
+ </div>
34
+
35
+ <style>
36
+ #main {
37
+ width:70%;
38
+ }
39
+ table.with_border td.smaller {
40
+ font-size: 120%;
41
+ }
42
+ </style>
@@ -0,0 +1,25 @@
1
+ xml.instruct! :xml, :version => "1.0"
2
+ xml.rss(:version => "2.0" ){
3
+ xml.channel{
4
+ xml.title(@title)
5
+ xml.link(request.host_with_port)
6
+ xml.description(@description)
7
+ xml.language('en-us')
8
+ h = {:order => "#{@klass.primary_key} desc", :limit => 100}
9
+ @records.each do |record|
10
+ xml.item do
11
+ xml.title("#{@klasss} id: #{record.id}")
12
+
13
+ desc = AdminData::Util.label_values_pair_for(record, self).inject([]) do |sum, a|
14
+ sum << "<p>#{a[0]}: #{a[1]}</p>"
15
+ end.join
16
+
17
+ xml.description(desc)
18
+ d = record.respond_to?(:created_at) ? record.created_at : Time.now
19
+ xml.pubDate(d.strftime("%a, %d %b %Y %H:%M:%S %z"))
20
+ xml.link(admin_data_url(:id => record, :klass => @klass.name))
21
+ xml.guid(admin_data_url(:id => record, :klass => @klass.name))
22
+ end
23
+ end
24
+ }
25
+ }
@@ -0,0 +1,21 @@
1
+ <div id="main">
2
+ <div class="block" id="block-tables">
3
+ <div class="content rounded select_box">
4
+ <h2 id='main_page_label'>Select from the drop down menu above</h2>
5
+ <div class="clear"></div>
6
+ </div>
7
+ </div>
8
+ </div>
9
+
10
+ <style>
11
+ #main_page_label {
12
+ margin-left: 0;
13
+ }
14
+ .select_box {
15
+ padding: 15px;
16
+ }
17
+ p.notice {
18
+ color: dimgray;
19
+ font-size:15px;
20
+ }
21
+ </style>
@@ -0,0 +1,18 @@
1
+ <div id="main">
2
+ <div class="block" id="block-tables">
3
+ <div class="content rounded">
4
+ <h2 class="title">Migration Information from schema_migrations table</h2>
5
+ <div class="inner">
6
+ <table class="table colorize">
7
+ <tr>
8
+ <th class='first last'>version</th>
9
+ </tr>
10
+ <% @data.each do |record| %>
11
+ <tr><td><%=record.values.first%></td></tr>
12
+ <% end %>
13
+ </table>
14
+ </div>
15
+ <div class="clear"></div>
16
+ </div>
17
+ </div>
18
+ </div>
@@ -0,0 +1,51 @@
1
+ <!DOCTYPE html>
2
+ <html id="html">
3
+ <head>
4
+ <title>admin_data JavaScript test</title>
5
+ <%= AdminData::Util.stylesheet_link_tag('vendor/qunit') %>
6
+ <%= AdminData::Util.javascript_include_tag( 'vendor/jquery-1.4.1',
7
+ 'vendor/jquery-ui-1.7.2.custom.min',
8
+ 'vendor/log',
9
+ 'vendor/jquery.form',
10
+ 'vendor/jquery.ba-isjquery',
11
+ 'vendor/jack',
12
+ 'misc/drop_down_change',
13
+ 'misc/quick_search_input_focus',
14
+ 'misc/js_util',
15
+ 'advance_search/global_ajax_setting',
16
+ 'advance_search/advance_search',
17
+ 'advance_search/advance_search_structure',
18
+ 'advance_search/ajaxify_advance_search',
19
+ 'advance_search/act_on_result',
20
+ 'advance_search/build_first_row',
21
+ 'advance_search/event_bindings',
22
+ 'advance_search/trigger_submit_on_domready',
23
+ 'vendor/qunit',
24
+ 'test/ajaxify_advance_search',
25
+ 'test/act_on_result',
26
+ 'test/build_first_row',
27
+ 'test/event_bindings',
28
+ 'test/advance_search'
29
+ ) %>
30
+ </head>
31
+
32
+ <body id="body">
33
+
34
+ <h1 id="qunit-header">admin_data JavaScript test</h1>
35
+ <h2 id="qunit-banner"></h2>
36
+ <h2 id="qunit-userAgent"></h2>
37
+ <ol id="qunit-tests">
38
+ </ol>
39
+
40
+ <div id='advance_search' class='search_box' style='display:none;'>
41
+ <table id='advance_search_table' class='advtable'>
42
+ </table>
43
+ </div>
44
+
45
+ <div style='display:none;' id='admin_data_table_structure_data'>
46
+ [{id:'integer',first_name:'string',last_name:'string',age:'integer',active:'booleant',description:'text',society_type:'string',society_id:'integer',created_at:'datetime',updated_at:'datetime',birth_date:'datetime'}]
47
+ </div>
48
+
49
+ </body>
50
+
51
+ </html>
@@ -0,0 +1 @@
1
+ <%= render 'admin_data/search/search/advance_search_form', :klass => @klass %>
@@ -0,0 +1 @@
1
+ <%= render 'admin_data/search/search/search_form', :klass => @klass %>
@@ -0,0 +1,52 @@
1
+ <%= form_tag(advance_search_path(:klass => klass),
2
+ :method => 'get',
3
+ :class => 'form search_form',
4
+ :id => 'advance_search_form') %>
5
+
6
+ <div id='advance_search' class='search_box'>
7
+ <table id='advance_search_table' class='advtable'>
8
+ </table>
9
+ <input type="hidden" id="advance_search_sortby" name="sortby" value="<%=params[:sortby]%>" />
10
+
11
+ <div class='sortby_umbrella'>
12
+ <div class='clear'></div>
13
+ <input type="submit" value="Search" class='submit_search' />
14
+ </div>
15
+ </div>
16
+
17
+ </form>
18
+
19
+ <div style='display:none;' id='primary_column_type_info'>
20
+ <%=@column_type_info%>
21
+ </div>
22
+ <div style='display:none;' id='association_info'>
23
+ <%=@association_info%>
24
+ </div>
25
+
26
+ <style>
27
+ .sortby_umbrella {
28
+ margin-top: 6px;
29
+ }
30
+ .sortby_umbrella .group {
31
+ padding-left: 20px;
32
+ }
33
+ .sortby_umbrella .sortby_text {
34
+ font-size: 16px;
35
+ }
36
+ .submit_search {
37
+ margin-left: 15px;
38
+ margin-right: 20px;
39
+ }
40
+ .sortby_umbrella .group {
41
+ float: left;
42
+ }
43
+ .sortby_text {
44
+ float: left;
45
+ margin-right: 5px;
46
+ }
47
+ #sortby {
48
+ width: 200px;
49
+ float: left;
50
+ }
51
+ </style>
52
+
@@ -0,0 +1,5 @@
1
+ <div>
2
+ <% errors.each do |error| %>
3
+ <p class='error'><%= error %></p>
4
+ <% end %>
5
+ </div>
@@ -0,0 +1,43 @@
1
+ <%= render :partial => 'admin_data/search/search/title', :locals => {
2
+ :records => @records,
3
+ :total_num_of_children => @total_num_of_children } %>
4
+
5
+ <div class="pagination">
6
+ <%= will_paginate @records, :container => false, :params => {:klass => klass.name.underscore} %>
7
+ </div>
8
+ <div class='clear'></div>
9
+
10
+ <table cellspacing="3" cellpadding="3" id="view_table" class='table colorize'>
11
+
12
+ <thead>
13
+ <tr class='thead'>
14
+ <% columns_order(klass).each do |column| %>
15
+ <th class='<%=get_sort_class(column)%>' data-sortby='<%=get_sort_order(column)%>'>
16
+ <%= get_sort_title_with_url(column, klass) %>
17
+ </th>
18
+ <% end %>
19
+ </tr>
20
+ </thead>
21
+
22
+ <tbody>
23
+ <% @records.each do |record| %>
24
+ <tr>
25
+ <% columns_order(klass).each do |column| %>
26
+ <td>
27
+ <% if (column == klass.primary_key) %>
28
+ <%= link_to(record.send(column), admin_data_path(:klass => klass.name.underscore, :id => record_id(record))) %>
29
+ <% else %>
30
+ <%=h get_value_for_column(column_native(klass, column), record) %>
31
+ <% end %>
32
+ </td>
33
+ <% end %>
34
+ </tr>
35
+ <% end %>
36
+ </tbody>
37
+ </table>
38
+
39
+ <div class="pagination">
40
+ <%= will_paginate @records, :container => false, :params => {:klass => klass.name.underscore} %>
41
+ </div>
42
+
43
+ <div class='clear'></div>