admin_data 1.0.22 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. data/History.txt +23 -16
  2. data/README.md +1 -1
  3. data/Rakefile +2 -2
  4. data/app/controllers/admin_data/application_controller.rb +111 -0
  5. data/app/controllers/admin_data/crud_controller.rb +100 -0
  6. data/app/controllers/admin_data/feed_controller.rb +38 -16
  7. data/app/controllers/admin_data/home_controller.rb +11 -0
  8. data/app/controllers/admin_data/migration_controller.rb +12 -12
  9. data/app/controllers/admin_data/public_controller.rb +29 -19
  10. data/app/controllers/admin_data/search_controller.rb +99 -103
  11. data/app/controllers/admin_data/table_structure_controller.rb +25 -0
  12. data/app/helpers/admin_data/application_helper.rb +287 -0
  13. data/app/views/admin_data/crud/association/_association_info.html.erb +11 -0
  14. data/app/views/admin_data/crud/association/_belongs_to_info.html.erb +7 -0
  15. data/app/views/admin_data/{main → crud}/association/_habtm_info.html.erb +3 -3
  16. data/app/views/admin_data/{main → crud}/association/_has_many_info.html.erb +3 -3
  17. data/app/views/admin_data/crud/association/_has_one_info.html.erb +6 -0
  18. data/app/views/admin_data/{main → crud}/edit.html.erb +9 -9
  19. data/app/views/admin_data/{main → crud}/misc/_form.html.erb +6 -6
  20. data/app/views/admin_data/{main → crud}/misc/_modify_record.html.erb +4 -4
  21. data/app/views/admin_data/{main → crud}/new.html.erb +7 -7
  22. data/app/views/admin_data/{main → crud}/show.html.erb +10 -10
  23. data/app/views/admin_data/{main → home}/index.html.erb +2 -2
  24. data/app/views/admin_data/migration/index.html.erb +3 -3
  25. data/app/views/admin_data/search/_search_base.html.erb +5 -5
  26. data/app/views/admin_data/search/quick_search.html.erb +4 -4
  27. data/app/views/admin_data/search/search/_listing.html.erb +11 -9
  28. data/app/views/admin_data/search/search/_sortby.html.erb +4 -3
  29. data/app/views/admin_data/search/search/_title.html.erb +7 -7
  30. data/app/views/admin_data/shared/_breadcrum.html.erb +11 -5
  31. data/app/views/admin_data/shared/_header.html.erb +6 -6
  32. data/app/views/admin_data/shared/_secondary_navigation.html.erb +13 -14
  33. data/app/views/admin_data/{main/table_structure.html.erb → table_structure/index.html.erb} +11 -11
  34. data/app/views/layouts/admin_data.html.erb +15 -15
  35. data/config/routes.rb +3 -3
  36. data/lib/admin_data.rb +29 -6
  37. data/lib/admin_data/active_record_util.rb +38 -6
  38. data/lib/admin_data/configuration.rb +113 -0
  39. data/lib/admin_data/deprecation.rb +31 -0
  40. data/lib/admin_data/railtie.rb +2 -7
  41. data/lib/admin_data/search.rb +1 -1
  42. data/lib/admin_data/util.rb +74 -161
  43. data/lib/admin_data/version.rb +1 -1
  44. data/test/rails_root/app/controllers/application_controller.rb +3 -0
  45. data/test/rails_root/app/helpers/application_helper.rb +5 -0
  46. data/test/rails_root/app/models/city.rb +22 -0
  47. data/test/rails_root/app/models/club.rb +3 -0
  48. data/test/rails_root/app/models/newspaper.rb +4 -0
  49. data/test/rails_root/app/models/phone_number.rb +3 -0
  50. data/test/rails_root/app/models/user.rb +17 -0
  51. data/test/rails_root/app/models/website.rb +3 -0
  52. data/test/rails_root/config/application.rb +42 -0
  53. data/test/rails_root/config/boot.rb +13 -0
  54. data/test/rails_root/config/environment.rb +5 -0
  55. data/test/rails_root/config/environments/development.rb +22 -0
  56. data/test/rails_root/config/environments/production.rb +49 -0
  57. data/test/rails_root/config/environments/test.rb +35 -0
  58. data/test/rails_root/config/initializers/admin_data.rb +22 -0
  59. data/test/rails_root/config/initializers/backtrace_silencers.rb +7 -0
  60. data/test/rails_root/config/initializers/empty_spaces_to_nil.rb +10 -0
  61. data/test/rails_root/config/initializers/inflections.rb +10 -0
  62. data/test/rails_root/config/initializers/mime_types.rb +5 -0
  63. data/test/rails_root/config/initializers/secret_token.rb +7 -0
  64. data/test/rails_root/config/initializers/session_store.rb +8 -0
  65. data/test/rails_root/config/routes.rb +9 -0
  66. data/test/rails_root/db/migrate/20091030202259_create_users.rb +55 -0
  67. data/test/rails_root/db/schema.rb +63 -0
  68. data/test/rails_root/db/seeds.rb +40 -0
  69. data/test/rails_root/features/step_definitions/advance_search_steps.rb +13 -0
  70. data/test/rails_root/features/step_definitions/app_steps.rb +40 -0
  71. data/test/rails_root/features/step_definitions/async.rb +18 -0
  72. data/test/rails_root/features/step_definitions/crud_show_steps.rb +37 -0
  73. data/test/rails_root/features/step_definitions/feed_steps.rb +3 -0
  74. data/test/rails_root/features/step_definitions/quick_search_steps.rb +65 -0
  75. data/test/rails_root/features/step_definitions/util.rb +86 -0
  76. data/test/rails_root/features/step_definitions/web_steps.rb +219 -0
  77. data/test/rails_root/features/support/env.rb +68 -0
  78. data/test/rails_root/features/support/paths.rb +33 -0
  79. data/test/rails_root/test/factories.rb +30 -0
  80. data/test/rails_root/test/performance/browsing_test.rb +9 -0
  81. data/test/rails_root/test/test_helper.rb +13 -0
  82. metadata +100 -49
  83. data/app/controllers/admin_data/base_controller.rb +0 -112
  84. data/app/controllers/admin_data/main_controller.rb +0 -141
  85. data/app/views/admin_data/main/association/_association_info.html.erb +0 -11
  86. data/app/views/admin_data/main/association/_belongs_to_info.html.erb +0 -7
  87. data/app/views/admin_data/main/association/_has_one_info.html.erb +0 -6
  88. data/lib/admin_data/chelper.rb +0 -37
  89. data/lib/admin_data/helpers.rb +0 -271
  90. data/lib/admin_data/settings.rb +0 -67
  91. data/lib/css/base.css +0 -1108
  92. data/lib/css/vendor/jquery-ui-1.7.2.custom.css +0 -406
  93. data/lib/js/advance_search/act_on_result.js +0 -45
  94. data/lib/js/advance_search/advance_search.js +0 -83
  95. data/lib/js/advance_search/advance_search_structure.js +0 -79
  96. data/lib/js/advance_search/ajaxify_advance_search.js +0 -28
  97. data/lib/js/advance_search/build_first_row.js +0 -8
  98. data/lib/js/advance_search/event_bindings.js +0 -76
  99. data/lib/js/advance_search/global_ajax_setting.js +0 -10
  100. data/lib/js/advance_search/trigger_submit_on_domready.js +0 -6
  101. data/lib/js/misc/drop_down_change.js +0 -8
  102. data/lib/js/misc/js_util.js +0 -58
  103. data/lib/js/misc/quick_search_input_focus.js +0 -6
  104. data/lib/js/test/act_on_result.js +0 -120
  105. data/lib/js/test/advance_search.js +0 -80
  106. data/lib/js/test/ajaxify_advance_search.js +0 -29
  107. data/lib/js/test/build_first_row.js +0 -10
  108. data/lib/js/test/event_bindings.js +0 -100
  109. data/lib/js/vendor/jack.js +0 -903
  110. data/lib/js/vendor/jquery-1.4.2.js +0 -6240
  111. data/lib/js/vendor/jquery-ui-1.7.2.custom.min.js +0 -298
  112. data/lib/js/vendor/jquery.ba-isjquery.js +0 -21
  113. data/lib/js/vendor/jquery.form.js +0 -814
  114. data/lib/js/vendor/log.js +0 -9
  115. data/lib/js/vendor/qunit.js +0 -1043
  116. data/lib/js/vendor/rails.js +0 -132
