rails_backend 0.0.1.alfa.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +3 -0
  4. data/Rakefile +40 -0
  5. data/app/assets/stylesheets/backend/backend.css +7 -0
  6. data/app/assets/stylesheets/backend/bootstrap_backend_action_bar.less +27 -0
  7. data/app/assets/stylesheets/backend/bootstrap_backend_form.less +9 -0
  8. data/app/assets/stylesheets/backend/bootstrap_backend_layout.less +33 -0
  9. data/app/assets/stylesheets/backend/bootstrap_backend_tables.less +23 -0
  10. data/app/assets/stylesheets/backend/bootstrap_backend_variables.less +4 -0
  11. data/app/assets/stylesheets/backend/style.css.less +36 -0
  12. data/app/controllers/backend/application_controller.rb +30 -0
  13. data/app/views/backend/application/_action_bar.html.erb +19 -0
  14. data/app/views/backend/application/_breadcrumbs.html.erb +4 -0
  15. data/app/views/backend/application/_footer.html.erb +3 -0
  16. data/app/views/backend/application/_form.html.erb +10 -0
  17. data/app/views/backend/application/_navigation.html.erb +9 -0
  18. data/app/views/backend/application/_search.html.erb +7 -0
  19. data/app/views/backend/application/_show.html.erb +10 -0
  20. data/app/views/backend/application/_table.html.erb +32 -0
  21. data/app/views/backend/application/edit.html.erb +9 -0
  22. data/app/views/backend/application/index.html.erb +20 -0
  23. data/app/views/backend/application/new.html.erb +9 -0
  24. data/app/views/backend/application/show.html.erb +8 -0
  25. data/app/views/layouts/backend/application.html.erb +54 -0
  26. data/config/routes.rb +2 -0
  27. data/lib/generators/rails_backend/install/USAGE +8 -0
  28. data/lib/generators/rails_backend/install/install_generator.rb +28 -0
  29. data/lib/generators/rails_backend/register/USAGE +8 -0
  30. data/lib/generators/rails_backend/register/register_generator.rb +8 -0
  31. data/lib/generators/rails_backend/register/templates/controller.rb +2 -0
  32. data/lib/generators/rails_backend/views/USAGE +8 -0
  33. data/lib/generators/rails_backend/views/views_generator.rb +17 -0
  34. data/lib/rails_backend.rb +4 -0
  35. data/lib/rails_backend/engine.rb +5 -0
  36. data/lib/rails_backend/version.rb +3 -0
  37. data/lib/tasks/rails_backend_tasks.rake +4 -0
  38. data/test/dummy/README.rdoc +261 -0
  39. data/test/dummy/Rakefile +7 -0
  40. data/test/dummy/app/assets/stylesheets/backend.css +7 -0
  41. data/test/dummy/app/controllers/application_controller.rb +3 -0
  42. data/test/dummy/app/controllers/backend/blogs_controller.rb +2 -0
  43. data/test/dummy/app/helpers/application_helper.rb +2 -0
  44. data/test/dummy/app/models/blog.rb +3 -0
  45. data/test/dummy/config.ru +4 -0
  46. data/test/dummy/config/application.rb +59 -0
  47. data/test/dummy/config/boot.rb +10 -0
  48. data/test/dummy/config/database.yml +25 -0
  49. data/test/dummy/config/environment.rb +5 -0
  50. data/test/dummy/config/environments/development.rb +37 -0
  51. data/test/dummy/config/environments/production.rb +67 -0
  52. data/test/dummy/config/environments/test.rb +37 -0
  53. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  54. data/test/dummy/config/initializers/inflections.rb +15 -0
  55. data/test/dummy/config/initializers/mime_types.rb +5 -0
  56. data/test/dummy/config/initializers/secret_token.rb +7 -0
  57. data/test/dummy/config/initializers/session_store.rb +8 -0
  58. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  59. data/test/dummy/config/locales/en.bootstrap.yml +17 -0
  60. data/test/dummy/config/locales/en.yml +5 -0
  61. data/test/dummy/config/routes.rb +12 -0
  62. data/test/dummy/db/development.sqlite3 +0 -0
  63. data/test/dummy/db/migrate/20130601205345_create_blogs.rb +10 -0
  64. data/test/dummy/db/schema.rb +23 -0
  65. data/test/dummy/db/test.sqlite3 +0 -0
  66. data/test/dummy/log/development.log +52571 -0
  67. data/test/dummy/log/test.log +1101 -0
  68. data/test/dummy/public/404.html +26 -0
  69. data/test/dummy/public/422.html +26 -0
  70. data/test/dummy/public/500.html +25 -0
  71. data/test/dummy/public/favicon.ico +0 -0
  72. data/test/dummy/script/rails +6 -0
  73. data/test/dummy/test/functional/backend/blogs_controller_test.rb +44 -0
  74. data/test/dummy/test/unit/helpers/blogs_helper_test.rb +4 -0
  75. data/test/dummy/tmp/cache/assets/C04/480/sprockets%2Fe916253589e77964516c50bc26945154 +0 -0
  76. data/test/dummy/tmp/cache/assets/C72/A10/sprockets%2F41c6297382192badb3da1c8659031602 +0 -0
  77. data/test/dummy/tmp/cache/assets/C82/B30/sprockets%2F9d96454e0e133411e3148ae93f7e6214 +0 -0
  78. data/test/dummy/tmp/cache/assets/C84/750/sprockets%2F1fd5cf78958620458a06d80d1119c164 +0 -0
  79. data/test/dummy/tmp/cache/assets/C96/280/sprockets%2F5467a63c843b802f5ec3034da3012c10 +0 -0
  80. data/test/dummy/tmp/cache/assets/C97/DB0/sprockets%2F35df495574c616437d71a381c94ef795 +0 -0
  81. data/test/dummy/tmp/cache/assets/CA7/4A0/sprockets%2Fe6830e784d090c314ba4bc82f3091246 +0 -0
  82. data/test/dummy/tmp/cache/assets/CA7/520/sprockets%2F6332f015311e78b833f8e6d0035d19da +0 -0
  83. data/test/dummy/tmp/cache/assets/CB4/DA0/sprockets%2Fd85092a7772715e6e017f6b4281b73bd +0 -0
  84. data/test/dummy/tmp/cache/assets/CB8/CD0/sprockets%2Fe0729e5a2278703e58a8d9766ae22d22 +0 -0
  85. data/test/dummy/tmp/cache/assets/CB9/500/sprockets%2Fb772c429a9d161973416c0616f9bcf47 +0 -0
  86. data/test/dummy/tmp/cache/assets/CBB/1C0/sprockets%2F361f69855d62d699d53f3c673eb01b13 +0 -0
  87. data/test/dummy/tmp/cache/assets/CC6/610/sprockets%2Fe5575b03971d7335f79e7b756316d7dd +0 -0
  88. data/test/dummy/tmp/cache/assets/CCC/D10/sprockets%2F642e847114fb8ff126a431e42ab062b0 +0 -0
  89. data/test/dummy/tmp/cache/assets/CD3/2D0/sprockets%2F4565eb69e3e5499fb7c581985018d96c +0 -0
  90. data/test/dummy/tmp/cache/assets/CD4/E90/sprockets%2F143cd026ee4a1d440fc586335b7564e1 +0 -0
  91. data/test/dummy/tmp/cache/assets/CD9/A30/sprockets%2F0d00a6ac326b8592711f2265adc879e6 +0 -0
  92. data/test/dummy/tmp/cache/assets/CD9/F00/sprockets%2F45ae0d1d279057182bef4a44ea084448 +0 -0
  93. data/test/dummy/tmp/cache/assets/CEA/F30/sprockets%2Ff4807347ef3f7b842e438cc056c375a4 +0 -0
  94. data/test/dummy/tmp/cache/assets/CF0/150/sprockets%2F0c6310b9d66e49ee3555524e48df68d6 +0 -0
  95. data/test/dummy/tmp/cache/assets/CF4/B10/sprockets%2Fe82846652a53d9886af8bf13b28e5d36 +0 -0
  96. data/test/dummy/tmp/cache/assets/CFF/DD0/sprockets%2Fb8d3f515f40810d00f55f3d632a435bc +0 -0
  97. data/test/dummy/tmp/cache/assets/D0E/F80/sprockets%2F8c2b061e379a23e7c4d207adcf992462 +0 -0
  98. data/test/dummy/tmp/cache/assets/D0F/AE0/sprockets%2F3750438563ad47a8afa742c6089fabd2 +0 -0
  99. data/test/dummy/tmp/cache/assets/D10/4B0/sprockets%2F67d0079da944caf0c73757a2e532d92b +0 -0
  100. data/test/dummy/tmp/cache/assets/D10/860/sprockets%2F7ec2912f2e511269fe56ab86a207e4c5 +0 -0
  101. data/test/dummy/tmp/cache/assets/D14/7D0/sprockets%2Fa83a5d9c357cb5035ec8da94f3839411 +0 -0
  102. data/test/dummy/tmp/cache/assets/D15/840/sprockets%2F74fcd8098fc730c137a526d89e37aa03 +0 -0
  103. data/test/dummy/tmp/cache/assets/D19/380/sprockets%2F365327b8f927eafe81a874acc210578e +0 -0
  104. data/test/dummy/tmp/cache/assets/D1A/C70/sprockets%2F9273768322a00607fda5cd76fe7b93fe +0 -0
  105. data/test/dummy/tmp/cache/assets/D1D/1B0/sprockets%2Fd4b6ad914981665079dedbb47e645b81 +0 -0
  106. data/test/dummy/tmp/cache/assets/D1E/090/sprockets%2F28c4c12de697ae62b6868606bced9904 +0 -0
  107. data/test/dummy/tmp/cache/assets/D24/350/sprockets%2F3fdc7836395873de5b06fa51980e7dc6 +0 -0
  108. data/test/dummy/tmp/cache/assets/D2A/500/sprockets%2F5b11e0cfa4dd815932d103ad350d6e91 +0 -0
  109. data/test/dummy/tmp/cache/assets/D2D/D50/sprockets%2Fd585a06e2ee6203ccb04c8b84150d14d +0 -0
  110. data/test/dummy/tmp/cache/assets/D2E/130/sprockets%2Ff5874d82f6722e92fbe9c9dc1a917685 +0 -0
  111. data/test/dummy/tmp/cache/assets/D33/6F0/sprockets%2F91cf757a52db6e25c4ea4a3c484b3112 +0 -0
  112. data/test/dummy/tmp/cache/assets/D35/730/sprockets%2F6504bafe6a6aed39c7060b04049275ce +0 -0
  113. data/test/dummy/tmp/cache/assets/D39/770/sprockets%2F866ace84a830918ba8bb1da3d92e1801 +0 -0
  114. data/test/dummy/tmp/cache/assets/D39/7B0/sprockets%2F24aae862c8adcf404076e252fd86c072 +0 -0
  115. data/test/dummy/tmp/cache/assets/D3A/C90/sprockets%2F3e55d311298da6b0b61e940fbf4a457e +0 -0
  116. data/test/dummy/tmp/cache/assets/D3A/F60/sprockets%2Fcb4cd9d1514a924f3aa624c9ba275495 +0 -0
  117. data/test/dummy/tmp/cache/assets/D3E/3A0/sprockets%2Fffc62d269104518eb30c9e430169ffda +0 -0
  118. data/test/dummy/tmp/cache/assets/D40/B20/sprockets%2Facf57781412d27fe75e90b9bbb3a9115 +0 -0
  119. data/test/dummy/tmp/cache/assets/D44/0A0/sprockets%2F8b5d80f4704e38bfa88c9622b6b3ad61 +0 -0
  120. data/test/dummy/tmp/cache/assets/D46/420/sprockets%2F5ede0324a6a84649e0c46eda86c264f8 +0 -0
  121. data/test/dummy/tmp/cache/assets/D46/6F0/sprockets%2F5f1277fdb2363ce8556958a1a06bfc5e +0 -0
  122. data/test/dummy/tmp/cache/assets/D46/7A0/sprockets%2F70ea4d706f06bf6f663ffc76d707a820 +0 -0
  123. data/test/dummy/tmp/cache/assets/D4C/000/sprockets%2Ff66e284c565f0e3c5d871a7d0c878db2 +0 -0
  124. data/test/dummy/tmp/cache/assets/D4D/DC0/sprockets%2Fb28ef56458c907e4b109578bcdfdd560 +0 -0
  125. data/test/dummy/tmp/cache/assets/D4E/960/sprockets%2F7339c05581b96fa56ffdfb82d4a6723f +0 -0
  126. data/test/dummy/tmp/cache/assets/D51/AE0/sprockets%2F28395afc3c89e6926b262d38eb6c7f1d +0 -0
  127. data/test/dummy/tmp/cache/assets/D54/950/sprockets%2F6f6a30e879035ec279f13d6ef4be86f5 +0 -0
  128. data/test/dummy/tmp/cache/assets/D55/FD0/sprockets%2Fbfd3e79509de480a67c7895de3c838a1 +0 -0
  129. data/test/dummy/tmp/cache/assets/D6A/F80/sprockets%2F653bde0520dea5cad18b37336bfd8972 +0 -0
  130. data/test/dummy/tmp/cache/assets/D70/B00/sprockets%2F8ab483f02b5b925a82faf162b7fb885b +0 -0
  131. data/test/dummy/tmp/cache/assets/D70/D00/sprockets%2F735f7dcb55000ce2c66d9cdd2e4837c4 +0 -0
  132. data/test/dummy/tmp/cache/assets/D71/B20/sprockets%2Fb9d86e22978ea51e3feaf45a04460ec1 +0 -0
  133. data/test/dummy/tmp/cache/assets/D73/D70/sprockets%2Fc45b3b1e806760c6b3add770de6de589 +0 -0
  134. data/test/dummy/tmp/cache/assets/D74/630/sprockets%2Faa7e8ece0f2d221c2f90c868e290d694 +0 -0
  135. data/test/dummy/tmp/cache/assets/D76/200/sprockets%2Fe992122b94fed06c88aa8c705bf3f53c +0 -0
  136. data/test/dummy/tmp/cache/assets/D79/B70/sprockets%2F8da4a7ef7976da60f832cc932f23f1f2 +0 -0
  137. data/test/dummy/tmp/cache/assets/D83/400/sprockets%2Ff98a92e90e96f1d9fe6fa2052c17bb86 +0 -0
  138. data/test/dummy/tmp/cache/assets/D8A/990/sprockets%2F793936e962f92b15fb1899ac49dfdeab +0 -0
  139. data/test/dummy/tmp/cache/assets/D8B/480/sprockets%2F421dc030c3b036e9958dd27b2ddab7aa +0 -0
  140. data/test/dummy/tmp/cache/assets/D8F/4E0/sprockets%2F1eaef30d1a93af38125025ecc8722efb +0 -0
  141. data/test/dummy/tmp/cache/assets/D92/A50/sprockets%2F6cbfe7d434bc0322771fd62e8d110ebc +0 -0
  142. data/test/dummy/tmp/cache/assets/D97/ED0/sprockets%2F702d4906eb4eef18e61ac42b13a95ebe +0 -0
  143. data/test/dummy/tmp/cache/assets/D9B/9C0/sprockets%2F0a2bfcf1ebf8b08ec441a275559e558a +0 -0
  144. data/test/dummy/tmp/cache/assets/D9B/F60/sprockets%2Fb86c50ee2b91ee8dc13493df4d33c50b +0 -0
  145. data/test/dummy/tmp/cache/assets/D9C/3C0/sprockets%2F2f6bd4fc4ef35bd8dc8382105b3c73e1 +0 -0
  146. data/test/dummy/tmp/cache/assets/D9D/7A0/sprockets%2Fc694aae1240f1f96b8a7c46f26fba9b0 +0 -0
  147. data/test/dummy/tmp/cache/assets/D9E/380/sprockets%2F5ddd2196c41e73b8d8323accbe862bf4 +0 -0
  148. data/test/dummy/tmp/cache/assets/DA9/B40/sprockets%2Fdad72d88594464c77a683d1fc1abd7fa +0 -0
  149. data/test/dummy/tmp/cache/assets/DAB/2B0/sprockets%2F57f2b0f4971bb02f6dd8d9f63ec6f43e +0 -0
  150. data/test/dummy/tmp/cache/assets/DAF/330/sprockets%2F72aeaf5f8693e27fe781faa83169dc4a +0 -0
  151. data/test/dummy/tmp/cache/assets/DBA/800/sprockets%2F946a20da6dd0402fdaf24883d55baaab +0 -0
  152. data/test/dummy/tmp/cache/assets/DBA/B60/sprockets%2F1f22b06d3f5cbebb8ba6f1278c30f3a2 +0 -0
  153. data/test/dummy/tmp/cache/assets/DC1/430/sprockets%2F0c8b1e6e0f8bb3b800e0e3ae3bd3768d +0 -0
  154. data/test/dummy/tmp/cache/assets/DCD/590/sprockets%2F4c5ea0743139f1fbe1e1ecbd5fe7068f +0 -0
  155. data/test/dummy/tmp/cache/assets/DD2/510/sprockets%2F960aeb6cf030c682fecf02dfcf755b59 +0 -0
  156. data/test/dummy/tmp/cache/assets/DD3/320/sprockets%2F02f8798c83c3a51a8b8494cddaeddd0c +0 -0
  157. data/test/dummy/tmp/cache/assets/DDB/F30/sprockets%2F2acb5aef77aeaffc9ec73d5705642688 +0 -0
  158. data/test/dummy/tmp/cache/assets/DFC/200/sprockets%2F4cb4f706af5df34e5df6eaa16f3be911 +0 -0
  159. data/test/dummy/tmp/cache/assets/E03/6C0/sprockets%2F5d395fefdaf621cffb87a5b7b4509aa3 +0 -0
  160. data/test/dummy/tmp/cache/assets/E03/750/sprockets%2F79ff6aec0448e0b269ae9e9baacba472 +0 -0
  161. data/test/dummy/tmp/cache/assets/E07/0D0/sprockets%2F50ff7e88bfa994f7c0c51e3ede61cea0 +0 -0
  162. data/test/dummy/tmp/cache/assets/E0C/560/sprockets%2Fc5fdcac9b8d5fad4f9c503293d65d9c5 +0 -0
  163. data/test/dummy/tmp/cache/assets/E50/230/sprockets%2Fb29ebe863b6cdcde1fa157ab2ce0b36b +0 -0
  164. data/test/dummy/tmp/cache/assets/E53/BF0/sprockets%2Fcdf55b20ad58e13cde31fa4e0cc76dfd +0 -0
  165. data/test/dummy/tmp/cache/assets/EB6/A80/sprockets%2Fdf8adcdbbe1f8a5b8abed32cce24c168 +0 -0
  166. data/test/dummy/tmp/cache/sass/964aa6411bc6c192c74723ef6e789b0bfbfb14e7/backend.scssc +0 -0
  167. data/test/dummy/tmp/cache/sass/964aa6411bc6c192c74723ef6e789b0bfbfb14e7/bootstrap_backend.sassc +0 -0
  168. data/test/dummy/tmp/cache/sass/964aa6411bc6c192c74723ef6e789b0bfbfb14e7/bootstrap_style.sassc +0 -0
  169. data/test/dummy/tmp/cache/sass/964aa6411bc6c192c74723ef6e789b0bfbfb14e7/bootstrap_style.scssc +0 -0
  170. data/test/dummy/tmp/pids/server.pid +1 -0
  171. data/test/integration/navigation_test.rb +10 -0
  172. data/test/rails_backend_test.rb +7 -0
  173. data/test/test_helper.rb +15 -0
  174. metadata +463 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 29fc90c004c7c920162fc2a81ec8e6da28a06167