@@ -0,0 +1,11 @@
1
+ <div class="block rounded">
2
+ <h3>Association Information</h3>
3
+ <div class='content association_info'>
4
+ <% if AdminData::ActiveRecordUtil.has_association_info?(klass) %>
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.declared_belongs_to_association_names(klass).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 %>
@@ -1,7 +1,7 @@
1
1
  <% if AdminData::ActiveRecordUtil.declared_habtm_association_names(klass).any? %>
2
2
  <p>
3
3
  <strong>has_and_belongs_to_many :</strong>
4
- <%= admin_data_habtm_data(model, klass).html_safe %>
4
+ <%= habtm_data(model, klass).html_safe %>
5
5
  &nbsp;
6
- </p>
7
- <% end %>
6
+ </p>
7
+ <% end %>
@@ -1,7 +1,7 @@
1
1
  <% if AdminData::ActiveRecordUtil.declared_has_many_association_names(klass).any? %>
2
2
  <p>
3
3
  <strong>has_many :</strong>
4
- <%= admin_data_has_many_data(model, klass).html_safe %>
4
+ <%= has_many_data(model, klass).html_safe %>
5
5
  &nbsp;
6
- </p>
7
- <% end %>
6
+ </p>
7
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <% if AdminData::ActiveRecordUtil.declared_has_one_association_names(klass).any? %>
2
+ <p>
3
+ <strong>has_one :</strong>
4
+ <%= has_one(model, klass).html_safe %>
5
+ </p>
6
+ <% end %>
@@ -1,22 +1,22 @@
1
1
  <div id="main">
2
2
  <div>
3
3
  <h1 class='search_path'>
4
- <%= link_to @klass, admin_data_search_path(:klass => @klass.name) %>
4
+ <%= link_to @klass, admin_data_search_path(:klass => @klass.name) %>
5
5
  >
6
- <%= link_to "ID #{@model.id}", ''%>
6
+ <%= link_to "ID #{@model.id}", ''%>
7
7
  </h1>
8
8
  <div class='clear'></div>
9
9
  </div>
10
10
 
11
11
  <div class="block" id="block-tables">
12
12
 
13
- <div class="content rounded">
13
+ <div class="content rounded">
14
14
  <div class="inner umbrella">
15
- <% url = admin_data_path(:klass => @klass.name, :id => @model)
15
+ <% url = admin_data_path(:klass => @klass.name, :id => @model)
16
16
  html_options = {:class => 'form', :method => :put} %>
17
17
  <%= form_for @model, :as => @klass.name.underscore.to_sym, :url => url, :html=> html_options do |f| %>
18
18
  <%= render 'admin_data/shared/flash_message', :model => @model %>
19
- <%= render 'admin_data/main/misc/form', :klass => @klass, :f => f %>
19
+ <%= render 'admin_data/crud/misc/form', :klass => @klass, :f => f %>
20
20
  <% end %>
21
21
  </div>
22
22
  </div>
@@ -25,12 +25,12 @@
25
25
  </div>
26
26
 
27
27
  <div id="sidebar">
28
- <%= render 'admin_data/main/association/association_info', :klass => @klass, :model => @model %>
29
- <%= render 'admin_data/main/misc/modify_record', :model => @model, :klass => @klass %>
30
- </div>
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
31
 
32
32
  <style type="text/css">
33
33
  #main {
34
34
  width:70%;
35
35
  }
36
- </style>
36
+ </style>
@@ -4,13 +4,13 @@
4
4
  <span class='col_type'>[<%= col.type.to_s %>]</span>
5
5
  </div>
6
6
  <div class='data'>
7
- <%= admin_data_form_field(klass, @model, col, f).html_safe %>
8
- </div>
7
+ <%= form_field(klass, @model, col, f).html_safe %>
8
+ </div>
9
9
  <% end %>
10
10
 
11
11
  <% if AdminData::ActiveRecordUtil.declared_habtm_association_names(klass).any? %>
12
12
  <div class='data'>
13
- <%= admin_data_form_field_for_habtm_records(klass, @model, f, '').html_safe %>
13
+ <%= form_field_for_habtm_records(klass, @model, f, '').html_safe %>
14
14
  </div>
15
15
  <% end %>
16
16
 
@@ -24,15 +24,15 @@
24
24
  </div>
25
25
 
26
26
  <style>