4
+ data.tar.gz: 761896c71aa82b13868931228196f0818f3c25bc
5
+ SHA512:
6
+ metadata.gz: 860add9d4152d833968c96f20d2f0388dbe6eaac58db6b87cf493d2b1db2d0a77507f4cdc04e989c9e903f1ffd7295221e08b6cde21d7e927eec82d943c93388
7
+ data.tar.gz: 2e12500508749f2155142b60daf273ae438e1a7e149b547af311d8c1cc51121998f0a73bbff80ad86c9ffe8445f7ef3129cb25e8e03e22fcfeee417f902e3856
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2013 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,3 @@
1
+ = RailsBackend
2
+
3
+ This project rocks and uses MIT-LICENSE.
data/Rakefile ADDED
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env rake
2
+ begin
3
+ require 'bundler/setup'
4
+ rescue LoadError
5
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
+ end
7
+ begin
8
+ require 'rdoc/task'
9
+ rescue LoadError
10
+ require 'rdoc/rdoc'
11
+ require 'rake/rdoctask'
12
+ RDoc::Task = Rake::RDocTask
13
+ end
14
+
15
+ RDoc::Task.new(:rdoc) do |rdoc|
16
+ rdoc.rdoc_dir = 'rdoc'
17
+ rdoc.title = 'RailsBackend'
18
+ rdoc.options << '--line-numbers'
19
+ rdoc.rdoc_files.include('README.rdoc')
20
+ rdoc.rdoc_files.include('lib/**/*.rb')
21
+ end
22
+
23
+ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
24
+ load 'rails/tasks/engine.rake'
25
+
26
+
27
+
28
+ Bundler::GemHelper.install_tasks
29
+
30
+ require 'rake/testtask'
31
+
32
+ Rake::TestTask.new(:test) do |t|
33
+ t.libs << 'lib'
34
+ t.libs << 'test'
35
+ t.pattern = 'test/**/*_test.rb'
36
+ t.verbose = false
37
+ end
38
+
39
+
40
+ task :default => :test
@@ -0,0 +1,7 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+
6
+ *= require backend/style
7
+ */
@@ -0,0 +1,27 @@
1
+ #action_bar{
2
+ min-height: 80px;
3
+ background-color: @breadcrumb-backgorund-color;
4
+ padding-right: 20px;
5
+ padding-top: 5px;
6
+ margin-bottom: 30px;
7
+ .breadcrumb{
8
+ background-color: @breadcrumb-backgorund-color;
9
+ margin: 0 0 -13px;
10
+ padding: 8px 3px;
11
+ }
12
+ #actions_buttons{
13
+ .pull-right;
14
+ margin-top: 20px;
15
+ .button{
16
+ .btn;
17
+ .btn-primary;
18
+ }
19
+ a{
20
+ .button
21
+ }
22
+ .destroy_button{
23
+ .button;
24
+ .btn-danger;
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,9 @@
1
+ .form-actions{
2
+ .save_button{
3
+ .btn;
4
+ .btn-primary;
5
+ }
6
+ .cancel_button{
7
+ .btn;
8
+ }
9
+ }
@@ -0,0 +1,33 @@
1
+ // basic layout
2
+ html, body{
3
+ height: 100%;
4
+ padding-left: 0px;
5
+ padding-right: 0px;
6
+ /* The html and body elements cannot have any padding or margin. */
7
+ }
8
+
9
+ /* Wrapper for page content to push down footer */
10
+ #wrap{
11
+ min-height: 100%;
12
+ height: auto !important;
13
+ height: 100%;
14
+ /* Negative indent footer by it's height */
15
+ margin: 0 auto @footer-height-margin;
16
+ }
17
+
18
+ /* Set the fixed height of the footer here */
19
+ #push, footer{
20
+ height: @footer-height;
21
+ }
22
+
23
+ footer{
24
+ background-color: #f5f5f5;
25
+ font-size: 12px;
26
+ padding-right: 20px;
27
+ padding-left: 20px;
28
+ }
29
+
30
+ //navbar
31
+ .navbar{
32
+ margin-bottom: 0px;
33
+ }
@@ -0,0 +1,23 @@
1
+ table{
2
+ .table;
3
+ .field_name{
4
+ font-weight: bold;
5
+ }
6
+ .button{
7
+ .btn;
8
+ .btn-mini;
9
+ }
10
+ .show_button{
11
+ .button;
12
+ }
13
+ .edit_button{
14
+ .button;
15
+ }
16
+ .destroy_button{
17
+ .button;
18
+ .btn-danger;
19
+ }
20
+ }
21
+ .index-table{
22
+ .table-striped;
23
+ }
@@ -0,0 +1,4 @@
1
+ //variables
2
+ @breadcrumb-backgorund-color: #E7E8E9;
3
+ @footer-height: 30px;
4
+ @footer-height-margin: -30px;
@@ -0,0 +1,36 @@
1
+ @import "twitter/bootstrap/bootstrap";
2
+ @import "twitter/bootstrap/responsive";
3
+
4
+ // Set the correct sprite paths
5
+ @iconSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings");
6
+ @iconWhiteSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings-white");
7
+
8
+ // Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
9
+ @fontAwesomeEotPath: asset-url("fontawesome-webfont.eot");
10
+ @fontAwesomeEotPath_iefix: asset-url("fontawesome-webfont.eot#iefix");
11
+ @fontAwesomeWoffPath: asset-url("fontawesome-webfont.woff");
12
+ @fontAwesomeTtfPath: asset-url("fontawesome-webfont.ttf");
13
+ @fontAwesomeSvgPath: asset-url("fontawesome-webfont.svg#fontawesomeregular");
14
+
15
+ // Font Awesome
16
+ @import "fontawesome/font-awesome";
17
+
18
+ // Glyphicons
19
+ //@import "twitter/bootstrap/sprites.less";
20
+
21
+ // Your custom LESS stylesheets goes here
22
+ //
23
+ // Since bootstrap was imported above you have access to its mixins which
24
+ // you may use and inherit here
25
+ //
26
+ // If you'd like to override bootstrap's own variables, you can do so here as well
27
+ // See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation
28
+ //
29
+ // Example:
30
+ // @linkColor: #ff0000;
31
+
32
+ @import "backend/bootstrap_backend_variables";
33
+ @import "backend/bootstrap_backend_layout";
34
+ @import "backend/bootstrap_backend_action_bar";
35
+ @import "backend/bootstrap_backend_tables";
36
+ @import "backend/bootstrap_backend_form";
@@ -0,0 +1,30 @@
1
+ module Backend
2
+ class ApplicationController < InheritedResources::Base
3
+
4
+ helper_method :attributes
5
+
6
+ before_filter :add_breadcrumbs
7
+
8
+ def attributes
9
+ resource_class.attribute_names - %w(id created_at updated_at)
10
+ end
11
+
12
+ protected
13
+ def collection
14
+ @q = end_of_association_chain.search(params[:q])
15
+ get_collection_ivar || set_collection_ivar(@q.result(distinct: true).paginate(:page => params[:page]))
16
+ end
17
+
18
+ def paths
19
+ request.path.split("/")[1..-1]
20
+ end
21
+
22
+ def add_breadcrumbs
23
+ url = ""
24
+ paths.each do |path|
25
+ url = url + "/" + path
26
+ add_breadcrumb path, url
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,19 @@
1
+ <div id="action_bar">
2
+ <%= render 'breadcrumbs' %>
3
+ <div id="actions_buttons">
4
+ <%= link_to t('.new', :default => t("helpers.links.new")),
5
+ new_resource_path, :class => 'new_button' unless current_page?(new_resource_path) %>
6
+
7
+ <% case action_name %>
8
+ <% when "show" %>
9
+ <%= link_to t('.edit', :default => t("helpers.links.edit")),
10
+ edit_resource_path(resource), :class => 'edit_button' %>
11
+ <%= link_to t('.destroy', :default => t("helpers.links.destroy")),
12
+ resource_path(resource), method: :delete, confirm: "Are you sure?", :class => 'destroy_button' %>
13
+ <% when "edit" %>
14
+ <%= link_to t('.show', :default => t("helpers.links.show")),
15
+ resource_path(resource), :class => 'show_button' %>
16
+ <% end %>
17
+ <%= yield :action_buttons %>
18
+ </div>
19
+ </div>
@@ -0,0 +1,4 @@
1
+ <div class="span6">
2
+ <%= render_breadcrumbs %>
3
+ <h2><%= yield :page_title %></h2>
4
+ </div>
@@ -0,0 +1,3 @@
1
+ <footer>
2
+ <p>&copy; Company 2013</p>
3
+ </footer>
@@ -0,0 +1,10 @@
1
+ <%= simple_form_for [ :backend, resource ], :html => { :class => 'form-horizontal' } do |f| %>
2
+ <% attributes.each do |attr| %>
3
+ <%= f.input attr %>
4
+ <% end %>
5
+ <div class="form-actions">
6
+ <%= f.button :submit, :class => 'save_button' %>
7
+ <%= link_to t('.cancel', :default => t("helpers.links.cancel")),
8
+ {action: :index}, :class => 'cancel_button' %>
9
+ </div>
10
+ <% end %>
@@ -0,0 +1,9 @@
1
+ <%= nav_bar brand: "BACKEND", responsive: true do %>
2
+ <%= menu_group do %>
3
+ <%= menu_item "Home" %>
4
+ <% end %>
5
+ <%= menu_group :pull => :right do %>
6
+ <%= menu_item "About Us" %>
7
+ <%= menu_item "Contact" %>
8
+ <% end %>
9
+ <% end %>
@@ -0,0 +1,7 @@
1
+ <%= search_form_for @q, url: collection_path do |f| %>
2
+ <% attributes.each do |attr| %>
3
+ <%= f.label "#{attr}_cont".to_sym %>
4
+ <%= f.text_field "#{attr}_cont".to_sym %>
5
+ <% end %>
6
+ <%= f.submit %>
7
+ <% end %>
@@ -0,0 +1,10 @@
1
+ <table>
2
+ <tbody>
3
+ <% resource_class.attribute_names.each do |attr| %>
4
+ <tr>
5
+ <td class="field_name"><%= resource_class.human_attribute_name(attr) %></td>
6
+ <td class="field_value"><%= resource.public_send(attr) %></td>
7
+ </tr>
8
+ <% end %>
9
+ </tbody>
10
+ </table>
@@ -0,0 +1,32 @@
1
+ <table class="index-table">
2
+ <thead>
3
+ <tr>
4
+ <% attributes.each do |attr|%>
5
+ <th>
6
+ <%= resource_class.human_attribute_name(attr) %>
7
+ </th>
8
+ <% end %>
9
+ <th><%=t '.actions', :default => t("helpers.actions") %></th>
10
+ </tr>
11
+ </thead>
12
+ <tbody>
13
+ <% collection.each do |resource| %>
14
+ <tr>
15
+ <% attributes.each do |attr| %>
16
+ <td><%= resource.public_send(attr).to_s.truncate(20) %></td>
17
+ <% end %>
18
+ <td>
19
+ <%= link_to t('.show', :default => t("helpers.links.show")),
20
+ resource_path(resource), :class => 'show_button' %>
21
+ <%= link_to t('.edit', :default => t("helpers.links.edit")),
22
+ edit_resource_path(resource), :class => 'edit_button' %>
23
+ <%= link_to t('.destroy', :default => t("helpers.links.destroy")),
24
+ resource_path(resource),
25
+ :method => :delete,
26
+ :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
27
+ :class => 'destroy_button' %>
28
+ </td>
29
+ </tr>
30
+ <% end %>
31
+ </tbody>
32
+ </table>
@@ -0,0 +1,9 @@
1
+ <div class="row-fluid">
2
+ <div class="span9">
3
+ <%= content_for :page_title do%>
4
+ Edit <%=t '.title', :default => controller_name.titleize %>
5
+ <% end %>
6
+ <%= bootstrap_flash %>
7
+ <%= render 'form' %>
8
+ </div>
9
+ </div>
@@ -0,0 +1,20 @@
1
+ <div class="row-fluid">
2
+ <div class="span9">
3
+
4
+ <%= content_for :page_title do%>
5
+ <%=t '.title', :default => controller_name.titleize %>
6
+ <% end %>
7
+
8
+ <%= bootstrap_flash %>
9
+ <%= will_paginate %>
10
+ <%= render 'table' %>
11
+ </div>
12
+ <div class="span3">
13
+ <div class="well sidebar-nav">
14
+ <ul class="nav nav-list">
15
+ <li class="nav-header"><%=t '.filtters', :default => "filtters" %></li>
16
+ </ul>
17
+ <%= render 'search' %>
18
+ </div>
19
+ </div>
20
+ </div>
@@ -0,0 +1,9 @@
1
+ <div class="row-fluid">
2
+ <div class="span9">
3
+ <%= content_for :page_title do%>
4
+ New <%=t '.title', :default => controller_name.titleize %>
5
+ <% end %>
6
+ <%= bootstrap_flash %>
7
+ <%= render 'form' %>
8
+ </div>
9
+ </div>
@@ -0,0 +1,8 @@
1
+ <div class="row-fluid">
2
+ <div class="span9">
3
+ <%= content_for :page_title do%>
4
+ <%=t '.title', :default => controller_name.titleize %>
5
+ <% end %>
6
+ <%= render 'show' %>
7
+ </div>
8
+ </div>
@@ -0,0 +1,54 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title><%= content_for?(:title) ? yield(:title) : "Dummy" %></title>
8
+ <%= csrf_meta_tags %>
9
+
10
+ <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
11
+ <!--[if lt IE 9]>
12
+ <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" type="text/javascript"></script>
13
+ <![endif]-->
14
+
15
+ <%= stylesheet_link_tag "backend", :media => "all" %>
16
+
17
+ <!-- For third-generation iPad with high-resolution Retina display: -->
18
+ <!-- Size should be 144 x 144 pixels -->
19
+ <%= favicon_link_tag 'images/apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144' %>
20
+
21
+ <!-- For iPhone with high-resolution Retina display: -->
22
+ <!-- Size should be 114 x 114 pixels -->
23
+ <%= favicon_link_tag 'images/apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114' %>
24
+
25
+ <!-- For first- and second-generation iPad: -->
26
+ <!-- Size should be 72 x 72 pixels -->
27
+ <%= favicon_link_tag 'images/apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72' %>
28
+
29
+ <!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
30
+ <!-- Size should be 57 x 57 pixels -->
31
+ <%= favicon_link_tag 'images/apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png' %>
32
+
33
+ <!-- For all other devices -->
34
+ <!-- Size should be 32 x 32 pixels -->
35
+ <%= favicon_link_tag 'favicon.ico', :rel => 'shortcut icon' %>
36
+ </head>
37
+ <body>
38
+ <div id="wrap">
39
+ <%= render 'navigation' %>
40
+ <%= render 'action_bar'%>
41
+
42
+ <div class="container-fluid">
43
+ <%= bootstrap_flash %>
44
+ <%= yield %>
45
+ </div>
46
+ </div> <!-- /container -->
47
+ <%= render 'footer'%>
48
+
49
+ <!-- Javascripts
50
+ ================================================== -->
51
+ <!-- Placed at the end of the document so the pages load faster -->
52
+ <%= javascript_include_tag "backend" %>
53
+ </body>
54
+ </html>