27
- .col_name {
27
+ .col_name {
28
28
  color: #222;
29
29
  font-size: 15px;
30
30
  }
31
31
  .col_type {
32
32
  color: dimgray;
33
33
  }
34
- .col_box {
34
+ .col_box {
35
35
  margin-top: 20px;
36
36
  padding-bottom: 4px;
37
37
  }
38
- </style>
38
+ </style>
@@ -1,16 +1,16 @@
1
- <% if controller.send(:admin_data_is_allowed_to_update?) %>
1
+ <% if controller.send(:is_allowed_to_update?) %>
2
2
  <div class="block rounded">
3
3
  <h3>Modify Record</h3>
4
4
  <div style='padding-left:15px'>
5
5
  <p>
6
- <%= link_to 'Edit', admin_data_edit_path(:klass => klass.name.underscore, :id => model) %>
6
+ <%= link_to 'Edit', admin_data_edit_path(:klass => klass.name.underscore, :id => model) %>
7
7
  </p>
8
8
  <p>
9
9
  <%= link_to 'Delete', admin_data_del_path(:klass => klass.name.underscore, :id => model) ,
10
- { :confirm => ' You are deleting (not destroying) a record. Are you sure?', :method => :delete} %>
10
+ { :confirm => ' You are deleting (not destroying) a record. Are you sure?', :method => :delete} %>
11
11
  </p>
12
12
  <p>
13
- <%= link_to "Destroy", admin_data_path(:klass => klass.name.underscore, :id => model),
13
+ <%= link_to "Destroy", admin_data_path(:klass => klass.name.underscore, :id => model),
14
14
  { :confirm => 'You are destroying a record. Are you sure?', :method => :delete} %>
15
15
  </p>
16
16
  </div>
@@ -1,23 +1,23 @@
1
1
  <div id="main">
2
2
 
3
- <%= admin_data_breadcrum do %>
4
- <%= link_to @klass, admin_data_search_path(:klass => @klass.name) %>
3
+ <%= breadcrum do %>
4
+ <%= link_to @klass, admin_data_search_path(:klass => @klass.name) %>
5
5
  <% end %>
6
6
 
7
7
  <div class="block" id="block-tables">
8
8
  <div class="secondary-navigation">
9
9
  <%= render 'admin_data/shared/secondary_navigation', :klass => @klass %>
10
10
  <div class="clear"></div>
11
- </div>
11
+ </div>
12
12
 
13
- <div class="content rounded">
13
+ <div class="content rounded">
14
14
  <div class="inner umbrella">
15
15
  <h1>Create a new record</h1>
16
- <%= form_for @model, :as => @klass.name.underscore.to_sym,
17
- :url => admin_data_index_path(:klass => @klass.name),
16
+ <%= form_for @model, :as => @klass.name.underscore.to_sym,
17
+ :url => admin_data_index_path(:klass => @klass.name),
18
18
  :html => {:class => 'form', :method => :post} do |f| %>
19
19
  <%= render 'admin_data/shared/flash_message', :model => @model %>
20
- <%= render 'admin_data/main/misc/form', :klass => @klass, :f => f %>
20
+ <%= render 'admin_data/crud/misc/form', :klass => @klass, :f => f %>
21
21
  <% end %>
22
22
  </div>
23
23
  </div>
@@ -2,25 +2,25 @@
2
2
 
3
3
  <div>
4
4
  <h1 class='search_path'>
5
- <%= link_to @klass, admin_data_search_path(:klass => @klass.name) %>
5
+ <%= link_to @klass, admin_data_search_path(:klass => @klass.name) %>
6
6
  >
7
- <%= link_to "ID #{@model.id}", ''%>
7
+ <%= link_to "ID #{@model.id}", ''%>
8
8
  </h1>
9
9
  <div class='clear'></div>
10
10
  </div>
11
11
 
12
12
  <%= render 'admin_data/shared/flash_message', :model => @model %>
13
-
13
+
14
14
  <div class="block" id="block-tables">
15
- <div class="content rounded">
15
+ <div class="content rounded">
16
16
  <div class="inner">
17
17
  <table class="table with_border" cellspacing="3" cellpadding="3">
18
18
  <% AdminData::Util.label_values_pair_for(@model, self).each do |pair| %>
19
19
  <tr>
20
20
  <td><%=pair[0]%></td>
21
21
  <td class='smaller'><%=pair[1]%></td>
22
- </tr>
23
- <% end %>
22
+ </tr>
23
+ <% end %>
24
24
  </table>
25
25
  </div>
26
26
  </div>
@@ -28,9 +28,9 @@
28
28
  </div>
29
29
 
30
30
  <div id="sidebar">
31
- <%= render 'admin_data/main/association/association_info', :klass => @klass, :model => @model %>
32
- <%= render 'admin_data/main/misc/modify_record', :model => @model, :klass => @klass %>
33
- </div>
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
34
 
35
35
  <style>
36
36
  #main {
@@ -39,4 +39,4 @@
39
39
  table.with_border td.smaller {
40
40
  font-size: 120%;
41
41
  }
42
- </style>
42
+ </style>
@@ -1,6 +1,6 @@
1
1
  <div id="main">
2
2
  <div class="block" id="block-tables">
3
- <div class="content rounded select_box">
3
+ <div class="content rounded select_box">
4
4
  <h2 id='main_page_label'>Select from the drop down menu above</h2>
5
5
  <div class="clear"></div>
6
6
  </div>
@@ -18,4 +18,4 @@
18
18
  color: dimgray;
19
19
  font-size:15px;
20
20
  }
21
- </style>
21
+ </style>
@@ -1,15 +1,15 @@
1
1
  <div id="main">
2
2
  <div class="block" id="block-tables">
3
- <div class="content rounded">
3
+ <div class="content rounded">
4
4
  <h2 class="title">Migration Information from schema_migrations table</h2>
5
5
  <div class="inner">
6
6
  <table class="table colorize">
7
- <tr>
7
+ <tr>
8
8
  <th class='first last'>version</th>
9
9
  </tr>
10
10
  <% @data.each do |record| %>
11
11
  <tr><td><%=record.values.first%></td></tr>
12
- <% end %>
12
+ <% end %>
13
13
  </table>
14
14
  </div>
15
15
  <div class="clear"></div>
@@ -10,21 +10,21 @@
10
10
  <div class="secondary-navigation">
11
11
  <%= render 'admin_data/shared/secondary_navigation', :klass => klass %>
12
12
  <div class="clear"></div>
13
- </div>
13
+ </div>
14
14
 
15
- <div class="content">
15
+ <div class="content">
16
16
  <% if advance_search %>
17
17
  <%= render 'admin_data/search/search/advance_search_form', :klass => klass %>
18
18
  <% else %>
19
19
  <%= render 'admin_data/search/search/search_form', :klass => klass %>
20
- <% end %>
20
+ <% end %>
21
21
  </div>
22
22
 
23
23
  <div class='clear'></div>
24
24
 
25
- <div class='main2 rounded'>
25
+ <div class='main2 rounded'>
26
26
  <div class="block" id="block-tables">
27
- <div class="content">
27
+ <div class="content">
28
28
  <div class='inner'>
29
29
  <div id='results'>
30
30
  <% if params[:action] == 'quick_search' %>
@@ -1,6 +1,6 @@
1
1
  <div id='main'>
2
- <%= render '/admin_data/search/search_base' , :klass => @klass,
3
- :model => @model,
4
- :records => @records,
2
+ <%= render '/admin_data/search/search_base' , :klass => @klass,
3
+ :model => @model,
4
+ :records => @records,
5
5
  :advance_search => false %>
6
- </div>
6
+ </div>
@@ -1,6 +1,6 @@
1
1
  <%@records = @relation.order(@order).paginate(:page => params[:page]) if @records.nil?%>
2
- <%= render :partial => 'admin_data/search/search/title', :locals => {
3
- :records => @records,
2
+ <%= render :partial => 'admin_data/search/search/title', :locals => {
3
+ :records => @records,
4
4
  :total_num_of_children => @total_num_of_children } %>
5
5
 
6
6
  <div class="pagination">
@@ -12,25 +12,27 @@
12
12
 
13
13
  <thead>
14
14
  <tr>
15
- <% AdminData::Util.columns_order(klass.name).each do |column| %>
16
- <th> <%= column %> </th>
15
+ <% columns_order(klass).each do |column| %>
16
+ <th> <%= column_title(klass, column) %> </th>
17
17
  <% end %>
18
18
  </tr>
19
19
  </thead>
20
20
 
21
+ <tbody>
21
22
  <% @records.each do |record| %>
22
23
  <tr>
23
- <% AdminData::Util.columns_order(klass.name).each do |column| %>
24
+ <% columns_order(klass).each do |column| %>
24
25
  <td>
25
26
  <% if (column == klass.primary_key) %>
26
- <%= link_to(record.send(column), admin_data_path(:klass => klass.name.underscore, :id => record)) %>
27
+ <%= link_to(record.to_param.to_s, admin_data_path(:klass => klass.name.underscore, :id => record)) %>
27
28
  <% else %>
28
- <%=h admin_data_get_value_for_column(admin_data_column_native(klass, column), record) %>
29
- <% end %>
29
+ <%=h get_value_for_column(column_native(klass, column), record) %>
30
+ <% end %>
30
31
  </td>
31
32
  <% end %>
32
33
  </tr>
33
- <% end %>
34
+ <% end %>
35
+ </tbody>
34
36
  </table>
35
37
 
36
38
  <div class="pagination">
@@ -1,12 +1,13 @@
1
1
  <label class='label sortby_label'>Sort by</label>
2
+
2
3
  <select name='sortby' id='sortby'>
3
4
  <%= AdminData::Util.build_sort_options(klass, params[:sortby]).html_safe %>
4
5
  </select>
5
6
 
6
7
  <style>
7
- .sortby_label {
8
+ .sortby_label {
8
9
  float: left;
9
- vertical-align: bottom;
10
+ vertical-align: bottom;
10
11
  margin-left: 40px;
11
12
  width: 70px;
12
13
  }
@@ -14,5 +15,5 @@
14
15
  width: 200px;
15
16
  float: left;
16
17
  }
17
- </style>
18
+ </style>
18
19
 
@@ -1,15 +1,15 @@
1
1
  <div>
2
- <h2 class='title' id='search_result_title'>
2
+ <h2 class='title' id='search_result_title'>
3
3
  <%= search_result_title(total_num_of_children, records) %>
4
4
  </h2>
5
5
 
6
- <% if admin_data_is_allowed_to_update? && params[:action] == 'advance_search' %>
6
+ <% if is_allowed_to_update? && params[:action] == 'advance_search' %>
7
7
  <div class='delete_destroy_box'>
8
8
  <span style=''>
9
9
  <%= link_to 'Delete All', '#', :id => 'advance_search_delete_all' %>
10
10
  </span>
11
11
  |
12
- <span>
12
+ <span>
13
13
  <%= link_to 'Destroy All', '#', :id => 'advance_search_destroy_all' %>
14
14
  </span>
15
15
  </div>
@@ -22,13 +22,13 @@
22
22
  <style>
23
23
  #search_result_title {
24
24
  float: left;
25
- margin-top: 5px;
26
- padding-top: 5px;
25
+ margin-top: 5px;
26
+ padding-top: 5px;
27
27
  }
28
- .delete_destroy_box {
28
+ .delete_destroy_box {
29
29
  float: left;
30
30
  margin-top: 6px;
31
31
  padding-top: 6px;
32
32
  margin-left: 20px;
33
33
  }
34
- </style>
34
+ </style>
@@ -1,10 +1,16 @@
1
1
  <div class='breadcrum rounded'>
2
- <%= link_to 'Home',admin_data_index_path %>
3
- >
2
+ <%= link_to 'Home', admin_data_root_path %>
3
+
4
+ <% unless data.blank? %>
5
+ >
6
+ <% end %>
7
+
4
8
  <%= data %>
9
+
5
10
  <% if params[:klass] && !(params[:action] == 'show') %>
6
11
  <span class='description'>
7
- (<%= pluralize(@klass.count, 'record') %> )
8
- </span>
9
- <% end %>
12
+ (<%= pluralize(@klass.count, 'record') %> )
13
+ </span>
14
+ <% end %>
15
+
10
16
  </div>
@@ -1,13 +1,13 @@
1
1
  <div id="header">
2
- <h1> &nbsp; </h1>
2
+ <h1> &nbsp; </h1>
3
3
 
4
4
  <ul id='subnav'>
5
- <li>
6
- <% label = "Back to Site " + image_tag('https://github.com/neerajdotname/admin_data/raw/master/public/images/site.png', :width => '12') %>
7
- <%= link_to label.html_safe, '/' %>
5
+ <li>
6
+ <% label = "Back to Site " + image_tag('site.png', :width => '12') %>
7
+ <%= link_to label.html_safe, '/' %>
8
8
  </li>
9
- <li>
10
- <%= link_to AdminData::Config.setting[:app_name] , '/admin_data' %>
9
+ <li>
10
+ <%= link_to 'admin_data' , '/admin_data' %>
11
11
  </li>
12
12
  </ul>
13
13